body{
  margin:0;
  background:#050505;
  color:#fff;
  font-family:'Poppins', sans-serif;
}

.gallery-page{
  background:#050505;
}

/* HERO */
.gallery-hero{
  min-height:78vh;
  padding:140px 20px 80px;
  display:flex;
  align-items:flex-end;

  background:
    linear-gradient(
      to top,
      #050505 0%,
      rgba(5,5,5,.78) 35%,
      rgba(5,5,5,.25) 100%
    ),
    url("images/img12.jpg");

  background-size:cover;
  background-position:center;
}

.gallery-hero-content{
  width:100%;
  max-width:1150px;
  margin:auto;
}

.back-link{
  display:inline-block;
  margin-bottom:40px;
  color:rgba(255,255,255,.72);
  text-decoration:none;
  font-weight:500;
}

.gallery-hero span,
.eyebrow{
  color:#9acb3c;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.8rem;
}

.gallery-hero h1{
  font-size:clamp(3.5rem,9vw,8rem);
  line-height:.9;
  margin:16px 0 24px;
}

.gallery-hero p{
  max-width:720px;
  color:rgba(255,255,255,.82);
  font-size:1.08rem;
  line-height:1.8;
}

/* SECTION */
.gallery-section{
  max-width:1250px;
  margin:auto;
  padding:80px 20px 120px;
}

.gallery-top{
  display:flex;
  justify-content:space-between;
  gap:30px;
  align-items:flex-end;
  margin-bottom:28px;
}

.gallery-top h2{
  font-size:clamp(2rem,4vw,3.5rem);
  line-height:1;
  margin:12px 0 0;
}

#photo-count{
  color:rgba(255,255,255,.62);
}

/* FILTERS */
.filter-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:34px;
}

.filter-btn{
  border:1px solid rgba(255,255,255,.13);
  background:rgba(255,255,255,.06);
  color:#fff;
  padding:10px 16px;
  border-radius:999px;
  cursor:pointer;
  font-family:inherit;
  transition:.25s ease;
}

.filter-btn:hover,
.filter-btn.active{
  background:#9acb3c;
  color:#071000;
  border-color:#9acb3c;
}

/* GRID MASONRY */
.photo-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  gap:12px;
}

.photo-item{
  aspect-ratio:1 / 1;
  border-radius:18px;
  overflow:hidden;
  background:#111;
  cursor:pointer;
}

.photo-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .55s ease, filter .55s ease;
}
.photo-item{
  position:relative;
  box-shadow:0 14px 35px rgba(0,0,0,.28);
  transition:transform .35s ease, box-shadow .35s ease;
}

.photo-item:hover{
  transform:translateY(-6px);
  box-shadow:0 22px 55px rgba(0,0,0,.45);
}

.photo-item:hover img{
  transform:scale(1.08);
  filter:saturate(1.1) contrast(1.05);
}
/* LIGHTBOX */
.lightbox{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.92);
  display:none;
  align-items:center;
  justify-content:center;
  padding:30px;
}

.lightbox.active{
  display:flex;
}

.lightbox img{
  max-width:92vw;
  max-height:86vh;
  border-radius:18px;
  object-fit:contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next{
  position:absolute;
  border:none;
  background:rgba(255,255,255,.1);
  color:#fff;
  cursor:pointer;
  font-size:2rem;
  border-radius:999px;
}

.lightbox-close{
  top:25px;
  right:25px;
  width:52px;
  height:52px;
}

.lightbox-prev,
.lightbox-next{
  top:50%;
  transform:translateY(-50%);
  width:58px;
  height:58px;
}

.lightbox-prev{
  left:25px;
}

.lightbox-next{
  right:25px;
}

/* MOBILE */
@media(max-width:800px){
  .gallery-hero{
    min-height:85vh;
    padding:120px 18px 60px;
  }

  .gallery-top{
    display:block;
  }

  .gallery-stats{
    display:grid;
    grid-template-columns:1fr;
  }

  .lightbox-prev,
  .lightbox-next{
    display:none;
  }
}