/* ===== Gallery Page ===== */
.gallery-page {
  padding: 140px 0 80px;
  min-height: 100vh;
  background: var(--color-cream);
}

.gallery-page__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--color-charcoal);
  text-align: center;
  margin-bottom: 12px;
}

.gallery-page__intro {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 48px;
}

.gallery-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-page__item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-page__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gallery-page__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-page__item:hover img {
  transform: scale(1.05);
}

/* Nav active state on gallery page */
.nav__link--active {
  color: var(--color-sage-dark) !important;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: opacity var(--transition);
}

.lightbox__close:hover {
  opacity: 0.8;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 2.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox__prev {
  left: 24px;
}

.lightbox__next {
  right: 24px;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .gallery-page {
    padding: 120px 0 60px;
  }

  .gallery-page__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .lightbox__prev,
  .lightbox__next {
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
    left: 12px;
    right: 12px;
  }

  .lightbox__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}
