.gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:980;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(6,8,10,.88);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.gallery-lightbox.is-open{display:flex}
.gallery-lightbox.is-video-open{
  background:rgba(5,6,8,.96);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.gallery-lightbox-dialog{
  position:relative;
  width:min(100%, 1320px);
  height:min(88vh, 920px);
  border-radius:30px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(12,14,18,.9);
  box-shadow:0 30px 100px rgba(0,0,0,.45);
  contain:layout paint;
}
.gallery-lightbox.is-video-open .gallery-lightbox-dialog{
  background:#050608;
  box-shadow:none;
}
.gallery-lightbox-dialog::before{
  content:"";
  position:absolute;
  top:0;
  left:26px;
  right:26px;
  height:2px;
  background:linear-gradient(90deg, rgba(224,71,77,.9), rgba(224,71,77,.22), rgba(224,71,77,0));
  box-shadow:0 0 18px rgba(224,71,77,.18);
  z-index:3;
}
.gallery-lightbox-stage{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.08), transparent 34%),
    linear-gradient(180deg,#0c0e12 0%, #0a0c10 100%);
}
.gallery-lightbox.is-video-open .gallery-lightbox-stage{
  background:#050608;
}
.gallery-lightbox-stage img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}
.gallery-lightbox-stage video{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
  background:#050608;
}
.gallery-lightbox-stage img[hidden],
.gallery-lightbox-stage video[hidden]{
  display:none;
}
.gallery-lightbox-close,
.gallery-lightbox-nav{
  position:absolute;
  z-index:2;
  width:52px;
  height:52px;
  border:none;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(16,18,22,.76);
  color:#f3f1ec;
  border:1px solid rgba(224,71,77,.18);
  box-shadow:0 14px 32px rgba(0,0,0,.28);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover{
  background:rgba(58,28,34,.92);
  border-color:rgba(224,71,77,.42);
  box-shadow:0 16px 34px rgba(0,0,0,.28), 0 0 18px rgba(184,29,36,.16);
  transform:translateY(-1px);
}
.gallery-lightbox-close{
  top:18px;
  right:18px;
  font-size:24px;
  line-height:1;
}
.gallery-lightbox-nav{
  top:50%;
  transform:translateY(-50%);
  font-size:26px;
  font-weight:600;
}
.gallery-lightbox-nav:hover{
  transform:translateY(calc(-50% - 1px));
}
.gallery-lightbox-nav.prev{left:18px}
.gallery-lightbox-nav.next{right:18px}
.gallery-lightbox-meta{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.gallery-lightbox-count{
  padding:12px 14px;
  border-radius:999px;
  background:rgba(10,12,16,.68);
  border:1px solid rgba(224,71,77,.2);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#e0474d;
  white-space:nowrap;
}
[data-lightbox-gallery] img,
[data-lightbox-gallery] video{
  cursor:pointer;
}

@media(max-width:768px){
  .gallery-lightbox{
    padding:10px;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .gallery-lightbox-dialog{
    height:min(84vh, 760px);
    border-radius:24px;
    border-color:rgba(224,71,77,.24);
  }
  .gallery-lightbox-dialog::before{
    left:14px;
    right:14px;
    height:3px;
  }
  .gallery-lightbox-nav,
  .gallery-lightbox-close{
    width:44px;
    height:44px;
  }
  .gallery-lightbox-nav{font-size:22px}
  .gallery-lightbox-close{font-size:20px}
  .gallery-lightbox-nav.prev{left:10px}
  .gallery-lightbox-nav.next{right:10px}
  .gallery-lightbox-close{top:10px;right:10px}
  .gallery-lightbox-meta{
    right:10px;
    bottom:10px;
  }
}
