/* ==========================================================================
   Material Design 3 (M3) Stylesheet with 60-30-10 Palette
   60% Primary Surface: Clean White (#ffffff / #fdfcfc)
   30% Secondary Brand & Structure: Royal Sapphire Blue (#2563eb / #1d4ed8) & Slate (#0f172a / #475569)
   10% Distinctive Accent: Golden Amber (#d97706 / #f59e0b)
   ========================================================================== */

:root {
  /* ── 60-30-10 Educational Palette Tokens ── */
  --md-sys-color-primary: #2563eb;
  --md-sys-color-primary-dark: #1d4ed8;
  --md-sys-color-primary-hover: #1e40af;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #eff6ff;
  --md-sys-color-on-primary-container: #1e40af;

  --md-sys-color-accent: #d97706;
  --md-sys-color-accent-dark: #b45309;
  --md-sys-color-accent-container: #fef3c7;
  --md-sys-color-on-accent-container: #92400e;

  --md-sys-color-secondary: #0284c7;
  --md-sys-color-secondary-container: #e0f2fe;
  --md-sys-color-on-secondary-container: #0369a1;

  --md-sys-color-surface: #fdfcfc;
  --md-sys-color-surface-dim: #f8fafc;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #fdfcfc;
  --md-sys-color-surface-container: #f8fafc;
  --md-sys-color-surface-container-high: #f1f5f9;
  --md-sys-color-surface-container-highest: #e2e8f0;

  --md-sys-color-on-surface: #0f172a;
  --md-sys-color-on-surface-variant: #475569;
  --md-sys-color-outline: #cbd5e1;
  --md-sys-color-outline-variant: #bfdbfe;

  /* ── M3 Shape Corner Tokens ── */
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 14px;
  --md-sys-shape-corner-large: 20px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 9999px;

  /* ── M3 Elevation Tokens ── */
  --md-sys-elevation-0: none;
  --md-sys-elevation-1: 0px 1px 3px 1px rgba(15, 23, 42, 0.04), 0px 1px 2px 0px rgba(15, 23, 42, 0.06);
  --md-sys-elevation-2: 0px 3px 8px 2px rgba(15, 23, 42, 0.04), 0px 1px 3px 0px rgba(15, 23, 42, 0.05);
  --md-sys-elevation-3: 0px 6px 18px 3px rgba(37, 99, 235, 0.06), 0px 2px 5px 0px rgba(15, 23, 42, 0.03);
  --md-sys-elevation-4: 0px 10px 28px 4px rgba(37, 99, 235, 0.12), 0px 3px 8px 0px rgba(15, 23, 42, 0.04);

  /* ── M3 State Layer & Transitions ── */
  --md-sys-motion-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-duration-short: 0.2s;
  --md-sys-duration-medium: 0.3s;
}

/* ── Container Layout ── */
.page-home-v2 {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4.5rem;
  font-family: "Tajawal", system-ui, -apple-system, sans-serif;
  color: var(--md-sys-color-on-surface);
}

/* ==========================================================================
   Hero Section (Clean Elevated Surface with Crisp Royal Blue Accent)
   ========================================================================== */

.home-v2-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem 3rem;
  margin-bottom: 2.25rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37, 99, 235, 0.05), transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(217, 119, 6, 0.04), transparent 70%),
    var(--md-sys-color-surface-container-lowest);
  border: 1.5px solid var(--md-sys-color-outline-variant);
  box-shadow: var(--md-sys-elevation-2);
  overflow: hidden;
}

/* Top colored accent stripe */
.home-v2-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8, #d97706, #f59e0b);
}

/* M3 Assist Chip Badge */
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.2rem;
  margin-bottom: 1.35rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 0.9rem;
  font-weight: 800;
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.home-hero-badge span.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

/* Hero Logo with M3 shape token */
.home-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
}

.home-hero-logo {
  width: 98px;
  height: 98px;
  border-radius: 26px;
  padding: 4px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  border: 2px solid #dbeafe;
  transition: transform var(--md-sys-duration-medium) var(--md-sys-motion-standard);
}

.home-hero-logo:hover {
  transform: scale(1.05) rotate(1deg);
}

/* Hero Typography (M3 Display / Headline) */
.home-v2-hero .hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.1rem, 4.8vw, 2.75rem);
  font-weight: 900;
  color: var(--md-sys-color-on-surface);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-v2-hero .hero-title span.highlight {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 60%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Hero Interactive Feature Slider (بطاقات متحركة لشرح ميزات التطبيق)
   ========================================================================== */

.hero-slider-container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.slider-viewport {
  position: relative;
  width: 100%;
  min-height: 155px;
  border-radius: var(--md-sys-shape-corner-large);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.04);
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
}

.slider-track {
  position: relative;
  width: 100%;
}

.slider-card {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 2.2rem 2rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--md-sys-shape-corner-large);
  border: 1.5px solid #bfdbfe;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.4s cubic-bezier(0.2, 0, 0, 1), transform 0.4s cubic-bezier(0.2, 0, 0, 1);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  min-height: 195px;
}

.slider-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.70) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.slider-card:hover::before {
  opacity: 0.7;
}

.slider-card:nth-child(1) { background-image: url('../images/card-smart-explanation.jpg'); }
.slider-card:nth-child(2) { background-image: url('../images/card-interactive-exercises.jpg'); }
.slider-card:nth-child(3) { background-image: url('../images/card-free-trial.jpg'); }
.slider-card:nth-child(4) { background-image: url('../images/card-secure-activation.jpg'); }

.slider-card > * {
  position: relative;
  z-index: 2;
}

.slider-card.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: slideFadeIn 0.4s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.slider-card-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.slider-card-badge {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.3rem 0.9rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.slider-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px #ffffff;
}

.slider-card-desc {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #0f172a;
  font-weight: 700;
  max-width: 34rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* Controls (Dots & Arrows) */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.slider-arrow {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.slider-arrow:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  transform: scale(1.08);
}

.slider-arrow:active {
  transform: scale(0.95);
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  padding: 0;
}

.slider-dot.active {
  width: 26px;
  background: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Hero Action Buttons (M3 Filled & Outlined Buttons) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.1rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: var(--md-sys-color-on-primary);
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.30);
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
  border: 1px solid transparent;
}

.btn-hero-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.40);
  transform: translateY(-2px);
}

.btn-hero-primary:active {
  transform: translateY(0);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.9rem;
  border-radius: var(--md-sys-shape-corner-full);
  border: 1.5px solid #cbd5e1;
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
}

.btn-hero-secondary:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.btn-hero-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.95rem 2.2rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-hero-guide:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 8px 26px rgba(217, 119, 6, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-hero-guide:active {
  transform: translateY(0);
}

.btn-hero-guide-pulse {
  display: inline-block;
  font-size: 1.25rem;
  animation: guideIconBounce 2s infinite ease-in-out;
}

@keyframes guideIconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(-8deg); }
}

/* ==========================================================================
   Free Preview Banner (M3 Expressive Card with Warm Amber Accent)
   ========================================================================== */

.free-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
  padding: 1.35rem 1.75rem;
  border-radius: var(--md-sys-shape-corner-large);
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
  border: 1.5px solid #fde68a;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.08);
  transition: box-shadow var(--md-sys-duration-short), transform var(--md-sys-duration-short);
}

.free-preview-banner:hover {
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.14);
  transform: translateY(-2px);
}

.free-preview-info {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.free-preview-text h4 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #92400e;
}

.free-preview-text p {
  margin: 0;
  font-size: 0.92rem;
  color: #b45309;
  line-height: 1.55;
}

.btn-free-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
}

.btn-free-preview:hover {
  background: linear-gradient(135deg, #b45309, #92400e);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
  transform: translateY(-2px);
}

.btn-free-preview:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

/* ==========================================================================
   Sections Headings (M3 Headline Medium)
   ========================================================================== */

.home-v2-section {
  margin-bottom: 3.75rem;
}

.home-v2-section-head {
  margin-bottom: 1.85rem;
  text-align: center;
}

.home-v2-section-head h2 {
  margin: 0 0 0.45rem;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--md-sys-color-on-surface);
  letter-spacing: -0.01em;
}

.home-v2-section-head p {
  margin: 0;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 1.05rem;
  font-weight: 500;
}

/* ==========================================================================
   Grade Cards (Distinct Rich Color Themes for 9th Grade & Baccalaureate)
   ========================================================================== */

.grade-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grade-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}

.grade-card-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1rem;
}

.grade-card {
  position: relative;
  width: 100%;
  appearance: none;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: 2.25rem 1.75rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: #0f172a;
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
  overflow: hidden;
}

.grade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.70) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.grade-card:hover::before {
  opacity: 0.7;
}

.grade-card > * {
  position: relative;
  z-index: 2;
}

.grade-card:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
  transform: translateY(-3px);
}

.grade-card.active {
  border-color: #2563eb;
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 8px 24px rgba(37, 99, 235, 0.12);
}

/* Grade 9 Card (Royal Blue Accent) */
.grade-card-wrapper:nth-child(1) .grade-card {
  border-top: 4px solid #2563eb;
  background-image: url('../images/card-grade-9.jpg');
}

.grade-card-wrapper:nth-child(1) .grade-card-cta {
  color: #2563eb;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
}

.grade-card-wrapper:nth-child(1) .grade-card:hover .grade-card-cta,
.grade-card-wrapper:nth-child(1) .grade-card.active .grade-card-cta {
  background: #2563eb;
  color: #ffffff;
  border-color: transparent;
  font-weight: 900;
}

/* Baccalaureate Card (Deep Navy Sapphire Accent) */
.grade-card-wrapper:nth-child(2) .grade-card {
  border-top: 4px solid #1e40af;
  background-image: url('../images/card-grade-12.jpg');
}

.grade-card-wrapper:nth-child(2) .grade-card-cta {
  color: #1e40af;
  background: #e0e7ff;
  border: 1.5px solid #c7d2fe;
}

.grade-card-wrapper:nth-child(2) .grade-card:hover .grade-card-cta,
.grade-card-wrapper:nth-child(2) .grade-card.active .grade-card-cta {
  background: #1e40af;
  color: #ffffff;
  border-color: transparent;
  font-weight: 900;
}

.grade-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 900;
  color: #0f172a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px #ffffff;
}

.grade-card p {
  margin: 0 0 1.35rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

.grade-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.55rem 1.35rem;
  border-radius: var(--md-sys-shape-corner-full);
  transition: all var(--md-sys-duration-short);
}

/* ==========================================================================
   Subject Panel (M3 Container with Filter Chips)
   ========================================================================== */

.subject-panel {
  margin-top: 1.25rem;
  padding: 1.85rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: #ffffff;
  border: 2px solid #2563eb;
  box-shadow: 0 6px 18px 3px rgba(37, 99, 235, 0.08);
  animation: m3FadeUp 0.3s var(--md-sys-motion-standard) both;
}

.subject-panel.hidden {
  display: none;
}

.subject-panel-label {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* M3 Filter Chip */
.subject-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--md-sys-shape-corner-full);
  padding: 0.75rem 1.5rem;
  background: #f8fafc;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
}

.subject-chip:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}

.subject-chip.active {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   Lessons Panel & List Items
   ========================================================================== */

.lessons-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--md-sys-color-outline-variant);
}

.lessons-panel.hidden {
  display: none;
}

.lessons-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.lessons-panel-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--md-sys-color-on-surface);
}

.lessons-count {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--md-sys-color-on-surface-variant);
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lesson-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  border-radius: var(--md-sys-shape-corner-medium);
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.02rem;
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
}

.lesson-link-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e40af;
  transform: translateX(-4px);
}

.lesson-link-card::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}

.lesson-badge-free {
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.28rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.lessons-empty {
  margin: 0;
  padding: 1.75rem;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: var(--md-sys-shape-corner-medium);
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
}

/* ==========================================================================
   Features Grid (Clean White Surfaces with Royal Blue Structural Accents)
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.35rem;
}

.feature-card {
  padding: 1.85rem 1.6rem;
  border-radius: var(--md-sys-shape-corner-large);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid #e2e8f0;
  border-top: 3.5px solid #2563eb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  text-align: start;
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
  position: relative;
  overflow: hidden;
  color: #0f172a;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.70) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 0.7;
}

.feature-card > * {
  position: relative;
  z-index: 2;
}

.feature-card:nth-child(1) { background-image: url('../images/card-smart-explanation.jpg'); }
.feature-card:nth-child(2) { background-image: url('../images/card-interactive-exercises.jpg'); }
.feature-card:nth-child(3) {
  background-image: url('../images/card-free-trial.jpg');
  border-top-color: #d97706;
}
.feature-card:nth-child(4) { background-image: url('../images/card-secure-activation.jpg'); }

.feature-card:hover {
  border-color: #2563eb;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px #ffffff;
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #0f172a;
  line-height: 1.65;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Steps Section (Clean White Process Cards)
   ========================================================================== */

.home-v2-steps {
  padding: 2.5rem 2.25rem;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: var(--md-sys-elevation-1);
}

.steps-inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-inline {
  text-align: center;
  padding: 0 0.5rem;
}

.step-inline-num {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  border: 2px solid #bfdbfe;
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.step-inline:nth-child(1) .step-inline-num { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.step-inline:nth-child(2) .step-inline-num { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.step-inline:nth-child(3) .step-inline-num { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }

.step-inline h3 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--md-sys-color-on-surface);
}

.step-inline p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.65;
}

/* ==========================================================================
   Community Cards (Clean Crisp Surface with 60-30-10 Palette)
   ========================================================================== */

.community-card {
  padding: 2.25rem 1.75rem;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  color: #0f172a;
  transition: all var(--md-sys-duration-short) var(--md-sys-motion-standard);
}

.community-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.70) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.community-card:hover::before {
  opacity: 0.7;
}

.community-card > * {
  position: relative;
  z-index: 2;
}

.community-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.community-card:nth-child(1) {
  border-color: #bfdbfe;
  border-top: 4px solid #2563eb;
  background-image: url('../images/card-community-telegram.jpg');
}

.community-card:nth-child(2) {
  border-color: #fde68a;
  border-top: 4px solid #d97706;
  background-image: url('../images/card-community-support.jpg');
}

.community-card h3 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 8px #ffffff;
}

.community-card p {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.65;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Download App Section & Store Cards (M3 Elevated)
   ========================================================================== */

.home-download-section {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--md-sys-shape-corner-extra-large);
  padding: 2.25rem 1.75rem 2.5rem;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.06);
}

.home-download-head {
  text-align: center;
  margin-bottom: 2rem;
}

.home-download-head h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.home-download-head p {
  color: #475569;
  font-size: 0.98rem;
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
}

.download-badges-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.5rem;
}

.store-badge-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  font-family: inherit;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.store-badge-card:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.5);
}

.store-badge-img {
  display: block;
  width: 204px;
  height: 60px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease;
}

.store-badge-card:hover .store-badge-img {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.store-badge-pill {
  position: absolute;
  top: -9px;
  right: -6px;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.02em;
}

.store-badge-pill.pill-soon {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border: 1.5px solid #ffffff;
}

.store-badge-pill.pill-available {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  border: 1.5px solid #ffffff;
}

.store-badge-custom-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  width: 204px;
  height: 60px;
  background: #000000;
  border: 1.2px solid #a6a6a6;
  border-radius: 10px;
  padding: 0 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  text-align: start;
  direction: ltr;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
}

.store-badge-card:hover .store-badge-custom-btn {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  border-color: #4285f4;
}

.store-badge-custom-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
}

.store-badge-custom-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.store-badge-custom-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.store-badge-custom-main {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.download-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.75rem 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
  font-family: inherit;
  outline: none;
}

.download-card:hover {
  transform: translateY(-4px);
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.download-card:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.download-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.download-card-badge.badge-soon {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.download-card-badge.badge-available {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.download-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease;
}

.download-card:hover .download-card-icon {
  transform: scale(1.08);
}

.download-card-icon.icon-play {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border-color: #bfdbfe;
}

.download-card-icon.icon-apple {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-color: #334155;
}

.download-card-icon.icon-apk {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #a7f3d0;
}

.download-card-icon.icon-web {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}

.download-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.download-card-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 1rem;
}

.download-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  border: none;
  transition: all 0.2s ease;
  margin-top: auto;
}

.download-card-btn.btn-outline {
  background: #f1f5f9;
  color: #334155;
}

.download-card:hover .download-card-btn.btn-outline {
  background: #2563eb;
  color: #ffffff;
}

.download-card-btn.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.download-card-btn.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.download-helper-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.download-helper-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.download-helper-text {
  font-size: 0.88rem;
  color: #1e40af;
  line-height: 1.55;
}

.download-helper-text strong {
  font-weight: 800;
  color: #1d4ed8;
}

/* ── Hero Download Action Button ── */
.btn-hero-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-full);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
  transition: all 0.25s ease;
  border: 1.5px solid #334155;
}

.btn-hero-download:hover {
  transform: translateY(-2px);
  background: #1e293b;
  border-color: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

/* ── Store Notice Popup Modal ── */
.store-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.store-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.store-modal-dialog {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 460px;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  border: 1.5px solid #bfdbfe;
  position: relative;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  direction: rtl;
}

.store-modal-backdrop.active .store-modal-dialog {
  transform: scale(1) translateY(0);
}

.store-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.store-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.store-modal-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
}

.store-modal-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-bottom: 0.75rem;
}

.store-modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.store-modal-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #475569;
  margin: 0 0 1.5rem;
}

.store-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.store-modal-btn-apk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.store-modal-btn-apk:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

.store-modal-btn-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1.5px solid #bfdbfe;
  transition: all 0.2s ease;
  cursor: pointer;
}

.store-modal-btn-web:hover {
  background: #dbeafe;
}

/* ==========================================================================
   Keyframes & Responsive Utilities
   ========================================================================== */

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

@media (max-width: 768px) {
  .page-home-v2 {
    padding: 1.25rem 1rem 3.5rem;
  }

  .home-v2-hero {
    padding: 2.25rem 1.25rem 2rem;
    border-radius: var(--md-sys-shape-corner-large);
  }

  .free-preview-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.25rem;
  }

  .free-preview-info {
    flex-direction: column;
    text-align: center;
  }

  .btn-free-preview {
    justify-content: center;
  }

  .grade-cards {
    grid-template-columns: 1fr;
  }

  .steps-inline {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .step-inline {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    text-align: start;
    padding: 0;
  }

  .step-inline-num {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}
