/* ============================================================
   Gallery
   ============================================================ */

.gallery-page {
  padding-top: 80px;
  padding-bottom: 6rem;
  min-height: 100svh;
  background: linear-gradient(170deg, #fdfaf5 0%, #f5ede0 100%);
}

.gallery-header {
  padding: 4rem 2rem 3rem;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.gallery-header h1 {
  font-family: 'BioRhyme', serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--bold-burgundy);
  margin-bottom: 1rem;
}

.gallery-intro {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: var(--reunion-text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.gallery-header .committee-names {
  text-align: center;
  margin-bottom: 0;
}

/* Photo grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 2rem;
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--linen-2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item {
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(30, 12, 18, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: min(90vw, 1000px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
  padding: 0.25rem 0.5rem;
}

.lightbox-close:hover {
  opacity: 1;
}
