/* ============================================
   GALLERY BANNER
   ============================================ */

.gallery-banner {
  background: url('../images/hero/hero-4.webp') center/cover no-repeat;
}

/* ============================================
   GALLERY MAIN GRID
   ============================================ */

.gallery-main-section {
  background: #ffffff;
  padding: 90px 40px;
  max-width: 1300px;
  margin: 0 auto;
}

.gallery-main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-tile:hover img {
  transform: scale(1.12);
}

.gallery-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-tile:hover .gallery-tile-overlay {
  opacity: 1;
}

.gallery-tile-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.gallery-tile-overlay p {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

/* Staggered reveal delay */
.gallery-main-grid .gallery-tile:nth-child(3n+1) { transition-delay: 0s; }
.gallery-main-grid .gallery-tile:nth-child(3n+2) { transition-delay: 0.1s; }
.gallery-main-grid .gallery-tile:nth-child(3n+3) { transition-delay: 0.2s; }

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
  animation: lightboxFadeIn 0.4s ease;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

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

.lightbox-caption {
  margin-top: 20px;
}

.lightbox-caption h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.lightbox-caption p {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .gallery-main-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .gallery-main-section {
    padding: 55px 20px;
  }

  .gallery-main-grid {
    grid-template-columns: 1fr;
  }

  .gallery-tile-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
  }

  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 30px;
  }
}


/* ============================================
   VIDEO TILES IN GALLERY
   ============================================ */

.video-gallery-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.play-icon-overlay svg {
  width: 60px;
  height: 60px;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* Lightbox video (hidden by default, shown via JS) */
#lightboxVideo {
  display: none;
  width: 100%;
  max-height: 75vh;
  border-radius: 12px;
}