/* Gallery Section */
.gallery {
  padding-top: 100px; /* prevents header overlap */
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.gallery h2 {
  font-size: 2rem;
  color: #007b83;
  text-align: center;
  margin-bottom: 10px;
}

.gallery p {
  text-align: center;
  color: #555;
  margin-bottom: 25px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.image-box img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-box img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.image-box p {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #555;
}

/* Lightbox Styles */
.lightbox {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.lightbox-content {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lightbox-content.fade-in {
  opacity: 1;
}

/* Caption */
#caption {
  color: #fff;
  text-align: center;
  margin-top: 10px;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#caption.show {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Arrows */
.prev, .next {
  position: absolute;
  top: 50%;
  font-size: 35px;
  color: white;
  padding: 16px;
  cursor: pointer;
  transform: translateY(-50%);
}
.prev { left: 40px; }
.next { right: 40px; }
.prev:hover, .next:hover { background-color: rgba(255,255,255,0.2); border-radius:5px; }

/* Close Button */
.close {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}
.close:hover { color: #ccc; }
