.gallery-page {
  background: linear-gradient(180deg, var(--paper) 0%, #f7f8ed 100%);
  min-height: 100vh;
}

.gallery-hero {
  background:
    radial-gradient(circle at top right, rgba(246, 248, 163, 0.9), transparent 28%),
    linear-gradient(135deg, var(--sage) 0%, var(--lime) 40%, var(--butter) 100%);
  padding: 2rem 0 3rem;
}

.gallery-hero .panel {
  padding: 1.8rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(68, 83, 61, 0.1);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(38, 49, 36, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-note {
  margin-top: 0.9rem;
  color: rgba(38, 49, 36, 0.82);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(38, 49, 36, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 1000px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 18px;
  border: 8px solid var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: var(--white);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: none;
  border-radius: 999px;
  background: var(--white);
  color: var(--deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 46px;
  min-width: 46px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.lightbox-close {
  top: -1rem;
  right: 0;
}

.lightbox-prev {
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-hero {
    padding: 2rem 0 2.5rem;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: -4rem;
    transform: none;
  }

  .lightbox-prev {
    left: 50%;
    margin-left: -110px;
  }

  .lightbox-next {
    right: 50%;
    margin-right: -110px;
  }

  .lightbox-close {
    top: -3.5rem;
    right: 0;
  }
}