/* ==========================================================================
   LIGHTBOX — fullscreen image viewer styles
   ========================================================================== */

/* Lock body scroll while open */
body.lb-locked {
  overflow: hidden;
}

/* Overlay */
.lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 13, 15, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 80px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s var(--ease);
}
.lb.is-open {
  opacity: 1;
  visibility: visible;
}

/* Stage holds the image; constrain + center */
.lb__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
}
.lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  animation: lb-img-in 0.4s var(--ease);
}
@keyframes lb-img-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Close button — top right */
.lb__close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(246, 241, 230, 0.08);
  border: 1px solid rgba(246, 241, 230, 0.2);
  color: var(--color-text-light);
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--dur) var(--ease);
  z-index: 2;
}
.lb__close:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--bg-deep);
  transform: rotate(90deg);
}
.lb__close:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 4px;
}

/* Prev/next buttons — sides */
.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(246, 241, 230, 0.08);
  border: 1px solid rgba(246, 241, 230, 0.2);
  color: var(--color-text-light);
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--dur) var(--ease);
  z-index: 2;
}
.lb__nav--prev { left: 24px; }
.lb__nav--next { right: 24px; }
.lb__nav:hover:not(:disabled) {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--bg-deep);
  transform: translateY(-50%) scale(1.08);
}
.lb__nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.lb__nav:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 4px;
}

/* Caption — bottom */
.lb__caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(13, 13, 15, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(246, 241, 230, 0.12);
  border-radius: 2px;
  max-width: calc(100% - 200px);
  text-align: center;
}
.lb__counter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--color-gold-light);
  white-space: nowrap;
}
.lb__title {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(246, 241, 230, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60ch;
}
.lb__caption:empty { display: none; }

/* Trigger hint cursor */
[data-lightbox] {
  cursor: zoom-in;
}
[data-lightbox]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
}

/* Mobile */
@media (max-width: 768px) {
  .lb {
    padding: 16px;
  }
  .lb__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .lb__nav {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .lb__nav--prev { left: 8px; }
  .lb__nav--next { right: 8px; }
  .lb__caption {
    bottom: 16px;
    padding: 8px 14px;
    gap: 10px;
    max-width: calc(100% - 32px);
  }
  .lb__title { display: none; }
}