/* =========================================================
   Centre De Formation Leader Pro — Design System
   Built from website_content.json (no invented content)
   Bilingual AR/FR, RTL default
   ========================================================= */

:root {
  --primary: #073A66;
  --primary-600: #0A4D80;
  --primary-700: #0C3053;
  --secondary: #0C3053;
  --accent: #B11217;
  --accent-700: #8F0F13;
  --bg: #ffffff;
  --surface: #F5F7FA;
  --surface-2: #E8EDF3;
  --text: #1E293B;
  --muted: #5B6678;
  --success: #2BB673;
  --warning: #E8A33D;
  --error: #D64545;
  --border: #E3E9F2;
  --shadow-sm: 0 4px 16px rgba(7,58,102,.08);
  --shadow-md: 0 10px 30px rgba(7,58,102,.14);
  --shadow-lg: 0 18px 50px rgba(7,58,102,.18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --container: 1200px;
  --font-ar: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-la: 'Inter', 'Tajawal', system-ui, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ar);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
}

[dir="ltr"] body, body { font-family: var(--font-ar); }
body.la { font-family: var(--font-la); }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.18; color: var(--primary); letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }
p { color: var(--muted); }
a { color: var(--primary); text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
.section { padding-block: var(--space-8); }
.section.sm { padding-block: var(--space-7); }
.bg-surface { background: var(--surface); }
.bg-primary { background: var(--primary); color: #fff; }
.bg-primary h1, .bg-primary h2, .bg-primary h3 { color: #fff; }
.bg-primary p { color: #d7e3f3; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-700); margin-bottom: var(--space-3);
}
.eyebrow.on-dark { color: var(--accent); }
.section-head { max-width: 720px; margin-bottom: var(--space-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 19px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-ar); font-weight: 700; font-size: 16px;
  padding: 14px 28px; border-radius: var(--radius-sm); border: 2px solid transparent;
  cursor: pointer; transition: all .2s ease; min-height: 48px; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); padding-inline: 12px; }
.btn-ghost:hover { color: var(--accent-700); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--surface); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--primary); font-size: 18px; }
.brand .logo-mark { display: flex; align-items: center; flex: none; height: 34px; width: auto; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  padding: 10px 14px; border-radius: 8px; font-weight: 600; color: var(--text); font-size: 15px;
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--surface-2); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.phone-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
  font-weight: 800; padding: 10px 16px; border-radius: 999px; font-size: 15px;
}
.phone-pill:hover { background: var(--accent-700); }
.phone-pill svg { width: 18px; height: 18px; }
.lang-toggle {
  border: 1px solid var(--border); background: #fff; color: var(--primary);
  border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; font-size: 14px;
}
.lang-toggle:hover { background: var(--surface); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 28px; height: 28px; color: var(--primary); }

/* Mobile bottom call bar */
.mobile-callbar { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--primary); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(245,166,35,.22), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(46,111,183,.45), transparent 60%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--space-7); align-items: center; padding-block: var(--space-9); }
.hero h1 { color: #fff; }
.hero .lead { color: #d7e3f3; font-size: 20px; margin-block: var(--space-4) var(--space-6); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .trust-line { margin-top: var(--space-5); font-size: 14px; color: #b9cde6; display: flex; gap: 18px; flex-wrap: wrap; }
.hero .trust-line span { display: inline-flex; align-items: center; gap: 6px; }
.hero .trust-line svg { width: 16px; height: 16px; color: var(--accent); }

.hero-art {
  position: relative; border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.18); padding: var(--space-6); min-height: 340px;
  display: grid; place-items: center; overflow: hidden;
}
.hero-art svg { width: 100%; height: auto; max-width: 360px; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--border); }
.trust-bar .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); padding-block: var(--space-5); }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-item .ic {
  width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--primary);
  display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm);
}
.trust-item .ic svg { width: 22px; height: 22px; }
.trust-item strong { display: block; color: var(--text); font-size: 15px; }
.trust-item span { font-size: 13px; color: var(--muted); }

/* ---------- Cards / Programs ---------- */
.grid { display: grid; gap: var(--space-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-6); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card .icon-box {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--primary); margin-bottom: var(--space-2);
}
.card .icon-box svg { width: 28px; height: 28px; }
.card h3 { font-size: 20px; }
.card .badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.badge { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--primary); }
.badge.price { background: #fde8e8; color: var(--accent-700); }
.card .card-foot { margin-top: auto; padding-top: var(--space-3); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .price { font-weight: 800; color: var(--text); font-size: 16px; }
.card .price small { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------- Why Us ---------- */
.feature { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature .ic {
  width: 50px; height: 50px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff;
}
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 18px; margin-bottom: 4px; }
.feature p { font-size: 15px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); text-align: center; }
.stat .num { font-size: clamp(32px, 5vw, 48px); font-weight: 800; color: var(--accent); line-height: 1; }
.bg-primary .stat .num { color: #fff; }
.stat .label { margin-top: 8px; font-size: 15px; color: var(--muted); }
.bg-primary .stat .label { color: #cfe0f4; }

/* ---------- Languages highlight ---------- */
.lang-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.lang-badges { display: flex; gap: 14px; flex-wrap: wrap; }
.lang-badge {
  flex: 1; min-width: 120px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5); text-align: center; box-shadow: var(--shadow-sm);
}
.lang-badge .flag { font-size: 30px; }
.lang-badge strong { display: block; color: var(--primary); margin-top: 6px; }
.lang-badge span { font-size: 13px; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 230px;
  background: var(--surface-2); display: block; transition: transform .3s ease;
}
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22,58,107,.88), rgba(22,58,107,.25) 55%, transparent);
}
.gallery-item span {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 1;
  padding: 16px; color: #fff; font-weight: 700; font-size: 15px;
}
.gallery-item:hover { transform: scale(1.02); }

/* Real images */
.hero-img { width: 100%; max-width: 460px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); object-fit: cover; }
.card-img { width: 100%; height: 175px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.about-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); object-fit: cover; }
.img-fallback {
  width: 100%; min-height: 180px; display: grid; place-items: center; padding: 16px; text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; border-radius: var(--radius);
}

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--space-3); background: #fff; overflow: hidden; }
.faq-q {
  width: 100%; text-align: start; background: none; border: none; cursor: pointer;
  padding: var(--space-5); font-family: var(--font-ar); font-weight: 700; font-size: 17px; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-q .chev { transition: transform .25s; color: var(--primary); flex: none; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 var(--space-5) var(--space-5); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--accent), var(--accent-700)); color: #fff; text-align: center; }
.cta-band h2 { color: #1a1300; }
.cta-band p { color: #4a3a00; }
.cta-band .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: var(--space-5); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); color: var(--primary); display: grid; place-items: center; flex: none; }
.info-list .ic svg { width: 22px; height: 22px; }
.info-list strong { display: block; color: var(--text); }
.info-list span { color: var(--muted); font-size: 15px; }
.warning-note {
  margin-top: var(--space-5); background: #fff8ec; border: 1px solid #f3d9a6; color: #7a5a14;
  border-radius: var(--radius-sm); padding: var(--space-4); font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.warning-note svg { width: 20px; height: 20px; flex: none; color: var(--warning); }

/* Form */
.form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-ar); font-size: 16px; color: var(--text); background: #fff; transition: border .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(177,18,23,.18);
}
.field .err { color: var(--error); font-size: 13px; margin-top: 4px; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.field.invalid .err { display: block; }
.form-note { font-size: 13px; color: var(--muted); margin-top: var(--space-3); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-700); color: #cfe0f4; padding-block: var(--space-8) var(--space-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: var(--space-4); }
.site-footer a { color: #cfe0f4; display: block; padding: 5px 0; font-size: 15px; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: 14px; color: #aac3e0; margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--space-6); padding-top: var(--space-4); font-size: 13px; color: #9fb8d8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.10); display: grid; place-items: center; }
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero .cta-row, .btn { transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 260px; }
  .grid-3, .grid-2, .contact-grid, .lang-split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-bar .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .nav-links, .nav-actions .phone-pill, .lang-toggle { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 72px; inset-inline: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: var(--space-4); gap: 4px; box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: 12px 14px; }
  .gallery-grid, .footer-grid, .stats, .trust-bar .container { grid-template-columns: 1fr; }
  .section { padding-block: var(--space-7); }
  .mobile-callbar {
    display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 90;
    background: var(--accent); padding: 10px 16px; gap: 10px; box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  }
  .mobile-callbar a { flex: 1; text-align: center; font-weight: 800; color: #fff; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
  body { padding-bottom: 60px; }
}
