.gallery-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #0b4f3e 0%, #0f6e56 45%, #1a8a6c 100%);
  border-bottom: 1px solid var(--c-border);
  padding: 3.6rem 0; /* Matched to home.css padding */
  color: #fff;
}

/* Match home page text styling */
.gallery-hero h1, 
.gallery-hero h2 {
  color: #fff;
}

.gallery-hero p {
  color: rgba(255, 255, 255, 0.88);
}

/* Add the decorative background rings from the home page */
.gallery-hero::before,
.gallery-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.gallery-hero::before {
  width: 460px;
  height: 460px;
  right: -120px;
  top: -120px;
}

.gallery-hero::after {
  width: 200px;
  height: 200px;
  left: -80px;
  bottom: -120px;
}


.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.filter-chip {
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-primary-strong);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.gallery-grid {
  margin-top: 1.4rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--c-border);
  cursor: pointer;
}

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

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

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox figure {
  max-width: 880px;
  width: 100%;
  margin: 0;
  text-align: center;
}

.lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox figcaption {
  color: #fff;
  margin-top: 0.5rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.lightbox-close {
  top: 12px;
  right: 12px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

@media (max-width: 1020px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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