/* =========
  Lightbox (no framework)
  ========= */
body.lb-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.lightbox[data-open="true"] {
  display: block;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
}

.lightbox__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(1100px, calc(100% - 2rem));
  height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}

.lightbox__figure {
  flex: 1;
  min-height: 0;
  margin: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox__img {
  flex: 1;
  min-height: 0;
  width: 90%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  margin-inline: auto;
}

.lightbox__caption {
  color: var(--muted);
  font-weight: 700;
  padding: 0 6px 6px;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .08);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
  user-select: none;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, .12);
}

.lightbox__close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 26px;
  line-height: 0;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 16px;
  font-size: 28px;
  line-height: 0;
}

.lightbox__prev {
  left: 10px;
}

.lightbox__next {
  right: 10px;
}

@media (max-width: 520px) {
  .lightbox__dialog {
    margin: 2vh auto;
  }

  .lightbox__prev {
    left: 8px;
  }

  .lightbox__next {
    right: 8px;
  }
}

.lb-trigger {
  display: block;
  cursor: zoom-in;
}

.lb-trigger img {
  transition: transform .20s ease;
}

.lb-trigger:hover img {
  transform: scale(1.03);
}

.gallery-grid { margin-top: 14px; }

.gallery-item{
  box-shadow: none;
  border-color: var(--border);
  background: rgba(255,255,255,.03);
  overflow: hidden;
}

.gallery-img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-caption{ margin-top: 10px; }