:root {
  --navy: #0a3670; --navy-dark: #072a58; --gold: #c08b2c; --green: #0b8043;
  --ink: #1d2733; --muted: #5b6676; --line: #dfe5ee; --tint: #f4f7fb; --white: #fff;
  --radius: 10px; --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.65 "Montserrat", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--white); }
html[lang="ar"] body { font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; line-height: 1.85; }
h1, h2, h3, h4 { font-family: "Source Serif 4", Georgia, serif; color: var(--navy); line-height: 1.25; margin: 0 0 .6em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { font-family: "Cairo", sans-serif; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; } h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
a { color: var(--navy); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 820px; }
.narrow-left { max-width: 860px; margin-inline: 0; padding-inline: 20px; }
.page-hero .narrow-left { margin-inline: auto; max-width: var(--max); }
.page-hero .wrap > * { max-width: 780px; }
.center { text-align: center; } .intro { max-width: 760px; margin-inline: auto; color: var(--muted); }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { inset-inline-start: 0; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand img { height: 56px; width: auto; }
.main-nav { display: flex; gap: 6px; margin-inline-start: auto; }
.main-nav a { text-decoration: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.main-nav a:hover { background: var(--tint); }
.main-nav a.active { color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch a { padding: 6px 12px; font-size: .82rem; font-weight: 700; text-decoration: none; color: var(--muted); }
.lang-switch a.on { background: var(--navy); color: #fff; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 6px; font-size: 1.3rem; padding: 4px 12px; cursor: pointer; }

/* hero */
.hero { background: linear-gradient(135deg, var(--navy-dark), var(--navy) 60%, #12508f); color: #fff; padding: 72px 0 80px; }
.hero h1 { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font-size: .78rem; letter-spacing: .12em; font-weight: 700; color: #e6c27a; margin-bottom: 1em; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.eyebrow.dark { color: var(--gold); }
.lead { font-size: 1.1rem; max-width: 640px; opacity: .95; }
.page-hero .lead { color: var(--muted); }
.hero-logo { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: .92rem; text-decoration: none; border: 2px solid transparent; }
.btn.gold { background: var(--gold); color: #fff; } .btn.gold:hover { background: #a97719; }
.btn.ghost { border-color: rgba(255,255,255,.7); color: #fff; } .btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.navy { background: var(--navy); color: #fff; } .btn.navy:hover { background: var(--navy-dark); }
.page-hero { background: var(--tint); border-bottom: 4px solid var(--gold); padding: 56px 0 44px; }

/* figures */
.figures { background: #fff; border-bottom: 1px solid var(--line); }
.figures-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.figure { padding: 28px 16px; text-align: center; font-weight: 700; color: var(--navy); font-size: 1.05rem; border-inline-end: 1px solid var(--line); }
.figure:last-child { border-inline-end: 0; }

/* sections */
.section { padding: 64px 0; } .section.tint { background: var(--tint); }
.section h2.center { margin-bottom: 1em; }
.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 28px; }
.card.plain { border-top-color: var(--gold); }
.card.format { border-top-color: var(--gold); }
.pic { width: 72px; height: 72px; object-fit: contain; margin-bottom: 14px; }
.pic.sm { width: 52px; height: 52px; margin: 0; flex: none; }
.sub { color: var(--green); font-weight: 600; }
.forms { display: grid; gap: 18px; margin-top: 18px; }
.form-item { display: flex; gap: 16px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--line); }
.form-item p { margin: 0; font-size: .95rem; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { padding-inline-start: 28px; position: relative; margin-bottom: .4em; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .6em; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); }
.ticks.cols { columns: 2; max-width: 520px; }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contacts li { border-inline-start: 4px solid var(--green); padding-inline-start: 14px; font-size: .95rem; }

/* members */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.member { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.member h3 { font-size: 1.05rem; margin-bottom: .4em; }
.member p { font-size: .92rem; color: var(--muted); flex: 1; }
.logo-box { height: 72px; display: flex; align-items: center; margin-bottom: 14px; }
.logo-box img { max-height: 72px; width: auto; }
.initials { display: inline-grid; place-items: center; min-width: 64px; height: 64px; padding: 0 12px; border-radius: 12px; background: var(--navy); color: #fff; font: 700 1.1rem "Montserrat", sans-serif; letter-spacing: .04em; }
.tag { display: inline-block; align-self: flex-start; background: #fbf3e2; color: #8a6016; border-radius: 999px; padding: 2px 12px; font-size: .75rem; font-weight: 700; margin-bottom: 10px; }
.tag.green { background: #e2f3ea; color: #0b6b39; } .tag.muted { background: #eceff4; color: var(--muted); }
.more { font-weight: 600; font-size: .9rem; text-decoration: none; } .more:hover { text-decoration: underline; }

/* programmes */
.cat-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
@media (min-width: 1000px) { .cat-nav { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; } }
.cat-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); transition: .15s; }
.cat-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(10,54,112,.1); }
.cat-card h3 { font-size: 1.02rem; margin: 8px 0 0; } .cat-card p { font-size: .86rem; color: var(--muted); margin: 0; flex: 1; }
.count { font-weight: 700; color: var(--green); font-size: .85rem; }
.cat { border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.cat-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.cat-head h2 { margin: 0; } .cat-head p { margin: 0; color: var(--muted); }
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.prog { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; border-inline-start: 4px solid var(--navy); background: #fff; }
.prog h3 { font-size: 1.08rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; } .badges .tag { margin-bottom: 0; }
.inst { font-weight: 600; color: var(--gold); font-size: .9rem; }
.prog p { font-size: .94rem; color: var(--muted); } .prog .meta { color: var(--navy); font-weight: 600; margin: 0; }
.event { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 36px; }

/* footer */
.site-footer { background: var(--navy-dark); color: #d6e0ef; padding: 48px 0 0; }
.site-footer a { color: #fff; } .site-footer h3 { color: #fff; font-size: 1rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot-logo { height: 64px; background: #fff; border-radius: 8px; padding: 6px 12px; margin-bottom: 14px; }
.site-footer nav { display: grid; gap: 8px; } .site-footer nav a { text-decoration: none; }
.legal { margin-top: 36px; padding-block: 18px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; }

@media (max-width: 900px) {
  .hero-grid, .two-col, .three-col, .foot-grid { grid-template-columns: 1fr; }
  .hero-logo { max-width: 340px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 20px; margin: 0; }
  .main-nav.open { display: flex; }
  .bar { position: relative; flex-wrap: wrap; gap: 10px; }
  .figures-grid { grid-template-columns: 1fr; } .figure { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .prog-grid { grid-template-columns: 1fr; } .ticks.cols { columns: 1; }
}

/* split section with optional image */
.wrap.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.split-image { margin: 0; }
.split-image img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(10,54,112,.18); }

/* member institutions: spider diagram */
.spider-map { position: relative; max-width: 1100px; aspect-ratio: 16 / 9; margin: 0 auto 28px; }
.spider-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.spider-lines line { stroke: var(--navy); stroke-width: 1.5; opacity: .35; }
.spider-hub { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; transform: translate(-50%, -50%); background: #fff; border: 4px solid var(--gold); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(10,54,112,.18); }
.spider-hub img { width: 96px; height: auto; }
.node { position: absolute; transform: translate(-50%, -50%); width: 190px; display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 10px 12px; font: inherit; color: var(--navy); cursor: pointer; text-align: start; transition: background .15s, box-shadow .15s; }
.node:hover, .node.active, .node:focus-visible { background: var(--navy); color: #fff; box-shadow: 0 8px 22px rgba(10,54,112,.3); outline: none; }
.node img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.node .initials { min-width: 38px; height: 38px; font-size: .8rem; padding: 0 6px; border-radius: 8px; background: var(--gold); flex: none; }
.node-name { font-size: .8rem; font-weight: 700; line-height: 1.3; }
.spider-detail { max-width: 760px; margin: 0 auto; }
.js .spider-detail .member:not(.active) { display: none; }
@media (max-width: 900px) {
  .wrap.split { grid-template-columns: 1fr; }
  .spider-map { display: none; }
  .spider-detail { max-width: none; display: grid; gap: 18px; }
  .js .spider-detail .member:not(.active) { display: flex; }
}

/* programme card picture */
.prog-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 14px; background: var(--tint); }
.prog .more { display: inline-block; margin-top: 6px; }

/* UFE section gallery (1 to 3 photos) */
.gallery { display: grid; gap: 14px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(10,54,112,.18); display: block; }
.gallery.n1 img { height: auto; }
.gallery.n2 { grid-template-rows: repeat(2, 220px); }
.gallery.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 170px; }
.gallery.n3 figure:first-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .gallery.n2 { grid-template-rows: repeat(2, 180px); } .gallery.n3 { grid-template-rows: 200px 140px; } }

/* member photo in the detail card */
.member-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 14px; }
