/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: 8px; /* small row height for masonry effect */
  gap: 8px;
}

.gallery-item {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  grid-row-end: span 20; /* JS will adjust */
  max-width: none;
  max-height: none;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 4s ease forwards;
}

/* Lightbox caption link at bottom */
.glightbox-container .lightbox-caption {
  display: block;
  text-align: center;
  padding: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  background: rgba(0,0,0,0.4);
  border-radius: 4px;
  margin: -30px auto;
  width: fit-content;
}

.glightbox-container .lightbox-caption:hover {
  background: rgba(255,255,255,0.7);
  color: #3e342c;
}

.gallerycontainer {
  max-width: 1017px;
  margin: 0 auto;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
