.gallery-section {
  padding: 40px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover,
.gallery-card:focus-within {
  transform: translateY(-3px);
}

.gallery-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-card-caption {
    padding: 15px;
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
    background: linear-gradient(135deg, #41643D, #7E9D49);
    text-align: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 19, 0.8);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.gallery-lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.gallery-lightbox-panel {
  position: relative;
  width: min(92vw, 860px);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.14);
}

.gallery-lightbox-content {
  padding: 0;
  background: #000;
}

.gallery-lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
}

.gallery-lightbox-caption {
  margin: 0;
  padding: 16px;
  font-size: 0.95rem;
  color: #1f2e20;
  background: #f4f7f1;
  text-align: center;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #223325;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  cursor: pointer;
}

.gallery-lightbox-close {
  top: 14px;
  right: 14px;
}

.gallery-lightbox-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-lightbox-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-card img {
    height: 220px;
  }

  .gallery-lightbox-panel {
    width: 95vw;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    display: none;
  }
}

