/* ============================================================
   ISFT — Website Design System
   Palette: Navy #0C234F / #081B39 · Gold #F3A117 · Blue #8395BD
   Type: Poppins/Inter (Latin) · Tajawal (Arabic)
   ============================================================ */

:root {
  /* Colors */
  --navy: #0C234F;
  --navy-900: #081B39;
  --navy-700: #163063;
  --gold: #F3A117;
  --gold-dark: #d98c0c;
  --blue: #8395BD;
  --white: #FFFFFF;
  --offwhite: #F7F8FA;
  --ink: #1A1F2B;
  --muted: #5B6472;
  --green: #2E9E6B;
  --line: #E4E7EE;

  /* Spacing scale (8px base) */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px;

  /* Radius */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;

  /* Shadows */
  --sh-sm: 0 2px 8px rgba(12,35,79,.06);
  --sh-md: 0 8px 24px rgba(12,35,79,.08);
  --sh-lg: 0 16px 40px rgba(12,35,79,.12);

  /* Type */
  --font-en: "Poppins", "Inter", system-ui, sans-serif;
  --font-ar: "Tajawal", "Poppins", system-ui, sans-serif;

  --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[lang="ar"], .ar { font-family: var(--font-ar); direction: rtl; display: inline-block; }

h1, h2, h3, h4 { font-family: var(--font-en); color: var(--navy); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { font-size: 1.05rem; color: var(--muted); }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s3); }
.section { padding: var(--s7) 0; }
.section-sm { padding: var(--s6) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-family: var(--font-en); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: var(--r-sm);
  border: 2px solid transparent; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Utility bar ---------- */
.utility {
  background: var(--navy-900); color: #cfd6e6; font-size: .85rem;
}
.utility .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.utility a { color: #cfd6e6; }
.utility a:hover { color: var(--gold); }
.utility .pill {
  background: var(--gold); color: var(--navy); font-weight: 700;
  padding: 3px 12px; border-radius: 999px; font-size: .8rem; letter-spacing: .5px;
}
.utility .util-links { display: flex; gap: var(--s3); align-items: center; }

/* ---------- Header / Nav ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); font-size: 1.3rem; }
.logo-img { height: 48px; width: auto; display: block; }

.logo .mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--navy);
  color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav a { font-weight: 500; color: var(--ink); }
.nav a:hover, .nav a.active { color: var(--navy); }
.nav .btn { padding: 10px 20px; }
.burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 3px; background: var(--navy); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: radial-gradient(1200px 600px at 80% -10%, var(--navy-700), var(--navy-900));
  color: var(--white); overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(243,161,23,.12) 95%),
                    linear-gradient(90deg, transparent 95%, rgba(243,161,23,.12) 95%);
  background-size: 38px 38px; opacity: .35; pointer-events: none;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s5); align-items: center; padding: var(--s7) var(--s3); }
.hero h1 { color: var(--white); }
.hero .gold { color: var(--gold); }
.hero p.lead { color: #cdd5e6; font-size: 1.15rem; margin: var(--s3) 0 var(--s4); }
.hero .ar { color: var(--gold); font-size: 1.25rem; margin-top: 6px; }
.hero-cta { display: flex; gap: var(--s2); flex-wrap: wrap; }
.hero-media {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg);
  border: 1px solid rgba(255,255,255,.12); background: var(--navy-700);
  aspect-ratio: 4/5;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media.fallback { display: grid; place-items: center; color: var(--gold); font-weight: 700; text-align: center; padding: 24px; }

.trust-strip { background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); }
.trust-strip .container { display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: center; padding: var(--s3); }
.trust-strip span { color: #cfd6e6; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.trust-strip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* ---------- Section headings ---------- */
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: .8rem; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s5); }
.section-head p { margin-top: var(--s2); }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s4); box-shadow: var(--sh-sm); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: rgba(243,161,23,.12);
  color: var(--gold-dark); display: grid; place-items: center; margin-bottom: var(--s2);
}
.card h3 { margin-bottom: 6px; }
.card .sub { color: var(--gold-dark); font-weight: 600; font-size: .9rem; margin-bottom: var(--s1); }
.card p { font-size: .98rem; }
.card .more { display: inline-block; margin-top: var(--s2); color: var(--navy); font-weight: 600; }

/* Service card badges */
.badge { display: inline-block; background: var(--navy); color: var(--white); font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-top: var(--s2); }

/* ---------- About preview ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: center; }
.split .media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); background: var(--navy); aspect-ratio: 5/4; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Why choose list ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.why-item { display: flex; gap: 12px; align-items: flex-start; }
.why-item .chk { color: var(--green); flex-shrink: 0; margin-top: 4px; }
.why-item h4 { font-size: 1.05rem; margin-bottom: 2px; }
.why-item p { font-size: .92rem; }

/* ---------- Stats band ---------- */
.stats { background: var(--navy); color: var(--white); }
.stats .grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s4); text-align: center; }
.stat .num { font-size: 2.6rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat .lbl { color: #cdd5e6; margin-top: 8px; }

/* ---------- Testimonial ---------- */
.testi { background: var(--offwhite); }
.testi-card {
  max-width: 800px; margin: 0 auto; background: var(--white); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: var(--s5); border-top: 5px solid var(--gold); text-align: center;
}
.testi-card .avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; margin: 0 auto var(--s3); }
.testi-card blockquote { font-size: 1.2rem; color: var(--ink); font-style: italic; }
.testi-card .name { font-weight: 700; color: var(--navy); margin-top: var(--s3); }
.testi-card .role { color: var(--muted); font-size: .92rem; }
.testi-card .result { display: inline-block; margin-top: var(--s2); background: rgba(46,158,107,.12); color: var(--green); font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: .9rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--navy-700)); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #cdd5e6; margin: var(--s2) auto var(--s4); max-width: 620px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #cdd5e6; padding: var(--s6) 0 var(--s4); }
.footer .grid-4 { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s4); }
.footer h4 { color: var(--white); margin-bottom: var(--s2); font-size: 1rem; }
.footer a { color: #cdd5e6; display: block; padding: 4px 0; }
.footer a:hover { color: var(--gold); }
.footer .brand { color: var(--white); font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin-bottom: var(--s2); }
.footer .brand .mark { width: 36px; height: 36px; border-radius: 9px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: var(--s4); padding-top: var(--s3); text-align: center; font-size: .85rem; color: #8b95ad; }

/* ---------- Mobile sticky bar ---------- */
.mobile-cta { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--white); border-top: 1px solid var(--line); padding: 10px var(--s2); gap: 10px; box-shadow: 0 -4px 16px rgba(12,35,79,.12); display: flex; transform: translateY(100%); transition: transform .35s ease; }
.mobile-cta.show { transform: none; }
.mobile-cta .btn { flex: 1; justify-content: center; padding: 12px; }
.mobile-cta .call { background: var(--navy); color: var(--white); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--s3); max-width: 560px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--font-en); font-size: 1rem; color: var(--ink); background: var(--offwhite); transition: border .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,161,23,.25); }
.field textarea { min-height: 120px; resize: vertical; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--s3); counter-reset: step; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); position: relative; }
.step .n { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; margin-bottom: var(--s2); }

/* ---------- Map ---------- */
.map { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-md); }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- Contact info ---------- */
.contact-info { display: grid; gap: var(--s3); }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(12,35,79,.07); color: var(--navy); display: grid; place-items: center; flex-shrink: 0; }
.contact-row h4 { font-size: 1rem; }
.contact-row p { font-size: .98rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Breadcrumb / page hero ---------- */
.page-hero { background: radial-gradient(900px 400px at 70% -20%, var(--navy-700), var(--navy-900)); color: var(--white); padding: var(--s6) 0; position: relative; }
.page-hero.bg-img { background: none; }
.page-hero.bg-img::before { content: ""; position: absolute; inset: 0; background: inherit; background-size: cover; background-position: center; filter: brightness(.3); }
.page-hero.bg-img .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); }
.page-hero p { color: #cdd5e6; margin-top: var(--s2); }

/* ---------- Registration form ---------- */
.form-section { background: var(--offwhite); }
.reg-form {
  max-width: 720px; margin: 0 auto; background: var(--white); padding: var(--s5) var(--s4);
  border-radius: var(--r-md); box-shadow: var(--sh-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--font-en); font-size: .95rem; color: var(--ink); background: var(--white);
  transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 100px; }
.dob-group { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.form-submit { text-align: center; margin-top: var(--s4); }
.form-note { font-size: .82rem; color: var(--muted); margin-top: var(--s2); }
.form-success {
  display: none; text-align: center; padding: var(--s6) var(--s4); max-width: 500px; margin: 0 auto;
}
.form-success .success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: var(--white);
  font-size: 1.8rem; font-weight: 700; display: grid; place-items: center; margin: 0 auto var(--s3);
}
.form-success h3 { color: var(--green); margin-bottom: var(--s2); }
.form-success p { color: var(--muted); margin-bottom: var(--s4); }

/* ---------- Header scroll shadow ---------- */
.header.scrolled { box-shadow: 0 4px 20px rgba(12,35,79,.12); }

/* ---------- Mobile CTA slide-up ---------- */
.mobile-cta { transform: translateY(100%); transition: transform .35s ease; }
.mobile-cta.show { transform: none; }

/* ---------- Inline form validation ---------- */
.form-group .field-error { display: none; color: #d32f2f; font-size: .82rem; margin-top: 4px; }
.form-group.has-error input, .form-group.has-error select { border-color: #d32f2f; }
.form-group.has-error .field-error { display: block; }

/* ---------- Submit loading state ---------- */
.btn.loading { pointer-events: none; opacity: .75; position: relative; }
.btn.loading::before {
  content: ""; width: 18px; height: 18px; border: 2px solid var(--navy); border-top-color: transparent;
  border-radius: 50%; display: inline-block; animation: spin .6s linear infinite; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Skip to form link ---------- */
.skip-form { display: inline-block; margin-top: var(--s2); color: var(--gold); font-weight: 600; font-size: .95rem; }
.skip-form:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .why-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { max-width: 420px; }
  .split { grid-template-columns: 1fr; }
  .footer .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 74px 0 auto 0; background: var(--white); flex-direction: column; gap: 0; padding: var(--s2) var(--s3) var(--s4); border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform .3s; box-shadow: var(--sh-md); }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: var(--s2); }
  .burger { display: flex; }
  .grid-2, .grid-3, .grid-5, .why-grid, .steps, .stats .grid-4, .footer .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 4/3; max-width: 100%; }
  .utility .util-links { gap: 6px; font-size: .78rem; }
  .trust-strip .container { gap: var(--s2); }
  .section { padding: var(--s6) 0; }
  body { padding-bottom: 64px; }
}
@media (min-width: 721px) {
  .mobile-cta { display: none; }
}
/* ============ Animations ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulsePill { 0%, 100% { box-shadow: 0 0 0 0 rgba(243,161,23,.55); } 50% { box-shadow: 0 0 0 9px rgba(243,161,23,0); } }
@keyframes shine { 0% { left: -60%; } 100% { left: 130%; } }

/* Hero entrance */
.hero h1, .hero .lead, .hero .ar, .hero-cta, .hero-media { opacity: 0; animation: fadeUp .7s ease forwards; }
.hero h1 { animation-delay: .05s; }
.hero .lead { animation-delay: .18s; }
.hero .ar { animation-delay: .30s; }
.hero-cta { animation-delay: .42s; }
.hero-media { animation: fadeUp .7s ease forwards, floaty 6s ease-in-out 1s infinite; }

/* Image zoom on hover */
.media img, .hero-media img { transition: transform .5s ease; }
.media:hover img, .hero-media:hover img { transform: scale(1.06); }

/* Button shine sweep */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); z-index: -1; animation: shine 3.6s ease-in-out infinite;
}
.btn-primary:hover::after { animation-play-state: paused; }

/* Nav underline */
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--gold); transition: width .25s ease; }
.nav a:hover::after, .nav a.active::after { width: 100%; }

/* Pulsing promo pill */
.utility .pill { animation: pulsePill 2.2s ease-in-out infinite; }

/* Back-to-top */
.to-top {
  position: fixed; right: 18px; bottom: 80px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--gold); border: none; cursor: pointer;
  display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--sh-md);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s, background .2s;
  z-index: 55;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: var(--navy); }

/* Card hover lift already present; add subtle icon pop */
.card:hover .icon { transform: scale(1.08) rotate(-3deg); }
.card .icon { transition: transform .25s ease; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1, .hero .lead, .hero .ar, .hero-cta, .hero-media { opacity: 1; animation: none; }
  .hero-media { animation: none; }
  .media img, .hero-media img { transition: none; transform: none; }
  .btn-primary::after, .utility .pill, .card .icon { animation: none; transition: none; }
  .to-top { transition: none; }
  html { scroll-behavior: auto; }
}
