/* MODULE: lightbox.css - fullscreen photo lightbox (homepage photo grid) */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200; /* above glass-nav (1100) and the mobile drawer (1050) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 25, 0.88);
  padding: var(--space-4);
  animation: lightbox-fade 200ms ease;
}

.lightbox[hidden] {
  display: none;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
}

.lightbox__figure {
  margin: 0;
  max-width: min(90vw, 900px);
  text-align: center;
}

.lightbox__img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--border-radius-card);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
  margin-top: var(--space-2);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.25);
}
