/* ==========================================================================
   Gallery Page Specific Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Section
   -------------------------------------------------------------------------- */
.gallery-hero {
  position: relative;
  padding: 130px 0 70px;
  background: linear-gradient(135deg, #160a2c 0%, #2D1B69 60%, #120726 100%);
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.gallery-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.3);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.gallery-hero-title {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.gallery-hero-title em {
  font-style: italic;
  color: var(--accent-gold);
  font-weight: 400;
}

.gallery-hero-subtext {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 740px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   2. Gallery Section & Category Filter Tabs
   -------------------------------------------------------------------------- */
.gallery-section {
  padding: 80px 0;
  background-color: var(--light-cream);
}

.gallery-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.gallery-filter-btn {
  padding: 10px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 24px;
  border: 1px solid rgba(45, 27, 105, 0.15);
  background-color: var(--white);
  color: var(--primary-purple);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
  background-color: var(--primary-purple);
  color: #ffffff;
  border-color: var(--primary-purple);
  box-shadow: 0 4px 14px rgba(45, 27, 105, 0.25);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   3. Pinterest Masonry Grid
   -------------------------------------------------------------------------- */
.gallery-masonry {
  column-count: 3;
  column-gap: 24px;
  width: 100%;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
  background-color: var(--white);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item.hidden {
  display: none !important;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 20px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(19, 12, 44, 0.92) 100%);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

.gallery-caption-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.gallery-caption-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   4. Lightbox Modal Overlay
   -------------------------------------------------------------------------- */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 40px;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content-box {
  position: relative;
  max-width: 900px;
  max-height: 85vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox-info {
  margin-top: 16px;
}

.lightbox-caption {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.lightbox-cat-badge {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  font-size: 2.2rem;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.lightbox-close:hover {
  color: var(--accent-gold);
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.lightbox-nav-btn:hover {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--dark-text);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .gallery-hero-title {
    font-size: 3rem;
  }
  .gallery-masonry {
    column-count: 2;
  }
  .lightbox-prev {
    left: 10px;
    top: auto;
    bottom: -60px;
  }
  .lightbox-next {
    right: 10px;
    top: auto;
    bottom: -60px;
  }
}

@media (max-width: 600px) {
  .gallery-hero-title {
    font-size: 2.2rem;
  }
  .gallery-masonry {
    column-count: 1;
  }
}
