/* ======================= gallery.css (FULL FILE) ======================= */

/* Active nav highlight */
.nav-link.is-active{
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
}

/* ===== HERO BANNER (half height, image) ===== */
.hero--gallery{
  min-height:48vh;
  height:48vh;
}
@media (min-width:1024px){
  .hero--gallery{min-height:52vh;height:52vh;}
}
@media (max-width:980px){
  .hero--gallery{min-height:42vh;height:42vh;}
}
@media (max-width:560px){
  .hero--gallery{min-height:40vh;height:40vh;}
}

.hero-media--gallery{
  position:absolute;
  inset:0;
  z-index:0;

  /* Replace with your banner image */
  background:url("../img/gallery-hero.jpg") center/cover no-repeat;
  filter:saturate(1.05) contrast(1.05);
}

.hero--gallery .hero-overlay{
  background:linear-gradient(
    90deg,
    rgba(0,0,0,.76) 0%,
    rgba(0,0,0,.48) 55%,
    rgba(0,0,0,.18) 100%
  );
}

.hero-content--gallery{
  padding-top:90px;
  padding-bottom:34px;
  max-width:760px;
}
@media (max-width:980px){ .hero-content--gallery{ padding-top:74px; } }
@media (max-width:560px){ .hero-content--gallery{ padding-top:66px; padding-bottom:26px; } }

/* ===== PAGE ===== */
.gallery-page{
  background:#ffece4;
}

/* Grid */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
}

/* Item card */
.g-item{
  border:0;
  padding:0;
  margin:0;
  background:transparent;
  cursor:pointer;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 14px 30px rgba(0,0,0,.12);
  transition:transform .18s ease, box-shadow .18s ease;
}

.g-item img{
  width:100%;
  height:240px;
  object-fit:cover;
  display:block;
}

/* Hover */
.g-item:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(0,0,0,.16);
}

/* Focus */
.g-item:focus-visible{
  outline:3px solid rgba(231,29,54,.55);
  outline-offset:4px;
}

/* Responsive */
@media (max-width:980px){
  .gallery-grid{
    grid-template-columns:repeat(2, 1fr);
  }
  .g-item img{ height:220px; }
}
@media (max-width:560px){
  .gallery-grid{
    grid-template-columns:1fr;
  }
  .g-item img{ height:240px; }
}

/* ================= LIGHTBOX (same style as menu) ================= */
.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.lightbox.is-open{
  opacity:1;
  pointer-events:auto;
}

.lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
}

.lightbox-dialog{
  position:relative;
  width:min(1100px, calc(100% - 24px));
  height:min(92vh, 900px);
  margin:3vh auto 0;
  border-radius:22px;
  overflow:hidden;
  background:rgba(15,15,15,.92);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 30px 90px rgba(0,0,0,.45);
  display:flex;
  flex-direction:column;
}

.lightbox-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.lightbox-title{
  font-weight:900;
  color:#fff;
  padding-left:6px;
}

.lightbox-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.lightbox-close{
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}

.lightbox-body{
  position:relative;
  flex:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
}

.lightbox-viewport{
  flex:1;
  height:100%;
  border-radius:18px;
  overflow:hidden;
  background:#111;
  border:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  -webkit-overflow-scrolling:touch;
}

/* Gallery images should fit within viewport */
.lightbox-img--contain{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  display:block;
}

.lightbox-nav{
  width:52px;
  height:52px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:2rem;
  line-height:0;
  cursor:pointer;
  display:grid;
  place-items:center;
  transition:transform .15s ease, background .15s ease;
}
.lightbox-nav:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.12);
}
.lightbox-nav:active{transform:translateY(0);}

@media (max-width:700px){
  .lightbox-dialog{
    height:92vh;
    margin:2vh auto 0;
  }
  .lightbox-nav{
    width:44px;height:44px;
    font-size:1.8rem;
  }
  .lightbox-viewport{
    padding:10px;
  }
}