/* ===================== Design Tokens ===================== */
:root {
  --blue: #1C68AE;
  --blue-light: #2E86D6;
  --navy: #0B2E4D;
  --navy-deep: #071E33;
  --ink: #0B1F33;
  --ink-soft: #4C5E70;
  --gold: #F2A93B;
  --gold-deep: #D98B1C;
  --cyan: #5ECBE0;
  --bg: #F5F8FC;
  --card: #FFFFFF;
  --border: #E1E8F0;
  --success: #2E9E6B;

  --font-display-en: "Space Grotesk", sans-serif;
  --font-body-en: "Manrope", sans-serif;
  --font-ar: "Tajawal", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(11,46,77,0.06);
  --shadow-md: 0 10px 30px rgba(11,46,77,0.10);
  --shadow-lg: 0 24px 60px rgba(11,46,77,0.18);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body-en);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body, body.lang-ar { font-family: var(--font-ar); }
body.lang-ar h1, body.lang-ar h2, body.lang-ar h3, body.lang-ar h4, body.lang-ar .display {
  font-family: var(--font-ar);
}
h1, h2, h3, h4, .display { font-family: var(--font-display-en); margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===================== Top bar ===================== */
.topbar {
  background: var(--navy-deep);
  color: #cfe0ef;
  font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 12px; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 20px; align-items: center; }
.topbar-links a { display: flex; align-items: center; gap: 6px; opacity: 0.92; transition: opacity .2s; }
.topbar-links a:hover { opacity: 1; color: #fff; }
.lang-toggle { display: flex; gap: 6px; }
.lang-toggle button {
  background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #cfe0ef;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; transition: all .2s;
}
.lang-toggle button.active { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }

/* ===================== Header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand-name { font-family: var(--font-display-en); font-weight: 700; font-size: 19px; color: var(--navy); line-height: 1.1; }
body.lang-ar .brand-name { font-family: var(--font-ar); }
.brand-tag { font-size: 11px; color: var(--ink-soft); letter-spacing: .02em; }

.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a { font-size: 14.5px; font-weight: 600; color: var(--ink); opacity: .8; transition: opacity .2s, color .2s; }
.main-nav a:hover { opacity: 1; color: var(--blue); }
.header-cta { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--navy-deep); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-deep); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost-light { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.22); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, #103c62 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: #fff;
  overflow: hidden;
  padding: 78px 0 60px;
}
.hero-network { position: absolute; inset: 0; opacity: .55; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
  background: rgba(242,169,59,0.12); border: 1px solid rgba(242,169,59,0.35);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: 52px; line-height: 1.08; margin-bottom: 18px; }
.hero h1 .accent { color: var(--gold); }
body.lang-ar .hero h1 { font-size: 44px; line-height: 1.3; }
.hero-sub { font-size: 17px; color: #cfe0ef; max-width: 560px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-search {
  display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 16px; box-shadow: var(--shadow-lg);
  max-width: 560px;
}
.hero-search input {
  flex: 1; border: none; outline: none; padding: 12px 14px; font-size: 15px; border-radius: 10px; color: var(--ink); font-family: inherit;
}
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display-en); font-size: 27px; color: #fff; }
body.lang-ar .hero-stat b { font-family: var(--font-ar); }
.hero-stat span { font-size: 12.5px; color: #9fbbd4; }

.hero-visual { position: relative; z-index: 2; }
.hero-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(6px);
}
.hero-card-title { font-size: 13px; color: var(--cyan); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.node-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.15); font-size: 14px; }
.node-row:last-child { border-bottom: none; }
.node-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; margin-inline-end: 10px; box-shadow: 0 0 0 4px rgba(242,169,59,0.18); }

/* ===================== Sections ===================== */
.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 700px; margin-bottom: 40px; }
.section-eyebrow { color: var(--blue); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: 34px; color: var(--navy); line-height: 1.2; margin-bottom: 12px; }
.section-head p { color: var(--ink-soft); font-size: 16px; }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy .section-head h2 { color: #fff; }
.bg-navy .section-head p { color: #b9cfe3; }
.bg-alt { background: #fff; }

/* ===================== Network Map (signature) ===================== */
.network-wrap { position: relative; }
.network-svg { width: 100%; height: auto; display: block; }
.city-node { cursor: pointer; }
.city-node circle.core { fill: var(--gold); transition: r .2s ease, fill .2s ease; }
.city-node:hover circle.core, .city-node.active circle.core { fill: var(--cyan); }
.city-node text { fill: #dfeaf5; font-size: 12px; font-family: var(--font-body-en); font-weight: 600; }
body.lang-ar .city-node text { font-family: var(--font-ar); }
.city-node.active text { fill: #fff; }
.network-line { stroke: rgba(255,255,255,0.16); stroke-width: 1; }
.network-pulse { fill: none; stroke: var(--gold); stroke-width: 1.4; opacity: 0; }

.city-chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; justify-content: center; }
.city-chip {
  border: 1px solid rgba(255,255,255,0.22); color: #dfeaf5; background: rgba(255,255,255,0.04);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: all .2s;
}
.city-chip:hover, .city-chip.active { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }

/* ===================== Sector Grid ===================== */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sector-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border-inline-start: 4px solid var(--blue);
}
.sector-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--blue-light); }
.sector-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; line-height: 1.35; }
.sector-card .count { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.sector-card .count b { color: var(--blue); font-family: var(--font-mono); }

/* ===================== Explorer / Filters ===================== */
.explorer { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; position: sticky; top: 90px;
}
.filters h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 12px; }
.filter-group { margin-bottom: 22px; }
.filter-group select, .filter-group input[type="search"] {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: #fbfdff; font-size: 14px; color: var(--ink); font-family: inherit;
}
.filter-reset { font-size: 13px; color: var(--blue); font-weight: 700; }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.results-bar .count { color: var(--ink-soft); font-size: 14px; }
.results-bar .count b { color: var(--navy); font-family: var(--font-mono); }
.sort-select { padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 13.5px; font-family: inherit; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.course-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px;
  display: flex; flex-direction: column; gap: 10px; transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.course-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
.badge-sector { background: #E7F0FA; color: var(--blue); }
.badge-level { background: #FCEFDA; color: var(--gold-deep); }
.course-card h3 { font-size: 16.5px; color: var(--navy); line-height: 1.4; }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--ink-soft); margin-top: auto; }
.course-meta span { display: flex; align-items: center; gap: 5px; }
.course-price { font-family: var(--font-mono); font-weight: 700; color: var(--navy); font-size: 13.5px; }
.load-more-wrap { text-align: center; margin-top: 30px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ===================== Modal ===================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(7,30,51,0.6); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 720px; width: 100%;
  box-shadow: var(--shadow-lg); overflow: hidden; margin-bottom: 40px;
}
.modal-head { background: var(--navy); color: #fff; padding: 28px 30px; position: relative; }
.modal-close {
  position: absolute; top: 18px; inset-inline-end: 18px; background: rgba(255,255,255,0.14); border: none;
  color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,0.25); }
.modal-head .badge-sector { background: rgba(94,203,224,0.18); color: var(--cyan); }
.modal-head .badge-level { background: rgba(242,169,59,0.2); color: var(--gold); }
.modal-head h2 { font-size: 24px; margin-top: 12px; line-height: 1.35; }
.modal-code { font-family: var(--font-mono); font-size: 12.5px; color: #9fbbd4; margin-top: 8px; }

.modal-tabs { display: flex; gap: 4px; padding: 0 30px; background: var(--navy); border-top: 1px solid rgba(255,255,255,0.1); }
.modal-tab {
  background: transparent; border: none; color: #9fbbd4; font-weight: 700; font-size: 13px;
  padding: 12px 16px; border-bottom: 3px solid transparent; transition: all .18s ease;
}
.modal-tab:hover { color: #fff; }
.modal-tab.active { color: #fff; border-bottom-color: var(--gold); }
.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; }
.modal-p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: #F0F6FC; color: var(--navy); font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.day-list { display: flex; flex-direction: column; gap: 14px; }
.day-list li { display: flex; gap: 14px; align-items: flex-start; }
.day-badge {
  flex-shrink: 0; background: var(--navy); color: var(--gold); font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.day-list li b { font-size: 14.5px; color: var(--navy); display: block; margin-bottom: 3px; }
.day-list li p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.modal-body { padding: 26px 30px 30px; }
.modal-section { margin-bottom: 26px; }
.modal-section h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 12px; }
.outline-list li { display: flex; gap: 10px; padding: 8px 0; font-size: 14.5px; border-bottom: 1px solid #F0F4F8; }
.outline-list li:last-child { border-bottom: none; }
.outline-num { font-family: var(--font-mono); color: var(--blue); font-weight: 700; flex-shrink: 0; }

.session-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.session-table th { text-align: start; color: var(--ink-soft); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.session-table td { padding: 10px; border-bottom: 1px solid #F0F4F8; }
.session-table tr:last-child td { border-bottom: none; }
.city-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy); }
.city-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.city-tag.online .dot { background: var(--success); }

.pricing-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.price-box .amount { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--navy); }
.price-box .label { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ===================== Pricing section ===================== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pricing-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; display: flex; flex-direction: column; gap: 16px;
}
.pricing-card.featured { border: 2px solid var(--gold); box-shadow: var(--shadow-md); position: relative; }
.pricing-card .tag { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--gold); color: var(--navy-deep); font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.pricing-card h3 { font-size: 18px; color: var(--navy); }
.pricing-card .price { font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: var(--navy); }
.pricing-card .price small { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.pricing-card ul { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.pricing-card li { font-size: 14px; color: var(--ink-soft); display: flex; gap: 8px; }
.pricing-card li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ===================== Why / stats strip ===================== */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-strip .stat b { font-family: var(--font-display-en); font-size: 36px; color: var(--navy); display: block; }
body.lang-ar .stats-strip .stat b { font-family: var(--font-ar); }
.stats-strip .stat span { color: var(--ink-soft); font-size: 13.5px; }

/* ===================== In-house banner ===================== */
.inhouse-banner {
  background: linear-gradient(120deg, var(--navy) 0%, #123f66 100%);
  border-radius: var(--radius-lg); padding: 46px; color: #fff;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 30px; align-items: center;
  position: relative; overflow: hidden;
}
.inhouse-banner h2 { font-size: 28px; margin-bottom: 12px; }
.inhouse-banner p { color: #cfe0ef; font-size: 15px; }
.inhouse-actions { display: flex; flex-direction: column; gap: 10px; }

/* ===================== Contact / Footer ===================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; }
.contact-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F0F4F8; }
.contact-row:last-child { border-bottom: none; }
.contact-row .ic {
  width: 40px; height: 40px; border-radius: 10px; background: #E7F0FA; color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-row b { display: block; font-size: 14.5px; color: var(--navy); }
.contact-row span { font-size: 13px; color: var(--ink-soft); }

.site-footer { background: var(--navy-deep); color: #b9cfe3; padding: 50px 0 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: #8ea9c1; max-width: 280px; }
.footer-col h5 { color: #fff; font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: #a9c2d8; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #7c98b1; }

/* ===================== WhatsApp float ===================== */
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(37,211,102,0.45);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .explorer { grid-template-columns: 1fr; }
  .filters { position: static; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .inhouse-banner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .hero h1 { font-size: 36px; }
  body.lang-ar .hero h1 { font-size: 32px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 26px; }
  .hero-search { flex-direction: column; }
  .pricing-mini { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
