/* ================================================================
   EEPL Classroom — 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: #0d0d0d;
}

/* ── 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,
    #0f0c29 0%,
    #302b63 40%,
    #24243e 70%,
    #c0392b 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(230, 57, 70, 0.18);
  border: 1px solid rgba(230, 57, 70, 0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ff8a93;
  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: #e63946;
  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 (red gradient) — no word splitting needed */
.hero-heading .highlight {
  background: linear-gradient(135deg, #e63946, #ff8a93);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  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 ──────────────────────────────────────────────── */
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #e63946;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.45);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  position: relative;
  overflow: hidden;
}

.hero-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.45s ease;
}
.hero-btn-primary:hover::before { left: 100%; }
.hero-btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 40px rgba(230, 57, 70, 0.6);
  background: #c92a36;
  color: #fff;
}

.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 100px;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.22s, border-color 0.22s, transform 0.22s;
}
.hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
  transform: translateY(-3px);
}

/* ── Progress bar ───────────────────────────────────────────────── */
.hero-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #e63946, #ff8a93);
  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: #e63946;
  width: 28px;
  border-radius: 100px;
}

/* ── Nav arrows ─────────────────────────────────────────────────── */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s, border-color 0.22s, transform 0.2s;
}
.hero-nav:hover {
  background: rgba(230, 57, 70, 0.75);
  border-color: #e63946;
  transform: translateY(-50%) scale(1.1);
}
.hero-nav-prev { left: 24px; }
.hero-nav-next { right: 24px; }

/* ── 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: #fff;
  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: 92vh; min-height: 480px; }
  .hero-heading { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .hero-subheading { font-size: 0.9rem; }
  .hero-nav { width: 42px; height: 42px; font-size: 0.9rem; }
  .hero-nav-prev { left: 10px; }
  .hero-nav-next { right: 10px; }
  .hero-counter { display: none; }
  .hero-btn-primary, .hero-btn-ghost { padding: 12px 22px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .hero-btns-cinema { flex-direction: column; align-items: center; }
  .hero-nav { display: none; }
}
