/* ============================================================
   UNIFIED HERO COMPONENT — SparkNest Academy
   ============================================================
   One reusable hero for all internal pages.
   BEM naming: .sn-hero, .sn-hero__*, .sn-hero--*
   Compatible with all themes via CSS custom properties.
   ============================================================ */

/* ── Color Variants ──
   Each page category sets its own gradient accents.
   These custom properties are consumed by the base .sn-hero rules. */

.sn-hero--blue {
  --hero-g1: #1e3a8a;
  --hero-g2: #2563eb;
  --hero-g3: #6366f1;
  --hero-glow: rgba(37, 99, 235, 0.35);
}

.sn-hero--purple {
  --hero-g1: #1e1b4b;
  --hero-g2: #6c4df6;
  --hero-g3: #7c3aed;
  --hero-glow: rgba(139, 92, 246, 0.35);
}

.sn-hero--orange {
  --hero-g1: #7c2d12;
  --hero-g2: #d97706;
  --hero-g3: #f59e0b;
  --hero-glow: rgba(245, 158, 11, 0.35);
}

.sn-hero--green {
  --hero-g1: #064e3b;
  --hero-g2: #059669;
  --hero-g3: #10b981;
  --hero-glow: rgba(16, 185, 129, 0.35);
}

.sn-hero--navy {
  --hero-g1: #0c1222;
  --hero-g2: #1e3a5f;
  --hero-g3: #3b82f6;
  --hero-glow: rgba(59, 130, 246, 0.35);
}

.sn-hero--blue-purple {
  --hero-g1: #1e1b4b;
  --hero-g2: #3b82f6;
  --hero-g3: #8b5cf6;
  --hero-glow: rgba(99, 102, 241, 0.35);
}

/* ── Base Hero Container ── */
.sn-hero {
  --hero-g1: #1e1b4b;
  --hero-g2: #6c4df6;
  --hero-g3: #7c3aed;
  --hero-glow: rgba(139, 92, 246, 0.35);

  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 85px 24px 60px;
  background: linear-gradient(135deg, var(--hero-g1) 0%, var(--hero-g2) 50%, var(--hero-g3) 100%);
  background-size: 300% 300%;
  animation: snHeroGradient 12s ease infinite;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
}

/* Radial glow overlays */
.sn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--hero-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, var(--hero-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

/* Grid pattern overlay */
.sn-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  z-index: 0;
  pointer-events: none;
}

/* Floating blur orbs */
.sn-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.sn-hero__orb.o1 {
  width: 260px;
  height: 260px;
  background: var(--hero-g2);
  top: -60px;
  left: -60px;
  animation: snHeroFloat 8s ease-in-out infinite;
}

.sn-hero__orb.o2 {
  width: 200px;
  height: 200px;
  background: var(--hero-g3);
  bottom: -40px;
  right: 10%;
  animation: snHeroFloatReverse 10s ease-in-out infinite;
}

.sn-hero__orb.o3 {
  width: 180px;
  height: 180px;
  background: var(--hero-glow);
  top: 30%;
  left: 60%;
  animation: snHeroFloat 7s ease-in-out infinite 1s;
}

/* ── Content Wrapper ── */
.sn-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Floating 3D emoji/icon */
.sn-hero__icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  animation: snHeroWiggle 3s ease-in-out infinite;
}

/* Small badge pill */
.sn-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  opacity: 0;
  animation: snHeroFadeUp 0.6s ease 0.1s forwards;
}

/* Large heading */
.sn-hero__title {
  font-size: 3.5rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
  letter-spacing: -1px;
  opacity: 0;
  animation: snHeroFadeUp 0.6s ease 0.15s forwards;
}

.sn-hero__title span {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #ff6b00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 2-line description */
.sn-hero__desc {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin-bottom: 32px;
  max-width: 700px;
  line-height: 1.6;
  opacity: 0;
  animation: snHeroFadeUp 0.6s ease 0.25s forwards;
}

/* ── CTA Buttons ── */
.sn-hero__buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
  opacity: 0;
  animation: snHeroFadeUp 0.6s ease 0.35s forwards;
}

.sn-hero__btn--primary,
.sn-hero__btn--secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.sn-hero__btn--primary {
  background: linear-gradient(135deg, #ff6b00, #f59e0b);
  color: #fff;
  box-shadow: 0 8px 30px rgba(255, 107, 0, 0.4);
}

.sn-hero__btn--primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 40px rgba(255, 107, 0, 0.55);
}

.sn-hero__btn--secondary {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.sn-hero__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ── Statistics Glass Cards ── */
.sn-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 700px;
  opacity: 0;
  animation: snHeroFadeUp 0.6s ease 0.45s forwards;
}

.sn-hero__stat {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md, 16px);
  padding: 16px 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.sn-hero__stat:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.sn-hero__stat h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.2;
}

.sn-hero__stat span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* ── Keyframes ── */
@keyframes snHeroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes snHeroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

@keyframes snHeroFloatReverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-5deg); }
}

@keyframes snHeroWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes snHeroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   SPLIT LAYOUT VARIANT (Dashboard)
   ══════════════════════════════════════════ */

.sn-hero--split {
  text-align: left;
}

/* In split mode, hide the default center content wrapper */
.sn-hero--split .sn-hero__content {
  display: none;
}

.sn-hero__container {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 20px;
}

.sn-hero__text-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sn-hero__text-side .sn-hero__badge {
  align-self: flex-start;
}

.sn-hero__text-side .sn-hero__buttons {
  justify-content: flex-start;
}

.sn-hero__text-side .sn-hero__stats {
  max-width: 100%;
}

.sn-hero__media-side {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sn-hero__media-side video,
.sn-hero__media-side img {
  max-width: 100%;
  max-height: 340px;
  border-radius: var(--radius-lg, 22px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  object-fit: cover;
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sn-hero {
    min-height: 500px;
    padding: 80px 20px 56px;
  }

  .sn-hero__title {
    font-size: 2.75rem;
  }

  .sn-hero__desc {
    font-size: 1.05rem;
  }

  .sn-hero__stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
  }

  /* Split layout stacks on tablet */
  .sn-hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sn-hero--split {
    text-align: center;
  }

  .sn-hero__text-side {
    align-items: center;
  }

  .sn-hero__text-side .sn-hero__buttons {
    justify-content: center;
  }

  .sn-hero__text-side .sn-hero__badge {
    align-self: center;
  }

  .sn-hero__text-side .sn-hero__stats {
    margin-left: auto;
    margin-right: auto;
  }

  .sn-hero__media-side {
    order: -1;
  }

  .sn-hero__media-side video,
  .sn-hero__media-side img {
    max-height: 260px;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
   ══════════════════════════════════════════ */
@media (max-width: 640px) {
  .sn-hero {
    min-height: 440px;
    padding: 76px 16px 48px;
    border-radius: 0 0 28px 28px;
  }

  .sn-hero__icon {
    font-size: 3rem;
    margin-bottom: 16px;
  }

  .sn-hero__badge {
    font-size: 0.8rem;
    padding: 6px 16px;
    margin-bottom: 16px;
  }

  .sn-hero__title {
    font-size: 2.125rem;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
  }

  .sn-hero__desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .sn-hero__buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-bottom: 32px;
  }

  .sn-hero__btn--primary,
  .sn-hero__btn--secondary {
    width: 100%;
    justify-content: center;
    padding: 13px 24px;
    font-size: 0.95rem;
  }

  .sn-hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .sn-hero__stat {
    padding: 12px 8px;
  }

  .sn-hero__stat h3 {
    font-size: 1.25rem;
  }

  .sn-hero__stat span {
    font-size: 0.78rem;
  }

  .sn-hero__orb.o1 { width: 160px; height: 160px; }
  .sn-hero__orb.o2 { width: 120px; height: 120px; }
  .sn-hero__orb.o3 { width: 100px; height: 100px; }

  .sn-hero__media-side video,
  .sn-hero__media-side img {
    max-height: 200px;
  }
}

/* ══════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .sn-hero {
    animation: none;
  }

  .sn-hero__icon {
    animation: none;
  }

  .sn-hero__orb {
    animation: none;
  }

  .sn-hero__badge,
  .sn-hero__title,
  .sn-hero__desc,
  .sn-hero__buttons,
  .sn-hero__stats {
    opacity: 1;
    animation: none;
  }
}
