/* ═══════════════════════════════════════════════════════════════
   icealex.com — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand colours */
  --ice:        #1FB6EA;
  --ice-dark:   #0d9fd0;
  --ice-light:  #ebf8ff;
  --ice-xlight: #f0fbff;
  --dark:       #0a1628;
  --dark-2:     #111d30;
  --dark-3:     #1a2d47;

  /* Neutral */
  --gray-900: #1a202c;
  --gray-700: #2d3748;
  --gray-500: #718096;
  --gray-400: #a0aec0;
  --gray-200: #e2e8f0;
  --gray-100: #f7f9fc;
  --white:    #ffffff;

  /* Semantic */
  --green:    #38a169;
  --amber:    #d69e2e;
  --red:      #e53e3e;
  --purple:   #6b46c1;

  /* Typography */
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-ar: 'Cairo', 'Segoe UI', sans-serif;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Radii */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.14);

  /* Nav */
  --nav-height: 68px;
}

/* ── 2. Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* prevent mobile horizontal scroll */
}
body.lang-ar { font-family: var(--font-ar); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ── 3. Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; }
h5 { font-size: 15px; }
p  { color: var(--gray-500); margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: var(--sp-3);
}
.lead {
  font-size: 18px;
  color: var(--gray-500);
  max-width: 640px;
}

/* ── 4. Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 var(--sp-6); }
.container-lg { max-width: 1300px; margin: 0 auto; padding: 0 var(--sp-6); }

section { padding: var(--sp-20) 0; }
section + section { padding-top: 0; }

.section-header {
  margin-bottom: var(--sp-12);
  max-width: 640px;
}
.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-header .eyebrow { margin-bottom: var(--sp-2); }
.section-header h2 { margin-bottom: var(--sp-4); }

/* Grid utilities */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

/* ── 5. Navigation ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.site-header .container { width: 100%; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.nav-logo img { height: 40px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin: 0 auto;
}
.nav-link {
  padding: var(--sp-2) var(--sp-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--ice); background: var(--ice-xlight); text-decoration: none; }
.nav-link.active { color: var(--ice); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}
.nav-lang-toggle {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  padding: 4px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  transition: all 0.15s;
}
.nav-lang-toggle:hover { color: var(--ice); border-color: var(--ice); text-decoration: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--sp-2);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-mobile {
  display: none;
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: var(--sp-6) 0;
}
.nav-mobile ul { padding: 0 var(--sp-6); }
.nav-mobile-link {
  display: block;
  padding: var(--sp-3) 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  border-bottom: 1px solid var(--gray-200);
}
.nav-mobile-link:hover { color: var(--ice); text-decoration: none; }

/* ── 6. Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.18s;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--ice);
  color: white;
  border-color: var(--ice);
}
.btn-primary:hover {
  background: var(--ice-dark);
  border-color: var(--ice-dark);
}
.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--ice);
  color: var(--ice);
}
.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
}
.btn-dark {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.btn-dark:hover { background: var(--dark-2); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }

/* ── 7. Hero Section ─────────────────────────────────────────── */
.hero {
  background: var(--dark);
  color: white;
  padding: var(--sp-20) 0;
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 70% 50%, rgba(31,182,234,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--white));
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(31,182,234,0.15);
  border: 1px solid rgba(31,182,234,0.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: var(--sp-6);
}
.hero h1 {
  color: white;
  max-width: 700px;
  margin-bottom: var(--sp-6);
}
.hero h1 .ice { color: var(--ice); }
.hero h1 .block { display: block; }
.hero .lead { color: rgba(255,255,255,0.7); margin-bottom: var(--sp-8); }
.hero-actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }

/* ── 8. Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--ice);
  color: white;
  padding: var(--sp-8) 0;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 var(--sp-8);
  position: relative;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.3);
}
.stat-number {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
  color: white;
  letter-spacing: -1px;
}
.stat-number span { color: rgba(255,255,255,0.7); font-size: 0.55em; font-weight: 600; }
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-top: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── 9. Cards ────────────────────────────────────────────────── */
.card {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.card:hover {
  border-color: var(--ice);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card-header { margin-bottom: var(--sp-4); }
.card-title { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: var(--sp-2); }
.card-desc { font-size: 14px; color: var(--gray-500); margin-bottom: var(--sp-4); }
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 12px;
  color: var(--gray-400);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--gray-200);
}
.card-meta-item { display: flex; align-items: center; gap: 5px; }

/* Program card */
.program-card {
  display: flex;
  flex-direction: column;
}
.program-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.program-card-footer {
  margin-top: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ── 10. Status Badges ───────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-open     { background: #c6f6d5; color: #276749; }
.badge-closed   { background: var(--gray-200); color: var(--gray-500); }
.badge-upcoming { background: #bee3f8; color: #2a4365; }
.badge-past     { background: #fed7d7; color: #742a2a; }
.badge-default  { background: var(--gray-200); color: var(--gray-500); }

/* ── 11. Pillars / Features ─────────────────────────────────── */
.pillars { background: var(--gray-100); }
.pillar-card {
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  background: white;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--gray-200);
  transition: all 0.2s;
}
.pillar-card:hover {
  border-color: var(--ice);
  box-shadow: var(--shadow);
}
.pillar-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ice-light);
  color: var(--ice);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
  font-size: 28px;
}
.pillar-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--sp-3);
}

/* ── 12. Partners Strip ──────────────────────────────────────── */
.partners { border-top: 1px solid var(--gray-200); }
.partners-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-16);
  flex-wrap: wrap;
}
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.2s;
  max-height: 48px;
  width: auto;
}
.partner-logo:hover { filter: none; opacity: 1; }

/* ── 13. CTA Band ────────────────────────────────────────────── */
.cta-band {
  background: var(--dark);
  color: white;
  padding: var(--sp-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 120% at 50% 50%, rgba(31,182,234,0.14) 0%, transparent 60%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: white; margin-bottom: var(--sp-4); }
.cta-band p { color: rgba(255,255,255,0.7); margin-bottom: var(--sp-8); }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: var(--sp-4); flex-wrap: wrap; }

/* ── 14. Page Hero (sub-pages) ───────────────────────────────── */
.page-hero {
  background: var(--dark);
  color: white;
  padding: var(--sp-16) 0 var(--sp-12);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 20% 50%, rgba(31,182,234,0.1) 0%, transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: white; margin-bottom: var(--sp-4); }
.page-hero p  { color: rgba(255,255,255,0.7); max-width: 600px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-6);
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--ice); }
.breadcrumb-sep { opacity: 0.3; }

/* ── 15. Events ─────────────────────────────────────────────── */
.event-card {
  display: flex;
  gap: var(--sp-6);
  padding: var(--sp-6);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  transition: all 0.2s;
}
.event-card:hover { border-color: var(--ice); box-shadow: var(--shadow); }
.event-date-block {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--dark);
  color: white;
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-2);
}
.event-date-day   { font-size: 28px; font-weight: 800; line-height: 1; }
.event-date-month { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--ice); margin-top: 4px; }
.event-body { flex: 1; }
.event-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-2);
}
.type-in-person  { background: var(--ice-light); color: var(--ice-dark); }
.type-online     { background: #e9d8fd; color: var(--purple); }
.type-hybrid     { background: #fefcbf; color: #b7791f; }
.event-title     { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: var(--sp-2); }
.event-location  { font-size: 13px; color: var(--gray-400); }

/* ── 16. Team / Profile ─────────────────────────────────────── */
.team-card {
  text-align: center;
  padding: var(--sp-8) var(--sp-6);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
  transition: all 0.2s;
}
.team-card:hover { border-color: var(--ice); box-shadow: var(--shadow); transform: translateY(-2px); }
.team-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto var(--sp-4);
  object-fit: cover;
  border: 3px solid var(--ice-light);
}
.team-name  { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: var(--sp-1); }
.team-role  { font-size: 13px; color: var(--ice); font-weight: 600; }
.team-links { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-4); }
.team-links a {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 14px;
  transition: all 0.15s;
}
.team-links a:hover { border-color: var(--ice); color: var(--ice); text-decoration: none; }

/* ── 17. Impact / Numbers ───────────────────────────────────── */
.impact-number-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.impact-number-card {
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  background: var(--dark);
  border-radius: var(--radius-xl);
  color: white;
}
.impact-number-value {
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 800;
  color: var(--ice);
  line-height: 1;
  margin-bottom: var(--sp-3);
}
.impact-number-label {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}

/* Alumni / story cards */
.alumni-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.alumni-card {
  padding: var(--sp-8);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: white;
}
.alumni-quote {
  font-size: 15px;
  color: var(--gray-700);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--sp-6);
  position: relative;
  padding-left: var(--sp-5);
}
.alumni-quote::before {
  content: '"';
  position: absolute;
  left: 0; top: -4px;
  font-size: 48px;
  color: var(--ice);
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}
.alumni-person { display: flex; align-items: center; gap: var(--sp-3); }
.alumni-photo  { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.alumni-name   { font-size: 14px; font-weight: 700; color: var(--dark); }
.alumni-role   { font-size: 12px; color: var(--gray-400); }

/* ── 18. Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: white;
  padding: var(--sp-16) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo img { height: 40px; width: auto; margin-bottom: var(--sp-4); }
.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  margin-bottom: var(--sp-4);
}
.footer-contact a { color: var(--ice); font-size: 14px; }
.footer-contact a:hover { text-decoration: underline; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-5);
}
.footer-col ul li { margin-bottom: var(--sp-3); }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.75); transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--ice); text-decoration: none; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-6) 0;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.footer-bottom strong { color: rgba(255,255,255,0.6); }
.footer-legal a { color: rgba(255,255,255,0.35); }
.footer-legal a:hover { color: var(--ice); }

/* ── 19. Utilities ───────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-ice     { color: var(--ice); }
.text-dark    { color: var(--dark); }
.text-muted   { color: var(--gray-400); }
.bg-light     { background: var(--gray-100); }
.bg-dark      { background: var(--dark); }
.bg-ice       { background: var(--ice); }
.mt-auto      { margin-top: auto; }
.flex         { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2        { gap: var(--sp-2); }
.gap-4        { gap: var(--sp-4); }
.gap-6        { gap: var(--sp-6); }
.hidden       { display: none !important; }
.divider      { height: 1px; background: var(--gray-200); margin: var(--sp-12) 0; }

/* Dot mark decoration */
.dot-mark {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.dot-mark span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ice);
}

/* ── 20. Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: var(--sp-12) 0; }
  .hero   { padding: var(--sp-12) 0; min-height: auto; }
  .hero::after { display: none; }

  .nav-links  { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile.open { display: block; }
  .site-header { position: relative; height: auto; }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .stats-inner { gap: 0; flex-wrap: wrap; }
  .stat-item  { width: 50%; flex: none; padding: var(--sp-6); }
  .stat-item + .stat-item::before { display: none; }

  .impact-number-grid { grid-template-columns: 1fr; }
  .alumni-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .cta-band h2 { font-size: 28px; }

  .page-hero h1 { font-size: 32px; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-4); }
  .stat-item { width: 100%; }
  h1 { font-size: 28px; }
}

/* ── 21. RTL Overrides ───────────────────────────────────────── */
[dir="rtl"] .nav { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hero h1 { direction: rtl; }
[dir="rtl"] .stat-item + .stat-item::before { left: auto; right: 0; }
[dir="rtl"] .event-card { flex-direction: row-reverse; }
[dir="rtl"] .alumni-quote { padding-left: 0; padding-right: var(--sp-5); }
[dir="rtl"] .alumni-quote::before { left: auto; right: 0; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .breadcrumb { flex-direction: row-reverse; }

/* ── 22. Mobile fit for nav and inline-styled layouts (added 2026-09-16) ── */
@media (max-width: 768px) {
  .nav { gap: var(--sp-4); }
  .nav-actions { gap: var(--sp-2); }
  .nav-lang-toggle { font-size: 12px; padding: 4px 8px; white-space: nowrap; }
  .nav-actions .btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; }
  .nav-hamburger { padding: var(--sp-2) 0 var(--sp-2) var(--sp-1); }
}
@media (max-width: 360px) {
  .nav-lang-toggle { display: none; }
}
@media (max-width: 900px) {
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:340px 1fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns:1fr 2fr"] { grid-template-columns: 1fr !important; }
  [style*="position:sticky"] { position: static !important; }
}
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:repeat(2, 1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3, 1fr)"],
  [style*="grid-template-columns:1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(4, 1fr)"],
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns:repeat(6,1fr)"],
  [style*="grid-template-columns:repeat(auto-fit"] { grid-template-columns: 1fr 1fr !important; }
  [style*="grid-column:1 / -1"], [style*="grid-column:span"] { grid-column: auto !important; }
  [style*="display:flex"]:not(.nav):not(.nav-actions):not(.nav-links) { flex-wrap: wrap; }
  [style*="min-width:"] { min-width: 0 !important; }
  table { font-size: 13px; }
  img, svg, iframe, video { max-width: 100%; }
}
/* ═══════════════════════════════════════════════════════════════
   26 Sep 2026 — tester-feedback fixes
   1. Tokens that templates already reference but were never defined
      (this is why card padding collapsed and borders disappeared).
   2. Programme cards, partner grid, event format cards, mobile rules.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --sp-7:       28px;
  --gray-50:    #f8fafc;
  --gray-300:   #cbd5e0;
  --gray-600:   #4a5568;
  --surface:    #ffffff;
  --border:     #e2e8f0;
  --accent:     #1FB6EA;
  --ice-blue:   #1FB6EA;
  --ice-navy:   #112240;
  --ice-white:  #ffffff;
  --ice-gray:   #64748b;
  --ice-border: #e2e8f0;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --card-pad:   28px;
  --card-gap:   12px;
}
.lang-ar { --font-heading: 'Cairo', 'Segoe UI', sans-serif; }

/* Programme cards (homepage + /programs) */
.program-card-rich { min-width: 0; }
.program-card-rich h3 { overflow-wrap: anywhere; }
.program-card-rich .btn-sm { padding: 9px 14px; font-size: 13px; }
.lang-ar .program-card-rich, .lang-ar .program-card-rich p { text-align: right; }
.lang-ar .program-card-rich [dir="ltr"] { direction: ltr; unicode-bidi: isolate; }

/* Event format cards and similar white cards */
.format-card {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 14px;
  padding: var(--card-pad) var(--card-pad) calc(var(--card-pad) - 4px);
  display: flex; flex-direction: column; gap: var(--card-gap);
  transition: border-color .2s, box-shadow .2s;
}
.format-card:hover { border-color: var(--ice); box-shadow: 0 2px 16px rgba(0,0,0,.07); }
.format-card > :last-child { margin-top: auto; }

/* Partners */
.partners-grid a { min-width: 0; }

/* Founder card (events page) */
.founder-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 6px 24px rgba(10,22,40,.15); }

/* Mobile */
@media (max-width: 768px) {
  .ribbon-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .format-grid { grid-template-columns: 1fr !important; }
  .programs-grid { grid-template-columns: 1fr !important; }
  .founder-card { grid-template-columns: 1fr !important; text-align: center; }
  .founder-card .founder-photo, .founder-card .founder-initials { margin: 0 auto; }
  .partners-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Language switcher pill: shared by every page (was only in rtl.css, so inner pages in English showed bare boxes) */
.lang-switcher { display: flex; align-items: center; gap: 2px; background: var(--gray-100); border-radius: 100px; padding: 3px; border: 1.5px solid var(--gray-200); }
.lang-switcher .lang-btn { padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--gray-500); transition: all .15s; border: none; background: transparent; letter-spacing: .5px; font-family: inherit; }
.lang-switcher .lang-btn.lang-active { background: #fff; color: var(--dark); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.lang-switcher .lang-btn:hover:not(.lang-active) { color: var(--dark); }

/* ── 23. Mobile menu as overlay below the header (CR-3, 2026-10-31) ── */
@media (max-width: 768px) {
  .nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 12px 24px rgba(10,22,40,.12);
    z-index: 99;
  }
  .nav-mobile .btn { display: inline-flex; margin-top: var(--sp-4); }
}

/* ── 24. Brand refresh (2026-11-01): booklet navy, logo never cropped ── */
:root { --brand-navy: #15173f; --brand-navy-2: #262a6b; --brand-blue: #1f5f9f; }
.nav-logo, .footer-brand a, footer a[href="/"] { flex-shrink: 0; }
.nav-logo img, .nav-logo svg { height: 38px !important; width: auto !important; max-width: none; flex-shrink: 0; display: block; }
.btn-primary { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--brand-navy-2); border-color: var(--brand-navy-2); color: #fff; }
.btn-outline:hover { border-color: var(--brand-navy); color: var(--brand-navy); }
.nav-link:hover, .nav-link.active { color: var(--brand-navy); }
.eyebrow { color: var(--brand-blue); }
/* On dark backgrounds the primary button becomes white with navy text */
.hero .btn-primary, .cta-band .btn-primary, #impact .btn-primary, .stats-bar .btn-primary,
section[style*="background:var(--dark"] .btn-primary, section[style*="background:linear-gradient(135deg,#0a1628"] .btn-primary,
.lsl-section .btn-primary, .page-hero .btn-primary, footer .btn-primary {
  background: #fff; border-color: #fff; color: var(--brand-navy);
}
.hero .btn-primary:hover, .cta-band .btn-primary:hover, #impact .btn-primary:hover,
section[style*="background:var(--dark"] .btn-primary:hover, section[style*="background:linear-gradient(135deg,#0a1628"] .btn-primary:hover,
.lsl-section .btn-primary:hover, .page-hero .btn-primary:hover, footer .btn-primary:hover {
  background: #e8f1fb; border-color: #e8f1fb; color: var(--brand-navy);
}
/* Hero now flows straight into the navy stats band */
.hero::after { display: none; }
/* Header breathing room so the logo is never clipped (2026-11-01) */
.nav-logo { display: flex; align-items: center; padding: 4px 0; line-height: 0; overflow: visible; }
.nav-logo svg, .nav-logo img { overflow: visible; }
.nav { align-items: center; }
@media (max-width: 1024px) {
  .site-header { height: auto !important; min-height: 64px; padding: 10px 0; display: flex; align-items: center; }
  .nav { min-height: 44px; }
}
@media (max-width: 480px) {
  .nav-logo img, .nav-logo svg { height: 32px !important; }
  .nav-actions .btn { padding: 8px 12px; font-size: 13px; }
}
/* Full logo restored (two lower dots), sized for the taller mark */
.nav-logo img, .nav-logo svg { height: 46px !important; }
@media (max-width: 480px) { .nav-logo img, .nav-logo svg { height: 40px !important; } }
