/* ============================================================
   Lightbox — fullscreen overlay with image + nav buttons
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: var(--overlay-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox[hidden] { display: none; }

/* === Image === */
.lightbox__figure {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.lightbox__image {
  display: block;
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  background: #000;
  border-radius: var(--radius-sm);
}

.lightbox__counter {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}

/* === Close button === */
.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-white);
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.lightbox__close:hover {
  opacity: 0.7;
  transform: rotate(90deg);
}

/* === Prev/Next nav === */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.lightbox__nav--prev { left: var(--space-md); }
.lightbox__nav--next { right: var(--space-md); }

.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.08);
}

/* === Mobile === */
@media (max-width: 599px) {
  .lightbox__nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 8px; right: 8px; }
  .lightbox__image { max-height: 72vh; }
}
