.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 13, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  padding: 4vh 4vw;
}
.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-figure {
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.97);
  transition: transform 0.25s ease;
}
.lightbox-overlay.is-open .lightbox-figure {
  transform: scale(1);
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 1rem;
  color: #faf8f5;
  font-size: 0.9rem;
  text-align: center;
  max-width: 60ch;
}
.lightbox-counter {
  margin-top: 0.35rem;
  color: rgba(250, 248, 245, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #faf8f5;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(154, 123, 79, 0.9);
}
.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}
.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.05);
}
.lightbox-trigger {
  cursor: zoom-in;
}
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 2.5rem; height: 2.5rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay, .lightbox-figure { transition: none; }
}
