/* ==========================================================================
   LUXURY GALLERY v2 — self-contained, no external CDN dependency
   Fixes: (1) images stuck invisible when AOS CDN fails to load,
          (2) images being force-cropped into mismatched aspect boxes.
   ========================================================================== */

.lux-gal-wrap{ padding:70px 0 90px; background:var(--gir-cream, #FAF9F6); }

/* --- Filter pills ------------------------------------------------------- */
.lux-gal-filters{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin:0 0 42px;
}
.lux-gal-filters button{
  font-family:'Poppins','Inter',sans-serif;
  font-size:13px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--gir-forest, #0F5132);
  background:#fff;
  border:1px solid rgba(15,81,50,.18);
  padding:10px 22px;
  border-radius:30px;
  cursor:pointer;
  transition:background .3s ease, color .3s ease, border-color .3s ease, transform .2s ease;
}
.lux-gal-filters button:hover{ transform:translateY(-2px); border-color:var(--gir-gold,#D4AF37); }
.lux-gal-filters button.is-active{
  background:var(--gir-forest, #0F5132);
  border-color:var(--gir-forest, #0F5132);
  color:#fff;
}

/* --- Grid ----------------------------------------------------------------
   Every card gets a fixed aspect-ratio box + object-fit:cover.
   This guarantees a clean, intentional crop no matter what the source
   image's native dimensions are — the bug class of "an 800x300 photo
   forced into a tall 1x2 cell" simply cannot happen with this approach.
   -------------------------------------------------------------------- */
.lux-gal-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
}
.lux-gal-card{
  position:relative;
  overflow:hidden;
  border-radius:6px;
  aspect-ratio:1 / 1;
  box-shadow:0 20px 45px -22px rgba(8,36,23,.35);
  cursor:pointer;
  background:#e9e6dd;

  /* progressive-enhancement reveal: visible by default, JS only upgrades it */
  opacity:1;
  transform:none;
}
.lux-gal-card.lux-gal-feature{
  grid-column:span 2;
  aspect-ratio:16 / 9;
}
.lux-gal-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .7s cubic-bezier(.22,1,.36,1);
}
.lux-gal-card:hover img{ transform:scale(1.07); }

.lux-gal-card::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(8,26,17,.82) 0%, rgba(8,26,17,.15) 45%, rgba(8,26,17,0) 68%);
  opacity:0;
  transition:opacity .35s ease;
}
.lux-gal-card:hover::after{ opacity:1; }

.lux-gal-caption{
  position:absolute;
  left:18px;
  right:18px;
  bottom:14px;
  color:#fff;
  font-family:'Playfair Display', Georgia, serif;
  font-size:18px;
  letter-spacing:.01em;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .35s ease, transform .35s ease;
  z-index:2;
}
.lux-gal-card:hover .lux-gal-caption{ opacity:1; transform:translateY(0); }

.lux-gal-zoom-hint{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border-radius:50%;
  background:rgba(255,255,255,.16);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  opacity:0;
  transition:opacity .35s ease;
  z-index:2;
  font-size:14px;
}
.lux-gal-card:hover .lux-gal-zoom-hint{ opacity:1; }

/* fade out items not matching the active filter */
.lux-gal-card.lux-gal-hidden{
  display:none;
}

/* --- Lightbox -------------------------------------------------------------- */
.lux-gal-lightbox{
  position:fixed;
  inset:0;
  background:rgba(6,14,10,.94);
  z-index:9999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:30px;
}
.lux-gal-lightbox.is-open{ display:flex; }
.lux-gal-lightbox figure{
  margin:0;
  max-width:min(1100px, 92vw);
  max-height:88vh;
  text-align:center;
}
.lux-gal-lightbox img{
  max-width:100%;
  max-height:78vh;
  border-radius:4px;
  box-shadow:0 40px 90px -20px rgba(0,0,0,.6);
}
.lux-gal-lightbox figcaption{
  color:var(--gir-gold-soft, #ecd896);
  font-family:'Playfair Display', Georgia, serif;
  font-size:19px;
  margin-top:16px;
}
.lux-gal-lightbox .lux-gal-close,
.lux-gal-lightbox .lux-gal-prev,
.lux-gal-lightbox .lux-gal-next{
  position:absolute;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.25);
  color:#fff;
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:18px;
  transition:background .25s ease, border-color .25s ease;
}
.lux-gal-lightbox .lux-gal-close:hover,
.lux-gal-lightbox .lux-gal-prev:hover,
.lux-gal-lightbox .lux-gal-next:hover{
  background:var(--gir-gold, #D4AF37);
  border-color:var(--gir-gold, #D4AF37);
  color:#0F5132;
}
.lux-gal-lightbox .lux-gal-close{ top:22px; right:22px; }
.lux-gal-lightbox .lux-gal-prev{ left:22px; top:50%; transform:translateY(-50%); }
.lux-gal-lightbox .lux-gal-next{ right:22px; top:50%; transform:translateY(-50%); }

/* ============================= RESPONSIVE ============================= */
@media (max-width:991px){
  .lux-gal-grid{ grid-template-columns:repeat(2, 1fr); gap:16px; }
  .lux-gal-card.lux-gal-feature{ grid-column:span 2; aspect-ratio:16/10; }
}

@media (max-width:600px){
  .lux-gal-wrap{ padding:44px 0 60px; }
  .lux-gal-filters{ gap:8px; margin-bottom:28px; }
  .lux-gal-filters button{ padding:8px 16px; font-size:12px; }
  .lux-gal-grid{ grid-template-columns:1fr; gap:16px; }
  .lux-gal-card,
  .lux-gal-card.lux-gal-feature{ grid-column:span 1; aspect-ratio:4/3; }
  .lux-gal-caption{ opacity:1; transform:none; font-size:16px; bottom:12px; left:14px; right:14px; }
  .lux-gal-card::after{ opacity:.55; }
  .lux-gal-zoom-hint{ display:none; }
  .lux-gal-lightbox .lux-gal-prev{ left:10px; width:40px; height:40px; }
  .lux-gal-lightbox .lux-gal-next{ right:10px; width:40px; height:40px; }
  .lux-gal-lightbox .lux-gal-close{ top:14px; right:14px; width:38px; height:38px; }
}
