/* ========================================
   Crash Hero — Scroll-controlled Video Crash
   ======================================== */

/* ---- Main Container ---- */
.crash-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #ffffff;
}

/* ---- Video ---- */
.crash-hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
}

/* ---- Intro (visible on page load) ---- */
.crash-hero__intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
  color: #1d1729;
  padding: var(--space-lg, 24px);
  will-change: opacity, transform;
}

.crash-hero__intro .hero__badge {
  margin-bottom: var(--space-md, 16px);
}

.crash-hero__intro h1 {
  font-size: var(--fs-hero, clamp(2rem, 5vw, 4rem));
  font-weight: var(--fw-black, 900);
  line-height: 1.1;
  margin-bottom: var(--space-md, 16px);
  max-width: 700px;
  color: #1d1729;
}

.crash-hero__intro p {
  font-size: var(--fs-lg, 1.125rem);
  color: #4a4458;
  max-width: 550px;
  margin-bottom: 0;
  line-height: 1.6;
}

/* ---- Content (appears after crash) ---- */
.crash-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #1d1729;
  opacity: 0;
  padding: var(--space-lg, 24px);
  will-change: opacity, transform;
}

/* Semi-transparent backdrop for readability */
.crash-hero__content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
  opacity: inherit;
}

.crash-hero__content-inner {
  display: flex;
  align-items: center;
  gap: var(--space-2xl, 48px);
  max-width: 900px;
  width: 100%;
}

.crash-hero__text {
  flex: 1;
  text-align: left;
}

.crash-hero__text h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: var(--fw-black, 900);
  line-height: 1.1;
  margin-bottom: var(--space-md, 16px);
  color: #1d1729;
}

.crash-hero__text p {
  font-size: var(--fs-lg, 1.125rem);
  color: #4a4458;
  margin-bottom: var(--space-xl, 32px);
  line-height: 1.6;
}

.crash-hero__ctas {
  display: flex;
  gap: var(--space-md, 16px);
  flex-wrap: wrap;
}

/* Calculator card in post-crash */
.crash-hero__calc {
  flex-shrink: 0;
  will-change: transform, opacity;
}

.crash-hero__calc .hero-calc-preview {
  animation: none;
}

/* ---- Scroll Indicator ---- */
.crash-hero__scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(30, 25, 45, 0.5);
  font-size: 0.8125rem;
  animation: scrollHintPulse 2s ease-in-out infinite;
}

.crash-hero__scroll-hint svg {
  width: 24px;
  height: 24px;
  stroke: rgba(30, 25, 45, 0.5);
  fill: none;
  stroke-width: 2;
}

@keyframes scrollHintPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(6px); }
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .crash-hero__intro h1 {
    font-size: clamp(1.75rem, 4.5vw, 3rem);
  }
  .crash-hero__text h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
}

@media (max-width: 768px) {
  /* Hero да може да расте — съдържанието е над 100vh на мобилен */
  .crash-hero {
    height: auto;
    min-height: 100vh;
  }

  .crash-hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transform: none;
    z-index: 1;
  }

  /* Intro — пълен viewport при зареждане */
  .crash-hero__intro {
    position: relative;
    min-height: 100vh;
    padding: 90px 20px 80px;
    justify-content: center;
  }

  .crash-hero__intro h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: 14px;
  }

  .crash-hero__intro p,
  .crash-hero__text p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Content — вече НЕ absolute на мобилен → flow надолу */
  .crash-hero__content {
    position: relative;
    inset: auto;
    padding: 40px 20px 60px;
    min-height: 100vh;
    opacity: 1; /* на мобилен се вижда директно след intro */
  }

  .crash-hero__content::before {
    background: rgba(255, 255, 255, 0.85);
  }

  .crash-hero__content-inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .crash-hero__text {
    text-align: center;
  }

  .crash-hero__ctas {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .crash-hero__ctas .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .crash-hero__calc {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  /* Скрий "Скролни надолу" — не е нужен на мобилен, че припокрива калкулатора */
  .crash-hero__scroll-hint {
    display: none;
  }
}

/* По-малки телефони */
@media (max-width: 480px) {
  .crash-hero__intro h1 {
    font-size: clamp(1.4rem, 6.5vw, 2rem);
  }
  .crash-hero__intro p {
    font-size: 0.9rem;
  }
  .crash-hero__intro .hero__badge {
    font-size: 0.78rem;
    padding: 5px 12px;
  }
}

/* ========================================
   Academy — Coming Soon
   ======================================== */
.academy-coming-soon .section-with-bg__overlay {
  background: rgba(255, 255, 255, 0.92);
}

.academy-coming-soon__content {
  text-align: center;
  padding: var(--space-2xl, 48px) 0;
}

.academy-coming-soon__content .section__title {
  color: #1d1729;
  margin-top: var(--space-md, 16px);
}

.academy-coming-soon__content .section__subtitle {
  color: #4a4458;
  max-width: 550px;
  margin: 0 auto;
}

.academy-coming-soon__video {
  margin: var(--space-xl, 32px) auto;
  max-width: 640px;
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
}

.academy-coming-soon__video video,
.academy-coming-soon__video img {
  width: 100%;
  height: auto;
  display: block;
}

/* Coming-soon placeholder (when no preview clip is set) */
.academy-coming-soon__video--soon {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1d1729 0%, #2a1f47 100%);
}
.academy-preview-soon {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
.academy-preview-soon::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(114, 67, 242, 0.30) 0%, transparent 50%);
  animation: academy-preview-glow 8s ease-in-out infinite;
}
@keyframes academy-preview-glow {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
.academy-preview-soon__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.academy-preview-soon__icon svg {
  width: 30px;
  height: 30px;
  color: #c084fc;
  margin-left: 4px;
}
.academy-preview-soon__title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.academy-preview-soon__text {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.academy-coming-soon__features {
  display: flex;
  justify-content: center;
  gap: var(--space-xl, 32px);
  margin-top: var(--space-lg, 24px);
}

.academy-coming-soon__feature {
  display: flex;
  align-items: center;
  gap: var(--space-xs, 8px);
  color: #4a4458;
  font-size: var(--fs-sm, 0.875rem);
  font-weight: var(--fw-medium, 500);
}

.academy-coming-soon__levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 380px));
  gap: var(--space-lg, 24px);
  margin: var(--space-xl, 32px) auto 0;
  justify-content: center;
}

.academy-coming-soon__level {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-xl, 16px);
  padding: var(--space-lg, 24px);
  text-align: center;
}

.academy-coming-soon__level h3 {
  color: #1d1729;
  font-size: var(--fs-md, 1rem);
  font-weight: var(--fw-bold, 700);
  margin: var(--space-sm, 12px) 0 var(--space-xs, 8px);
}

.academy-coming-soon__level p {
  color: #6c757d;
  font-size: var(--fs-sm, 0.875rem);
  line-height: 1.5;
  margin: 0;
}

/* ── Academy Split Layout ── */
.academy-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 40px;
}

.academy-split__image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.academy-split__image img,
.academy-split__image video {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Animated Course Levels ── */
.academy-split__levels {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 32px;
}

.academy-levels__connector {
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}

.academy-level {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 24px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s, transform 0.5s, border-color 0.3s, box-shadow 0.3s;
}

.academy-level--visible {
  opacity: 1;
  transform: translateX(0);
}

.academy-level--active {
  border-color: var(--color-accent-purple, #7243f2);
  box-shadow: 0 4px 20px rgba(114, 67, 242, 0.1);
}

/* Dot on connector */
.academy-level::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 2px solid #ffffff;
  transition: background 0.3s;
  z-index: 1;
}

.academy-level--active::before {
  background: var(--color-accent-purple, #7243f2);
  box-shadow: 0 0 0 4px rgba(114, 67, 242, 0.15);
}

.academy-level__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.academy-level__badge--beginner {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.academy-level__badge--practice {
  background: rgba(114, 67, 242, 0.1);
  color: #7243f2;
}

.academy-level__badge--expert {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.academy-level__title {
  font-size: 16px;
  font-weight: 700;
  color: #1d1729;
  margin: 0 0 6px;
}

.academy-level__desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 12px;
}

.academy-level__modules {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.academy-level__modules span {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 6px;
}

.academy-level__progress {
  margin-top: 12px;
  height: 4px;
  background: #f3f4f6;
  border-radius: 2px;
  overflow: hidden;
}

.academy-level__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 1.2s ease-out;
}

.academy-level:nth-child(1) .academy-level__progress-bar { background: #10b981; }
.academy-level:nth-child(2) .academy-level__progress-bar { background: #7243f2; }
.academy-level:nth-child(3) .academy-level__progress-bar { background: #ef4444; }

/* Responsive */
@media (max-width: 991px) {
  .academy-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .academy-split__image {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .academy-split__levels { padding-left: 24px; }
  .academy-level { padding: 16px 18px; }
  .academy-level::before { left: -19px; width: 10px; height: 10px; }
  .academy-levels__connector { left: 7px; }
}

@media (max-width: 768px) {
  .academy-coming-soon__features {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md, 16px);
  }

  .academy-coming-soon__levels {
    grid-template-columns: 1fr;
  }
}
