:root {
  --baby-50: #f0f9ff;
  --baby-100: #e0f3fe;
  --baby-200: #bae8fb;
  --baby-300: #8fd8f5;
  --baby-400: #5fbee8;
  --baby-500: #3aa5da;
  --baby-600: #2587bf;
  --baby-700: #1f6b9b;
  --baby-800: #1e5780;
  --baby-900: #1c4a6b;
  --baby-950: #12304a;
  --gold-300: #f4dd8f;
  --gold-400: #e9c660;
  --gold-500: #D4AF37;
  --gold-600: #b8922a;
  --gold-700: #95731f;
  --ink: #12304a;
  --ink-soft: #48637e;
  --card: #ffffff;
  --line: #dceefb;
  --shadow: 0 10px 30px -12px rgba(37, 135, 191, .25);
  --shadow-lg: 0 24px 60px -24px rgba(18, 48, 74, .35);
  --radius: 18px;
  --radius-lg: 26px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--baby-100), transparent 60%),
    radial-gradient(1000px 500px at -10% 20%, var(--baby-50), transparent 55%),
    linear-gradient(180deg, #fbfeff 0%, #f4fafd 100%);
  min-height: 100vh;
  line-height: 1.7;
}
.bg-orb {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(500px 500px at 15% 85%, rgba(212,175,55,.10), transparent 65%),
    radial-gradient(600px 600px at 80% 45%, rgba(63,174,224,.08), transparent 65%);
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 20px; max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 48px; height: 48px; display: grid; place-items: center; filter: drop-shadow(0 4px 8px rgba(212,175,55,.35)); }
.brand-icon svg { width: 48px; height: 48px; }
.brand-icon.small { width: 40px; height: 40px; font-size: 22px; color: var(--gold-500); }
.brand-name { display: block; font-weight: 900; font-size: 21px; line-height: 1.1; color: var(--baby-900); letter-spacing: -.3px; }
.brand-sub { display: block; font-size: 12.5px; color: var(--gold-600); font-weight: 700; }
.main-nav { display: flex; gap: 6px; }
.nav-link {
  padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 15px;
  color: var(--ink-soft); transition: .2s;
}
.nav-link:hover { color: var(--baby-700); background: var(--baby-100); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, var(--baby-400), var(--baby-600)); box-shadow: 0 6px 16px -6px var(--baby-500); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 11px 20px; font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer; transition: .2s; }
.btn-gold { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #3a2c05; box-shadow: 0 8px 20px -8px var(--gold-600); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px var(--gold-600); }
.btn-blue { background: linear-gradient(135deg, var(--baby-400), var(--baby-600)); color: #fff; box-shadow: 0 8px 20px -8px var(--baby-500); }
.btn-blue:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px var(--baby-600); }
.btn-outline { background: #fff; color: var(--baby-700); border: 1.5px solid var(--baby-300); }
.btn-outline:hover { border-color: var(--baby-500); background: var(--baby-50); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; border-radius: 12px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; background: var(--baby-100); }
.nav-toggle span { width: 20px; height: 2.5px; background: var(--baby-800); border-radius: 3px; transition: .25s; }

/* ---------- Page shell ---------- */
.page-content { min-height: 62vh; padding: 26px 0 40px; }
.section { padding: 28px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 30px; }
.eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--baby-100); color: var(--baby-700); font-weight: 800; font-size: 13px; letter-spacing: .4px; margin-bottom: 12px;
  border: 1px solid var(--baby-200);
}
h1, h2 { font-weight: 900; line-height: 1.25; }
.section-title { font-size: 30px; }
.section-sub { color: var(--ink-soft); margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; padding: 30px 0 8px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 900; }
.hero h1 .hl { color: var(--gold-500); position: relative; }
.hero h1 .hl-b { color: var(--baby-600); }
.hero p { font-size: 17px; color: var(--ink-soft); margin: 14px 0 24px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badge { display: inline-flex; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink-soft); box-shadow: var(--shadow); }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.stat { }
.stat b { display: block; font-size: 26px; font-weight: 900; color: var(--baby-800); }
.stat b i { color: var(--gold-500); font-style: normal; }
.stat span { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-card {
  background: linear-gradient(160deg, #ffffff, var(--baby-50));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; width: min(420px, 100%); box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-card .book-emoji { font-size: 54px; }
.flying { position: absolute; width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; box-shadow: var(--shadow-lg); }
.flying.f1 { top: -16px; right: -22px; animation: float 5s ease-in-out infinite; background: #fff; border: 2px solid var(--gold-300); }
.flying.f2 { bottom: -12px; left: -18px; animation: float 6s ease-in-out infinite reverse; background: #fff; border: 2px solid var(--baby-300); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Cards ---------- */
.grid-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-cover { height: 150px; position: relative; display: grid; place-items: center; }
.card-cover .g { font-size: 46px; }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 18px; font-weight: 800; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--baby-50); color: var(--baby-700); border: 1px solid var(--baby-200); }
.chip.gold { background: #fdf7e0; color: var(--gold-700); border-color: var(--gold-300); }
.card-txt { color: var(--ink-soft); font-size: 14px; }
.card-foot { margin-top: auto; padding-top: 8px; }
.link-more { color: var(--baby-600); font-weight: 800; font-size: 14.5px; display: inline-flex; gap: 6px; align-items: center; }
.link-more:hover { color: var(--gold-600); }

/* ---------- Courses / Course detail ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }
.filter-btn { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--baby-200); background: #fff; font-family: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer; transition: .2s; font-size: 14px; }
.filter-btn:hover { border-color: var(--baby-500); color: var(--baby-700); }
.filter-btn.active { background: linear-gradient(135deg, var(--baby-400), var(--baby-600)); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px var(--baby-500); }
.course-hero {
  border-radius: var(--radius-lg); padding: 30px; color: #fff;
  background: linear-gradient(135deg, var(--baby-700), var(--baby-900));
  position: relative; overflow: hidden; margin-bottom: 26px;
}
.course-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(400px 200px at 85% -10%, rgba(212,175,55,.45), transparent 60%); }
.course-hero > * { position: relative; z-index: 1; }
.course-hero h1 { font-size: 30px; }
.course-hero .ch-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--baby-100); }
.unit-block { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.unit-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.unit-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--baby-400), var(--baby-600)); color: #fff; font-weight: 900; flex-shrink: 0; }
.unit-title { font-size: 16.5px; font-weight: 800; flex: 1; }
.unit-head .arrow { transition: .25s; color: var(--baby-600); font-size: 18px; }
.unit-block.open .arrow { transform: rotate(180deg); }
.unit-body { display: none; padding: 4px 18px 18px; }
.unit-block.open .unit-body { display: block; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; transition: .15s; }
.lesson-row:hover { background: var(--baby-50); }
.lesson-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--baby-100); flex-shrink: 0; }
.lesson-ico.quiz { background: #fdf7e0; }
.lesson-txt { flex: 1; font-weight: 700; font-size: 14.5px; }
.lesson-txt small { display: block; color: var(--ink-soft); font-weight: 600; font-size: 12px; }

/* ---------- Lesson / Article body ---------- */
.content-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 30px; max-width: 820px; margin: 0 auto;
}
.content-card h1 { font-size: 26px; margin-bottom: 6px; }
.content-card .byline { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 18px; }
.prose { color: var(--ink-soft); font-size: 16px; }
.prose p { margin: 12px 0; }
.prose h2, .prose h3 { color: var(--ink); margin: 20px 0 8px; }
.prose ul, .prose ol { margin: 10px 24px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--baby-800); }
.prose blockquote { border-right: 4px solid var(--gold-500); background: #fdf7e0; padding: 12px 16px; border-radius: 12px; margin: 14px 0; }
.prose img { border-radius: 14px; margin: 14px 0; }

/* ---------- Quiz modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(18,48,74,.5); backdrop-filter: blur(4px); z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius-lg); max-width: 720px; width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-head { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 22px; }
.question { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.question h4 { font-size: 15px; margin-bottom: 10px; display: flex; gap: 8px; }
.question .qnum { background: var(--baby-100); color: var(--baby-800); width: 26px; height: 26px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.answer-opt { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; cursor: pointer; transition: .15s; }
.answer-opt:hover { border-color: var(--gold-500); background: #fdf9e8; }
.answer-opt input { accent-color: var(--gold-500); width: 17px; height: 17px; }
.quiz-result { border-radius: var(--radius); padding: 18px; background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #3a2c05; font-weight: 800; font-size: 18px; text-align: center; }
.close-x { background: var(--baby-100); border: 0; width: 36px; height: 36px; border-radius: 11px; font-size: 16px; cursor: pointer; color: var(--baby-800); font-weight: 800; }

/* ---------- Contact / forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field textarea, .field select {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; font-family: inherit; font-size: 15px; background: #f8fcfe; transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--baby-500); box-shadow: 0 0 0 4px var(--baby-100); }
.form-note { text-align: center; font-weight: 800; padding: 12px; border-radius: 12px; margin-top: 8px; }
.form-note.ok { background: #eafaf0; color: #147a3f; border: 1px solid #bfe8ce; }
.form-note.err { background: #fdf0f0; color: #a02a2a; border: 1px solid #f2c9c9; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.contact-card { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.contact-card .ico { font-size: 30px; }
.contact-card b { display: block; margin: 8px 0 2px; }

/* ---------- Marquee / misc ---------- */
.marquee-tape { overflow: hidden; background: linear-gradient(90deg, var(--gold-500), var(--gold-400), var(--gold-500)); padding: 10px 0; border-radius: 14px; margin: 16px 0; }
.marquee-tape .inner { display: inline-flex; gap: 40px; white-space: nowrap; color: #3a2c05; font-weight: 800; animation: marquee 22s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty .big { font-size: 48px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--baby-200); border-top-color: var(--baby-600); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #12304a, #0c2437); color: #cfe9f7; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 40px 20px 26px; max-width: 1280px; margin: 0 auto; }
.footer-grid h4 { color: var(--gold-400); margin-bottom: 12px; font-size: 16px; }
.footer-grid ul li { margin: 7px 0; }
.footer-grid a:hover { color: #fff; }
.footer-desc { margin-top: 10px; font-size: 14px; color: #9fc5dd; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: 13px; color: #8fb4cd; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav {
    position: fixed; top: 64px; right: 14px; left: 14px; z-index: 55;
    flex-direction: column; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    padding: 14px; border: 1px solid var(--line); display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 24px; }
}