/* ===== Justified Gallery ===== */
.gallery-grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:2px;
  margin-top:10px;
}

.gallery-item{
  flex: 0 0 auto;
  height: 180px;
  border-radius: 14px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
  background: rgba(255,255,255,.04);
}

.gallery-item img{
  height:100%;
  width:100%;
  object-fit:cover;
  display:block;
  transition: transform .35s ease;
}

.gallery-item:hover img{ transform: scale(1.04); }

@media (max-width: 1000px){
  .gallery-grid{ gap:3px; }
  .gallery-item{ height: 180px; }
}

/* Blur-up */
.blur-up{
  filter: blur(18px);
  transform: scale(1.02);
  transition: filter .35s ease, transform .35s ease;
}
.blur-up.is-loaded{
  filter: blur(0);
  transform: scale(1);
}

.gallery-copyright{
  margin: 3rem auto 1rem;
  text-align:center;
  font-size: 0.9rem;
  color: rgba(255,255,255,.5);
  max-width: 900px;
  line-height: 1.5;
}

/* ===== Lightbox ===== */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.active{ display:flex; }

.lb-stage{
  max-width: 95vw;
  max-height: 85vh;
  display:flex;
  align-items:center;
  justify-content:center;
}

.lb-image{
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 12px;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-close, .lb-prev, .lb-next, .lb-full{
  position: absolute;
  background: rgba(255,255,255,.08);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: .5rem .8rem;
  cursor: pointer;
  border-radius: 12px;
}

.lb-close{ top: 1rem; right: 1rem; }
.lb-prev{ left: 1rem; }
.lb-next{ right: 1rem; }
.lb-full{ bottom: 1rem; right: 1rem; }

@media (max-width: 900px){
  .lb-close, .lb-prev, .lb-next, .lb-full{
    font-size: 2.4rem;
    padding: .7rem 1rem;
  }
  .lb-prev{ left: .6rem; }
  .lb-next{ right: .6rem; }
}

/* Fullscreen UI overlay */
.lb-fs-ui{
  position:absolute;
  inset: 0;
  pointer-events:none;
  display:none;
}
.lb-exitfs{
  position:absolute;
  top: 1rem;
  left: 1rem;
  pointer-events:auto;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.15);
  color:#fff;
  font-size: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  cursor:pointer;
}
.lightbox.is-fullscreen .lb-fs-ui{ display:block; }
.lightbox.is-fullscreen .lb-full{ display:none; }

@media (max-width: 900px){
  .lb-exitfs{
    top: .8rem;
    left: .8rem;
    width: 52px;
    height: 52px;
    font-size: 2.4rem;
  }
}

/* Mobile Swipe Hint */
.lb-swipehint{
  position:absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .45rem .75rem;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: 0.9rem;
  display:none;
  pointer-events:none;
}
.lb-swipehint.show{
  display:block;
  animation: hintFade 2.8s ease forwards;
}

@keyframes hintFade{
  0%{opacity:0; transform: translateX(-50%) translateY(6px);}
  12%{opacity:1; transform: translateX(-50%) translateY(0);}
  80%{opacity:1;}
  100%{opacity:0;}
}
