/* ============================================================
   Proway Academy — Design System
   Palette: Indigo (trust/tech), Cyan (innovation), Amber (CTA)
   Fonts: Space Grotesk (headings), Inter (body), Cairo (Arabic)
   ============================================================ */

:root {
  /* Colors */
  --indigo-900: #0f1b4c;
  --indigo-700: #1b2a6b;
  --indigo-600: #243a8f;
  --indigo-500: #2f4fb0;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --green-500: #16a34a;
  --red-500: #dc2626;

  --bg: #ffffff;
  --surface: #f5f7fb;
  --surface-2: #eef2fa;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --primary: var(--indigo-700);
  --secondary: var(--cyan-500);
  --accent: var(--amber-500);

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radius */
  --r-btn: 12px; --r-card: 18px; --r-img: 16px; --r-input: 12px;

  /* Shadow */
  --sh-card: 0 4px 24px rgba(27, 42, 107, .08);
  --sh-card-hover: 0 12px 36px rgba(27, 42, 107, .16);
  --sh-drop: 0 16px 48px rgba(15, 23, 42, .18);

  --container: 1200px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-head {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.ar { font-family: 'Cairo', 'Tajawal', sans-serif; direction: rtl; }

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { color: var(--text-2); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }

.section { padding: var(--s-9) 0; }
.section-sm { padding: var(--s-8) 0; }
.section-tight { padding: var(--s-7) 0; }

.bg-surface { background: var(--surface); }
.bg-gradient {
  background: linear-gradient(135deg, var(--indigo-900) 0%, var(--indigo-700) 55%, var(--indigo-600) 100%);
  color: #fff;
}
.bg-gradient h1, .bg-gradient h2, .bg-gradient h3 { color: #fff; }
.bg-gradient p { color: rgba(255,255,255,.82); }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan-500);
  margin-bottom: var(--s-3);
}
.text-center { text-align: center; }
.lead { font-size: 1.15rem; max-width: 60ch; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 1rem; padding: 14px 26px; border-radius: var(--r-btn);
  border: 2px solid transparent; cursor: pointer; transition: all .18s ease;
  line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--amber-500); color: #1a1205; }
.btn-primary:hover { background: var(--amber-400); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(245,158,11,.4); }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-indigo { background: var(--indigo-700); color: #fff; }
.btn-indigo:hover { background: var(--indigo-600); transform: translateY(-2px); box-shadow: var(--sh-card); }
.btn-ghost { background: transparent; color: var(--indigo-700); border-color: var(--indigo-700); }
.btn-ghost:hover { background: var(--indigo-700); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }

/* ---------- Header / Nav ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: var(--s-3); font-family: 'Space Grotesk'; font-weight: 700; font-size: 1.25rem; color: var(--indigo-700); }
.brand .logo-img { height: 36px; width: auto; border-radius: 8px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--indigo-700), var(--cyan-500));
  display: grid; place-items: center; color: #fff; font-size: 1.1rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: var(--s-6); list-style: none; }
.nav-links a { font-weight: 600; color: var(--text-2); font-size: .98rem; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--indigo-700); }
.nav-cta { display: flex; align-items: center; gap: var(--s-3); }
.hamburger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 26px; height: 3px; background: var(--indigo-700); border-radius: 3px; transition: .25s; }
.mobile-menu { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: #fff; z-index: 99; padding: var(--s-6) var(--s-5); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 16px 8px; font-size: 1.2rem; font-weight: 600; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-menu .btn { margin-top: var(--s-5); }

/* ---------- Sticky WhatsApp bubble ---------- */
.wa-bubble {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; font-weight: 700;
  padding: 13px 18px; border-radius: 40px; box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform .2s;
}
.wa-bubble:hover { transform: scale(1.05); }
.wa-bubble .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-7); align-items: center; }
.hero-logo { margin-bottom: var(--s-5); }
.hero-logo img { height: 80px; width: auto; filter: drop-shadow(0 6px 24px rgba(6,182,212,.3)); }
.hero h1 { margin-bottom: var(--s-4); }
.hero .ar { display: block; color: var(--cyan-400); font-size: 1.25rem; font-weight: 600; margin-top: var(--s-3); }
.hero p.lead { margin: var(--s-4) 0 var(--s-6); }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.hero-media { position: relative; border-radius: var(--r-img); overflow: hidden; box-shadow: var(--sh-drop); aspect-ratio: 4/5; background: var(--surface-2); }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.95);
  border-radius: 12px; padding: 10px 14px; font-weight: 700; color: var(--indigo-700); font-size: .9rem;
  box-shadow: var(--sh-card);
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
.stat { text-align: center; padding: var(--s-5); border-radius: var(--r-card); background: #fff; border: 1px solid var(--border); }
.stat .num { font-family: 'Space Grotesk'; font-size: 2.4rem; font-weight: 700; color: var(--indigo-700); }
.stat .lbl { color: var(--text-2); font-size: .95rem; }

/* ---------- Section header ---------- */
.sec-head { max-width: 720px; margin: 0 auto var(--s-7); text-align: center; }
.sec-head p { margin-top: var(--s-3); }

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

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-card);
  padding: var(--s-6); transition: all .22s ease; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); border-color: transparent; }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--indigo-700); margin-bottom: var(--s-4);
}
.card h3 { margin-bottom: var(--s-2); }
.card p { font-size: .97rem; }
.card .price { font-weight: 700; color: var(--amber-500); margin-top: var(--s-3); }

.feature-list { list-style: none; margin-top: var(--s-4); display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: .98rem; }
.feature-list li::before { content: "✓"; color: var(--green-500); font-weight: 800; flex: 0 0 auto; }

/* Program card with thumb */
.prog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.prog-card .thumb { aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.prog-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prog-card:hover .thumb img { transform: scale(1.05); }
.prog-card .body { padding: var(--s-5); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prog-card .tag { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-500); }
.prog-card .more { margin-top: auto; font-weight: 700; color: var(--indigo-700); display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Why choose ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.why-item { display: flex; gap: var(--s-4); align-items: flex-start; }
.why-item .ico { flex: 0 0 auto; }
.why-item h3 { font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
.split.reverse .split-media { order: -1; }
.split-media { border-radius: var(--r-img); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); box-shadow: var(--sh-card); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); counter-reset: step; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s-6); position: relative; }
.step .n { font-family: 'Space Grotesk'; font-size: 2.2rem; font-weight: 800; color: var(--cyan-500); }
.step h3 { margin: var(--s-3) 0 6px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: var(--s-8) var(--s-5); border-radius: 24px; }
.cta-band h2 { margin-bottom: var(--s-3); }
.cta-band .hero-actions { justify-content: center; margin-top: var(--s-5); }

/* ---------- Footer ---------- */
.footer { background: var(--indigo-900); color: rgba(255,255,255,.78); padding: var(--s-8) 0 var(--s-6); }
.footer a { color: rgba(255,255,255,.78); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-6); }
.footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: var(--s-4); }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer .brand { color: #fff; margin-bottom: var(--s-3); }
.footer .contact-line { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: var(--s-6); padding-top: var(--s-5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .9rem; }
.social { display: flex; gap: 12px; margin-top: var(--s-4); }
.social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; transition: .2s; }
.social a:hover { background: var(--cyan-500); color: #04222a; }

/* ---------- Gallery ---------- */
.gallery-grid { columns: 3; column-gap: var(--s-4); }
.gallery-grid a { display: block; margin-bottom: var(--s-4); break-inside: avoid; border-radius: var(--r-img); overflow: hidden; position: relative; }
.gallery-grid img { width: 100%; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.05); }
.gallery-grid a .cap { position: absolute; inset: auto 0 0 0; padding: 14px; background: linear-gradient(transparent, rgba(15,27,76,.85)); color: #fff; font-size: .85rem; font-weight: 600; opacity: 0; transition: .25s; }
.gallery-grid a:hover .cap { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(8,12,30,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: var(--s-5); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.lightbox .close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 2rem; background: none; border: 0; cursor: pointer; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--r-card); margin-bottom: var(--s-3); overflow: hidden; background: #fff; }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: var(--s-5); font-size: 1.08rem; font-weight: 600; font-family: 'Space Grotesk'; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); }
.faq-q .plus { color: var(--indigo-700); font-size: 1.5rem; transition: transform .25s; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 var(--s-5) var(--s-5); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--s-4); }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--r-input);
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--text); transition: .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(6,182,212,.18); }
.field .err { color: var(--red-500); font-size: .85rem; margin-top: 5px; display: none; }
.field.invalid input { border-color: var(--red-500); }
.field.invalid .err { display: block; }
.form-note { font-size: .85rem; color: var(--text-3); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: start; }
.info-card { display: flex; gap: var(--s-4); margin-bottom: var(--s-5); }
.info-card .ico { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--indigo-700); }
.map { border-radius: var(--r-img); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/10; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .9rem; color: var(--text-3); padding: var(--s-5) 0 0; }
.breadcrumb a:hover { color: var(--indigo-700); }

/* ---------- Placeholder media (replace with scraped FB/IG photos) ---------- */
.ph {
  display: grid; place-items: center; text-align: center; color: var(--indigo-700);
  background: linear-gradient(135deg, var(--surface-2), #dfe9fb);
  position: relative; overflow: hidden;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(6,182,212,.18), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(245,158,11,.15), transparent 55%);
}
.ph .ph-in { position: relative; z-index: 1; padding: var(--s-5); }
.ph .ph-ico { font-size: 2.4rem; opacity: .55; }
.ph .ph-label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-top: 8px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); 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; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .hamburger { display: flex; }
  .hero-grid, .split, .split.reverse, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .hero-media { aspect-ratio: 16/11; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-2, .grid-4, .why-grid, .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .section { padding: var(--s-8) 0; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .wa-bubble { padding: 11px 14px; font-size: .9rem; }
}
