/* ================================================================
   Emancipation — Cinematic Hero Carousel  v2
   Pure CSS animations — no GSAP dependency for visibility.
   Text is ALWAYS visible; animations are progressive enhancement.
   ================================================================ */

/* ── Reset & wrapper ────────────────────────────────────────────── */
.hero-cinema {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  max-height: 920px;
  overflow: hidden;
  background: var(--color-dark, #163640);
}

/* ── Swiper shell ───────────────────────────────────────────────── */
.hero-cinema .swiper {
  width: 100%;
  height: 100%;
}

.hero-cinema .swiper-slide {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Background image (Ken Burns target) ───────────────────────── */
.hero-slide-bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transform-origin: center center;
  /* Ken Burns: slow zoom driven by CSS animation on active slide */
  animation: kenburns 8s ease-out forwards;
}

@keyframes kenburns {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}

/* Gradient fallback */
.hero-slide-bg.gradient-fallback {
  background: linear-gradient(135deg,
    var(--color-dark, #163640) 0%,
    var(--color-navy, #1F2933) 48%,
    var(--color-blue-dark, #163640) 100%);
}

/* ── Overlay stack ──────────────────────────────────────────────── */
.hero-overlay-base {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.50);
  z-index: 1;
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,   rgba(0,0,0,0.80) 0%, transparent 50%),
    linear-gradient(to right, rgba(0,0,0,0.45) 0%, transparent 65%);
  z-index: 2;
}

.hero-overlay-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.60) 100%);
  z-index: 3;
}

/* ── Particle canvas ────────────────────────────────────────────── */
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

/* ── Content area ───────────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
  max-width: 920px;
  width: 100%;
}

/* ─────────────────────────────────────────────────────────────────
   TEXT ANIMATIONS — pure CSS keyframes.
   All elements start VISIBLE (opacity:1 is the default).
   We animate FROM a transformed state TO the natural state so
   the text is always readable even if JS/GSAP fails.
   ───────────────────────────────────────────────────────────────── */

/* ── Eyebrow badge ──────────────────────────────────────────────── */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--accent-rgb),0.14);
  border: 1px solid rgba(var(--accent-rgb),0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-yellow, #C8A24D);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 22px;
  /* Animate in */
  animation: hero-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #C8A24D);
  animation: hero-pulse 1.8s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(1.6); opacity: 0.5; }
}

/* ── Heading ────────────────────────────────────────────────────── */
.hero-heading {
  font-size: clamp(1.9rem, 5.5vw, 4.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
  animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.25s both;
}

/* Highlighted word — uses admin color per slide, then the site gold accent. */
.hero-heading .highlight {
  color: var(--hero-highlight-color, var(--color-yellow, #C8A24D));
  -webkit-text-fill-color: var(--hero-highlight-color, var(--color-yellow, #C8A24D));
  display: inline;
}

/* ── Subheading ─────────────────────────────────────────────────── */
.hero-subheading {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
  margin: 0 auto 34px;
  line-height: 1.7;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
  animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.45s both;
}

/* ── CTA buttons ────────────────────────────────────────────────── */
.hero-btns-cinema {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.62s both;
}

/* ── Shared entrance keyframe ───────────────────────────────────── */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Re-trigger animation when Swiper clones a slide into active state */
.swiper-slide-active .hero-eyebrow    { animation: hero-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s  both; }
.swiper-slide-active .hero-heading    { animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.25s both; }
.swiper-slide-active .hero-subheading { animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.45s both; }
.swiper-slide-active .hero-btns-cinema{ animation: hero-fade-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.62s both; }
.swiper-slide-active .hero-slide-bg   { animation: kenburns 8s ease-out forwards; }

/* Inactive slides — reset animation so it replays when they become active */
.swiper-slide:not(.swiper-slide-active) .hero-eyebrow,
.swiper-slide:not(.swiper-slide-active) .hero-heading,
.swiper-slide:not(.swiper-slide-active) .hero-subheading,
.swiper-slide:not(.swiper-slide-active) .hero-btns-cinema {
  animation: none;
  opacity: 0;
}

.swiper-slide:not(.swiper-slide-active) .hero-slide-bg {
  animation: none;
  transform: scale(1.0);
}

/* ── Button styles ──────────────────────────────────────────────── */

/* Primary CTA */
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-blue, #1F5A66) 0%, var(--color-blue-dark, #163640) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 100px;
  border: 1px solid var(--color-blue, #1F5A66);
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 6px 24px rgba(var(--primary-rgb),0.40),
    0 0 0 0 rgba(var(--primary-rgb),0.35);
  transition:
    transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.25s ease,
    background 0.25s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

/* Shimmer sweep */
.hero-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 80%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.30) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.hero-btn-primary:hover::before { left: 160%; }

/* Pulsing glow ring (idle) */
.hero-btn-primary::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 100px;
  border: 2px solid rgba(var(--primary-rgb),0);
  animation: hero-btn-ring 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hero-btn-ring {
  0%   { inset: -4px;  border-color: rgba(var(--primary-rgb),0.55); opacity: 1; }
  70%  { inset: -14px; border-color: rgba(var(--primary-rgb),0.05); opacity: 0; }
  100% { inset: -14px; border-color: rgba(var(--primary-rgb),0);    opacity: 0; }
}

.hero-btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 18px 48px rgba(var(--primary-rgb),0.48),
    0 4px 16px rgba(var(--primary-rgb),0.28);
  color: #fff;
}
.hero-btn-primary:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb),0.38);
}

/* Arrow icon bounce on hover */
.hero-btn-primary:hover .fa-arrow-right {
  animation: btn-arrow-bounce 0.55s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes btn-arrow-bounce {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(6px); }
  100% { transform: translateX(4px); }
}

/* ── Ghost / secondary CTA ──────────────────────────────────────── */
.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.hero-btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hero-btn-ghost:hover::before { opacity: 1; }
.hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.70);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.20);
}
.hero-btn-ghost:active {
  transform: translateY(-1px);
}

/* Play icon spin on hover */
.hero-btn-ghost:hover .fa-circle-play {
  animation: btn-icon-spin 0.5s ease forwards;
}
@keyframes btn-icon-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(20deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ── Progress bar ───────────────────────────────────────────────── */
.hero-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-blue, #1F5A66), var(--color-yellow, #C8A24D));
  z-index: 20;
}

/* ── Pagination dots ────────────────────────────────────────────── */
.hero-cinema .swiper-pagination {
  bottom: 28px;
  z-index: 20;
}
.hero-cinema .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.4);
  opacity: 1;
  border-radius: 50%;
  transition: width 0.35s ease, background 0.25s ease, border-radius 0.35s ease;
}
.hero-cinema .swiper-pagination-bullet-active {
  background: var(--color-yellow, #C8A24D);
  width: 28px;
  border-radius: 100px;
}

/* ── Nav arrows ─────────────────────────────────────────────────── */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 15, 30, 0.45);
  border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.30);
  outline: none;
}

/* Glow ring on hover */
.hero-nav::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(var(--primary-rgb),0);
  transition: border-color 0.28s ease, inset 0.28s ease;
  pointer-events: none;
}
.hero-nav:hover::after {
  border-color: rgba(var(--accent-rgb),0.65);
  inset: -7px;
}

.hero-nav:hover {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.92) 0%, rgba(var(--primary-dark-rgb),0.95) 100%);
  border-color: rgba(var(--primary-rgb),0.70);
  box-shadow:
    0 8px 32px rgba(var(--primary-rgb),0.40),
    0 2px 8px rgba(0,0,0,0.30);
  transform: translateY(-50%) scale(1.12);
}
.hero-nav:active {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.32);
}

/* Icon shift on hover */
.hero-nav-prev { left: 24px; }
.hero-nav-next { right: 24px; }

.hero-nav-prev:hover i { animation: nav-shift-left  0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.hero-nav-next:hover i { animation: nav-shift-right 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }

@keyframes nav-shift-left  { 0% { transform:translateX(0); } 50% { transform:translateX(-4px); } 100% { transform:translateX(-2px); } }
@keyframes nav-shift-right { 0% { transform:translateX(0); } 50% { transform:translateX(4px);  } 100% { transform:translateX(2px);  } }

/* ── Slide counter ──────────────────────────────────────────────── */
.hero-counter {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
}
.hero-counter .current {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-yellow, #C8A24D);
  line-height: 1;
}
.hero-counter .divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.4);
}
.hero-counter .total {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* ── Parallax layer (mouse JS) ──────────────────────────────────── */
.hero-parallax-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  will-change: transform;
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-cinema {
    height: 88vh;
    min-height: 520px;
    max-height: none;
  }
  .hero-content { padding: 0 16px; max-width: 100%; }
  .hero-heading { font-size: clamp(1.5rem, 7vw, 2.4rem); margin-bottom: 14px; }
  .hero-subheading { font-size: 0.88rem; margin-bottom: 24px; }
  .hero-eyebrow { font-size: 0.72rem; padding: 5px 14px; margin-bottom: 16px; }
  .hero-nav { width: 40px; height: 40px; font-size: 0.85rem; }
  .hero-nav-prev { left: 8px; }
  .hero-nav-next { right: 8px; }
  .hero-counter { display: none; }
  .hero-btn-primary { padding: 13px 26px; font-size: 0.92rem; }
  .hero-btn-ghost   { padding: 12px 22px; font-size: 0.9rem; }
  .hero-cinema .swiper-pagination { bottom: 18px; }
}

/* Landscape phones — shorter hero */
@media (max-width: 768px) and (orientation: landscape) {
  .hero-cinema { height: 100vh; min-height: 340px; }
  .hero-heading { font-size: clamp(1.2rem, 5vw, 1.8rem); }
  .hero-subheading { display: none; }
}

@media (max-width: 480px) {
  .hero-cinema { min-height: 480px; }
  .hero-btns-cinema {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-btn-primary,
  .hero-btn-ghost {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  .hero-nav { display: none; }
  /* Bigger pagination dots for fat thumbs */
  .hero-cinema .swiper-pagination-bullet { width: 10px; height: 10px; }
  .hero-cinema .swiper-pagination-bullet-active { width: 32px; }
}

@media (max-width: 360px) {
  .hero-cinema { min-height: 420px; }
  .hero-btn-primary, .hero-btn-ghost { font-size: 0.86rem; padding: 11px 20px; }
}
