/* ============ 1. Tokens: change colours and type here only ============ */
:root {
  --dark:      #14181B;   /* hero, staff band, footer */
  --dark-2:    #1F262B;
  --brand-800: #064E3B;
  --brand-700: #047857;   /* links, icons on light */
  --brand-100: #D1FAE5;
  --brand-50:  #ECFDF5;
  --mint:      #34D399;   /* highlights on dark */
  --mint-soft: #A7F3D0;
  --accent:       #C2410C; /* the one call-to-action colour (staff login) */
  --accent-hover: #9A3412;
  --page:  #F3F4F6;
  --card:  #FFFFFF;
  --ink:   #14181B;
  --muted: #55606B;
  --line:  #E1E4E8;
  --on-dark-muted: #C3CAD1;
  --orange: #FB923C;   /* highlights on dark */
  --danger: #DC2626;   /* pop-up «إغلاق» button */
  --glass:      rgba(255, 255, 255, .06);
  --glass-line: rgba(255, 255, 255, .14);
  /* light surfaces that the dark theme (below) recolours; same values as before */
  --brand-fg:  #047857;   /* green text and icons on light surfaces (mint in dark) */
  --accent-fg: #C2410C;   /* orange-red text and icons on light surfaces */
  --danger-fg: #DC2626;   /* red text on light surfaces */
  --chip:      #E5E7EB;
  --warm:      #FFF7ED;
  --warm-2:    #FFF1E8;
  --warm-ink:  #9A3412;
  --ghost:     rgba(20, 24, 27, .05);
  --bar:       rgba(255, 255, 255, .82);
  --bar-solid: rgba(255, 255, 255, .94);
  --bar-line:  rgba(255, 255, 255, .6);
  color-scheme: light;

  --font-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body:    "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --radius:    24px;
  --radius-sm: 14px;
  --shadow:    0 1px 2px rgba(3, 36, 28, .06), 0 10px 30px rgba(3, 36, 28, .08);
  --shadow-lg: 0 2px 6px rgba(3, 36, 28, .08), 0 24px 60px rgba(3, 36, 28, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1180px;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* Dark theme: html[data-theme="dark"] is set by the script in <head> (device setting first, then the button's saved choice).
   Only the light surfaces change; hero, staff band, clinics panel, footer and viewer keep their own colours. Other dark rules: section 15. */
html[data-theme="dark"] {
  color-scheme: dark;
  --page:  #0F1316;
  --card:  #1A2025;
  --ink:   #E8EBEE;
  --muted: #A7B0B9;
  --line:  #2A3239;
  --brand-50:  #10291F;
  --brand-100: #173A2C;
  --brand-fg:  var(--mint);
  --accent-fg: #FB923C;
  --danger-fg: #F87171;   /* #DC2626 is only 3.4:1 on the dark card */
  --chip:      #2A3239;
  --warm:      #2B2016;
  --warm-2:    #33261A;
  --warm-ink:  #FDBA74;
  --ghost:     rgba(255, 255, 255, .04);
  --bar:       rgba(26, 32, 37, .82);
  --bar-solid: rgba(26, 32, 37, .94);
  --bar-line:  rgba(255, 255, 255, .08);
}

/* ============ 2. Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.8;
  color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; overflow-x: clip; /* clip, not hidden: hidden would break the sticky scenes */
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.35; margin: 0; }
p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand-fg); text-decoration: none; } /* house rule: links are never underlined */
svg { display: block; }
button { font: inherit; }
:focus-visible { outline: 3px solid #F97316; outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 4px 14px;
  font-size: .875rem; font-weight: 600; color: var(--ink);
  background: var(--chip); border-radius: 999px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.section-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
.section-lead { margin-top: 14px; max-width: 58ch; color: var(--muted); font-size: 1.0625rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }

.skip-link {
  position: fixed; inset-inline-start: 16px; top: -80px; z-index: 200;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-lg);
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Placeholder tag: shown wherever a detail is not verified yet */
.ph-tag {
  display: inline-block; margin-inline-start: 6px; padding: 0 8px;
  font-family: var(--font-body); font-size: .75rem; font-weight: 600; line-height: 1.7;
  color: #7C2D12; background: #FFEDD5; border: 1px dashed #EA580C; border-radius: 999px;
  vertical-align: middle; white-space: nowrap;
}

/* Reading-progress line (CSS only; simply absent where scroll timelines are unsupported) */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; transform-origin: 100% 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #F97316, var(--mint)); }
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* ============ 3. Buttons ============ */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 26px;
  font: 600 1rem var(--font-body); border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(-5px); } /* arrow nudges forward (RTL) */
/* light sweep across the button on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(-120%); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 28px rgba(194, 65, 12, .38); }
.btn-accent:hover { background: var(--accent-hover); box-shadow: 0 14px 34px rgba(194, 65, 12, .46); }
.btn-mint { background: var(--mint); color: var(--dark); box-shadow: 0 10px 28px rgba(52, 211, 153, .3); }
.btn-mint:hover { background: #6EE7B7; }
.btn-ghost { color: #fff; border-color: var(--glass-line); background: var(--glass); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .5); }
.btn-outline { color: var(--brand-800); border-color: var(--line); background: var(--card); }
.btn-outline:hover { border-color: var(--brand-700); }
.btn-close { color: var(--danger-fg); border-color: var(--danger); background: var(--card); }
.btn-close:hover { color: #fff; background: var(--danger); }
.btn-sm { min-height: 44px; padding: 6px 18px; font-size: .9375rem; }

/* ============ 4. Header: floating glass pill ============ */
.site-header {
  position: fixed; top: 14px; inset-inline: 0; z-index: 100;
  width: min(100% - 24px, var(--wrap)); margin-inline: auto;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px;
  background: var(--bar); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--bar-line); border-radius: 999px;
  box-shadow: 0 8px 30px rgba(3, 36, 28, .12);
  transition: box-shadow .3s, background-color .3s;
  animation: drop .7s var(--ease) backwards;
}
.site-header.is-scrolled { background: var(--bar-solid); box-shadow: 0 12px 40px rgba(3, 36, 28, .2); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px); } }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-inline-end: auto; padding-inline-start: 2px; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 14px; background: #fff; /* white backing keeps the logo readable on the dark footer too */
  transition: transform .5s var(--ease);
}
.brand-mark img { display: block; width: 40px; height: 42px; object-fit: contain; }
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.06); }
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font: 700 1rem/1.3 var(--font-display); }
.brand-sub { display: block; font: 400 .8125rem/1.3 var(--font-body); color: var(--muted); }

.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a:not(.btn):not(.nav-lang) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: var(--ink); font-weight: 500; border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.nav-list a:not(.btn):not(.nav-lang):hover { background: var(--brand-50); color: var(--brand-fg); }
.nav-list a:not(.btn):not(.nav-lang)[aria-current="true"] { background: var(--brand-700); color: #fff; } /* same weight as the rule above, or its dark ink wins */
.nav-list .btn { margin-inline-start: 6px; }
/* language + theme switches, just before the sign-in button */
.nav-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: 6px; }
.nav-lang { /* a link to the other language since the Laravel build */
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  color: var(--ink); font: 600 .875rem/1 var(--font-body); cursor: pointer; transition: background-color .2s, border-color .2s;
}
.nav-lang:hover { border-color: var(--brand-700); background: var(--brand-50); }
.nav-theme svg[hidden] { display: none; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--brand-700); background: var(--brand-50); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1140px) { /* was 960: with the language and theme buttons the bar needs about 1085px for one line */
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; inset-inline: 0; top: calc(100% + 8px);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    display: none;
  }
  .site-nav.is-open { display: block; animation: drop .3s var(--ease) backwards; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; }
  .nav-list a:not(.btn):not(.nav-lang) { min-height: 48px; width: 100%; justify-content: center; } /* full width, like the sign-in button */
  /* idle items get a light gray fill so they read as buttons; hover and the current section keep their own colours */
  .nav-list a:not(.btn):not(.nav-lang):not([aria-current]) { background: var(--page); }
  .nav-list a:not(.btn):not(.nav-lang):not([aria-current]):hover { background: var(--brand-50); }
  .nav-list .btn { margin: 8px 0 0; width: 100%; }
  .nav-tools { margin: 8px 0 0; } /* menu: language and theme split the line in half (user 14-11-2026) */
  .nav-lang { flex: 1 1 0; min-height: 48px; padding: 0; background: var(--page); } /* no padding, or flex adds it to this half */
  .nav-theme { flex: 1 1 0; width: auto; height: 48px; border-radius: 999px; background: var(--page); }
}

/* ============ 5. Hero ============ */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--dark);
  min-height: 100svh; display: flex; flex-direction: column;
}
/* drifting colour blobs */
.blob { position: absolute; z-index: -3; width: 46vw; min-width: 320px; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); opacity: .55; }
.blob-1 { top: -18%; inset-inline-start: -10%; background: #475569; animation: drift 16s ease-in-out infinite alternate; }
.blob-2 { bottom: -30%; inset-inline-end: -8%; background: #047857; opacity: .4; animation: drift 20s ease-in-out -6s infinite alternate-reverse; }
.blob-3 { top: 30%; inset-inline-start: 38%; width: 26vw; background: #EA580C; opacity: .38; animation: drift 24s ease-in-out -10s infinite alternate; }
@keyframes drift { to { transform: translate(8vw, 6vh) scale(1.2); } }
/* 3D waves drawn by JS on a canvas */
.waves { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.hero-main {
  flex: 1; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px;
  padding-block: 112px 32px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 6px 16px;
  font-size: .875rem; font-weight: 500; color: var(--mint-soft);
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; backdrop-filter: blur(6px);
}
.hero-eyebrow i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.hero-eyebrow i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mint); animation: ping 2s ease-out infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }

.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); font-weight: 800; line-height: 1.3; }
.hero h1 .w { display: inline-block; animation: word .9s var(--ease) backwards; }
.hero h1 .w:nth-child(2) { animation-delay: .12s; }
.hero h1 .w:nth-child(3) { animation-delay: .24s; }
@keyframes word { from { opacity: 0; transform: translateY(.6em) rotate(4deg); filter: blur(10px); } }
.grad {
  padding-block: .12em; /* keeps Arabic descenders inside the clipped gradient */
  background: linear-gradient(90deg, var(--orange), #FED7AA, #fff, #FED7AA, var(--orange)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .grad { animation: word .9s var(--ease) backwards, sheen 8s linear infinite; }
@keyframes sheen { to { background-position: 300% 0; } }
.hero-uni { display: block; margin-top: 6px; font: 400 clamp(1.25rem, 3vw, 2rem) var(--font-display); color: var(--on-dark-muted); }
.hero-lead { margin-top: 22px; max-width: 46ch; font-size: 1.125rem; color: var(--on-dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-copy > :not(h1) { animation: rise .8s var(--ease) backwards; }
.hero-copy > .hero-uni     { animation-delay: .35s; }
.hero-copy > .hero-lead    { animation-delay: .45s; }
.hero-copy > .hero-actions { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* Illustration: the logo, with rings and two tilted orbits round it */
.hero-art { --r: 165px; position: relative; aspect-ratio: 1; width: 100%; max-width: 380px; margin-inline: auto; animation: rise 1s var(--ease) .3s backwards; }
.hero-art .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); }
.hero-art .ring-1 { inset: 6%; }
.hero-art .ring-2 { inset: 20%; border-style: dashed; border-color: rgba(251, 146, 60, .45); animation: spin 50s linear infinite reverse; }
.hero-art .core {
  position: absolute; inset: 27%; display: grid; place-items: center; border-radius: 50%;
  background: #fff; /* white disc so the logo's dark lettering stays readable */
  border: 1px solid var(--glass-line); backdrop-filter: blur(4px);
  box-shadow: 0 0 80px rgba(255, 255, 255, .28); animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 130px rgba(251, 146, 60, .5); scale: 1.03; } }
.hero-art .core img { width: 70%; height: auto; animation: pop 1s var(--ease) .5s backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.5) rotate(-12deg); } }
/* two tilted orbits round the logo, each carrying one light */
.gyro { position: absolute; inset: 1%; transform: rotate(var(--lean)) rotateX(68deg); }
.gyro i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .26); animation: spin 14s linear infinite; }
.gyro i::after {
  content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 22px 4px var(--orange);
}
.gyro-1 { --lean: 32deg; }
.gyro-2 { --lean: -32deg; }
.gyro-2 i { border-color: rgba(251, 146, 60, .45); animation-duration: 21s; animation-direction: reverse; }
.gyro-2 i::after { background: #fff; box-shadow: 0 0 22px 4px rgba(255, 255, 255, .8); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Figures: glass row at the foot of the hero */
.figures { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding-bottom: 36px; }
.figure {
  padding: 18px 20px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-sm);
  backdrop-filter: blur(8px); transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s;
}
.figure:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .1); border-color: rgba(251, 146, 60, .6); }
.figure-num { display: block; font: 800 clamp(1.75rem, 4vw, 2.5rem)/1.2 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.figure-label { color: var(--on-dark-muted); font-weight: 500; }

@media (max-width: 960px) {
  .hero-main { grid-template-columns: 1fr; gap: 24px; padding-top: 112px; }
  .hero-art { --r: 118px; max-width: 270px; order: -1; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:last-child { grid-column: 1 / -1; } /* the odd fifth card takes the whole line */
}

/* ============ 7. About: bento grid ============ */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.tile {
  position: relative; overflow: hidden; padding: clamp(24px, 3.5vw, 40px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile-intro { grid-column: span 7; }
.tile-intro p { color: var(--muted); }
.tile-branches { grid-column: span 5; grid-row: span 2; display: flex; flex-direction: column; background: var(--dark); color: #fff; border-color: transparent; }
.tile-branches::before { /* glow in the corner */
  content: ""; position: absolute; width: 320px; aspect-ratio: 1; top: -120px; inset-inline-end: -120px; border-radius: 50%;
  background: var(--brand-700); filter: blur(70px); opacity: .7; transition: transform .8s var(--ease);
}
.tile-branches:hover::before { transform: scale(1.4); }
/* DNA helix down the tile's left edge: each rung is a line with a dot at each end; the dots swap sides
   in turn (--i staggers them), which reads as a strand turning. Five rungs (.on) are orange, one per branch. */
.helix { position: absolute; inset-block: 28px; inset-inline-end: 22px; width: 56px; display: none; flex-direction: column; justify-content: space-between; pointer-events: none; }
.helix i { position: relative; height: 10px; color: rgba(167, 243, 208, .55); background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; animation: helix-line 2.6s linear infinite; animation-delay: calc(var(--i) * -.3s); }
.helix i::before, .helix i::after { content: ""; position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: helix-dot 2.6s ease-in-out infinite alternate; animation-delay: inherit; }
.helix i::before { left: 0; --to: 46px; }
.helix i::after { right: 0; --to: -46px; opacity: .6; }
.helix .on { color: var(--orange); filter: drop-shadow(0 0 6px rgba(251, 146, 60, .7)); }
@keyframes helix-dot { to { transform: translateX(var(--to)); } }
@keyframes helix-line { 0%, 100% { background-size: 100% 2px; animation-timing-function: ease-in; } 50% { background-size: 0% 2px; animation-timing-function: ease-out; } }
@media (min-width: 600px) { .helix { display: flex; } .tile-branches { padding-inline-end: calc(clamp(24px, 3.5vw, 40px) + 64px); } }
.tile-branches .branches { flex: 1; grid-auto-rows: 1fr; } /* rows share the tile's spare height */
@media (min-width: 901px) { .tile-branches .branches { row-gap: 36px; } } /* wider gaps = shorter branches (user 13-11-2026) */
.tile-branches h3 { position: relative; font-size: 1.25rem; margin-bottom: 20px; }
.branches { position: relative; display: grid; gap: 18px; counter-reset: branch; }
.branches li {
  counter-increment: branch; display: flex; align-items: center; gap: 16px; padding: 14px 16px;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-sm); font-weight: 600;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s;
}
.branches li::before {
  content: "0" counter(branch); display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  font: 700 .9375rem var(--font-display); color: var(--dark); background: var(--mint); border-radius: 12px;
  transition: transform .4s var(--ease);
}
.branches li:hover { transform: translateX(-6px); background: rgba(255, 255, 255, .12); border-color: var(--mint); }
.branches li:hover::before { transform: rotate(-8deg) scale(1.1); }
.branches li { position: relative; }
.branch-btn { flex: 1; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.branch-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole row is clickable */
.branch-btn:focus-visible { outline: none; }
.branches li:has(.branch-btn:focus-visible) { outline: 2px solid var(--mint); outline-offset: 2px; }
.tile-vision { grid-column: span 7; }
.tile-vision h3 { font-size: 1.125rem; margin-bottom: 6px; }
.tile-vision p { color: var(--muted); }.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* About pop-ups: native <dialog> (Escape, focus trap and top layer come free) */
.modal {
  width: min(640px, calc(100% - 32px)); max-height: min(80vh, 680px); padding: 0;
  border: 0; border-radius: var(--radius); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg);
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in .3s var(--ease); }
.modal::backdrop { background: rgba(20, 24, 27, .6); backdrop-filter: blur(4px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
html:has(.modal[open]) { overflow: hidden; } /* page behind does not scroll */
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 1.25rem; }
.modal-x {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--danger); border-radius: 50%; background: var(--card); color: var(--danger); cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .25s var(--ease);
}
.modal-x:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }
.modal-x svg { width: 20px; height: 20px; }
.modal-body {
  flex: 1; overflow-y: auto; padding: 20px 24px; color: var(--muted); line-height: 1.9;
  scrollbar-width: thin; scrollbar-color: var(--orange) transparent;
}
.modal-body p + p, .modal-body p + ul { margin-top: 12px; }
.modal-body ul, .modal-body ol { padding-inline-start: 1.4em; list-style: disc; }
.modal-body ol { list-style: arabic-indic; margin-top: 12px; }
.modal-body h3 { font-size: 1.0625rem; color: var(--ink); margin-bottom: 8px; }
.modal-body * + h3 { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.modal-body strong { color: var(--ink); }
.modal-body .modal-shared { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-body li + li { margin-top: 8px; }
.modal-body li::marker { color: var(--orange); }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 999px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line); }
/* Mobile clinic pop-up: a grid of picture tiles (the last one is the video); a tile opens #dlg-shot, a second pop-up as wide as the browser */
.mg-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-block: 20px 22px; } /* sits between the opening text and «الزيارات الميدانية» */
.mg-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--dark); cursor: zoom-in; }
.mg-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s var(--ease); }
.mg-thumb:hover img { scale: 1.06; }
.mg-thumb svg { width: 34%; height: 34%; fill: var(--orange); transition: scale .3s var(--ease); }
.mg-thumb:hover svg { scale: 1.15; }
@media (max-width: 600px) { .mg-strip { grid-template-columns: repeat(2, 1fr); } }
.lightbox { width: 100%; max-width: 100%; height: 100vh; /* 100%, not 100vw: 100vw runs under the page's scroll bar and hid part of the close button */ height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 24, 27, .96); overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; animation: modal-in .3s var(--ease); }
/* buttons at the screen's sides with room from the browser's edge (--gap); the picture keeps clear of them (user 15-11-2026) */
.lightbox { --gap: 40px; }
.shot-stage { display: contents; }
.lightbox img, .lightbox video { display: block; max-width: calc(100vw - 2 * (var(--gap) + 64px)); max-height: calc(100dvh - 2 * (var(--gap) + 44px)); width: auto; height: auto; }
.lightbox video { width: calc(100vw - 2 * (var(--gap) + 64px)); height: calc(100dvh - 2 * (var(--gap) + 44px)); object-fit: contain; } /* no size before it loads (preload none), so it keeps the full box */
.lightbox img { cursor: zoom-out; }
.lightbox [hidden] { display: none; }
.lightbox form { position: absolute; top: calc(var(--gap) / 2); inset-inline-end: var(--gap); z-index: 1; }
/* previous / next at the screen's sides: previous on the reading-start side (right in Arabic) */
.shot-nav {
  position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px;
  padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(20, 24, 27, .6); color: #fff; cursor: pointer;
  transition: background-color .25s, border-color .25s, scale .25s var(--ease);
}
.shot-nav:hover, .shot-nav:focus-visible { background: var(--accent); border-color: var(--accent); scale: 1.08; outline: none; }
.shot-nav svg { width: 26px; height: 26px; }
/* download, beside the close button */
.shot-dl {
  position: absolute; top: calc(var(--gap) / 2); inset-inline-end: calc(var(--gap) + 56px); z-index: 1; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(20, 24, 27, .6); color: #fff;
  transition: background-color .25s, border-color .25s, scale .25s var(--ease);
}
.shot-dl:hover, .shot-dl:focus-visible { background: var(--accent); border-color: var(--accent); scale: 1.08; outline: none; }
.shot-dl svg { width: 20px; height: 20px; }
.shot-prev { inset-inline-start: var(--gap); }
.shot-next { inset-inline-end: var(--gap); }
.shot-nav:dir(ltr) svg { scale: -1 1; } /* English copy: arrows point the other way */
@media (max-width: 560px) { .lightbox { --gap: 16px; } .shot-nav { width: 44px; height: 44px; margin-top: -22px; } .lightbox img, .lightbox video { max-width: calc(100vw - 32px); } .lightbox video { width: calc(100vw - 32px); } } /* phones: the arrows sit over the picture */
/* Course tables pop-up: wider window; a table scrolls sideways on its own if the phone is too narrow */
.modal-wide { width: min(860px, calc(100% - 32px)); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.course-table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.6; color: var(--ink); }
.course-table th { background: var(--page); font-weight: 700; white-space: nowrap; }
.course-table th, .course-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.course-table tbody tr:last-child td { border-bottom: 0; }
.course-table tbody tr:hover td { background: var(--warm); }
.course-table td:first-child, .course-table td:last-child, .course-table th:first-child, .course-table th:last-child { text-align: center; }
.course-table td:nth-child(2) { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.course-table .en { display: block; text-align: right; color: var(--muted); font-size: .8125rem; } /* right: under the Arabic name */
@media (max-width: 560px) {
  .modal-wide .modal-body { padding-inline: 14px; }
  .course-table th { white-space: normal; }
  .course-table th, .course-table td { padding: 8px; }
}
@media (max-width: 380px) { /* small phones: tables fit without sideways scroll */
  .modal-wide .modal-body { padding-inline: 10px; }
  .course-table { font-size: .8125rem; }
  .course-table th, .course-table td { padding: 6px 5px; }
  .course-table .en { font-size: .75rem; }
}
/* Clinics map pop-up: wider window, the map fills the body */
.modal-map { width: min(960px, calc(100% - 32px)); max-height: 90vh; }
.modal-map .modal-body { padding: 0; overflow: hidden; }
.map-frame { display: block; width: 100%; height: min(65vh, 560px); border: 0; }
.map-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; }
@media (max-width: 560px) { .map-frame { height: 55vh; } }

/* Drop-down lists, as on the committees site (user 12-11-2026): the JS turns each <select> into a
   button plus a list in the site's orange, with a tick on the chosen item. The real <select> stays hidden and holds the value. */
.cselect { position: relative; display: flex; min-width: 0; }
.cselect > select.cselect-native { position: absolute; inset: 0; width: 100%; min-width: 0; height: 100%; padding: 0; opacity: 0; pointer-events: none; }
.cselect-button {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 44px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 12px; border-radius: 8px; font: 600 .9375rem var(--font-body);
  text-align: start; cursor: pointer; white-space: nowrap; transition: border-color .2s, box-shadow .2s;
}
.cselect-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cselect-button::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-inline-start: 10px; margin-top: -4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s, margin-top .15s;
}
.cselect.is-open .cselect-button::after { margin-top: 4px; transform: rotate(-135deg); }
.cselect-button:hover { border-color: var(--accent); }
.cselect-button:focus-visible, .cselect.is-open .cselect-button { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194, 65, 12, .18); }
.field .cselect-button { min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 400; }
.field .cselect-button:hover, .field .cselect-button:focus-visible, .field .cselect.is-open .cselect-button { border-color: var(--accent); }
.field .cselect:has([aria-invalid="true"]) .cselect-button { border-color: var(--danger); }
.cselect-list {
  position: fixed; z-index: 1000; width: max-content; max-width: min(22rem, 90vw); max-height: 18rem;
  overflow-y: auto; margin: 0; padding: 5px; list-style: none;
  border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  box-shadow: 0 10px 28px rgba(17, 24, 39, .14); font-family: var(--font-body); color: var(--ink);
}
.cselect-list[hidden] { display: none; }
.cselect-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 6px; font-size: .9375rem; cursor: pointer;
}
.cselect-option.is-active { background: var(--warm-2); }
.cselect-option[aria-selected="true"] { color: var(--accent-fg); font-weight: 700; }
.cselect-option[aria-selected="true"]::after {
  content: ""; flex: none; width: 5px; height: 10px; margin-bottom: 3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
@media (max-width: 480px) { .cselect-button, .cselect-option { font-size: 1.0625rem; padding-top: 11px; padding-bottom: 11px; } }

/* Complaints form (inside a .modal) */
.modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.field + .field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .875rem; }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.8; }
.field input[dir="ltr"] { text-align: left; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(4, 120, 87, .18); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.field-err { margin-top: 6px; font-size: .875rem; color: var(--danger-fg); }
/* Sent or failed (user 14-11-2026): an icon that draws itself, the message, then its buttons. */
.modal-form [hidden] { display: none; } /* the footer is a flex row */
.form-result { padding: 28px 24px 24px; text-align: center; }
.form-result-icon { display: none; width: 76px; height: 76px; margin: 0 auto 14px; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.form-result[data-state="ok"] .form-result-ok, .form-result[data-state="fail"] .form-result-fail { display: block; }
.form-result-ok { stroke: var(--brand-fg); }
.form-result-fail { stroke: var(--danger); }
.form-result-icon circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: result-draw .6s ease-out forwards; }
.form-result-icon path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: result-draw .35s .55s ease-out forwards; }
.form-result-ok { animation: result-pop .35s .85s ease-out; }
.form-result-fail { animation: result-shake .4s .85s ease-in-out; }
@keyframes result-draw { to { stroke-dashoffset: 0; } }
@keyframes result-pop { 50% { transform: scale(1.12); } }
@keyframes result-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.no-motion .form-result-icon, .no-motion .form-result-icon * { animation: none; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .form-result-icon, .form-result-icon * { animation: none; stroke-dashoffset: 0; } }
.form-result-text { max-width: 42ch; margin: 0 auto 20px; font-size: 1.0625rem; color: var(--ink); }
.form-result-actions { justify-content: center; }
.form-result[data-state="ok"] [data-retry], .form-result[data-state="fail"] [data-again] { display: none; }
.btn-send { color: #fff; background: var(--brand-700); }
.btn-send:hover { background: var(--brand-800); }
.service h3 .service-link { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: inherit; cursor: pointer; }
.service h3 .service-link::after { content: ""; position: absolute; inset: -200px; } /* whole card opens the form, like the link cards */
@media (max-width: 900px) { .tile-intro, .tile-branches, .tile-vision { grid-column: 1 / -1; grid-row: auto; } }
@media (min-width: 600px) and (max-width: 900px) { /* tablets: branches two to a line (1-2, 3-4, then 5), a slimmer helix */
  .branches { grid-template-columns: 1fr 1fr; }
  .branches li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .helix { width: 34px; inset-inline-end: 16px; }
  .helix i { height: 8px; }
  .helix i::before, .helix i::after { width: 8px; height: 8px; }
  .helix i::before { --to: 26px; }
  .helix i::after { --to: -26px; }
  .tile-branches { padding-inline-end: calc(clamp(24px, 3.5vw, 40px) + 38px); }
}

/* ============ 8. News ============ */
.news { background: var(--card); border-block: 1px solid var(--line); }
.news-grid { /* six cards: three show, the rest are reached by the thin bar under the row (user 15-11-2026) */
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--orange) var(--line);
  padding-block: 38px 50px; margin-block: -38px 0; /* +60px room for the hover lift and its shadow, so no vertical bar shows (user 15-11-2026) */
}
.news-grid > .news-card { scroll-snap-align: start; }
.news-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--page); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
/* stands in for the news photo */
.news-thumb {
  position: relative; aspect-ratio: 2 / 1; /* was 16/10: cards filled the window (user 13-11-2026) */ overflow: hidden; display: grid; place-items: center; color: #fff;
  background: linear-gradient(120deg, var(--dark), #475569, #9A3412, var(--dark)); background-size: 300% 300%;
  transition: background-position 1.2s var(--ease);
}
.news-card:hover .news-thumb { background-position: 100% 100%; }
/* a real news photo: see-through so the glow sweep behind it still shows (user 13-11-2026) */
.news-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* in colour (user 13-11-2026) */
.news-thumb img { transition: filter .3s; }
.news-card:hover .news-thumb img, .news-card:focus-within .news-thumb img { filter: grayscale(1); } /* only the hovered/focused card goes black and white (user 13-11-2026) */
.news-thumb:has(img)::after { /* the same red/orange gradient laid over the photo, so the sweep still shows */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: inherit; mix-blend-mode: overlay; opacity: .6;
}
.news-thumb:has(img) .news-no { z-index: 2; }
.news-thumb svg { width: 44px; height: 44px; opacity: .85; transition: transform .6s var(--ease); }
.news-card:hover .news-thumb svg { transform: scale(1.25) rotate(-8deg); }
.news-no { position: absolute; bottom: -18px; inset-inline-start: 14px; font: 800 5rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .28); }
.news-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; flex: 1; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.news-kind { padding: 0 12px; font-weight: 600; color: var(--ink); background: var(--chip); border-radius: 999px; }
.news-card h3 { font-size: 1.0625rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.news-card h3 a { color: var(--ink); transition: color .2s; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.news-card:hover h3 a { color: var(--brand-fg); }
.news-card p { color: var(--muted); font-size: .9375rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
@media (max-width: 900px) { .news-grid { grid-auto-columns: min(340px, 80vw); } }

/* ============ 9. Services ============ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
/* glow that follows the pointer inside the card (JS sets --mx / --my) */
.service::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(251, 146, 60, .16), transparent 70%);
}
.service:hover::before, .service:focus-within::before { opacity: 1; }
.service:hover, .service:focus-within { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-700); }
.service-icon {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px;
  color: var(--brand-fg); background: var(--brand-50); border-radius: 18px;
  transition: background-color .3s, color .3s, transform .5s var(--ease), border-radius .5s var(--ease);
}
.service:hover .service-icon { background: var(--dark); color: var(--mint); transform: rotate(-8deg) scale(1.08); border-radius: 50%; }
.service-icon svg { width: 26px; height: 26px; }
.service h3 { position: relative; font-size: 1.1875rem; margin-top: 6px; }
.service h3 a { color: var(--ink); }
.service h3 a::after { content: ""; position: absolute; inset: -200px; } /* whole card is the link; the card clips it */
.service p { position: relative; color: var(--muted); font-size: .9375rem; }
.service-go {
  position: absolute; top: 24px; inset-inline-end: 24px; display: grid; place-items: center; width: 40px; height: 40px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 50%;
  transition: transform .35s var(--ease), background-color .3s, color .3s, border-color .3s;
}
.service-go svg { width: 18px; height: 18px; transform: rotate(45deg); transition: transform .35s var(--ease); }
.service:hover .service-go { background: var(--accent); border-color: var(--accent); color: #fff; }
.service:hover .service-go svg { transform: rotate(0); }
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* ============ 10. Staff login band ============ */
.staff-band {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
  padding: clamp(32px, 6vw, 72px) max(20px, calc((100% - var(--wrap)) / 2)); color: #fff; border: 2px solid transparent; border-inline-width: 0; /* full width: the text still lines up with the page column */
  /* a light travels round the border */
  background:
    linear-gradient(var(--dark), var(--dark)) padding-box,
    conic-gradient(from var(--angle), rgba(255, 255, 255, .1) 0 62%, var(--mint) 80%, #FDBA74 90%, rgba(255, 255, 255, .1)) border-box;
  animation: turn 7s linear infinite;
  box-shadow: var(--shadow-lg);
}
@keyframes turn { to { --angle: 360deg; } }
#staff > .wrap { width: 100%; }
.staff-band::before {
  content: ""; position: absolute; z-index: -1; width: 480px; aspect-ratio: 1; bottom: -260px; inset-inline-start: -120px; border-radius: 50%;
  background: #475569; filter: blur(90px); opacity: .7; animation: drift 14s ease-in-out infinite alternate;
}
.staff-band h2 { font-size: clamp(1.75rem, 4.4vw, 3rem); font-weight: 800; }
.staff-band p { margin-top: 12px; max-width: 50ch; color: var(--on-dark-muted); font-size: 1.0625rem; }
.staff-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; font-size: .9375rem; }
.staff-points li { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; }
.staff-points svg { width: 16px; height: 16px; color: var(--mint); flex: none; }
.staff-action { position: relative; display: grid; gap: 12px; justify-items: center; text-align: center; }
.staff-action .btn { min-width: 250px; min-height: 64px; font-size: 1.125rem; }
.id-card { width: 200px; height: auto; justify-self: center; overflow: visible; rotate: -4deg; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .4)); }
.id-scan { filter: drop-shadow(0 0 6px #FB923C); animation: id-scan 2.6s ease-in-out infinite alternate; }
@keyframes id-scan { to { transform: translateY(110px); } }
/* rings pulse out from behind the button */
.pulse { position: absolute; bottom: 32px; left: 50%; width: 120px; height: 120px; margin: 0 0 -60px -60px; z-index: -1; border-radius: 50%; border: 1px solid rgba(249, 115, 22, .6); animation: pulse 3s ease-out infinite; }
.pulse + .pulse { animation-delay: 1.5s; }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@media (max-width: 767.98px) { /* from 768 the text and the badge + sign-in button share one line (user) */
  .staff-band { grid-template-columns: 1fr; }
  .staff-action { justify-items: stretch; }
  .staff-action .btn { min-width: 0; }
}

/* ============ 10b. Social media ============ */
.social { margin-top: clamp(48px, 7vw, 96px); }
.social-head { text-align: center; margin-bottom: 28px; }
.social-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } /* three cards on one line */
.social-card {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
  font: inherit; text-align: start; cursor: pointer; /* the contact card is a <button> */
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.social-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
.social-card b { display: block; font-weight: 700; }
.social-card b + span { display: block; color: var(--muted); font-size: .9375rem; }
.social-icon {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--dark); color: #fff; transition: background-color .3s, transform .35s var(--ease);
}
.social-icon svg { width: 24px; height: 24px; }
.social-card:hover .social-icon { background: var(--accent); transform: rotate(-8deg) scale(1.06); }
.social-grid { display: grid; grid-template-columns: fit-content(640px) auto; justify-content: center; gap: clamp(24px, 6vw, 72px); align-items: center; } /* text and phone side by side in the middle */
.social-grid .social-head { text-align: start; }
.social-grid .social-list { justify-content: flex-start; }
.phone-art { width: clamp(220px, 30vw, 360px); height: auto; overflow: visible; }
.phone-body { transform-origin: 150px 355px; }
.phone-float { transform-box: fill-box; transform-origin: center; opacity: 0; animation: phone-float 6s linear var(--d) infinite; }
/* motion off: the icons rest spread out above the phone */
.no-motion .phone-float { opacity: 1; transform: translate(var(--x), var(--y)); }
@media (prefers-reduced-motion: reduce) { .phone-float { opacity: 1; transform: translate(var(--x), var(--y)); } }
@keyframes phone-float {
  from { transform: translate(0, 0) scale(.4); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  to { transform: translate(var(--x), -185px) scale(1); opacity: 0; }
}
@media (max-width: 767.98px) { /* from 768 the text and cards sit beside the phone (user) */
  .social-grid { grid-template-columns: 1fr; }
  .social-grid .social-head { text-align: center; }
  .social-grid .social-list { justify-content: center; }
  .phone-art { justify-self: center; }
}
@media (max-width: 424.98px) { .social-list { grid-template-columns: 1fr; } } /* small phones: one card per line */
@media (min-width: 425px) and (max-width: 560px), (min-width: 768px) and (max-width: 1023.98px) { /* phones from 425 and tablets (side by side, «الاتصال المباشر» wrapped below 1024): the three cards on one line, icon above the words */
  .social-list { gap: 8px; }
  .social-card { flex-direction: column; justify-content: center; gap: 8px; padding: 14px 6px; text-align: center; }
  .social-card b { font-size: .875rem; }
  .social-card b + span { font-size: .75rem; }
  .social-icon { width: 40px; height: 40px; }
}

/* ============ 11. Footer ============ */
.site-footer { position: relative; overflow: hidden; margin-top: clamp(64px, 9vw, 128px); padding-top: 92px; background: linear-gradient(170deg, #15803D, #14532D); color: var(--on-dark-muted); --on-dark-muted: #DCFCE7; --mint: #fff; }
/* Flying tooth lane: --u is how far across the tooth has flown (0 = off the right edge).
   The trail is four waves wide (8π); --a is the tooth's place on that wave, so it rides the same curve. */
.plane-lane { --u: .9; --a: calc((1 - var(--u) * .9) * 25.1327); position: absolute; inset: 16px 0 auto; height: 60px; pointer-events: none; }
.plane { position: absolute; top: calc(8px + sin(var(--a)) * 12px); left: calc(100% - var(--u) * 90%); width: 40px; height: 44px; color: var(--orange); rotate: calc(cos(var(--a)) * 14deg); animation: van-bob 1.6s ease-in-out infinite alternate; }
.plane-trail {
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: inset(0 0 0 calc(100% - var(--u) * 90% + 46px)); /* shows only behind the tooth */
}
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-line); }
.site-footer h2 { margin-bottom: 8px; font-size: 1rem; font-weight: 600; color: #fff; }
.site-footer a { color: var(--on-dark-muted); transition: color .2s, transform .25s var(--ease); }
.site-footer a:hover { color: #FDBA74; /* light orange: readable on the green */ transform: translateX(-4px); }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; min-height: 38px; }
.footer-contact svg { width: 18px; height: 18px; margin-top: 10px; flex: none; color: var(--orange); }
.footer-contact .line { padding-top: 6px; }
.footer-contact .line a { display: inline; min-height: 0; } /* a link inside a text line keeps the line's height */
.footer-brand .brand { color: #fff; margin-bottom: 8px; }
.footer-brand .brand-mark { width: 56px; height: 56px; }
.footer-brand .brand-mark img { width: 48px; height: 50px; }
.footer-brand .brand-sub { color: var(--on-dark-muted); }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.site-footer .footer-social a, .site-footer .footer-social .footer-dev {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.site-footer .footer-social a:hover, .site-footer .footer-social .footer-dev:hover { background: var(--orange); border-color: var(--orange); color: #14532D; transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; }
/* the designer's round button: a <button> with his photo filling the circle (the orange hover shows as the ring only) */
.site-footer .footer-social .footer-dev { padding: 0; overflow: hidden; cursor: pointer; font: inherit; }
.footer-dev img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* his pop-up (#dlg-dev) */
.dev-card { text-align: center; }
.dev-photo { display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; background: var(--brand-50); color: var(--brand-fg); border: 3px solid var(--orange); }
.dev-photo img { width: 100%; height: 100%; object-fit: cover; }
.dev-photo svg { width: 56px; height: 56px; }
.dev-card h3 { font-size: 1.25rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.modal-body.dev-card * + h3 { margin-top: 0; padding-top: 0; border-top: 0; }
.dev-role { color: var(--muted); }
.dev-none { text-align: center; text-align-last: center; }
.dev-list { margin-top: 16px; text-align: start; }
.dev-list > div { padding: 10px 0; border-top: 1px solid var(--line); }
.dev-list dt { font-size: .8125rem; color: var(--muted); }
.dev-list dd { color: var(--ink); overflow-wrap: anywhere; }
.modal-foot .btn svg { width: 18px; height: 18px; flex: none; }
.modal-foot .btn span { overflow-wrap: anywhere; min-width: 0; }
.footer-credit { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; } /* same size as the address lines (user 14-11-2026) */
.footer-credit [dir="ltr"] { text-align: start; align-self: flex-start; }
/* big outlined domain name, decorative */
.wordmark {
  direction: ltr; text-align: center; white-space: nowrap; user-select: none; margin: 12px 0 -.05em; /* almost the whole word shows */
  font: 800 clamp(2rem, 9vw, 7rem)/1 var(--font-display);
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .14);
  background: linear-gradient(90deg, transparent 40%, rgba(251, 146, 60, .55) 50%, transparent 60%) 200% 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; background-position: 0 0; animation: wordmark-light 7s ease-in-out infinite;
}
/* light crosses the word, comes back, then rests 2s (2s of the 7s) */
@keyframes wordmark-light { 36% { background-position: 100% 0; } 72%, 100% { background-position: 0 0; } }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; } }
/* Phones: buttons and the footer brand sit in the middle (works the same for RTL and a later English LTR copy) */
@media (max-width: 560px) {
  .hero-actions, .about-actions, .clinic-actions { justify-content: center; }
  .hero-actions .btn { padding-inline: 20px; } /* both hero buttons fit on one line at 375px; smaller phones wrap */
  .cl-panel > .btn { align-self: center; }
  .section-head:has(> .btn) > :not(.btn) { flex-basis: 100%; } /* the button gets its own line */
  .section-head > .btn { margin-inline: auto; }
  .footer-brand { text-align: center; }
  .footer-brand .brand, .footer-social { justify-content: center; }
  .footer-credit, .footer-credit [dir="ltr"] { align-items: center; align-self: center; text-align: center; }
  /* hero text, section titles (chip, title, lead) and every card title in the middle */
  .hero-copy, .section-head, :has(> .section-title), .staff-band :has(> h2) { text-align: center; }
  .section-head { justify-content: center; }
  .staff-points { justify-content: center; }
  .mobile-facts { text-align: start; } /* icon list stays lined up */
  .tile h3, .cl-panel h3, .news-card h3, .treat h3 { text-align: center; } /* service and value cards stay lined up (user) */
  /* long paragraphs: justified, last line in the middle */
  .hero-lead, .section-lead, .tile-vision p, .cl-panel p, .staff-band h2 + p, .modal-body p { text-align: justify; text-align-last: center; }
  .cl-panel h3 { align-self: stretch; }
  /* news: cards scroll sideways like the treatments; «كل الأخبار» moves under them */
  .news .wrap { display: flex; flex-direction: column; }
  .news .section-head { display: contents; }
  .news .section-head > div { flex-basis: auto; margin-bottom: 28px; }
  .news .section-head > .btn { order: 1; margin-top: 8px; }
  .news-grid {
    display: flex; gap: 16px; margin: -30px -20px 0; padding: 34px 20px 46px;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: thin;
  }
  .news-card { flex: 0 0 min(300px, 80vw); scroll-snap-align: center; }
  /* mobile clinic: the moving van sits between the title and its text */
  .wrap.mobile-grid { display: flex; flex-direction: column; gap: 0; } /* .wrap: beats the later base rule */
  .mobile-grid > [data-reveal]:not(.mobile-art) { display: contents; }
  .mobile-grid .eyebrow { align-self: center; }
  .mobile-grid > .mobile-art { order: 1; margin-block: 24px 4px; }
  .mobile-grid .section-title ~ * { order: 2; }
  /* social: the phone with the flying icons sits between the title and the cards */
  .wrap.social-grid { display: flex; flex-direction: column; }
  .social-grid > div { display: contents; }
  .social-grid > .phone-art { order: 1; align-self: center; }
  .social-grid .social-list { order: 2; align-self: stretch; }
  .wordmark { font-size: 12.2vw; } /* the word covers about 80% of the screen width */
  /* the three clinic figures on one line */
  .clinics .clinic-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
  .clinics .clinic-stats dd { font-size: 1.875rem; }
  .clinics .clinic-stats dt { font-size: .875rem; line-height: 1.4; }
}

/* ============ 11b. Teaching clinics ============ */
.clinics {
  position: relative; isolation: isolate; overflow: clip;
  margin-inline: clamp(8px, 2vw, 24px); padding-block: clamp(56px, 8vw, 104px); /* keep: less space clips the cards' shadow and glow */
  color: #fff; background: var(--dark); border-radius: 44px;
}
.clinics::before, .clinics::after { content: ""; position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; filter: blur(90px); }
.clinics::before { width: 520px; top: -200px; inset-inline-start: -120px; background: #475569; opacity: .6; }
.clinics::after  { width: 380px; bottom: -180px; inset-inline-end: -80px; background: #C2410C; opacity: .4; }
.clinics .eyebrow { color: var(--mint-soft); background: var(--glass); border: 1px solid var(--glass-line); }
.clinics .eyebrow::before { background: var(--mint); }
.clinics .section-lead { color: var(--on-dark-muted); }
.clinics-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.clinic-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 28px; }
.clinic-stats dd { font: 800 clamp(2rem, 4.5vw, 3rem)/1.2 var(--font-display); color: var(--orange); font-variant-numeric: tabular-nums; }
.clinic-stats dt { color: var(--on-dark-muted); font-weight: 500; }
.clinic-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.value, .visit li {
  padding: 20px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-sm); backdrop-filter: blur(8px);
  transition: transform .3s var(--ease), background-color .3s, border-color .3s, box-shadow .3s;
}
.value:hover, .visit li:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .1); border-color: rgba(251, 146, 60, .6); }
.value svg { width: 28px; height: 28px; margin-bottom: 12px; color: var(--mint); }
.value h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.value p { font-size: .9375rem; color: var(--on-dark-muted); line-height: 1.7; }
.visit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: clamp(32px, 5vw, 56px); }
.visit li { display: flex; gap: 14px; align-items: flex-start; }
.visit svg { width: 22px; height: 22px; margin-top: 4px; flex: none; color: var(--mint); }
.visit b { display: block; font-weight: 600; }
.visit li { position: relative; }
.visit-info { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 20px; color: var(--on-dark-muted); font-size: .9375rem; }
.visit-info li { display: flex; align-items: center; gap: 8px; }
.visit-info svg { width: 20px; height: 20px; flex: none; color: var(--mint); }
.visit-info b { color: #fff; font-weight: 600; }
.chair-art { width: min(100%, 420px); height: auto; margin: 0 auto 20px; overflow: visible; }
.chair-bulb { filter: drop-shadow(0 0 10px #FB923C); animation: chair-glow 2.4s ease-in-out infinite alternate; }
.chair-tooth { animation: van-bob 2s ease-in-out infinite alternate; }
.chair-lamp { transform-origin: 70px 40px; }
@keyframes chair-glow { to { opacity: .6; } }
.clinic-btn { display: block; padding: 0; border: 0; background: none; color: inherit; font: 600 1rem var(--font-body); text-align: start; cursor: pointer; }
.clinic-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card is clickable */
.clinic-btn:focus-visible { outline: none; }
.visit li:has(.clinic-btn:focus-visible) { outline: 2px solid var(--mint); outline-offset: 2px; }
.visit span { color: var(--on-dark-muted); font-size: .9375rem; }
/* The six clinics on a light section: same cards as above, recoloured */
.clinic-list { padding-bottom: 0; }
.clinic-list .visit { margin-top: 0; }
.clinic-list .visit li { background: var(--card); border-color: var(--line); backdrop-filter: none; }
.clinic-list .visit li:hover { background: var(--card); border-color: var(--orange); box-shadow: var(--shadow); }
.clinic-list .visit li:has(.clinic-btn:focus-visible) { outline-color: var(--accent); }
.clinic-list .visit svg, .clinic-list .visit-info svg { color: var(--accent-fg); }
.clinic-list .visit span, .clinic-list .visit-info { color: var(--muted); }
.clinic-list .visit-info b { color: var(--ink); }
/* The six clinics: a list beside one dark panel. Choosing a name swaps the panel, and its big icon draws itself */
.cl { display: grid; grid-template-columns: minmax(240px, .7fr) 1.3fr; gap: 20px; }
.cl svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cl-list { position: relative; display: grid; grid-auto-rows: 1fr; gap: 8px; }
.js .cl-list::before { /* orange marker that slides to the chosen clinic */
  content: ""; position: absolute; inset-inline: 0; top: 0; height: calc((100% - 40px) / 6); border-radius: var(--radius-sm);
  background: var(--orange); translate: 0 calc(var(--i, 0) * (100% + 8px)); transition: translate .5s var(--ease);
}
.cl-tab {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; color: var(--muted);
  font: 600 1rem var(--font-body); text-align: start; cursor: pointer; transition: color .3s, border-color .3s;
}
.cl-tab b { min-width: 22px; font-size: .8125rem; }
.cl-tab svg { width: 28px; height: 28px; flex: none; }
.cl-tab:hover { border-color: var(--orange); }
.js .cl-tab[aria-current] { color: var(--dark); border-color: transparent; } /* sits on the orange marker: dark in both themes */
.cl-panels { position: relative; isolation: isolate; display: grid; border-radius: var(--radius); background: var(--dark); color: #fff; overflow: hidden; }
.cl-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(24px, 4vw, 44px); }
.cl-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.cl-art { width: clamp(110px, 13vw, 170px); aspect-ratio: 1; color: var(--orange); overflow: visible; }
.cl-no { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 700; line-height: 1; color: rgba(255, 255, 255, .1); }
.cl-panel h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); color: #fff; }
.cl-panel p { flex: 1; color: var(--on-dark-muted); line-height: 1.9; }
.js .cl-panel { grid-area: 1 / 1; transition: opacity .35s, translate .5s var(--ease), visibility 0s .35s; }
.js .cl-panel:not(.on) { opacity: 0; visibility: hidden; translate: 0 18px; }
.js .cl-panel.on { transition-delay: .12s, .12s, 0s; }
.fx .cl-panel.on .cl-art * { animation: cl-draw 1s ease-in-out backwards; animation-delay: calc(.2s + var(--n, 0) * .4s); }
@keyframes cl-draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@media (max-width: 860px) {
  .cl { grid-template-columns: 1fr; }
  .cl-list { grid-template-columns: 1fr 1fr; }
  .js .cl-list::before { display: none; }
  .js .cl-tab[aria-current] { background: var(--orange); }
}
@media (max-width: 520px) { .cl-tab { gap: 8px; padding: 8px 12px; font-size: .9375rem; } .cl-tab svg { display: none; } }
@media (max-width: 900px) { .clinics-grid { grid-template-columns: 1fr; } .visit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .visit { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .values { grid-template-columns: 1fr; } }

/* Clinic treatments: a row that swipes sideways. On wide screens with motion on,
   the row is pinned and page scroll drives it instead (see section 12). */
.pin-stage { padding-block: clamp(56px, 8vw, 96px) clamp(24px, 4vw, 48px); } /* keep: less space clips the treatment cards' shadow */
.pin-bar { height: 4px; margin-top: 24px; border-radius: 4px; background: var(--line); overflow: hidden; display: none; }
.pin-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--accent)); transform-origin: 100% 50%; scale: var(--pin, 0) 1; }
.pin-track {
  display: flex; gap: 20px; padding: 60px max(20px, calc((100vw - var(--wrap)) / 2)); /* 60px above and below the cards */
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.treat {
  position: relative; overflow: hidden; flex: 0 0 min(320px, 78vw); scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 8px; padding: 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.treat:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
/* picture from the clinics system, edge to edge at the top of the card */
.treat-pic { margin: -26px -26px 8px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--brand-50); }
.treat-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.treat:hover .treat-pic img { transform: scale(1.07); }
/* «احجز موعد» rises over the picture on hover; reveal uses `translate` so the .btn hover `transform` still works */
.treat-pic { position: relative; }
.treat-book {
  position: absolute; inset-block-end: 14px; inset-inline: 0; width: max-content; margin-inline: auto;
  opacity: 0; translate: 0 14px; pointer-events: none; transition: opacity .3s, translate .35s var(--ease), transform .25s var(--ease), box-shadow .25s;
}
.treat:hover .treat-book { opacity: 1; translate: 0 0; pointer-events: auto; }
@media (hover: none) { .treat-book { opacity: 1; translate: 0 0; pointer-events: auto; } } /* touch screens have no hover: always shown */
.treat-no {
  position: absolute; top: 14px; inset-inline-start: 14px; padding: 2px 12px;
  font: 700 .875rem/1.7 var(--font-display); color: #fff; background: rgba(3, 36, 28, .78); border-radius: 999px; backdrop-filter: blur(4px);
  transition: background-color .3s, color .3s;
}
.treat:hover .treat-no { background: var(--mint); color: var(--dark); }
.treat h3 { font-size: 1.125rem; }
.treat p { color: var(--muted); font-size: .9375rem; line-height: 1.7; }
.treat-meta { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.treat-meta div { flex: 1; padding: 8px 12px; background: var(--page); border-radius: 12px; }
.treat-meta dt { font-size: .75rem; color: var(--muted); }
.treat-meta dd { font-weight: 600; font-size: .9375rem; }

/* Mobile clinic: text beside a dark panel; the van drives across it as the section scrolls by (section 12) */
.mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.mobile-sub { margin-top: 28px; font-size: 1.125rem; }
.mobile-facts { display: grid; gap: 6px; margin-top: 10px; } /* plain lines, no cards */
.mobile-facts li { display: flex; gap: 10px; align-items: center; }
.mobile-facts svg { width: 22px; height: 22px; flex: none; color: var(--accent-fg); }
.mobile-facts b { font-weight: 600; }
.mobile-art {
  position: relative; isolation: isolate; overflow: clip; aspect-ratio: 4 / 3; display: grid; place-items: center;
  color: #fff; background: var(--dark); border-radius: 44px; box-shadow: var(--shadow-lg);
}
.mobile-art::before, .mobile-art::after { content: ""; position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); }
.mobile-art::before { width: 60%; top: -25%; inset-inline-start: -15%; background: #475569; opacity: .6; }
.mobile-art::after  { width: 50%; bottom: -25%; inset-inline-end: -10%; background: #C2410C; opacity: .45; }
.mobile-art svg { width: 82%; height: auto; overflow: visible; }
.van-body { animation: van-bob 1.6s ease-in-out infinite alternate; }
.van-wheel { transform-box: fill-box; transform-origin: center; animation: van-wheel 1.4s linear infinite; }
.van-road { stroke-dasharray: 26 18; animation: van-road 1s linear infinite; }
.van-wind line { stroke-dasharray: 14 30; animation: van-road 1s linear infinite; }
.van-tooth { color: var(--orange); filter: drop-shadow(0 0 8px rgba(251, 146, 60, .6)); }
@keyframes van-bob { to { transform: translateY(-3px); } }
@keyframes van-wheel { to { transform: rotate(-360deg); } }
@keyframes van-road { to { stroke-dashoffset: -44; } } /* the van faces left, so the ground runs to the right */
@media (min-width: 768px) and (max-width: 1023.98px) { /* tablets: the button moves under the van (user) */
  /* van + button are one block centred beside the text: both share rows 1-5; the van is lifted by the
     button's height + 20px gap, the button pushed down by the van's height (4:3 of the column) + 20px */
  .mobile-grid { row-gap: 0; column-gap: 40px; container-type: inline-size; }
  .mobile-grid > [data-reveal]:not(.mobile-art) { display: contents; }
  .mobile-grid > [data-reveal]:not(.mobile-art) > * { grid-column: 1; }
  .mobile-grid .eyebrow { justify-self: start; }
  .mobile-grid > .mobile-art { grid-column: 2; grid-row: 1 / 6; align-self: center; margin-bottom: 72px; }
  .mobile-grid > [data-reveal]:not(.mobile-art) > .clinic-actions { grid-column: 2; grid-row: 1 / 6; align-self: center; margin-top: calc((100cqw - 40px) * .375 + 20px); }
}
@media (max-width: 767.98px) { /* tablets from 768 keep the van beside the text (user) */ .mobile-grid { grid-template-columns: 1fr; }
  .mobile-art { border-radius: var(--radius); width: 90vw; max-width: 100%; justify-self: center; align-self: center; } /* phones: about 90% of the screen (user) */
}

/* ============ 12. Scroll effects (parallax, pinned scenes) ============ */
/* Pinned sideways scene: JS measures the row (--dist) and reports progress (--pin) */
@media (min-width: 961px) and (min-height: 700px) {
  .fx .pin { height: calc(100vh + var(--dist, 0) * 1px); }
  .fx .pin-stage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: clip; padding-top: 96px; }
  .fx .pin-track { overflow: visible; scroll-snap-type: none; translate: calc(var(--pin, 0) * var(--dist, 0) * 1px) 0; }
  .fx .pin-bar { display: block; }
  .fx .clinics-side { translate: 0 calc((var(--p) - .5) * -70px); }
}
/* About: the tooth outline draws itself (--u goes 0 to 1) and each dot appears as the line reaches it */
.fx .helix i { opacity: clamp(0, (var(--draw, 1) - var(--i) / 18) * 12, 1); } /* the helix builds from the top with the same progress as the tooth */
.fx .van { translate: calc((.5 - var(--p)) * 150px) 0; } /* drives from right to left as the section passes */
.fx .chair-lamp  { rotate: calc((1 - min(1, var(--p) * 2.2)) * -40deg); } /* raised at first, lowers as the panel comes in */
.fx .chair-light { opacity: min(1, var(--p) * 2.2); }
.fx .clinics::before { translate: 0 calc((var(--p) - .5) * 260px); }
.fx .clinics::after  { translate: 0 calc((var(--p) - .5) * -220px); }

/* JS writes three numbers and CSS does all the moving:
     --hero  0→1 while the first screen scrolls away
     --p     0→1 while a [data-scroll] section crosses the screen (.5 = centred)
     --w     0→1 while the [data-words] paragraph is being read
   Everything sits under html.fx, which exists only while motion is on, so with motion
   off the page is the plain layout. Uses the translate / scale properties so these
   never fight the hover and entrance transforms. */
:root { --hero: 0; }
[data-scroll] { --p: .5; }

/* The page body is a sheet that slides up over the pinned hero */
.hero { padding-bottom: 44px; }
.sheet {
  position: relative; z-index: 1; margin-top: -44px; padding-bottom: clamp(64px, 9vw, 128px);
  background: var(--page); border-radius: 44px 44px 0 0; box-shadow: 0 -30px 80px rgba(0, 0, 0, .35);
}
.sheet > .news { margin-top: 0; }
.site-footer { margin-top: 0; }

@media (min-width: 961px) and (min-height: 700px) {
  .fx .hero { position: sticky; top: 0; }
  .fx.hero-away .hero { visibility: hidden; } /* fully covered: stop painting it */
  /* layers leave at different speeds */
  .fx .hero-copy     { translate: 0 calc(var(--hero) * -120px); opacity: calc(1 - var(--hero) * 1.6); }
  .fx .hero-art      { translate: 0 calc(var(--hero) * -40px); scale: calc(1 + var(--hero) * .45); opacity: calc(1 - var(--hero) * 1.2); }
  .fx .hero .figures { translate: 0 calc(var(--hero) * -200px); opacity: calc(1 - var(--hero) * 2); }
  .fx .hero .waves   { translate: 0 calc(var(--hero) * -120px); scale: calc(1 + var(--hero) * .2); }
}
.fx .blob-1 { translate: 0 calc(var(--hero) * 180px); }
.fx .blob-2 { translate: 0 calc(var(--hero) * -220px); }
.fx .blob-3 { translate: calc(var(--hero) * -160px) calc(var(--hero) * 90px); }

/* About: the sentence lights up word by word as it is scrolled through */
.fx [data-words] { color: var(--ink); }
.fx [data-words] .wd { opacity: clamp(.14, (var(--w, 1.2) - var(--n)) * 6 + .14, 1); transition: opacity .25s linear; }

/* Huge faint word drifting sideways behind a section (repeats the section's own label) */
.has-ghost { position: relative; overflow: clip; }
.has-ghost > .wrap { position: relative; }
.ghost {
  display: none; position: absolute; top: clamp(4px, 2vw, 28px); inset-inline: 0; text-align: center; white-space: nowrap;
  pointer-events: none; user-select: none;
  font: 800 clamp(5rem, 22vw, 18rem)/1.1 var(--font-display); color: var(--ghost);
}
.fx .ghost { display: block; translate: calc((var(--p) - .5) * 40vw) 0; }

/* Columns move at different speeds */
@media (min-width: 901px) {
  .fx .tile-branches { translate: 0 calc((var(--p) - .5) * -90px); }
  .fx .tile-vision   { translate: 0 calc((var(--p) - .5) * 50px); }
  /* News opens like a folded newspaper: the two side cards are hinged on the middle one and swing open
     as the row scrolls in (--u goes 0 to 1). The hidden back face keeps a folded card from showing mirrored. */
  .fx .news-grid { perspective: 1800px; --u: clamp(0, (var(--p) - .3) * 5, 1); }
  .fx .news-card { backface-visibility: hidden; }
  .fx .news-card:nth-child(1) { transform-origin: 0 50%;    rotate: y calc((1 - var(--u)) * -120deg); }
  .fx .news-card:nth-child(2) { scale: calc(.92 + .08 * var(--u)); }
  .fx .news-card:nth-child(3) { transform-origin: 100% 50%; rotate: y calc((1 - var(--u)) * 120deg); }
}
.fx .news-thumb svg { translate: 0 calc((var(--p) - .5) * 60px); }
.fx .news-no        { translate: calc((var(--p) - .5) * -50px) 0; }

/* Open book under the pinned heading */
.book { display: none; position: relative; width: min(100%, 320px); aspect-ratio: 3 / 2; margin-top: 36px; perspective: 1400px; filter: drop-shadow(0 18px 24px rgba(20, 24, 27, .16)); }
.book-page, .book-leaf {
  position: absolute; top: 0; left: 0; width: 50%; height: 100%; padding: 22px 16px; border: 3px solid var(--ink); border-radius: 12px 0 0 12px;
  background: repeating-linear-gradient(180deg, transparent 0 15px, var(--line) 15px 18px) content-box, #fff;
}
.book-r { left: 50%; border-radius: 0 12px 12px 0; }
.book-l { display: grid; place-items: center; background: #fff; }
.book-l svg { width: 56%; height: 56%; color: var(--accent-fg); }
.book-leaf { transform-origin: 100% 50%; background: repeating-linear-gradient(180deg, transparent 0 15px, #FED7AA 15px 18px) content-box, #FFF7ED; }
/* Services: the heading stays pinned while the cards scroll past it */
.services-head { margin-bottom: 36px; }
.services-head::after { /* fills as the section is scrolled through */
  content: ""; display: block; height: 4px; margin-top: 28px; border-radius: 4px;
  background: linear-gradient(90deg, var(--mint), var(--accent)); transform-origin: 100% 50%;
}
.fx .services-head::after { scale: var(--p) 1; }
@media (min-width: 961px) {
  .services-layout { display: grid; grid-template-columns: minmax(280px, .8fr) 1.7fr; gap: 56px; align-items: start; }
  .services-head { position: sticky; top: 120px; margin-bottom: 0; }
  .services-layout .services-grid { grid-template-columns: repeat(2, 1fr); }
  .fx .service:nth-child(even) { translate: 0 calc((var(--p) - .5) * -70px); }
  .book { display: block; }
  .fx .book-leaf { rotate: y calc(clamp(0, (var(--p) - var(--k)) * 10, 1) * 180deg); }
}

/* Staff band grows into place as it arrives */
.fx .id-card { translate: 0 calc((1 - min(1, var(--p) * 2.4)) * 50px); rotate: calc(-4deg - (1 - min(1, var(--p) * 2.4)) * 14deg); }

/* Footer wordmark rises from below */
.fx .phone-body { rotate: calc((var(--p) - .4) * -24deg); }
.fx .plane-lane { --u: min(.9, var(--p) * 2.6); }
.fx .wordmark { translate: 0 calc((1 - min(1, var(--p) * 4)) * 70%); } /* settles before the page bottom (--p is only ~0.3 there) */

/* 3D: the hero illustration and the cards lean toward the pointer (JS sets --tx / --ty, -1 to 1).
   Depth comes from the translate property, so the spin and hover transforms stay as they are. */
@media (hover: hover) {
  .fx .hero-art { transform: perspective(900px) rotateX(calc(var(--ty, 0) * -12deg)) rotateY(calc(var(--tx, 0) * 14deg)); transform-style: preserve-3d; transition: transform .5s var(--ease); }
  .fx .hero-art .ring-2 { translate: 0 0 20px; }
  .fx .hero-art .core   { translate: 0 0 80px; }
  .fx .service:hover, .fx .news-card:hover, .fx .treat:hover {
    transform: perspective(900px) translateY(-6px) rotateX(calc(var(--ty, 0) * -5deg)) rotateY(calc(var(--tx, 0) * 5deg));
  }
}
/* The dark panels tip up into place as they arrive */
.fx .clinics    { transform: perspective(1600px) rotateX(calc((1 - min(1, var(--p) * 2.4)) * 12deg)); transform-origin: 50% 100%; }

/* Glow: soft orange light on the few things that should draw the eye */
.hero h1 .grad { filter: drop-shadow(0 0 26px rgba(251, 146, 60, .35)); }
.clinic-stats dd { text-shadow: 0 0 28px rgba(251, 146, 60, .45); }
.hero-art .ring-2 { box-shadow: 0 0 44px rgba(251, 146, 60, .16), inset 0 0 44px rgba(251, 146, 60, .1); }
.btn-accent:hover { box-shadow: 0 0 0 1px rgba(251, 146, 60, .5), 0 12px 44px rgba(251, 146, 60, .55); }
.figure:hover, .value:hover, .visit li:hover { box-shadow: 0 0 34px rgba(251, 146, 60, .2); }
.service:hover, .news-card:hover, .treat:hover { box-shadow: var(--shadow-lg), 0 18px 54px rgba(251, 146, 60, .2); }
.staff-band { box-shadow: var(--shadow-lg), 0 0 90px rgba(251, 146, 60, .14); }

/* Smoke: a canvas behind the content of each dark panel; drawn by JS, hidden when motion is off */
.smoke { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero .smoke { z-index: -2; }
.no-motion .smoke { display: none; }
@media (prefers-reduced-motion: reduce) { .smoke { display: none; } }

/* ============ 13. Entrance on scroll ============ */
/* Blocks ease in once as they enter the screen. Only with JS, so nothing stays hidden without it.
   "backwards" fill leaves hover transforms free once the entrance has played. */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-visible { opacity: 1; animation: reveal .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(36px) scale(.97); filter: blur(8px); } }

/* ============ 14. Motion off ============ */
/* Same rules twice: without JS (media query) and with it (class "no-motion"). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; }
}
.no-motion { scroll-behavior: auto; }
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }
.no-motion.js [data-reveal] { opacity: 1; }

/* ============ 15. Dark theme: what the tokens alone do not reach ============ */
/* Everything else on a light surface follows the tokens in section 1. Here: the few places with their own colours. */
html[data-theme="dark"] .btn-outline { color: var(--mint); }
/* «عن الكلية» buttons: outline with no arrow in light; the mint booking-button look (with arrow) in dark */
.about-actions .btn svg { display: none; }
html[data-theme="dark"] .about-actions .btn { border-color: transparent; background: var(--mint); color: var(--dark); box-shadow: 0 10px 28px rgba(52, 211, 153, .3); }
html[data-theme="dark"] .about-actions .btn:hover { background: #6EE7B7; }
html[data-theme="dark"] .about-actions .btn svg { display: block; }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .cselect-button { background: var(--page); } /* fields a shade darker than the pop-up */
html[data-theme="dark"] .cselect-list { box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .ph-tag { color: #FDBA74; background: #3A2414; }
html[data-theme="dark"] .lightbox .modal-x:not(:hover) { background: #fff; } /* the full-screen viewer keeps its look */
html[data-theme="dark"] .book-page, html[data-theme="dark"] .book-l { background: repeating-linear-gradient(180deg, transparent 0 15px, var(--line) 15px 18px) content-box, var(--card); } /* the CSS-drawn book is a light surface, not an SVG picture */
html[data-theme="dark"] .book-l { background: var(--card); }
html[data-theme="dark"] .book-leaf { background: repeating-linear-gradient(180deg, transparent 0 15px, #4A3320 15px 18px) content-box, var(--card); }

/* ============ 16. News page (/news/{id}) ============ */
.np-wrap { width: min(100% - 32px, 820px); margin-inline: auto; }
.np-main { padding-block: 112px 64px; } /* room for the fixed home header */
.news-page .site-header .btn { flex: none; white-space: nowrap; }
.np-hero { position: relative; display: grid; place-items: center; width: 100%; padding: 0; border: 0; overflow: hidden; border-radius: var(--radius); background: var(--chip); cursor: zoom-in; }
.np-hero img:not(.np-blur) { position: relative; z-index: 1; display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; transition: scale .5s var(--ease); }
.np-hero:hover img:not(.np-blur) { scale: 1.02; }
/* the whole photo, upright or wide; a blurred, darker copy of it fills the sides or the top and bottom (user 15-11-2026) */
.np-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) brightness(.75); scale: 1.2; pointer-events: none; }
.np-album .mg-thumb { position: relative; }
.np-album .mg-thumb img:not(.np-blur) { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; } /* absolute: height 100% alone lets an upright photo grow past the tile */
.np-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block: 32px; } /* date, then «شارك الخبر» and its icons on the same line; room above (photo) and below (title) */
.np-head .np-meta { margin: 0; }
.np-share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.np-share-title { font-size: 1rem; }
.np-head .np-share { gap: 8px; }
.np-head .np-btn { width: 40px; height: 40px; }
.np-head .np-btn svg { width: 18px; height: 18px; }
@media (max-width: 560px) { /* phones: the date, then «شارك الخبر», then all 8 icons on one line (8 × 30 + 7 × 4 fits 320px less margins) */
  .np-head { margin-block: 24px; }
  .np-share-box { width: 100%; }
  .np-head .np-share { gap: 4px; }
  .np-head .np-btn { width: 30px; height: 30px; }
  .np-head .np-btn svg { width: 16px; height: 16px; }
}
@media (max-width: 420px) { .news-page .site-header .brand-name { display: none; } } /* the logo alone, so the theme and home buttons fit */
.np-title {font-size: clamp(1.5rem, 5vw, 2.25rem); overflow-wrap: anywhere; }
.np-text { margin-top: 18px; }
.np-text p { text-align: start; overflow-wrap: anywhere; } /* right-aligned in Arabic (user 15-11-2026) */
.np-text p + p { margin-top: 14px; }
.np-foot { margin-top: 46px; } /* paragraph gap 14px + 32px (user 15-11-2026): the editor's name and division, then the college's three links */
.np-foot p { overflow-wrap: anywhere; color: var(--muted); }
.np-foot p:first-child { font-weight: 700; color: var(--ink); }
.np-foot p + p { margin-top: 2px; }
.np-foot .np-share { margin-top: 14px; }
.np-sec { margin-top: 40px; }
.np-sec h2 { margin-bottom: 14px; font-size: 1.25rem; }
.np-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.np-share { display: flex; flex-wrap: wrap; gap: 10px; }
.np-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 50%;
  transition: color .2s, border-color .2s;
}
.np-btn[hidden] { display: none; }
.np-btn svg { width: 20px; height: 20px; }
.np-btn:hover, .np-btn:focus-visible { color: var(--accent-fg); border-color: var(--accent-fg); }
.np-btn::after { /* the hint: hover and keyboard focus */
  content: attr(data-tip); position: absolute; inset-block-end: calc(100% + 8px); left: 50%; translate: -50% 0; /* physical left: translate is physical too, so it centres in RTL */ z-index: 2;
  padding: 2px 10px; border-radius: 8px; white-space: nowrap; font-size: .8125rem; line-height: 1.7; color: #fff; background: var(--dark);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.np-btn:hover::after, .np-btn:focus-visible::after { opacity: 1; }
.np-gone { padding-block: 80px; text-align: center; font: 700 1.25rem/1.6 var(--font-display); }

/* News page, light only (user 15-11-2026): the light colours of Accounts/Staff/Store (--site-light-*); dark keeps the home tokens. Header pill and footer keep their own look. */
html:not([data-theme="dark"]) body.news-page {
  --page: #ECEEF1; --card: #FFFFFF; --ink: #111827; --muted: #4B5563; --line: #9CA3AF;
  --accent: #C2410C; --accent-hover: #9A3412; --accent-fg: #C2410C;
}
.news-page .site-header .nav-theme { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--card); } /* the ≤1140px menu rule stretches it; here it is a plain round button */

/* News page backdrop, copied from Accounts (app.css "Backdrop"; user 15-11-2026): light theme, wide soft ribbons;
   dark theme, the WebGL rays js/backdrop-dark.js mounts into .bd-rays. z-index -1: above the page colour, below all content. */
.bd-back { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bd-ribs, .bd-rays { display: none; position: absolute; inset: 0; }
html:not([data-theme="dark"]) .bd-ribs { display: block; }
html[data-theme="dark"] .bd-rays { display: block; }
.bd-rib {
  position: absolute; left: -35vmax; width: 170vmax; height: 26vmax; opacity: .12;
  background: linear-gradient(180deg, transparent, var(--c) 50%, transparent); transform: rotate(-25deg);
}
.rb1 { --c: #475569; top: -4%; }
.rb2 { --c: #047857; top: 24%; }
.rb3 { --c: #EA580C; top: 50%; }
.rb4 { --c: #475569; top: 74%; }
@media print { .bd-back { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes bd-sway-a { from { transform: translate(-5vmax, 0) rotate(-27deg); } to { transform: translate(5vmax, 3vmax) rotate(-23deg); } }
  @keyframes bd-sway-b { from { transform: translate(4vmax, 2vmax) rotate(-23deg); } to { transform: translate(-6vmax, -2vmax) rotate(-27deg); } }
  .rb1 { animation: bd-sway-a 32s ease-in-out infinite alternate; }
  .rb2 { animation: bd-sway-b 36s ease-in-out -8s infinite alternate; }
  .rb3 { animation: bd-sway-a 40s ease-in-out -14s infinite alternate; }
  .rb4 { animation: bd-sway-b 34s ease-in-out -20s infinite alternate; }
}

/* ============ 17. Theme switch: the new theme spreads as a circle from the button (theme.js, like Accounts; user 15-11-2026) ============ */
@keyframes theme-circle {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0)); }
}
html.theme-vt::view-transition-group(root) { animation-duration: .6s; }
html.theme-vt::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-new(root) { animation: theme-circle .6s ease-in-out both; mix-blend-mode: normal; }

/* News page footer: the tooth flies with the scroll as on home (news.js writes --p; home's .fx engine isn't loaded there). */
@media (prefers-reduced-motion: no-preference) {
  .news-page .plane-lane { --u: min(.9, var(--p, 0) * 2.6); }
}
