/* ============================================
   FUTURE LEARNING CENTER — Mobile-First Design System
   ============================================ */

:root {
  --indigo-900: #141C42;
  --indigo-800: #1E2A5E;
  --indigo-700: #2A3A75;
  --indigo-600: #3E4F8F;
  --indigo-100: #E8ECF7;
  --indigo-50:  #F4F6FB;

  --saffron: #F4A24C;
  --saffron-dark: #E08A2D;
  --saffron-50: #FFF4E6;

  --mint-600: #4FA888;
  --mint: #7FC8A9;
  --mint-50: #EAF6F0;

  --coral: #E8806B;
  --coral-50: #FBEDE8;

  --cream: #FAF6EE;
  --cream-warm: #F5EFE0;
  --paper: #FFFFFF;

  --ink-900: #1A1F2E;
  --ink-700: #3D4356;
  --ink-500: #6B7185;
  --ink-300: #B8BCC9;
  --ink-100: #E5E7EE;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;

  --shadow-sm: 0 1px 2px rgba(20,28,66,.06), 0 1px 3px rgba(20,28,66,.04);
  --shadow-md: 0 4px 12px rgba(20,28,66,.08), 0 2px 4px rgba(20,28,66,.04);
  --shadow-lg: 0 12px 32px rgba(20,28,66,.10), 0 4px 8px rgba(20,28,66,.06);
  --shadow-xl: 0 24px 60px rgba(20,28,66,.14), 0 8px 16px rgba(20,28,66,.06);
  --shadow-glow: 0 12px 40px rgba(244,162,76,.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 76px; /* space for sticky CTA */
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ----- Type ----- */
.h-display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; font-variation-settings: "opsz" 144; }
.h1 { font-size: clamp(34px, 8vw, 64px); }
.h2 { font-size: clamp(28px, 6.5vw, 46px); }
.h3 { font-size: clamp(22px, 4.5vw, 32px); }
.h4 { font-size: clamp(18px, 3.5vw, 22px); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--saffron-dark);
}
.lead { font-size: clamp(15px, 4vw, 18px); color: var(--ink-700); line-height: 1.6; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap;
}
.btn-primary { background: var(--saffron); color: var(--indigo-900); box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--saffron-dark); transform: translateY(-2px); }
.btn-dark { background: var(--indigo-800); color: white; }
.btn-dark:hover { background: var(--indigo-900); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--indigo-800); border: 1.5px solid var(--ink-100); }
.btn-ghost:hover { border-color: var(--indigo-800); }
.btn-light { background: white; color: var(--indigo-900); }
.btn-link { display: inline-flex; align-items: center; gap: 6px; color: var(--indigo-800); font-weight: 600; font-size: 14px; }
.btn-link:hover { gap: 10px; }

/* ----- Pills ----- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--cream-warm);
  color: var(--indigo-800);
  border: 1px solid rgba(30,42,94,.08);
}
.pill-mint { background: var(--mint-50); color: var(--mint-600); border-color: rgba(79,168,136,.15); }
.pill-saffron { background: var(--saffron-50); color: var(--saffron-dark); border-color: rgba(224,138,45,.18); }
.pill-coral { background: var(--coral-50); color: var(--coral); border-color: rgba(232,128,107,.18); }
.pill-indigo { background: var(--indigo-100); color: var(--indigo-800); border-color: rgba(30,42,94,.10); }

/* ----- Section spacing ----- */
section { padding: 56px 0; position: relative; }
@media (min-width: 768px) { section { padding: 80px 0; } }
@media (min-width: 1024px) { section { padding: 100px 0; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
@media (min-width: 768px) { .section-head { margin-bottom: 56px; } }

/* ----- Cards ----- */
.card { background: var(--paper); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--ink-100); }
@media (min-width: 768px) { .card { padding: 32px; } }

/* ----- Top Nav ----- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,246,238,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(30,42,94,.06);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-right: auto; }
.logo-img { display: block; height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.logo-mark { display: flex; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--indigo-900); letter-spacing: -.01em; white-space: nowrap; }
.logo-sub { font-size: 10px; font-weight: 600; color: var(--ink-500); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

/* Default (mobile): hide desktop links + CTA, show toggle */
.nav-links-desk { display: none; }
.nav-cta { display: none; }
.nav-toggle {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo-900);
  border-radius: var(--r-md);
}
.nav-toggle:hover { background: rgba(30,42,94,.05); }

/* Desktop layout: 1024px+ */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-links-desk {
    display: flex; gap: 2px; align-items: center;
    flex-wrap: nowrap;
  }
  .nav-links-desk a {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-700);
    white-space: nowrap;
    transition: background .18s, color .18s;
  }
  .nav-links-desk a:hover { color: var(--indigo-900); background: rgba(255,255,255,.7); }
  .nav-links-desk a.active { background: white; color: var(--indigo-900); font-weight: 600; box-shadow: var(--shadow-sm); }
  .nav-cta {
    display: inline-flex;
    padding: 10px 18px;
    font-size: 13px;
    margin-left: 8px;
    flex-shrink: 0;
  }
}

/* Tighter on mid-laptops to avoid overflow */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav-inner { gap: 8px; }
  .nav-links-desk a, .nav-mega-trigger { padding: 8px 9px !important; font-size: 13px !important; }
  .logo-sub { display: none; }
  .logo-img { height: 38px; max-width: 180px; }
}
@media (max-width: 1023px) {
  .logo-img { height: 38px; max-width: 170px; }
}
@media (max-width: 480px) {
  .logo-img { height: 32px; max-width: 140px; }
}

/* mobile overlay */
.nav-mobile {
  position: fixed; inset: 68px 0 0 0; z-index: 99;
  background: var(--cream);
  padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  animation: slideDown .22s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-mobile-link {
  padding: 16px 18px; border-radius: var(--r-md);
  font-weight: 500; color: var(--ink-700);
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid transparent;
  transition: all .18s;
}
.nav-mobile-link:hover, .nav-mobile-link.active { background: white; border-color: var(--ink-100); color: var(--indigo-900); }
.nav-mobile-link.active { font-weight: 600; box-shadow: var(--shadow-sm); }
.nav-mobile-cta { margin-top: 16px; padding: 16px; justify-content: center; font-size: 15px; }
.nav-mobile-foot { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ink-100); display: flex; gap: 10px; }
.nav-mobile-foot a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; border-radius: var(--r-md); font-size: 13px; font-weight: 600; }
.nav-mobile-foot .mob-call { background: var(--indigo-800); color: white; }
.nav-mobile-foot .mob-wa { background: #25D366; color: white; }

/* ----- Mega-menu (desktop) ----- */
.nav-mega-wrap { position: relative; }
.nav-mega-trigger {
  background: transparent; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 999px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-700);
  display: inline-flex; align-items: center;
  transition: background .18s, color .18s;
}
.nav-mega-trigger:hover, .nav-mega-trigger.open { color: var(--indigo-900); background: rgba(255,255,255,.7); }
.nav-mega-trigger.active { background: white; color: var(--indigo-900); font-weight: 600; box-shadow: var(--shadow-sm); }
.nav-mega {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: white;
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(20,28,66,.18), 0 2px 8px rgba(20,28,66,.08);
  border: 1px solid var(--ink-100);
  min-width: 320px; max-width: min(880px, calc(100vw - 32px));
  z-index: 102;
  animation: megaIn .18s ease;
}
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-mega::before {
  content: ''; position: absolute; top: -10px; left: 24px;
  width: 14px; height: 14px; background: white;
  border-left: 1px solid var(--ink-100); border-top: 1px solid var(--ink-100);
  transform: rotate(45deg);
}
.nav-mega-inner {
  display: grid; gap: 8px 28px;
  padding: 22px 24px;
}
.nav-mega-col { min-width: 0; }
.nav-mega-col-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--saffron-dark); margin-bottom: 8px;
}
.nav-mega-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-mega-col a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-700); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-mega-col a:hover { background: var(--cream); color: var(--indigo-900); }
.nav-mega-col a.is-soon { color: var(--ink-500); }
.nav-mega-badge {
  font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 999px;
  background: rgba(244,162,76,.15); color: var(--saffron-dark); letter-spacing: .04em;
}
.nav-mega-soon {
  font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 999px;
  background: var(--ink-100); color: var(--ink-500); letter-spacing: .04em;
}
.nav-mega-foot {
  border-top: 1px solid var(--ink-100); padding: 12px 24px;
  background: var(--cream);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.nav-mega-foot-link {
  font-size: 13px; font-weight: 600; color: var(--saffron-dark);
}
.nav-mega-foot-link:hover { color: var(--indigo-900); }

/* ----- Mobile drawer accordion (mega items) ----- */
.nav-mobile-group {
  display: flex; flex-direction: column;
}
.nav-mobile-trigger {
  width: 100%; background: transparent; border: 1px solid transparent; cursor: pointer;
  font: inherit; text-align: inherit;
}
.nav-mobile-group.open .nav-mobile-trigger {
  background: white; border-color: var(--ink-100); color: var(--indigo-900);
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom-color: transparent;
}
.nav-mobile-sub {
  background: white; border: 1px solid var(--ink-100);
  border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 4px 12px 12px;
  margin-bottom: 4px;
  animation: slideDown .18s ease;
}
.nav-mobile-sub-all {
  display: block; padding: 10px 8px; font-size: 13px; font-weight: 600;
  color: var(--saffron-dark); border-bottom: 1px solid var(--ink-100); margin-bottom: 6px;
}
.nav-mobile-sub-col + .nav-mobile-sub-col { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--ink-100); }
.nav-mobile-sub-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-500); padding: 6px 8px 4px;
}
.nav-mobile-sub-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 8px; font-size: 14px; color: var(--ink-700);
  border-radius: var(--r-sm);
}
.nav-mobile-sub-link:hover { background: var(--cream); color: var(--indigo-900); }
.nav-mobile-sub-link.is-soon { color: var(--ink-500); }

/* RTL flips for mega */
html[dir="rtl"] .nav-mega { left: auto; right: 0; }
html[dir="rtl"] .nav-mega::before { left: auto; right: 24px; }

/* ----- Sticky bottom CTA bar (mobile) ----- */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--ink-100);
  padding: 10px 12px;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px;
  box-shadow: 0 -4px 24px rgba(20,28,66,.06);
}
.sticky-cta a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.sticky-call { background: var(--indigo-800); color: white; }
.sticky-wa { background: #25D366; color: white; }
.sticky-book { background: var(--saffron); color: var(--indigo-900); }
@media (min-width: 1024px) {
  .sticky-cta { display: none; }
  body { padding-bottom: 0; }
}

/* ----- Floating WhatsApp ----- */
.fab-whatsapp {
  position: fixed; right: 16px; bottom: 88px; z-index: 88;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(37,211,102,.4);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (min-width: 1024px) {
  .fab-whatsapp { right: 28px; bottom: 28px; width: 64px; height: 64px; }
}

/* ----- Footer ----- */
.footer { background: var(--indigo-900); color: rgba(255,255,255,.7); padding: 48px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 20px; }
.footer-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.footer-logo-pill { background: white; padding: 10px 16px; border-radius: 12px; display: inline-flex; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.footer-logo-pill img { display: block; height: 40px; width: auto; max-width: 220px; object-fit: contain; }
.footer-logo-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: white; }
.footer-logo-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.footer-tag { font-size: 14px; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.footer-cols h5 { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--saffron); margin-bottom: 12px; letter-spacing: .04em; }
.footer-cols ul { list-style: none; }
.footer-cols li { padding: 5px 0; font-size: 13px; }
.footer-cols a:hover { color: white; }
.footer-bottom { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(255,255,255,.45); }
@media (min-width: 768px) {
  .footer-top { grid-template-columns: 1.4fr 2fr; gap: 48px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ----- Page hero ----- */
.page-hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
}
.page-hero-blob {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: .45; pointer-events: none;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { color: var(--indigo-900); margin: 14px 0 14px; }
.page-hero .lead { max-width: 640px; }
.page-hero-img {
  margin-top: 32px;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/10;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.page-hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) {
  .page-hero { padding: 96px 0 72px; }
  .page-hero-img { margin-top: 48px; aspect-ratio: 21/9; }
}

/* ----- Image placeholder (for img tags that fail) ----- */
img { background: var(--cream-warm); }

/* ----- Animations ----- */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(79,168,136,.2); } 50% { box-shadow: 0 0 0 8px rgba(79,168,136,.05); } }
.fade-up { animation: fadeUp .7s ease both; }

/* Reveal on scroll utility */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 999px; border: 2px solid var(--cream); }
::selection { background: var(--saffron); color: var(--indigo-900); }


/* ============================================
   I18N — Arabic / RTL support
   ============================================ */
body.lang-ar {
  font-family: 'Cairo', 'Plus Jakarta Sans', sans-serif;
}
body.lang-ar .h-display {
  font-family: 'Cairo', 'Fraunces', serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}
body.lang-ar em {
  font-style: normal !important;
  color: var(--saffron-dark);
}
body.lang-ar .eyebrow {
  letter-spacing: 0.04em;
  font-weight: 700;
}

/* RTL layout flips */
html[dir="rtl"] .nav-mobile-toggle { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .sticky-cta { direction: rtl; }
html[dir="rtl"] .hero-arrow,
html[dir="rtl"] .arrow-rtl { transform: scaleX(-1); }
html[dir="rtl"] .pill svg,
html[dir="rtl"] .btn svg:not(.no-flip) { transform: scaleX(-1); }
html[dir="rtl"] .nav-list { flex-direction: row-reverse; }

/* Lang toggle button */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--indigo-50);
  color: var(--indigo-900);
  font-weight: 700;
  font-size: 13px;
  border: 1.5px solid transparent;
  transition: all .18s;
  white-space: nowrap;
}
.lang-toggle:hover {
  background: var(--saffron-50);
  color: var(--saffron-dark);
  border-color: var(--saffron);
}
.lang-toggle svg {
  flex-shrink: 0;
  opacity: .7;
}
.nav-mobile .lang-toggle {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  margin-top: 8px;
}
@media (max-width: 1199px) {
  .nav-list .lang-toggle { display: none; }
}

/* RTL specific tweaks */
html[dir="rtl"] body { padding-bottom: 76px; }
html[dir="rtl"] .quiz-progress-bar > div { left: auto; right: 0; }
