/* ==========================================================================
   FI LOUNGE CLUB - LUXURY GALLERY SECTION
   ========================================================================== */

.gallery-section {
  position: relative;
  min-height: 100vh;
  padding: 160px 32px;
  background-color: var(--bg-dark);
  z-index: 20;
}

.gallery-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-title {
  font-family: var(--font-serif-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #FFF;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Category Filter Tabs */
.gallery-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.gallery-filter-btn {
  background: rgba(16, 14, 12, 0.6);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 24px;
  padding: 8px 22px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.gallery-filter-btn:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.gallery-filter-btn.active {
  background: var(--gold-gradient);
  border-color: var(--gold-light);
  color: var(--bg-deep);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
}

/* Gallery Grid Layout (Masonry / Editorial Asymmetric) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-gold-subtle);
  background: #000;
  transition: transform 0.5s var(--transition-smooth), border-color 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item:hover {
  transform: translateY(-6px);
  border-color: var(--gold-light);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.25);
  z-index: 5;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-smooth), filter 0.6s ease;
  filter: brightness(0.85) contrast(1.08);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.15);
}

/* Hover Overlay & Caption */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 5, 0.92) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  z-index: 2;
}

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

.gallery-item-category {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.gallery-item-title {
  font-family: var(--font-serif-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: #FFF;
  line-height: 1.3;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 4, 0.95);
  backdrop-filter: blur(24px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 4px;
  border: 1px solid var(--border-gold-medium);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.2);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 16px;
  font-family: var(--font-serif-body);
  font-size: 1.2rem;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  text-align: center;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox-close-btn:hover {
  color: var(--gold-light);
}

@media (max-width: 992px) {
  .gallery-section {
    padding: 100px 20px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 260px;
    gap: 16px;
  }
  .gallery-item.large, .gallery-item.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 576px) {
  .gallery-section {
    padding: 80px 16px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 14px;
  }
}
