/*
 * Le Bon Repos — gallery page styles
 */

.page-gallery .site-content-inner.safar-container { max-width: none; padding: 0; }
.page-gallery .safar-main-content-inner { margin: 0; }
.page-gallery #primary { padding: 0; }
.page-gallery .safar-single-page { margin: 0; }
.page-gallery .post-thumbnail,
.page-gallery .entry-title { display: none; }
.page-gallery .entry-content { margin: 0; padding: 0; }

/* ---- Hero ---- */
.lbr-gal-hero {
  position: relative;
  padding: 100px 24px 90px;
  background: #0d1f1c center/cover no-repeat;
  color: #fff;
  text-align: center;
}
.lbr-gal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,31,28,.45) 0%, rgba(13,31,28,.7) 100%);
}
.lbr-gal-hero__inner { position: relative; max-width: 820px; margin: 0 auto; }
.lbr-gal-hero .lbr-eyebrow {
  letter-spacing: 5px;
  font-size: 13px;
  text-transform: uppercase;
  color: #E8C896;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 16px;
}
.lbr-gal-hero h1 {
  font-family: Marcellus, Georgia, serif;
  font-size: clamp(38px, 5.5vw, 60px);
  line-height: 1.1;
  margin: 0 0 18px;
  color: #fff;
  font-weight: 400;
}
.lbr-gal-hero p {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: #f4ebde;
  max-width: 640px;
  margin: 0 auto;
}

/* ---- Filter chips ---- */
.lbr-gal-filters {
  max-width: 1180px;
  margin: 60px auto 30px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.lbr-gal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #fff;
  border: 1px solid #EAEAEA;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #362618;
  letter-spacing: .3px;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
  font-family: inherit;
}
.lbr-gal-chip:hover { border-color: #C97A4F; color: #C97A4F; }
.lbr-gal-chip--active { background: #362618; color: #fff; border-color: #362618; }
.lbr-gal-chip__count {
  background: #FAF5F1;
  color: #C97A4F;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.lbr-gal-chip--active .lbr-gal-chip__count { background: rgba(255,255,255,.18); color: #fff; }

/* ---- Masonry grid ---- */
.lbr-gal-grid {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 18px 90px;
  column-count: 4;
  column-gap: 14px;
}
.lbr-gal-item {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: #FAF5F1;
  display: block;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 0;
  padding: 0;
  width: 100%;
}
.lbr-gal-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s ease;
}
.lbr-gal-item:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(54,38,24,.18); }
.lbr-gal-item:hover img { transform: scale(1.04); }
.lbr-gal-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 60%, rgba(13,31,28,.75) 100%);
  color: #fff;
  opacity: 0;
  transition: opacity .25s ease;
}
.lbr-gal-item:hover .lbr-gal-item__overlay,
.lbr-gal-item:focus-visible .lbr-gal-item__overlay { opacity: 1; }
.lbr-gal-item__caption {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.lbr-gal-item__zoom {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #362618;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Hidden when filtered out */
.lbr-gal-item.is-hidden { display: none !important; }

/* ---- Lightbox ---- */
.lbr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8,16,14,.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lbr-lightbox.is-open { display: flex; }
.lbr-lightbox__inner {
  position: relative;
  max-width: 1200px;
  max-height: 92vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lbr-lightbox img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
}
.lbr-lightbox__caption {
  color: #f4ebde;
  font-size: 14px;
  margin-top: 14px;
  letter-spacing: .3px;
  text-align: center;
}
.lbr-lightbox__close,
.lbr-lightbox__prev,
.lbr-lightbox__next {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
  font-family: inherit;
  line-height: 1;
}
.lbr-lightbox__close:hover,
.lbr-lightbox__prev:hover,
.lbr-lightbox__next:hover { background: rgba(255,255,255,.22); transform: scale(1.05); }
.lbr-lightbox__close { top: -8px; right: -8px; }
.lbr-lightbox__prev  { left: -10px; top: 50%; transform: translateY(-50%); }
.lbr-lightbox__next  { right: -10px; top: 50%; transform: translateY(-50%); }
.lbr-lightbox__prev:hover { transform: translateY(-50%) scale(1.05); }
.lbr-lightbox__next:hover { transform: translateY(-50%) scale(1.05); }
.lbr-lightbox__counter {
  position: absolute;
  top: -8px;
  left: -8px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  letter-spacing: 1px;
  background: rgba(255,255,255,.08);
  padding: 8px 14px;
  border-radius: 100px;
}
body.lbr-lightbox-open { overflow: hidden; }

/* ---- Final CTA ---- */
.lbr-gal-cta {
  background: #362618;
  color: #f4ebde;
  padding: 80px 24px;
  text-align: center;
}
.lbr-gal-cta .lbr-eyebrow { color: #E8C896; display: inline-block; letter-spacing: 4px; font-size: 13px; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.lbr-gal-cta h2 {
  font-family: Marcellus, Georgia, serif;
  font-size: 36px;
  margin: 0 0 16px;
  color: #fff;
  font-weight: 400;
}
.lbr-gal-cta p { font-size: 17px; line-height: 1.6; max-width: 640px; margin: 0 auto 28px; color: #f4ebde; }
.lbr-gal-cta a.btn {
  display: inline-block;
  padding: 14px 32px;
  background: #C97A4F;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 1.5px;
  font-size: 14px;
  text-transform: uppercase;
}
.lbr-gal-cta a.btn:hover { background: #B16638; }

/* ---- Empty state ---- */
.lbr-gal-empty {
  text-align: center;
  padding: 60px 24px;
  color: #777;
  font-size: 16px;
  display: none;
}
.lbr-gal-empty.is-visible { display: block; }

/* ---- Responsive ---- */
@media (max-width: 1100px) { .lbr-gal-grid { column-count: 3; } }
@media (max-width: 768px)  { .lbr-gal-grid { column-count: 2; column-gap: 10px; } .lbr-gal-item { margin-bottom: 10px; } }
@media (max-width: 480px)  { .lbr-gal-grid { column-count: 1; } }

@media (max-width: 992px) {
  .lbr-gal-hero { padding: 80px 22px 70px; }
  .lbr-gal-filters { margin: 40px auto 24px; padding: 0 18px; }
  .lbr-gal-chip { padding: 8px 18px; font-size: 12.5px; }
}
@media (max-width: 600px) {
  .lbr-gal-hero { padding: 60px 18px 50px; }
  .lbr-gal-hero h1 { font-size: 30px; }
  .lbr-gal-grid { padding: 0 14px 60px; }
  .lbr-gal-cta { padding: 60px 20px; }
  .lbr-gal-cta h2 { font-size: 26px; }
  .lbr-lightbox { padding: 14px; }
  .lbr-lightbox__close { top: 8px; right: 8px; }
  .lbr-lightbox__prev  { left: 4px; }
  .lbr-lightbox__next  { right: 4px; }
  .lbr-lightbox__close,
  .lbr-lightbox__prev,
  .lbr-lightbox__next { width: 42px; height: 42px; font-size: 20px; }
  .lbr-lightbox__counter { top: 8px; left: 8px; font-size: 11px; padding: 6px 11px; }
}
