/* =============================================
   GALLERY — NAV ACTIVE
   ============================================= */
.nav-active {
  color: var(--black) !important;
}


/* =============================================
   GALLERY HERO
   ============================================= */
.gallery-hero {
  padding-top: var(--header-h);
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gallery-hero-inner {
  padding-top: 64px;
  padding-bottom: 48px;
}

.gallery-hero-label {
  font-size: 0.6rem;
  letter-spacing: 0.38em;
  color: var(--mid);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gallery-hero-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.gallery-hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--black);
  line-height: 1;
}


/* =============================================
   CATEGORY TABS
   ============================================= */
.category-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--light);
}

.cat-btn {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--mid);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  padding: 14px 20px;
  transition: color 0.2s, border-color 0.2s;
}

.cat-btn:hover {
  color: var(--brown);
}

.cat-btn.active {
  color: var(--black);
  border-bottom-color: var(--black);
}


/* =============================================
   SERIES LIST
   ============================================= */
.series-list {
  width: 100%;
}

.series-item {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.series-item.hidden {
  display: none;
}

/* Background image */
.series-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

/* Dark overlay (fades in with image) */
.series-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.45);
  opacity: 0;
  transition: opacity 0.7s ease;
  z-index: 1;
}

/* Hover state */
.series-item:hover .series-bg {
  opacity: 1;
  transform: scale(1);
}

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

/* Text content */
.series-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.series-cat {
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 300;
  transition: color 0.4s;
}

.series-name {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--black);
  line-height: 1;
  transition: color 0.4s;
}

.series-view {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--mid);
  transition: color 0.4s;
  margin-top: 2px;
}

.series-count {
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: var(--mid);
  font-family: var(--sans);
  font-weight: 300;
  transition: color 0.4s;
  margin-top: 4px;
}

/* Hover text color change */
.series-item:hover .series-name,
.series-item:hover .series-view {
  color: rgba(255, 255, 255, 0.95);
}

.series-item:hover .series-cat {
  color: var(--accent);
}

.series-item:hover .series-count {
  color: rgba(255, 255, 255, 0.5);
}


/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.96);
  cursor: zoom-out;
}

.lb-stage {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  max-height: 88svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lb-img {
  display: block;
  max-width: 100%;
  max-height: 80svh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-img.loaded {
  opacity: 1;
  transform: scale(1);
}

.lb-meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.lb-series {
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 300;
}

.lb-counter {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
}

/* Prev / Next */
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lb-btn:hover {
  background: rgba(218, 119, 86, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* Close */
.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.lb-close:hover {
  color: var(--accent);
}

/* Progress */
.lb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.lb-progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.35s ease;
}


/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 600px) {
  .gallery-hero {
    padding-left: 24px;
    padding-right: 24px;
  }

  .gallery-hero-inner {
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .series-item {
    height: 320px;
  }

  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }

  .lb-btn {
    width: 40px;
    height: 40px;
  }

  .lb-btn svg {
    width: 20px;
    height: 20px;
  }

  .lb-close {
    top: 12px;
    right: 12px;
  }
}
