/* HAMOU MATH — Live Visual Layer v59
   Matches the official reference design preview with 100% fidelity.
   Preserves all existing application logic, routes, tests, and handlers. */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  --hm-bg-dark: #040816;
  --hm-bg-card: #081226;
  --hm-gold: #f59e0b;
  --hm-gold-light: #fbbf24;
  --hm-cyan: #38bdf8;
  --hm-blue: #2563eb;
  --hm-navy: #0a1b38;
  --hm-border: rgba(56, 189, 248, 0.2);
  --hm-border-gold: rgba(245, 158, 11, 0.35);
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif !important;
}

body.hm49-home {
  background-color: var(--hm-bg-dark) !important;
  color: #f1f5f9 !important;
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, sans-serif !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* =========================================================
   1. TOPBAR & NAVIGATION (MATCHING IMAGE)
   ========================================================= */
body.hm49-home .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: rgba(4, 8, 22, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  padding: 8px 0 !important;
}

body.hm49-home .navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  gap: 16px !important;
}

/* Brand Logo */
.hm-brand-logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.hm-brand-logo img {
  height: 44px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* Main Navigation Links (Center) */
.hm-nav-center {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hm-nav-link {
  color: #cbd5e1 !important;
  text-decoration: none !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.hm-nav-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.hm-nav-link.active {
  color: var(--hm-gold-light) !important;
  font-weight: 800 !important;
  position: relative !important;
}

.hm-nav-link.active::after {
  content: "" !important;
  position: absolute !important;
  bottom: 2px !important;
  right: 14px !important;
  left: 14px !important;
  height: 2.5px !important;
  background: var(--hm-gold-light) !important;
  border-radius: 999px !important;
}

/* Action Buttons (Right in RTL / End) */
.hm-nav-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.hm-btn-search {
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
  font-size: 16px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.hm-btn-search:hover {
  color: #ffffff !important;
  border-color: var(--hm-cyan) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

.hm-btn-login {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 18px !important;
  border-radius: 12px !important;
  background: rgba(14, 23, 44, 0.75) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #f1f5f9 !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.hm-btn-login:hover {
  background: rgba(20, 35, 68, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

.hm-btn-register {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 7px 20px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  border: 1px solid #fcd34d !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.hm-btn-register:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5) !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.hm-country-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.hm-flag {
  font-size: 16px !important;
}

/* =========================================================
   2. HERO SECTION (MATCHING IMAGE)
   ========================================================= */
body.hm49-home .hero {
  position: relative !important;
  min-height: 480px !important;
  padding: 44px 0 40px !important;
  background: radial-gradient(ellipse at 50% 35%, rgba(13, 62, 128, 0.45) 0%, transparent 60%),
              radial-gradient(circle at 15% 30%, rgba(20, 45, 95, 0.35) 0%, transparent 45%),
              linear-gradient(135deg, #020611 0%, #061126 50%, #030814 100%) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18) !important;
  overflow: hidden !important;
}

/* Ambient cosmic and formula background */
body.hm49-home .hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.08) 0, transparent 40%),
    radial-gradient(circle at 30% 70%, rgba(124, 58, 237, 0.06) 0, transparent 40%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.hm-hero-container {
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  position: relative !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.95fr) minmax(0, 0.7fr) !important;
  gap: 24px !important;
  align-items: center !important;
}

/* Hero Right Column: Titles, badges & CTAs */
.hm-hero-main {
  text-align: right !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.hm-hero-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: fit-content !important;
  padding: 6px 18px !important;
  border-radius: 999px !important;
  background: rgba(14, 28, 54, 0.7) !important;
  border: 1px solid var(--hm-gold) !important;
  color: var(--hm-gold-light) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2) !important;
}

.hm-hero-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

.hm-hero-title {
  font-size: clamp(34px, 4.2vw, 52px) !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
}

.hm-hero-title span {
  color: var(--hm-gold-light) !important;
}

.hm-hero-tagline {
  font-size: clamp(22px, 2.5vw, 32px) !important;
  font-weight: 900 !important;
  color: var(--hm-gold-light) !important;
  margin: -4px 0 0 !important;
  letter-spacing: -0.01em !important;
}

.hm-hero-desc {
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: #cbd5e1 !important;
  max-width: 520px !important;
  margin: 0 !important;
}

/* 4 Mini Feature Badges Row */
.hm-hero-pills-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  margin-top: 6px !important;
}

.hm-hero-mini-pill {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 10px 8px !important;
  border-radius: 14px !important;
  background: rgba(14, 25, 48, 0.65) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  backdrop-filter: blur(12px) !important;
  transition: all 0.2s ease !important;
  color: #e2e8f0 !important;
}

.hm-hero-mini-pill:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  transform: translateY(-2px) !important;
  background: rgba(18, 32, 62, 0.8) !important;
}

.hm-mini-pill-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 6px !important;
  font-size: 15px !important;
}

.hm-mini-pill-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7) !important; color: white !important; }
.hm-mini-pill-icon.green  { background: linear-gradient(135deg, #059669, #10b981) !important; color: white !important; }
.hm-mini-pill-icon.blue   { background: linear-gradient(135deg, #0284c7, #38bdf8) !important; color: white !important; }
.hm-mini-pill-icon.indigo { background: linear-gradient(135deg, #4f46e5, #6366f1) !important; color: white !important; }

.hm-hero-mini-pill strong {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.3 !important;
}

.hm-hero-mini-pill span {
  font-size: 10px !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
  line-height: 1.2 !important;
}

/* Two Main CTAs */
.hm-hero-ctas {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 10px !important;
  flex-wrap: wrap !important;
}

.hm-btn-student {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 12px 32px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4) !important;
  transition: all 0.25s ease !important;
  min-width: 150px !important;
}

.hm-btn-student:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.55) !important;
}

.hm-btn-teacher {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 12px 32px !important;
  border-radius: 14px !important;
  background: rgba(11, 25, 52, 0.8) !important;
  border: 1px solid #2563eb !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.25s ease !important;
  min-width: 150px !important;
}

.hm-btn-teacher:hover {
  background: rgba(22, 45, 90, 0.9) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-2px) !important;
}

/* Hero Center Column: Floating 3D Artwork */
.hm-hero-visual-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.hm-hero-visual-img {
  width: 100% !important;
  max-width: 480px !important;
  height: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 15px 35px rgba(56, 189, 248, 0.35)) drop-shadow(0 0 50px rgba(245, 158, 11, 0.2)) !important;
  animation: floatBook 6s ease-in-out infinite !important;
}

@keyframes floatBook {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Hero Left Column: 3 Stacked Badges + Founder */
.hm-hero-side-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  text-align: right !important;
}

.hm-side-badge {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  background: rgba(14, 25, 48, 0.75) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  backdrop-filter: blur(14px) !important;
  transition: all 0.2s ease !important;
}

.hm-side-badge:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  transform: translateX(-3px) !important;
}

.hm-side-badge-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  border: 1px solid var(--hm-gold) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  color: var(--hm-gold-light) !important;
  background: rgba(245, 158, 11, 0.12) !important;
  flex-shrink: 0 !important;
}

.hm-side-badge-info h4 {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 2px !important;
}

.hm-side-badge-info p {
  font-size: 12px !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.hm-founder-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px dashed rgba(245, 158, 11, 0.35) !important;
  margin-top: 6px !important;
}

.hm-founder-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1px solid var(--hm-gold) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--hm-gold-light) !important;
  font-size: 15px !important;
  flex-shrink: 0 !important;
}

.hm-founder-info strong {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

.hm-founder-info small {
  display: block !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
}

/* =========================================================
   3. SECTION: "كل ما تحتاجه في مكان واحد" (MATCHING IMAGE)
   ========================================================= */
.hm-section-features {
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 56px 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.hm-features-head {
  text-align: center !important;
  margin-bottom: 36px !important;
}

.hm-features-head h2 {
  font-size: clamp(28px, 3.2vw, 40px) !important;
  font-weight: 950 !important;
  color: #0f172a !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.02em !important;
}

.hm-features-head p {
  font-size: 16px !important;
  color: #64748b !important;
  margin: 0 !important;
  font-weight: 600 !important;
}

.hm-features-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 16px !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.hm-feature-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 24px 16px 20px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
  position: relative !important;
}

.hm-feature-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.08) !important;
  border-color: #cbd5e1 !important;
}

.hm-feature-icon-wrap {
  width: 58px !important;
  height: 58px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  margin-bottom: 16px !important;
  color: white !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.hm-feature-card.teal .hm-feature-icon-wrap   { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
.hm-feature-card.purple .hm-feature-icon-wrap { background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important; }
.hm-feature-card.orange .hm-feature-icon-wrap { background: linear-gradient(135deg, #f97316, #ea580c) !important; }
.hm-feature-card.blue .hm-feature-icon-wrap   { background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; }
.hm-feature-card.green .hm-feature-icon-wrap  { background: linear-gradient(135deg, #10b981, #059669) !important; }
.hm-feature-card.pink .hm-feature-icon-wrap   { background: linear-gradient(135deg, #d946ef, #c026d3) !important; }

.hm-feature-card h3 {
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 8px !important;
  line-height: 1.3 !important;
}

.hm-feature-card p {
  font-size: 12.5px !important;
  color: #64748b !important;
  line-height: 1.6 !important;
  margin: 0 0 16px !important;
  flex: 1 !important;
}

.hm-feature-card-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  transition: all 0.2s ease !important;
  margin-top: auto !important;
}

.hm-feature-card:hover .hm-feature-card-btn {
  background: #0f172a !important;
  color: #ffffff !important;
  transform: translateX(-3px) !important;
}

/* =========================================================
   4. SHOWCASE SECTION (THE 3 MOCKUPS)
   ========================================================= */
.hm-section-mockups {
  background: #060d1e !important;
  padding: 56px 0 !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
}

.hm-mockups-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.65fr) minmax(0, 0.95fr) !important;
  gap: 20px !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  align-items: start !important;
}

.hm-mockup-frame {
  display: flex !important;
  flex-direction: column !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: rgba(11, 20, 42, 0.7) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

.hm-mockup-header {
  padding: 12px 18px !important;
  background: rgba(8, 15, 32, 0.9) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hm-mockup-header span.dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--hm-cyan) !important;
}

.hm-mockup-body {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000000 !important;
}

.hm-mockup-body img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

/* Palette & Font bar underneath document mockup */
.hm-doc-footer-meta {
  padding: 12px 16px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border-top: 1px solid rgba(56, 189, 248, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #e2e8f0 !important;
}

.hm-color-dots {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.hm-color-dot {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

.hm-color-dot.yellow { background: #f59e0b !important; }
.hm-color-dot.blue   { background: #1e3a8a !important; }
.hm-color-dot.purple { background: #7c3aed !important; }
.hm-color-dot.cyan   { background: #06b6d4 !important; }
.hm-color-dot.gray   { background: #94a3b8 !important; }

/* =========================================================
   5. SECTION: 4 FEATURE PILLARS
   ========================================================= */
.hm-section-pillars {
  background: #040816 !important;
  padding: 36px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.hm-pillars-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.hm-pillar-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 22px 18px !important;
  border-radius: 18px !important;
  background: rgba(11, 20, 42, 0.65) !important;
  border: 1px solid rgba(56, 189, 248, 0.2) !important;
  backdrop-filter: blur(14px) !important;
  transition: all 0.2s ease !important;
}

.hm-pillar-card:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  transform: translateY(-3px) !important;
  background: rgba(16, 30, 60, 0.8) !important;
}

.hm-pillar-icon {
  font-size: 26px !important;
  margin-bottom: 10px !important;
  color: var(--hm-cyan) !important;
}

.hm-pillar-card strong {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin-bottom: 4px !important;
}

.hm-pillar-card p {
  font-size: 12px !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

/* =========================================================
   6. FOOTER STRIP
   ========================================================= */
.hm-bottom-strip {
  background: #02050e !important;
  padding: 18px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.hm-bottom-strip-inner {
  max-width: 1380px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

.hm-bottom-slogan {
  color: var(--hm-gold-light) !important;
  font-size: 14.5px !important;
  font-weight: 900 !important;
}

.hm-bottom-future {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #e2e8f0 !important;
}

.hm-bottom-future span.trend {
  color: var(--hm-gold-light) !important;
  font-size: 16px !important;
}

.hm-bottom-badges {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  color: #94a3b8 !important;
}

/* =========================================================
   RESPONSIVE QUERIES
   ========================================================= */
@media (max-width: 1200px) {
  .hm-features-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .hm-hero-container {
    grid-template-columns: 1fr 1fr !important;
  }
  .hm-hero-side-stack {
    grid-column: span 2 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) 1fr !important;
  }
  .hm-mockups-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .hm-mockups-grid > :nth-child(3) {
    grid-column: span 2 !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
}

@media (max-width: 860px) {
  .hm-nav-center {
    display: none !important;
  }
  .hm-hero-container {
    grid-template-columns: 1fr !important;
  }
  .hm-hero-side-stack {
    grid-column: span 1 !important;
    grid-template-columns: 1fr !important;
  }
  .hm-hero-pills-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hm-features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hm-mockups-grid {
    grid-template-columns: 1fr !important;
  }
  .hm-mockups-grid > :nth-child(3) {
    grid-column: span 1 !important;
  }
  .hm-pillars-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hm-bottom-strip-inner {
    flex-direction: column !important;
    text-align: center !important;
  }
}

@media (max-width: 540px) {
  .hm-features-grid {
    grid-template-columns: 1fr !important;
  }
  .hm-pillars-grid {
    grid-template-columns: 1fr !important;
  }
  .hm-hero-pills-row {
    grid-template-columns: 1fr !important;
  }
  .hm-hero-ctas {
    flex-direction: column !important;
    width: 100% !important;
  }
  .hm-btn-student, .hm-btn-teacher {
    width: 100% !important;
  }
}


/* Hidden legacy compatibility container */
#hamou-legacy-compat-layer, .hm-legacy-compat-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* =========================================================
   HM PATHWAYS — growth-focused navigation and clearer value
   ========================================================= */
.hm-pathways-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 6vw, 86px) 0;
  color: #f8fafc;
  background:
    radial-gradient(ellipse at 8% 8%, rgba(14, 165, 233, .13), transparent 36%),
    radial-gradient(ellipse at 92% 86%, rgba(245, 158, 11, .10), transparent 34%),
    linear-gradient(135deg, #050b19 0%, #0a1630 55%, #071020 100%);
  border-top: 1px solid rgba(125, 211, 252, .13);
  border-bottom: 1px solid rgba(125, 211, 252, .13);
}
.hm-pathways-section .container { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }
.hm-pathways-heading { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.hm-pathways-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  color: #fbbf24; font-size: 12px; font-weight: 900; letter-spacing: .08em;
}
.hm-pathways-kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.hm-pathways-heading h2 { margin: 0 0 10px; color: #fff; font-size: clamp(25px, 3.2vw, 38px); line-height: 1.3; font-weight: 900; }
.hm-pathways-heading p { max-width: 620px; margin: 0 auto; color: #b7c6dc; font-size: 15px; line-height: 1.9; }
.hm-pathways-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-pathway-card {
  display: flex; min-width: 0; flex-direction: column; align-items: flex-start;
  min-height: 260px; padding: 22px; border-radius: 20px;
  color: #f8fafc; text-decoration: none;
  background: linear-gradient(155deg, rgba(18, 34, 61, .96), rgba(8, 18, 36, .98));
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.hm-pathway-card:hover { transform: translateY(-5px); border-color: rgba(125, 211, 252, .62); box-shadow: 0 18px 40px rgba(2, 132, 199, .14); color: #fff; }
.hm-pathway-card:focus-visible, .hm-pathways-cta:focus-visible { outline: 3px solid #fbbf24; outline-offset: 4px; }
.hm-pathway-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px;
  border-radius: 15px; color: #7dd3fc; font-size: 23px;
  background: rgba(56, 189, 248, .10); border: 1px solid rgba(125, 211, 252, .22);
}
.hm-pathway-teacher .hm-pathway-icon { color: #6ee7b7; background: rgba(16, 185, 129, .10); border-color: rgba(110, 231, 183, .22); }
.hm-pathway-bac .hm-pathway-icon { color: #fcd34d; background: rgba(245, 158, 11, .10); border-color: rgba(252, 211, 77, .22); }
.hm-pathway-research .hm-pathway-icon { color: #c4b5fd; background: rgba(139, 92, 246, .12); border-color: rgba(196, 181, 253, .22); }
.hm-pathway-label { margin-bottom: 7px; color: #9fb4d0; font-size: 11px; font-weight: 800; }
.hm-pathway-card strong { display: block; margin-bottom: 9px; color: #fff; font-size: 18px; font-weight: 900; line-height: 1.5; }
.hm-pathway-card small { display: block; color: #b8c6da; font-size: 13px; line-height: 1.85; }
.hm-pathway-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 18px; color: #7dd3fc; font-size: 12px; font-weight: 900; }
.hm-pathways-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 18px; padding: 20px 22px; border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, .23);
  background: linear-gradient(100deg, rgba(245, 158, 11, .08), rgba(15, 23, 42, .68));
}
.hm-pathways-footer > div { display: grid; gap: 5px; }
.hm-pathways-footer strong { color: #fff; font-size: 15px; font-weight: 900; }
.hm-pathways-footer span { color: #b8c6da; font-size: 13px; line-height: 1.8; }
.hm-pathways-cta {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  color: #111827; background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-size: 13px; font-weight: 900; text-decoration: none;
  transition: transform .2s ease, filter .2s ease;
}
.hm-pathways-cta:hover { transform: translateY(-2px); filter: brightness(1.06); color: #111827; }
.hm-savings-badge {
  display: inline-flex; align-items: center; width: fit-content; margin: 8px 0 12px;
  padding: 6px 10px; border-radius: 999px;
  color: #052e1b; background: linear-gradient(120deg, #a7f3d0, #6ee7b7);
  font-size: 11px; font-weight: 900;
}
.hm-savings-note { color: #047857; font-weight: 800; }
@media (max-width: 1000px) {
  .hm-pathways-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-pathway-card { min-height: 235px; }
}
@media (max-width: 560px) {
  .hm-pathways-section { padding: 42px 0; }
  .hm-pathways-section .container { width: calc(100% - 28px); }
  .hm-pathways-grid { grid-template-columns: 1fr; gap: 12px; }
  .hm-pathway-card { min-height: 0; padding: 19px; }
  .hm-pathways-footer { align-items: stretch; flex-direction: column; padding: 18px; }
  .hm-pathways-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-pathway-card, .hm-pathways-cta { transition: none; }
  .hm-pathway-card:hover, .hm-pathways-cta:hover { transform: none; }
}


/* Wider mathematics audience: discovery paths */
.hm-math-world {
  padding: 58px 0;
  color: #f8fafc;
  background:
    radial-gradient(ellipse at 88% 10%, rgba(99, 102, 241, .12), transparent 35%),
    radial-gradient(ellipse at 10% 90%, rgba(20, 184, 166, .09), transparent 34%),
    #080f20;
  border-bottom: 1px solid rgba(125, 211, 252, .12);
}
.hm-math-world-inner { width: min(1240px, calc(100% - 36px)); margin-inline: auto; }
.hm-math-world-heading { max-width: 790px; margin: 0 auto 28px; text-align: center; }
.hm-math-world-kicker { display: inline-block; margin-bottom: 10px; color: #5eead4; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.hm-math-world-heading h2 { margin: 0 0 10px; color: #fff; font-size: clamp(24px, 3vw, 36px); line-height: 1.4; font-weight: 900; }
.hm-math-world-heading p { margin: 0 auto; max-width: 680px; color: #b7c6dc; font-size: 14px; line-height: 1.95; }
.hm-math-world-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-world-card {
  display: flex; min-width: 0; min-height: 228px; flex-direction: column; align-items: flex-start;
  padding: 21px; border: 1px solid rgba(148, 163, 184, .17); border-radius: 19px;
  background: linear-gradient(145deg, rgba(19, 35, 61, .88), rgba(9, 18, 36, .97));
  color: #f8fafc; text-decoration: none; box-shadow: 0 12px 30px rgba(0,0,0,.14);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hm-world-card:hover { transform: translateY(-4px); border-color: rgba(94, 234, 212, .55); box-shadow: 0 18px 36px rgba(13, 148, 136, .12); color: #fff; }
.hm-world-card:focus-visible { outline: 3px solid #fbbf24; outline-offset: 4px; }
.hm-world-symbol { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 13px; border: 1px solid rgba(94, 234, 212, .24); border-radius: 13px; background: rgba(20, 184, 166, .09); color: #5eead4; font-size: 19px; font-weight: 900; }
.hm-world-audience { margin-bottom: 5px; color: #9fb4d0; font-size: 11px; font-weight: 800; }
.hm-world-card strong { margin-bottom: 7px; color: #fff; font-size: 17px; font-weight: 900; line-height: 1.5; }
.hm-world-card small { color: #b8c6da; font-size: 12px; line-height: 1.9; }
.hm-world-action { display: flex; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 14px; color: #5eead4; font-size: 12px; font-weight: 900; }
.hm-math-world-note { margin: 20px 0 0; padding: 15px 18px; border: 1px solid rgba(94, 234, 212, .18); border-radius: 14px; background: rgba(13, 148, 136, .06); color: #b8c6da; font-size: 13px; line-height: 1.9; }
.hm-math-world-note strong { color: #99f6e4; }
@media (max-width: 900px) { .hm-math-world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hm-math-world { padding: 42px 0; }
  .hm-math-world-inner { width: calc(100% - 28px); }
  .hm-math-world-grid { grid-template-columns: 1fr; gap: 11px; }
  .hm-world-card { min-height: 0; padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .hm-world-card { transition: none; } .hm-world-card:hover { transform: none; } }
