/* Shared site shell: design tokens + header + footer + buttons.
   Loaded by every page so the header/footer look identical everywhere. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");
:root {
  /* Bright modern palette. The "bronze" names are kept so every page's
     existing classes keep working; they now hold the primary blue. */
  --navy: #0b1f4b;
  --navy-deep: #081638;
  --navy-soft: #1e3a8a;
  --teal: #00a99d;
  --teal-bright: #14c8b8;
  --bronze: #2563eb;
  --bronze-dark: #1d4ed8;
  --bronze-soft: #e0eaff;
  --ink: #16213e;
  --muted: #5b6785;
  --surface: #ffffff;
  --surface-soft: #f1f6ff;
  --aqua-soft: #e3faf7;
  --line: #e2e8f3;
  --shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
  --paper: #f5f8ff;
  --bronze-light: #93b4ff;
  --teal-dark: #00857b;
  --amber: #f59e0b;
  --font: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
}

/* Every inner page declares its own legacy tokens in an inline :root block.
   html:root outranks :root, so this one block re-maps all of them to the
   bright palette above without touching each page. */
html:root {
  --navy-900: #0b1f4b; --navy-800: #13306f; --navy-700: #2563eb; --navy-600: #3b82f6;
  --gold-600: #1d4ed8; --gold-500: #2563eb; --gold-400: #3b82f6; --gold-100: #e0eaff;
  --ink-900: #16213e; --ink-700: #36425e; --ink-500: #5b6785; --ink-300: #c5d0e0;
  --ink-200: #e2e8f3; --ink-100: #eef3fb; --ink-50: #f5f8ff; --white: #ffffff;
  --danger: #dc2626; --success: #059669;
  --shadow-sm: 0 1px 2px rgba(37,99,235,.06), 0 1px 1px rgba(37,99,235,.04);
  --shadow-md: 0 10px 30px rgba(37,99,235,.10);
  --shadow-lg: 0 24px 56px rgba(37,99,235,.14);
  --radius-md: 12px; --radius-lg: 20px; --radius-pill: 999px;
}

body.menu-open { overflow: hidden; }
/* One light wash across the top of every page (the home hero paints over it). */
html body { background: radial-gradient(760px 420px at 88% -60px, rgba(147,180,255,.38), transparent 70%), radial-gradient(680px 380px at 8% 40px, rgba(20,200,184,.16), transparent 70%), #fff; background-repeat: no-repeat; color: var(--ink); }
/* Content is never hidden waiting for a scroll animation. */
html .reveal { opacity: 1 !important; transform: none !important; }
.shell-container { width: min(calc(100% - 40px), 1180px); margin-inline: auto; }

/* ==================== Buttons ==================== */
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border: 2px solid transparent; border-radius: 10px; padding: 10px 24px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(7, 38, 95, .16); }
.button-bronze { color: #fff; background: var(--bronze); }
.button-bronze:hover { background: var(--bronze-dark); }
.button-outline { color: var(--navy); background: transparent; border-color: var(--navy); }
.button-outline:hover { color: #fff; background: var(--navy); }
.button-small { min-height: 38px; padding: 7px 17px; font-size: 14px; }
.button-large { min-height: 54px; padding: 12px 30px; font-size: 17px; }
.button-ghost { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); }
.button-ghost:hover { background: rgba(255,255,255,.14); }
.button-light { color: var(--navy); background: #fff; }
.button-light:hover { background: var(--paper); }

/* ==================== Header ==================== */
.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); font-family: var(--font); line-height: 1.75; }
.nav-wrap { display: flex; min-height: 68px; align-items: center; gap: 28px; }
/* The header gets a little more room than the page body, and nothing in it ever wraps. */
.site-header .shell-container { width: min(calc(100% - 40px), 1320px); }
.site-header a, .site-header button { white-space: nowrap; }
.site-header .brand, .site-footer .brand { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); font-size: 19px; font-weight: 900; white-space: nowrap; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 4px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--teal)); }
.main-nav { display: flex; align-items: center; gap: 26px; margin-inline: auto; font-size: 15px; font-weight: 600; color: var(--navy); }
.main-nav a, .login-link { transition: color .2s ease; }
.main-nav a:hover, .login-link:hover { color: var(--teal); }
.main-nav .mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.login-link { color: var(--navy); font-weight: 700; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-link { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border: 1.5px solid #c7d7ff; border-radius: 10px; color: var(--bronze-dark); background: #fff; font-weight: 700; white-space: nowrap; transition: border-color .2s ease, background .2s ease; }
.platform-link:hover { border-color: var(--bronze); background: var(--bronze-soft); }
.language-button, .menu-button { border: 0; color: var(--navy); background: none; cursor: pointer; font: inherit; }
.language-button { font-size: 14px; font-weight: 700; }
.menu-button { display: none; font-size: 24px; }

/* ==================== Certification dropdowns ==================== */
.nav-dropdown { position: relative; }
.nav-dd-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 4px 0; background: none; color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; }
.nav-dd-toggle:hover, .nav-dropdown.open .nav-dd-toggle { color: var(--teal); }
.nav-dd-toggle .caret { width: 0; height: 0; font-size: 0; border-inline: 4px solid transparent; border-top: 5px solid currentColor; transition: transform .2s ease; }
.nav-dropdown.open .caret { transform: rotate(180deg); }
.dd-menu { position: absolute; z-index: 40; top: calc(100% + 14px); inset-inline-start: -14px; display: none; width: 330px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); text-align: start; }
.nav-dropdown.open .dd-menu { display: block; }
.dd-title { margin: 0 4px 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .3px; }
.main-nav .dd-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; color: var(--navy); }
.main-nav .dd-item:hover { background: var(--surface-soft); color: var(--navy); }
.dd-name { display: flex; flex-direction: column; line-height: 1.35; }
.dd-name b { font-size: 14px; }
.dd-name small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.dd-price { color: var(--bronze-dark); font-size: 15px; font-weight: 900; }
.dd-tag { padding: 2px 9px; border-radius: 20px; color: var(--bronze-dark); background: var(--bronze-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.main-nav .dd-item.is-soon .dd-name b { color: var(--muted); }
.dd-actions { display: flex; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.dd-actions .button { flex: 1; }
.main-nav .dd-actions .button-bronze { color: #fff; }
.main-nav .dd-actions .button-outline { color: var(--navy); }
.main-nav .dd-actions .button-outline:hover { color: #fff; }
.dd-note { margin: 8px 4px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.signout-button { border: 0; padding: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.signout-button:hover { color: var(--navy); text-decoration: underline; }

/* ==================== Footer ==================== */
.site-footer { padding: 60px 0 20px; color: rgba(255,255,255,.72); background: var(--navy-deep); font-family: var(--font); line-height: 1.75; }
.site-footer .brand, .site-footer h3 { color: #fff; }
.site-footer h3 { margin: 0 0 8px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 50px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer-grid a:not(.brand) { font-size: 14px; color: rgba(255,255,255,.72); transition: color .2s ease; }
.footer-grid a:not(.brand):hover { color: #fff; }
.footer-brand p { max-width: 390px; margin: 0; color: rgba(255,255,255,.62); font-size: 14px; }
.site-footer .copyright { margin-top: 50px; padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6); font-size: 13px; }

/* ==================== Responsive ==================== */
@media (max-width: 1240px) {
  .main-nav { gap: 18px; font-size: 14px; }
  .nav-wrap { gap: 20px; }
  .nav-actions { gap: 12px; }
}
@media (max-width: 960px) {
  .menu-button { display: block; margin-inline-start: auto; }
  .main-nav { position: fixed; top: 68px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px; }
  .main-nav .mobile-only { display: block; }
  .nav-actions .login-link, .nav-actions .signout-button { display: none; }
  .nav-dd-toggle { width: 100%; justify-content: space-between; padding: 11px; }
  .dd-menu { position: static; width: auto; margin: 0 0 6px; box-shadow: none; border-color: var(--line); }
}
@media (max-width: 640px) {
  .shell-container { width: min(calc(100% - 28px), 1180px); }
  .nav-wrap { gap: 10px; }
  .nav-actions { gap: 8px; }
  .nav-actions .button-small { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-grid a.footer-email:not(.brand) { color: #fff; font-size: 13px; font-weight: 700; }
.policy.legal .policy-box h2 { margin: 28px 0 10px; font-size: 18px; color: var(--navy); }
.policy.legal .policy-box h2:first-child { margin-top: 0; }
.policy.legal .policy-box ul { margin: 10px 0 0; padding-inline-start: 22px; list-style: disc; }
.policy.legal .policy-box li { margin-bottom: 8px; }
.policy.legal .policy-box p + p, .policy.legal .policy-box p + ul { margin-top: 10px; }

/* Cookie / local-storage notice (first visit only) */
.cookie-banner { position: fixed; inset-inline: 0; bottom: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 20px; color: #fff; background: var(--navy-deep); box-shadow: 0 -6px 24px rgba(4,27,77,.25); font-family: var(--font); font-size: 13px; line-height: 1.7; }
.cookie-banner p { margin: 0; color: rgba(255,255,255,.9); }
.cookie-banner a { color: #fff; font-weight: 700; text-decoration: underline; }
.cookie-ok { flex: 0 0 auto; min-height: 38px; padding: 7px 26px; border: 0; border-radius: 4px; color: #fff; background: var(--bronze); font: inherit; font-weight: 800; cursor: pointer; }
.cookie-ok:hover { background: var(--bronze-dark); }
@media (max-width: 640px) { .cookie-banner { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; } }

/* Brand: the same logo as the study platform (logo.png). */
.brand-logo { display: block; width: auto; height: 46px; }
.site-footer .brand-logo { height: 52px; padding: 8px 14px; border-radius: 14px; background: #fff; box-sizing: content-box; }
@media (max-width: 640px) { .site-header .brand-logo { height: 38px; } }
