/* =========================================================
   Tabsirah Center — public site styles
   Palette taken from the logo: royal blue on white, with a
   small warm accent.
   ========================================================= */

:root {
  --ink: #0b1d4d;
  --royal: #1a3f9c;
  --royal-2: #2c5ccc;
  --royal-soft: #e9effc;
  --gold: #d99a1e;
  --gold-soft: #fbefd3;
  --paper: #f8f7f3;
  --paper-2: #f1efe8;
  --card: #ffffff;
  --line: #e2ded2;
  --text: #1b2333;
  --muted: #5b6475;
  --danger: #b42318;
  --ok: #157f3b;

  --font-display: "Amiri", "Fraunces", serif;
  --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 29, 77, .06), 0 12px 32px -14px rgba(11, 29, 77, .22);
  --header-h: 74px;
}

html[lang="fr"], html[lang="en"] {
  --font-display: "Fraunces", "Amiri", serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
html[lang="fr"] body, html[lang="en"] body { line-height: 1.65; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.25; margin: 0; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }

.icon svg, .res-icon svg, .hero-badges svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.5em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit; font-weight: 500; font-size: .98rem;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
:is(.btn, .chip, .lang-switch button, .menu-toggle, .nav a, .res-action, summary):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.btn-sm { padding: .5em 1.15em; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover { background: var(--royal-2); box-shadow: 0 8px 20px -8px rgba(44, 92, 204, .6); }
.btn-ghost { border-color: var(--royal); color: var(--royal); }
.btn-ghost:hover { background: var(--royal); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); font-weight: 600; }
.btn-gold:hover { background: #ebae31; box-shadow: 0 8px 24px -8px rgba(217, 154, 30, .7); }
.btn-disabled { background: var(--paper-2); color: var(--muted); cursor: default; }
.btn-disabled:hover { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(248, 247, 243, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(11, 29, 77, .4); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 12px -4px rgba(26, 63, 156, .5); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-ar { font-family: "Amiri", serif; font-weight: 700; font-size: 1.2rem; }
.brand-en { font-family: "IBM Plex Sans", sans-serif; font-size: .6rem; letter-spacing: .26em; color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: 24px; }
.nav a { position: relative; text-decoration: none; font-size: .94rem; padding-block: 4px; white-space: nowrap; }
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s ease;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--royal); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.lang-switch button {
  min-width: 36px; height: 32px; padding: 0 8px;
  border: 0; border-radius: 999px; background: transparent;
  font: 600 .78rem "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif; letter-spacing: .04em;
  color: var(--muted); cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.lang-switch button[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: .95rem; }
.lang-switch button[aria-pressed="true"] { background: var(--royal); color: #fff; }

.menu-toggle {
  display: none; width: 42px; height: 42px; padding: 10px;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.menu-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 110px) 0 clamp(64px, 9vw, 120px); border-bottom: 1px solid var(--line); }
.hero-pattern {
  position: absolute; inset: 0; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23d6d2c4' stroke-width='1'%3E%3Crect x='24' y='24' width='32' height='32'/%3E%3Crect x='24' y='24' width='32' height='32' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='6'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse 60% 80% at 82% 45%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 82% 45%, #000 10%, transparent 70%);
}
html[dir="rtl"] .hero-pattern {
  mask-image: radial-gradient(ellipse 60% 80% at 18% 45%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 18% 45%, #000 10%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px;
  font-size: .85rem; color: var(--royal);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }

.hero-title { font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 700; letter-spacing: -.01em; }
html[lang="fr"] .hero-title, html[lang="en"] .hero-title { letter-spacing: -.025em; }

.hero-motto {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin: 12px 0 22px;
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--royal);
}
.hero-motto i { font-style: normal; color: var(--gold); font-size: 1.4em; line-height: 1; }
.hero-lead { max-width: 34em; margin: 0 0 32px; font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 34px 0 0; padding: 0; color: var(--muted); font-size: .9rem; }
.hero-badges li { display: flex; align-items: center; gap: 8px; }
.hero-badges svg { color: var(--royal); }
.hero-badges .plat { font-family: "IBM Plex Sans", sans-serif; font-size: .82rem; letter-spacing: .02em; direction: ltr; }

.hero-emblem { position: relative; aspect-ratio: 1; width: min(100%, 420px); margin-inline: auto; display: grid; place-items: center; }
.emblem { position: relative; width: 78%; height: 78%; border-radius: 50%; box-shadow: 0 30px 60px -20px rgba(13, 33, 97, .55), 0 0 0 10px #fff, 0 0 0 11px var(--line); }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(26, 63, 156, .25); }
.orbit-2 { inset: 6%; border: 1px solid rgba(217, 154, 30, .35); animation: spin 40s linear infinite; }
.orbit-2 span { position: absolute; top: -6px; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 116px) 0; }
.section-paper { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-num { display: inline-block; margin-bottom: 10px; font-family: "Fraunces", serif; font-size: .95rem; letter-spacing: .08em; color: var(--gold); direction: ltr; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.section-sub { margin: 12px 0 0; color: var(--muted); font-size: 1.08rem; }
.empty { grid-column: 1 / -1; margin: 0; padding: 36px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.about-text > p { margin: 0 0 18px; }
.lead-para { font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.62rem); line-height: 1.6; color: var(--ink); }
.lead-para strong { color: var(--royal); }
.mv-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.mv-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; transition: transform .25s ease, box-shadow .25s ease; }
.mv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mv-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.mv-card h3::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-inline-end: 10px; border-radius: 2px; background: var(--gold); transform: rotate(45deg) translateY(-3px); }
.mv-card p { margin: 0; color: var(--muted); font-size: .97rem; }

.definition-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px 26px; box-shadow: var(--shadow); }
.definition-card::before { content: ""; position: absolute; inset-block: 22px; inset-inline-start: 0; width: 4px; border-radius: 4px; background: linear-gradient(var(--gold), var(--royal)); }
.def-head { display: flex; align-items: baseline; gap: 14px; }
.def-word { font-family: "Amiri", serif; font-size: 2.6rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.def-pos { font-style: italic; color: var(--gold); font-size: .95rem; font-family: var(--font-display); }
.def-translit { margin: 2px 0 16px; color: var(--muted); font-family: "IBM Plex Sans", sans-serif; font-size: .9rem; }
.def-list { margin: 0 0 16px; padding-inline-start: 1.3em; }
.def-list li { margin-bottom: 6px; }
.def-list li::marker { color: var(--royal); font-weight: 600; }
.def-note { margin: 0; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .95rem; }

/* Pillars */
.section-ink { position: relative; overflow: hidden; background: var(--ink); color: #d4ddef; }
.section-ink::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 320px at 88% 0%, rgba(44, 92, 204, .5), transparent 70%),
              radial-gradient(520px 260px at 0% 100%, rgba(217, 154, 30, .14), transparent 70%);
}
.section-ink .container { position: relative; }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink .section-sub { color: #a7b6d3; }
.pillars { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: stretch; }
.pillar { padding: 32px 28px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); background: rgba(255,255,255,.04); transition: background-color .25s ease, border-color .25s ease, transform .25s ease; }
.pillar:hover { background: rgba(255,255,255,.08); border-color: rgba(217, 154, 30, .55); transform: translateY(-4px); }
.pillar-index { font-family: "Fraunces", serif; font-size: .9rem; letter-spacing: .1em; color: var(--gold); }
.pillar h3 { font-size: 2.3rem; margin-top: 8px; }
.pillar-alt { margin: 0 0 12px; font-family: "Amiri", serif; color: #8ea3c9; font-size: 1.1rem; }
html[lang="ar"] .pillar-alt { display: none; }
.pillar p:last-child { margin: 0; }
.pillar-arrow { display: grid; place-items: center; color: var(--gold); }
.pillar-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .pillar-arrow svg { transform: scaleX(-1); }

/* Programs */
.syllabus { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.module { display: grid; grid-template-columns: auto 1fr; gap: 22px; padding: 30px 8px; border-bottom: 1px solid var(--line); transition: background-color .25s ease; }
.module:nth-child(odd) { border-inline-end: 1px solid var(--line); padding-inline-end: 32px; }
.module:nth-child(even) { padding-inline-start: 32px; }
.module:hover { background: rgba(26, 63, 156, .035); }
.module-code { height: fit-content; padding: 4px 10px; font-family: "Fraunces", serif; font-size: .82rem; letter-spacing: .06em; color: var(--royal); background: var(--royal-soft); border: 1px solid #cdd9f3; border-radius: 6px; direction: ltr; }
.module h3 { font-size: 1.4rem; margin-bottom: 6px; }
.module p { margin: 0 0 12px; color: var(--muted); }
.module-link { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; font-weight: 500; color: var(--royal); text-decoration: none; }
.module-link b { transition: transform .2s ease; }
html[dir="ltr"] .module-link b { transform: scaleX(-1); }
.module-link:hover b { transform: translateX(-4px); }
html[dir="ltr"] .module-link:hover b { transform: scaleX(-1) translateX(-4px); }

/* Events */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
#libraryFilters { margin-bottom: 28px; }
.chip {
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font: inherit; font-size: .9rem; color: var(--text); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--royal); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.segmented { display: flex; padding: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: .9rem; color: var(--muted); cursor: pointer; }
.segmented button.active { background: var(--royal-soft); color: var(--royal); font-weight: 500; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.event-card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-media { position: relative; aspect-ratio: 16 / 9; background: var(--royal); overflow: hidden; }
.event-media img { width: 100%; height: 100%; object-fit: cover; }
.event-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 75% 25%, rgba(255,255,255,.16), transparent 45%),
    linear-gradient(135deg, var(--ink), var(--royal) 60%, var(--royal-2));
  color: #fff; font-family: var(--font-display); font-size: 1.8rem;
}
.cat-leadership .event-placeholder { background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #0b1d4d, #23407f 60%, #b07d17); }
.cat-academic .event-placeholder { background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #0b1d4d, #1b5a83 60%, #2a8aa8); }
.cat-lecture .event-placeholder { background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.16), transparent 45%), linear-gradient(135deg, #0b1d4d, #3b3a8f 60%, #6a5cc4); }
.date-badge {
  position: absolute; top: 14px; inset-inline-start: 14px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 58px; padding: 6px 10px 4px;
  background: #fff; border-radius: 12px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35);
  line-height: 1.1; color: var(--ink);
}
.date-day { font-family: "Fraunces", serif; font-size: 1.5rem; font-weight: 700; }
.date-month { font-size: .75rem; color: var(--muted); }
.event-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.event-body h3 { font-size: 1.35rem; }
.tag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--royal-soft); color: var(--royal); }
.tag-leadership { background: var(--gold-soft); color: #8a5d07; }
.tag-academic { background: #e2f1f6; color: #1b5a83; }
.tag-lecture { background: #ecebfa; color: #3b3a8f; }
.event-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--muted); font-size: .9rem; }
.event-meta li { display: flex; align-items: center; gap: 8px; }
.event-meta .icon { color: var(--royal); display: inline-flex; }
.event-desc { margin: 0; color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.event-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.event-foot > div { display: flex; flex-direction: column; line-height: 1.3; }
.free-badge { display: inline-block; width: fit-content; padding: 2px 12px; border-radius: 999px; background: #e3f4e9; color: var(--ok); font-weight: 600; font-size: .9rem; }
.free-note .free-badge { background: var(--ok); color: #fff; }
.seats { font-size: .8rem; color: var(--ok); }
.seats.low { color: var(--danger); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .25s ease, box-shadow .25s ease; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 50%; background: var(--royal-soft); color: var(--royal); font-family: "Fraunces", serif; font-weight: 600; }
.step h3 { font-size: 1.35rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }
.free-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0 0; padding: 16px 20px; background: #e3f4e9; border: 1px solid #b9e2c6; border-radius: var(--radius); color: #14532d; font-weight: 500; }

/* Library */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.resource-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease; }
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.resource-card h3 { font-size: 1.2rem; }
.resource-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.res-thumb { margin: -22px -22px 4px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--ink); }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-head { display: flex; align-items: center; gap: 8px; }
.res-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--royal-soft); color: var(--royal); }
.type-pdf .res-icon { background: #fde8e6; color: #b42318; }
.type-video .res-icon { background: #ecebfa; color: #3b3a8f; }
.type-link .res-icon { background: #e2f1f6; color: #1b5a83; }
.res-type { font-size: .8rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.res-action { align-self: flex-start; margin-top: auto; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--royal); text-decoration: none; cursor: pointer; border-bottom: 1.5px solid currentColor; }
.res-action:hover { color: var(--royal-2); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.team-card { padding: 28px 22px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.avatar { width: 108px; height: 108px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.avatar-initials { display: grid; place-items: center; background: linear-gradient(135deg, var(--royal), var(--royal-2)); color: #fff; font-family: var(--font-display); font-size: 2rem; }
.team-card h3 { font-size: 1.25rem; }
.team-role { margin: 2px 0 0; color: var(--royal); font-size: .92rem; font-weight: 500; }
.team-bio { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 500; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { position: relative; flex-shrink: 0; width: 14px; height: 14px; }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: var(--royal); border-radius: 2px; transition: transform .25s ease; }
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-answer { padding: 0 22px 18px; color: var(--muted); }
.faq-answer p { margin: 0 0 8px; }

/* Join / contact */
.join { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 110px) 0; text-align: center; color: #cdd7ec; background: linear-gradient(135deg, var(--ink) 0%, var(--royal) 70%, var(--royal-2) 130%); }
.join::after { content: ""; position: absolute; width: 540px; height: 540px; inset-inline-end: -170px; top: -230px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 120px rgba(255,255,255,.02); pointer-events: none; }
.join-inner { position: relative; z-index: 1; max-width: 720px; }
.join-logo { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
.join h2 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-bottom: 14px; }
.join p { margin: 0 auto 30px; font-size: 1.1rem; color: #bccae6; }
.join-actions { display: flex; justify-content: center; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.contact-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #fff; text-decoration: none; font-size: .95rem; transition: background-color .2s ease, border-color .2s ease; }
.contact-link:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.contact-link svg { width: 18px; height: 18px; }

/* Footer */
.site-footer { padding: 40px 0; background: #071338; color: #8b9cc0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; }
.footer-brand-wrap { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 52px; height: 52px; border-radius: 50%; }
.footer-brand { margin: 0; color: #fff; font-family: "Amiri", serif; font-size: 1.3rem; font-weight: 700; }
.footer-motto { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { text-decoration: none; transition: color .2s ease; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .7);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Dialogs ---------- */
.modal {
  width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 20px;
  background: var(--card); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(7, 19, 56, .5);
}
.modal-wide { width: min(760px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(7, 19, 56, .55); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close-form { position: sticky; top: 0; z-index: 2; height: 0; display: flex; justify-content: flex-end; }
.modal-x { margin: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--paper-2); font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; }
.modal-x:hover { background: var(--line); }
.modal-body { padding: 30px 30px 28px; }
.modal-title { font-size: 1.7rem; margin-bottom: 14px; padding-inline-end: 40px; }
.modal-event { display: grid; justify-items: start; gap: 4px; margin-bottom: 18px; }
.modal-event:empty { display: none; }
.modal-event strong { font-size: 1.1rem; color: var(--ink); }
.modal-event p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }

.reg-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: .92rem; font-weight: 500; color: var(--ink); }
.field em { color: var(--danger); font-style: normal; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-weight: 400; color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(26, 63, 156, .15); }
.field input[type=file] { padding: 8px; background: var(--paper); }
.field .help { font-size: .8rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }


.form-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; color: var(--danger); font-size: .92rem; }
.success { text-align: center; padding-block: 44px 36px; }
.success-icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; background: #e3f4e9; color: var(--ok); font-size: 2rem; }
.success h2 { font-size: 1.6rem; margin-bottom: 8px; }
.success p { margin: 0 0 22px; color: var(--muted); }

.article h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 6px 0 12px; padding-inline-end: 40px; }
.article-lead { font-size: 1.1rem; color: var(--ink); }
.article-text { font-size: 1.05rem; }
.article-text p { margin: 0 0 1em; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .fade-in, .modal[open], .orbit-2 { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: var(--header-h); inset-inline: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px -20px rgba(11, 29, 77, .4);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
}

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; }
  .pillar-arrow { transform: rotate(90deg); }
  html[dir="rtl"] .pillar-arrow { transform: rotate(-90deg); }
  .faq-layout { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  :root { --header-h: 66px; }
  .hide-mobile { display: none; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-emblem { width: min(72%, 320px); grid-row: 1; }
  .syllabus { grid-template-columns: 1fr; }
  .module:nth-child(odd), .module:nth-child(even) { border-inline-end: 0; padding-inline: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-text { display: none; }
  .steps, .mv-cards, .field-row { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .definition-card { padding: 26px 22px 20px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .module { grid-template-columns: 1fr; gap: 10px; }
  .module-code { width: fit-content; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chip { flex-shrink: 0; }
  .segmented { align-self: flex-start; }
  .modal-body { padding: 26px 20px 22px; }
}
