/* =====================================================================
   صفحة «مجالات عملنا» (areas.html) — التحالف الوطني | NACDW v2
   - كل الأنماط محصورة داخل #mj (والهيدر داخل .page-areas) فلا تؤثر على الصفحة الرئيسية.
   - الألوان والخط من متغيرات site.css (:root) طبقًا لـ BRIEF.md.
   - نقاط الكسر: 1199 / 980 (نفس الموقع) / 767.
   ===================================================================== */

/* ---------- 1. Opening section = former hero + intro, merged (see .mj-intro below). No slider. ---------- */

#mj{
  --base: var(--green-900); --base-2: var(--green); --teal-c: var(--teal); --acc: var(--orange);
  --dark: var(--ink); --body: var(--ink-2); --medium: var(--muted);
  --line: #E1E8E6; --line-2: #EBF0EF; --soft: #F1F5F4;
  --r: 12px; --r-md: 14px; --r-lg: 20px;
  --sh-sm: 0 2px 10px rgba(14,91,82,.06);
  --sh: 0 10px 30px rgba(14,91,82,.08);
  --sh-lg: 0 20px 50px rgba(14,91,82,.16);
  --ease: cubic-bezier(.16,1,.3,1);
  --hdr: 104px;                 /* set at runtime from the real header height */
  font-family: var(--font); color: var(--body); font-size: 16px; line-height: 1.85;
}
#mj *, #mj *::before, #mj *::after{ box-sizing:border-box; }
#mj h1,#mj h2,#mj h3,#mj h4,#mj p{ margin:0; font-family:inherit; }
#mj ul{ margin:0; padding:0; list-style:none; }
#mj img{ display:block; max-width:100%; }
#mj button{ font-family:inherit; cursor:pointer; background:none; border:0; padding:0; color:inherit; }
#mj svg.i{ width:1em; height:1em; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.mj-sr{ position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- Section heading (نفس أسلوب الموقع: eyebrow بخط أورانج + عنوان بلونين) ---------- */
.mj-h2{ margin-top:14px!important; font-size:clamp(1.9rem, 3vw, 2.6rem); line-height:1.3; font-weight:700; color:var(--base); }
.mj-h2 .l1{ color:var(--base); }
.mj-h2 .l2{ color:var(--acc); }
#mj .eyebrow-line{ color:var(--base); }

/* ---------- 1. Page title ---------- */
.mj-title-sec{ padding-top:calc(var(--hdr) + 8px); }
.mj-title{ position:relative; height:420px; border-radius:var(--r-lg); background-size:cover; background-position:center 88%; overflow:hidden; display:flex; align-items:flex-end; }
.mj-title::before{ content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(11,74,67,.92) 0%,rgba(11,74,67,.55) 48%,rgba(11,74,67,.18) 100%); }
.mj-title .in{ position:relative; z-index:1; padding:0 48px 52px; }
.mj-crumbs{ display:flex; align-items:center; gap:10px; font-size:15px; color:rgba(255,255,255,.78); margin-bottom:16px; }
.mj-crumbs a{ color:rgba(255,255,255,.78); transition:color .2s; }
.mj-crumbs a:hover{ color:#fff; }
.mj-crumbs span[aria-current]{ color:#fff; font-weight:600; }
.mj-title h1{ color:#fff; font-size:clamp(2.4rem, 4.3vw, 3.6rem); line-height:1.25; font-weight:700; }
.mj-title h1 .l2{ color:var(--acc); }
.mj-title p{ margin-top:12px; max-width:780px; color:rgba(255,255,255,.9); font-size:18px; line-height:1.8; text-wrap:balance; }

/* ---------- 2. Hero: one photo, homepage hero treatment (12 Nov) ---------- */
/* Markup reuses the homepage hero classes from site.css (.hero, .hero-media/.hero-bg, .hero-fade + ::before/::after,
   .wrap.hero-grid, .hero-copy, .eyebrow, h1 .l1/.l2, p, .stat/.num/.label), so height, gutters, type, gradient and
   breakpoints come from the homepage itself. Only what the homepage hero does not have is added here. */
.mj-hero .hero-bg{ object-position:22% 42%; }          /* keep the three people in frame on narrow screens */
#mj .mj-hero p{ margin-top:6px; }                       /* site.css .hero p; #mj resets p margins */
/* the 4 stats sit under the lead, inside the copy column: homepage .stat items (number over label here, centred,
   2px orange divider), one row, same measure as the lead (.hero p max-width 32em at 17px) */
.mj-hero .hero-grid{ grid-template-columns:minmax(0,1fr); }   /* let the copy column shrink below the stats' measure */
.mj-hero .hero-copy{ min-width:0; max-width:100%; grid-template-columns:minmax(0,1fr); }
.mj-hero-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); width:32em; max-width:100%; font-size:17px; }
.mj-hero-stats .stat .num{ font-variant-numeric:tabular-nums; }
.mj-hero-stats .stat .label{ white-space:nowrap; }
.mj-head p, .mj-join-head p, .mj-def p{ text-wrap:pretty; }
/* 17 Nov (designer): every button on the site = the homepage buttons (site.css .btn / .btn-primary / .btn-outline, final
   values): 48px high, 0 24px, pill, 15px / 500, 1.5px border, 15px icon, no shadow; hover = 1px lift + the fill colour
   change, 0.15s. .mj-btn-base = .btn-primary, .mj-btn-line = .btn-outline. (Was: 26px sides, a green shadow, a 2px lift,
   16px icon sliding on hover, a white-filled outline.) */
.mj-btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; height:48px; padding:0 24px; line-height:1; border-radius:999px; font-size:15px; font-weight:500; border:1.5px solid transparent; box-shadow:none; transition:transform .15s, background .15s, color .15s; white-space:nowrap; }
.mj-btn svg{ width:15px; height:15px; flex:none; }
.mj-btn:hover{ transform:translateY(-1px); }
.mj-btn-base{ background:var(--green-900); color:#fff; }
.mj-btn-base:hover{ background:var(--green); }
.mj-btn-line{ border-color:var(--green-900); color:var(--green-900); background:transparent; }
.mj-btn-line:hover{ background:rgba(255,255,255,.35); }
.mj-btn-white{ background:#fff; color:var(--base); }
.mj-btn-white:hover{ box-shadow:0 14px 30px rgba(0,0,0,.2); }

/* ---------- Section heads ---------- */
.mj-sec{ padding:80px 0; }
.mj-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:32px; margin-bottom:44px; }
.mj-head p{ margin-top:12px; max-width:640px; font-size:17px; color:var(--body); }
.mj-hint{ display:inline-flex; align-items:center; gap:8px; color:var(--medium); font-size:14px; font-weight:500; white-space:nowrap; padding-bottom:6px; }
.mj-hint svg{ width:18px; height:18px; }

/* ---------- 3. The 8 domains: list + one large card (12 Nov; layout idea from the faculties reference, the site's own
   colours, type, radii and shadows). Replaces the arc cards and the in-page explorer. ---------- */
.mj-pk{ display:grid; grid-template-columns:minmax(300px, 380px) minmax(0,1fr); grid-template-areas:"list stage" "ctl stage";
  grid-template-rows:auto 1fr; gap:14px 28px; }
/* list (the main navigation between domains): one row per domain, icon + name + number */
/* list: the same panel and rows as the domain pages' side list (.mj-tabs / .mj-tab), number on the right, no icons */
.mj-pk-list{ grid-area:list; align-self:start; display:flex; flex-direction:column; gap:2px; min-width:0; padding:8px; background:#fff; border:1px solid var(--line-2); border-radius:var(--r-md); box-shadow:var(--sh-sm); }
#mj .mj-pk-tab{ position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:11px 12px; border-radius:10px; text-align:start; color:var(--dark); transition:background .2s, color .2s; }
.mj-pk-tab .n{ flex:none; width:22px; font-size:13px; font-weight:600; color:#A3AFAC; font-variant-numeric:tabular-nums; transition:color .2s; }
.mj-pk-tab .t{ flex:1; min-width:0; font-size:15px; font-weight:500; line-height:1.5; }
#mj .mj-pk-tab:hover{ background:var(--soft); }
#mj .mj-pk-tab[aria-selected="true"]{ background:rgba(14,91,82,.07); color:var(--base); }
.mj-pk-tab[aria-selected="true"] .t{ font-weight:700; }
.mj-pk-tab[aria-selected="true"] .n{ color:var(--acc); }
.mj-pk-tab::before{ content:""; position:absolute; inset-inline-start:-8px; top:10px; bottom:10px; width:3px; border-radius:0 3px 3px 0; background:var(--acc); transform:scaleY(0); transition:transform .3s var(--ease); }
.mj-pk-tab[aria-selected="true"]::before{ transform:scaleY(1); }
#mj .mj-pk-tab:focus-visible{ outline:2px solid var(--base); outline-offset:2px; }
/* auto-advance timer: a thin orange line fills under the active row; its end moves to the next domain */
.mj-pk-tab .bar{ position:absolute; inset-inline:12px; bottom:3px; height:2px; border-radius:2px; overflow:hidden; pointer-events:none; }
.mj-pk-tab .bar i{ display:block; height:100%; background:var(--acc); transform:scaleX(0); transform-origin:0% 50%; }
.mj-pk:not(.is-stopped) .mj-pk-tab[aria-selected="true"] .bar i{ animation:mjpk 6s linear forwards; }
.mj-pk.is-paused .mj-pk-tab[aria-selected="true"] .bar i{ animation-play-state:paused; }   /* must outrank the rule above */
@keyframes mjpk{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
/* pause / play + position */
.mj-pk-ctl{ grid-area:ctl; align-self:end; display:flex; align-items:center; justify-content:space-between; gap:12px; }
#mj .mj-pk-play{ display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 14px 0 16px; border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--base); font-size:14px; font-weight:600; transition:background .2s, border-color .2s; }
#mj .mj-pk-play:hover{ background:var(--soft); border-color:rgba(14,91,82,.3); }
#mj .mj-pk-play:focus-visible{ outline:2px solid var(--base); outline-offset:2px; }
#mj .mj-pk-play svg.i{ width:16px; height:16px; }
.mj-pk-count{ font-size:14px; font-weight:500; color:var(--medium); font-variant-numeric:tabular-nums; }
.mj-pk-count b{ color:var(--base); font-weight:700; }
/* the card: the whole card is one link to the domain page; panels are stacked and cross-fade */
.mj-pk-stage{ grid-area:stage; display:grid; min-height:452px; min-width:0; }   /* = list panel + controls, so both columns end together */
.mj-pk-panel{ grid-area:1 / 1; display:grid; opacity:0; visibility:hidden; transition:opacity .7s var(--ease), visibility 0s linear .7s; }
.mj-pk-panel.is-on{ opacity:1; visibility:visible; z-index:1; transition-delay:0s; }
.mj-pk-card{ position:relative; display:flex; align-items:flex-end; border-radius:var(--r-lg); overflow:hidden; isolation:isolate; background:var(--base); color:#fff; box-shadow:var(--sh); }
#mj .mj-pk-card img{ position:absolute; inset:0; z-index:-2; width:100%; height:100%; max-width:none; object-fit:cover; transition:transform 1.2s var(--ease); }
.mj-pk-card .ov{ position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg, rgba(11,74,67,.94) 0%, rgba(11,74,67,.8) 30%, rgba(11,74,67,.3) 58%, rgba(11,74,67,0) 78%); }
.mj-pk-card .in{ display:grid; gap:10px; justify-items:start; max-width:660px; padding:40px 44px; }
#mj .mj-pk-card h3{ font-size:clamp(1.6rem, 2.4vw, 2.25rem); line-height:1.35; font-weight:700; color:#fff; }
.mj-pk-card .ex{ font-size:16px; line-height:1.9; color:rgba(255,255,255,.9); display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; text-wrap:pretty; }
.mj-pk-card .go{ display:inline-flex; align-items:center; gap:10px; height:46px; margin-top:8px; padding:0 22px; border-radius:999px; background:#fff; color:var(--base); font-size:15px; font-weight:600; transition:background .25s, color .25s; }
.mj-pk-card .go .ar svg{ width:18px; height:18px; display:block; transition:transform .35s var(--ease); }
@media (hover:hover){
  .mj-pk-card:hover img{ transform:scale(1.04); }
  .mj-pk-card:hover .go{ background:var(--acc); color:#fff; }
  .mj-pk-card:hover .go .ar svg{ transform:translateX(4px); }
}
.mj-pk-card:focus-visible{ outline:3px solid var(--orange); outline-offset:4px; }
.mj-pk + .mj-fn{ margin-top:32px!important; }

/* ---------- Domain pages (area-*.html): breadcrumb + back link, the explorer below (section 4) ---------- */
.mj-dp{ padding-top:calc(var(--hdr) + 20px); }
.mj-crumbs-d{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:24px; font-size:14px; color:var(--medium); }
.mj-crumbs-d a{ color:var(--medium); transition:color .2s; }
.mj-crumbs-d a:hover{ color:var(--base); }
.mj-crumbs-d [aria-current]{ color:var(--base); font-weight:600; }
/* 16 Nov (designer, whole site): back arrow above every breadcrumb; opens the breadcrumb's previous step. Same size on
   every screen (a 44px touch target). Outline circle like the other round controls; fills on hover. */
.mj-up{ display:inline-grid; place-items:center; width:44px; height:44px; margin-bottom:12px; border-radius:50%; border:1.5px solid var(--line);
  background:#fff; color:var(--base); transition:background .2s, border-color .2s, color .2s; }
.mj-up:hover{ background:var(--base); border-color:var(--base); color:#fff; }
.mj-up:focus-visible{ outline:2px solid var(--base); outline-offset:3px; }
#mj .mj-up svg.i{ width:20px; height:20px; stroke-width:2; }
/* the domain and partner pages keep the arrow and the breadcrumb in a row container (.mj-dp-top): stack them there */
.mj-dp-top:has(> .mj-up){ flex-direction:column; align-items:flex-start; gap:0; }
.mj-dp-top > .mj-up{ margin-bottom:12px; }
.mj-back{ display:inline-flex; align-items:center; gap:8px; margin-bottom:14px; font-size:15px; font-weight:600; color:var(--base); transition:color .2s; }
.mj-back:hover{ color:var(--acc); }
#mj .mj-back svg.i{ width:18px; height:18px; }
.mj-dnum{ display:inline-block; font-size:14px; font-weight:600; color:var(--medium); font-variant-numeric:tabular-nums; }
.mj-dnum b{ color:var(--acc); font-weight:700; }
.mj-pg-all{ font-size:14px; font-weight:600; color:var(--base); padding:8px 14px; border-radius:999px; transition:background .2s; }
.mj-pg-all:hover{ background:rgba(14,91,82,.07); }
.mj-pg.is-off{ opacity:.35; cursor:default; }

/* ---------- 4. Explorer (approved wireframe: side list + open flat list, no photos, no accordions) ---------- */
.mj-explorer{ background:var(--soft); }
.mj-ex{ --c:var(--base); display:grid; grid-template-columns:320px minmax(0,1fr); gap:40px; align-items:start; }
.mj-aside{ position:sticky; top:96px; min-width:0; }
.mj-search{ position:relative; }
.mj-search svg.s{ position:absolute; inset-inline-start:16px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:var(--medium); pointer-events:none; }
#mj .mj-search input{ width:100%; height:52px; margin:0; padding:0 44px 0 48px; border:1px solid var(--line); border-radius:999px; background:#fff; font-family:inherit; font-size:15px; color:var(--dark); transition:border-color .2s, box-shadow .2s; }
#mj .mj-search input::placeholder{ color:#93A09D; }
#mj .mj-search input:focus{ outline:none; border-color:var(--base); box-shadow:0 0 0 4px rgba(14,91,82,.12); }
#mj .mj-search input::-webkit-search-cancel-button{ display:none; }
.mj-search .clr{ position:absolute; inset-inline-end:8px; top:50%; transform:translateY(-50%); width:36px; height:36px; border-radius:50%; display:none; place-items:center; color:var(--medium); }
.mj-search .clr:hover{ background:var(--line-2); color:var(--dark); }
.mj-search.has .clr{ display:grid; }
.mj-search .clr svg{ width:18px; height:18px; }

.mj-tabs{ margin-top:14px; display:flex; flex-direction:column; gap:2px; padding:8px; background:#fff; border:1px solid var(--line-2); border-radius:var(--r-md); box-shadow:var(--sh-sm); }
.mj-tab{ position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:11px 12px!important; border-radius:10px!important; text-align:start; color:var(--dark)!important; transition:background .2s, color .2s, opacity .2s; }
.mj-tab:hover{ background:var(--soft)!important; }
.mj-tab .t{ flex:1; font-size:15px; font-weight:500; line-height:1.5; }
.mj-tab .n{ flex:none; width:22px; font-size:13px; font-weight:600; color:#A3AFAC; font-variant-numeric:tabular-nums; transition:color .2s; }
.mj-tab[aria-current="page"] .n{ color:var(--acc); }
.mj-tab[aria-current="page"]{ background:rgba(14,91,82,.07)!important; color:var(--base)!important; }
.mj-tab[aria-current="page"] .t{ font-weight:700; }
.mj-tab::before{ content:""; position:absolute; inset-inline-start:-8px; top:10px; bottom:10px; width:3px; border-radius:0 3px 3px 0; background:var(--acc); transform:scaleY(0); transition:transform .3s var(--ease); }
.mj-tab[aria-current="page"]::before{ transform:scaleY(1); }
.mj-tab.zero{ opacity:.45; }
.mj-tab:focus-visible{ outline:2px solid var(--base); outline-offset:-2px; }

.mj-main{ min-width:0; scroll-margin-top:96px; }
.mj-detail, .mj-results{ background:#fff; border:1px solid var(--line-2); border-radius:var(--r-lg); box-shadow:var(--sh); padding:36px 40px 32px; }

/* domain photo (same photo as its card above) behind the head of the card, fading to white like the homepage hero,
   so the head has the domain's photo and the long list underneath stays on clean white for reading */
.mj-detail{ position:relative; overflow:hidden; isolation:isolate; }
/* The photo spans the full card width and is faded with a mask (no overlay box), so it melts into the white card:
   fully visible on the left, gone before the text on the right, and gone at the bottom. No edge anywhere. */
.mj-dbg{ position:absolute; inset:0 0 auto 0; height:420px; z-index:-1; pointer-events:none;
  -webkit-mask-image:linear-gradient(to right, transparent 0%, transparent 36%, rgba(0,0,0,.35) 52%, rgba(0,0,0,.85) 72%, #000 90%), linear-gradient(to top, transparent 0%, rgba(0,0,0,.6) 25%, #000 55%);
  -webkit-mask-composite:source-in;
          mask-image:linear-gradient(to right, transparent 0%, transparent 36%, rgba(0,0,0,.35) 52%, rgba(0,0,0,.85) 72%, #000 90%), linear-gradient(to top, transparent 0%, rgba(0,0,0,.6) 25%, #000 55%);
          mask-composite:intersect; }
.mj-dbg img{ width:100%; height:100%; object-fit:cover; display:block; }
.mj-dh{ min-height:190px; }
.mj-detail .mj-dh > *{ max-width:min(520px, 56%); }
.mj-jump{ position:relative; background:rgba(241,245,244,.92)!important; backdrop-filter:blur(6px); }
/* domain head: title, short definition, reference */
.mj-dh{ padding:8px 0 4px; }
.mj-dh h1{ margin-top:0!important; font-size:30px; line-height:1.35; font-weight:700; color:var(--base); }
.mj-def{ margin-top:12px!important; max-width:760px; font-size:16px; line-height:1.95; color:var(--body); text-wrap:pretty; }
.mj-def [hidden]{ display:none; }
.mj-more{ display:inline; font-size:15px; font-weight:600; color:var(--base)!important; padding:0!important; text-decoration:underline; text-decoration-color:rgba(14,91,82,.35); text-underline-offset:5px; }
.mj-more:hover{ text-decoration-color:var(--base); }
.mj-dh .ref{ display:inline-flex; align-items:center; gap:6px; margin-top:10px; font-size:14px; color:var(--medium); transition:color .2s; }
.mj-dh .ref:hover{ color:var(--base); }
.mj-dh .ref svg{ width:14px; height:14px; }

/* contents of the domain: a labelled block of quiet links to each group */
.mj-jump{ margin-top:24px; padding:16px 18px 18px; border-radius:var(--r-md); background:var(--soft); }
.mj-jump .lb{ display:block; font-size:14px; font-weight:700; color:var(--dark); margin-bottom:10px; }
.mj-jump .ch{ display:flex; flex-wrap:wrap; gap:8px; }
.mj-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 14px!important; border:1px solid transparent!important; border-radius:999px!important; background:#fff; font-size:14px; font-weight:500; color:var(--base)!important; white-space:nowrap; box-shadow:0 1px 2px rgba(16,40,36,.06); transition:border-color .2s, background .2s; }
.mj-chip::after{ content:""; width:6px; height:6px; border-right:1.6px solid currentColor; border-bottom:1.6px solid currentColor; transform:translateY(-2px) rotate(-45deg); opacity:.6; }
.mj-chip:hover{ border-color:var(--base)!important; }
.mj-empty .mj-chip::after{ display:none; }

/* groups: a clear heading (orange marker, larger, brand green) over an indented list of services */
.mj-groups{ display:flex; flex-direction:column; gap:12px; }
.mj-group{ padding-top:28px; scroll-margin-top:110px; }
.mj-gh{ position:relative; display:flex; align-items:center; gap:12px; font-size:19px; font-weight:700; color:var(--base); line-height:1.55; margin-bottom:10px!important; }
.mj-gh::before{ content:""; flex:none; width:4px; height:22px; border-radius:4px; background:var(--acc); }
.mj-svcs{ padding-inline-start:16px; }
.mj-svc{ position:relative; display:block; padding:12px 8px 12px 20px; border-bottom:1px solid var(--line-2); border-radius:8px; scroll-margin-top:140px; transition:background .2s; }
.mj-svc:last-child{ border-bottom:0; }
.mj-detail .mj-svc::before{ content:""; position:absolute; inset-inline-start:2px; top:24px; width:6px; height:6px; border-radius:50%; background:#B7C9C5; }
.mj-svc .tx{ min-width:0; display:block; width:100%; text-align:start; padding:0!important; background:none!important; border:0!important; }
.mj-svc .st{ display:block; font-size:16px; line-height:1.7; font-weight:600; color:var(--dark); transition:color .2s; }
.mj-svc p{ margin-top:2px!important; font-size:15px; line-height:1.8; color:var(--medium); }
/* service rows: title + small arrow visible, the description folds open under the title */
.mj-detail .mj-svc .tx{ display:flex; align-items:center; justify-content:space-between; gap:14px; cursor:pointer; }
.mj-detail .mj-svc .tx:hover .st{ color:var(--base); }
.mj-svc .chv{ flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; color:var(--base); background:rgba(14,91,82,.07); transition:transform .35s var(--ease), background .25s, color .25s; }
.mj-svc .chv svg{ width:16px; height:16px; }
.mj-detail .mj-svc .tx:hover .chv{ background:rgba(14,91,82,.14); }
.mj-svc.open > .tx .chv, .mj-svc.open > .mj-gh .chv{ transform:rotate(-180deg); background:var(--base); color:#fff; }
.mj-svc .sd{ display:grid; grid-template-rows:0fr; transition:grid-template-rows .35s var(--ease); }
.mj-svc.open > .sd{ grid-template-rows:1fr; }
.mj-svc .sd > div{ overflow:hidden; visibility:hidden; transition:visibility 0s .35s; }
.mj-svc.open > .sd > div{ visibility:visible; transition-delay:0s; }
.mj-svc .sd p{ display:block; -webkit-line-clamp:unset; padding-top:4px; padding-inline-end:42px; }
/* a one-service group: the group heading itself is the row */
.mj-svc.is-head{ padding:0; border:0; border-radius:0; }
.mj-detail .mj-svc.is-head::before{ display:none; }
.mj-gh .tx{ flex:1; font:inherit; color:inherit; }
.mj-svc.is-head .sd p{ padding-inline-start:16px; }
.mj-svc .tx:focus-visible{ outline:2px solid var(--base); outline-offset:4px; border-radius:6px; }
.mj-svc.is-hit:hover{ background:var(--soft); }
.mj-svc.flash{ animation:mjflash 1.8s ease; }
@keyframes mjflash{ 0%,35%{ background:rgba(242,140,40,.16); } 100%{ background:transparent; } }
#mj mark{ background:rgba(242,140,40,.25); color:inherit; border-radius:3px; padding:0 1px; }

/* previous / next domain */
/* previous / next domain: two arrows only (the names are already in the side list) */
.mj-pager{ display:flex; justify-content:space-between; margin-top:28px; padding-top:20px; border-top:1px solid var(--line-2); }
.mj-pg{ width:46px; height:46px; border-radius:50%!important; display:grid; place-items:center; border:1px solid var(--line)!important; background:#fff; color:var(--base)!important; transition:background .25s, color .25s, border-color .25s; }
.mj-pg svg{ width:20px; height:20px; }
.mj-pg:hover:not(.is-off){ background:var(--base); border-color:var(--base)!important; color:#fff!important; }
.mj-pg:disabled{ opacity:.35; cursor:default; }
.mj-pg:focus-visible{ outline:2px solid var(--base); outline-offset:3px; }
.mj-detail.out{ opacity:0; transform:translateY(10px); transition:opacity .18s, transform .18s; }
.mj-detail.in{ animation:mjin .5s var(--ease); }
@keyframes mjin{ from{ opacity:0; transform:translateY(12px);} to{ opacity:1; transform:none; } }

/* search results: grouped by domain */
.mj-link{ display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600; color:var(--base)!important; padding:8px 14px!important; border-radius:999px!important; transition:background .2s; white-space:nowrap; }
.mj-link:hover{ background:rgba(14,91,82,.07)!important; }
.mj-link svg{ width:16px; height:16px; }
.mj-rh{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line-2); }
.mj-rh h2{ font-size:22px; font-weight:700; color:var(--base); line-height:1.5; }
.mj-rh h2 span{ color:var(--acc); }
.mj-rh p{ margin-top:2px!important; font-size:15px; color:var(--medium); }
.mj-rg{ padding-top:28px; }
.mj-rg h3{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; margin-bottom:6px!important; }
.mj-rg h3 .t{ font-size:17px; font-weight:700; color:var(--dark); }
.mj-rg h3 .c{ font-size:13px; font-weight:500; color:var(--medium); }
.mj-rg h3 .mj-link{ margin-inline-start:auto; padding:4px 10px!important; font-size:13px; }
.mj-svc.is-hit .tx{ cursor:pointer; }
.mj-svc .pth{ display:block; font-size:13px; color:var(--base); font-weight:500; line-height:1.6; }
.mj-svc.is-hit p{ display:block; -webkit-line-clamp:unset; }
.mj-empty{ text-align:center; padding:40px 16px 24px; }
.mj-empty .e{ width:64px; height:64px; margin:0 auto; border-radius:50%; display:grid; place-items:center; background:var(--soft); color:var(--base); }
.mj-empty .e svg{ width:28px; height:28px; }
.mj-empty h2{ margin-top:16px!important; font-size:18px; font-weight:600; color:var(--dark); }
.mj-empty p{ margin-top:6px!important; color:var(--medium); font-size:15px; }
.mj-empty .sg{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:16px; }

@media (max-width:1199px){
  .mj-ex{ grid-template-columns:280px minmax(0,1fr); gap:28px; }
  .mj-tab{ gap:10px; padding:10px!important; }
  .mj-tab .t{ font-size:14px; }
  .mj-detail, .mj-results{ padding:30px 28px 28px; }
  .mj-dh h1{ font-size:27px; }
}
@media (max-width:980px){
  .mj-ex{ grid-template-columns:minmax(0,1fr); gap:20px; }
  /* search + domains become one sticky bar under the site header */
  .mj-aside{ position:sticky; top:64px; z-index:15; margin-inline:calc(var(--gr) * -1); padding:12px var(--gr) 10px; background:rgba(241,245,244,.97); backdrop-filter:blur(6px); border-bottom:1px solid var(--line-2); }
  #mj .mj-search input{ height:46px; }
  .mj-tabs{ margin-top:10px; flex-direction:row; overflow-x:auto; gap:8px; padding:0 0 2px; border:0; border-radius:0; box-shadow:none; background:none; scrollbar-width:none; }
  .mj-tabs::-webkit-scrollbar{ display:none; }
  .mj-tab{ flex:none; width:auto; gap:8px; padding:7px 16px!important; border:1px solid var(--line)!important; border-radius:999px!important; background:#fff; }
  .mj-tab::before{ display:none; }
  .mj-tab .t{ font-size:14px; white-space:nowrap; }
  .mj-tab[aria-current="page"]{ border-color:var(--base)!important; background:#fff!important; }
  .mj-main{ scroll-margin-top:190px; }
  .mj-group{ scroll-margin-top:200px; }
  .mj-svc{ scroll-margin-top:220px; }
}
@media (max-width:767px){
  .mj-detail, .mj-results{ padding:22px 18px 20px; border-radius:var(--r-md); }
  .mj-dh h1{ font-size:24px; }
  .mj-def{ font-size:15px; }
  /* phone: the photo becomes a strip at the top of the card and the text starts under it */
  .mj-detail{ padding-top:176px; }
  .mj-dbg{ height:190px; -webkit-mask-image:linear-gradient(to top, transparent 0%, rgba(0,0,0,.5) 22%, #000 55%); mask-image:linear-gradient(to top, transparent 0%, rgba(0,0,0,.5) 22%, #000 55%); }
  .mj-dh{ min-height:0; }
  .mj-detail .mj-dh > *{ max-width:none; }
  .mj-jump{ margin-inline:-6px; padding:14px 14px 12px; }
  .mj-jump .ch{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-inline:-14px; padding:2px 14px 4px; }
  .mj-jump .ch::-webkit-scrollbar{ display:none; }
  .mj-chip{ font-size:13px; }
  .mj-group{ padding-top:22px; }
  .mj-gh{ font-size:17px; gap:10px; }
  .mj-gh::before{ height:20px; }
  .mj-svcs, .mj-group.is-single .mj-svcs{ padding-inline-start:14px; }
  .mj-svc{ padding:12px 4px 12px 18px; }
  .mj-svc .st{ font-size:15.5px; }
  .mj-svc p{ font-size:14px; }
  .mj-rh{ flex-direction:column; gap:6px; }
  .mj-rh .mj-link{ padding-inline:0!important; }
  .mj-rh h2{ font-size:19px; }
}

/* ---------- 5. Relief note: a small footnote under the domains (designer review: not a section of its own) ---------- */
.mj-fn{ display:flex; align-items:flex-start; gap:10px; margin-top:28px!important; font-size:14px; line-height:1.9; color:var(--medium); text-wrap:pretty; }
.mj-fn svg.i{ width:18px; height:18px; margin-top:4px; color:var(--acc); }
.mj-fn b{ display:block; font-weight:700; color:var(--acc); }

/* ---------- 6. Join us (option B, designer review): a volunteers row and an organisations row, photo opposite ---------- */
.mj-join{ padding:90px 0 100px; }
.mj-join-head{ text-align:start; max-width:720px; margin:0 0 44px; display:flex; flex-direction:column; align-items:flex-start; }   /* right-aligned like every other section head */
.mj-join-head p{ margin-top:14px; font-size:18px; }
.mj-jrows{ display:flex; flex-direction:column; gap:28px; }
.mj-jrow{ display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:56px; align-items:center; padding:44px; background:#fff; border:1px solid var(--line-2); border-radius:var(--r-lg); box-shadow:var(--sh); }
.mj-jrow.flip .tx{ order:2; }
.mj-jrow .tx{ min-width:0; }
.mj-jrow .kick{ display:block; font-size:14px; font-weight:700; color:var(--acc); }
.mj-jrow h3{ margin-top:8px!important; font-size:30px; line-height:1.4; font-weight:700; color:var(--base); text-wrap:balance; }
.mj-jrow .tx > p{ margin-top:10px!important; max-width:560px; font-size:17px; line-height:1.9; color:var(--body); text-wrap:pretty; }
.mj-jrow .ph{ margin:0; position:relative; align-self:stretch; min-height:440px; border-radius:var(--r-md); overflow:hidden; background:var(--soft); }
.mj-jrow .ph img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }

/* volunteers: one quiet line of proof with a thin progress line */
.mj-vstat{ margin-top:22px; max-width:420px; }
.mj-vstat p{ font-size:15px; font-weight:500; color:var(--medium); }
.mj-vstat b{ font-size:22px; font-weight:800; color:var(--base); margin-inline-end:4px; font-variant-numeric:tabular-nums; }
.mj-vstat .bar{ height:4px; margin-top:8px; border-radius:4px; background:var(--line-2); overflow:hidden; }
.mj-vstat .bar i{ display:block; width:46.8%; height:100%; border-radius:4px; background:var(--acc); }   /* 23,400 / 50,000 */
.mj-vstat small{ display:block; margin-top:4px; font-size:12.5px; color:#93A09D; }

/* interests: one line of the 8 domains moving slowly (pauses on hover); still and scrollable with reduced motion */
.mj-interest{ margin-top:22px; }
.mj-interest .lb{ font-size:14px; font-weight:700; color:var(--dark); }
.mj-interest .mq{ margin-top:10px; overflow:hidden; -webkit-mask-image:linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image:linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.mq-track{ display:flex; width:max-content; animation:mjmq 38s linear infinite; }
.mq .set{ display:flex; gap:8px; padding-inline-end:8px; }
.mq span{ white-space:nowrap; padding:6px 14px; border-radius:999px; background:var(--soft); font-size:13.5px; font-weight:600; color:var(--base); }
.mq:hover .mq-track{ animation-play-state:paused; }
@keyframes mjmq{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

/* what happens next: one light line */
.mj-steps{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-top:20px!important; padding:0; list-style:none; font-size:14px; color:var(--medium); }
.mj-steps li{ display:inline-flex; align-items:center; gap:12px; }
.mj-steps li + li::before{ content:""; width:6px; height:6px; border-left:1.6px solid #A9BCB7; border-bottom:1.6px solid #A9BCB7; transform:rotate(-45deg); }
.mj-steps b{ font-weight:700; color:var(--dark); margin-inline-end:3px; }

.mj-jcta{ display:flex; flex-wrap:wrap; align-items:center; gap:14px 24px; margin-top:26px; }
.mj-tlink{ font-size:15px; font-weight:700; color:var(--base)!important; text-decoration:underline; text-decoration-color:rgba(14,91,82,.3); text-underline-offset:5px; padding:0!important; background:none!important; }
.mj-tlink:hover{ text-decoration-color:var(--base); }

/* organisations */
.mj-checks{ display:flex; flex-wrap:wrap; gap:8px 22px; margin-top:18px!important; padding:0; list-style:none; }
.mj-checks li{ display:flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:var(--dark); }
.mj-checks svg{ width:18px; height:18px; color:var(--acc); }
.mj-members{ margin-top:24px; }
.mj-members .hd{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.mj-members .hd span{ font-size:14px; font-weight:700; color:var(--dark); }
.mj-members .hd .mj-tlink{ font-size:14px; }
/* member logos: one moving line, like the interests line (pauses on hover, still with reduced motion) */
.mj-members .mq{ margin-top:12px; overflow:hidden; -webkit-mask-image:linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image:linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.mq-logos .mq-track{ animation-duration:150s; }
.mq-logos .set{ gap:10px; padding-inline-end:10px; }
.mj-members figure{ flex:none; margin:0; width:104px; height:62px; padding:8px; border-radius:12px; background:#fff; border:1px solid var(--line-2); display:grid; place-items:center; }
.mj-members img{ max-width:100%; max-height:42px; object-fit:contain; }

/* ---------- Reveal ---------- */
.mj-rv{ opacity:0; transform:translateY(28px); transition:opacity .8s var(--ease), transform .9s var(--ease); transition-delay:calc(var(--i,0) * 70ms); }
.mj-rv.on{ opacity:1; transform:none; }

/* ===================== Responsive (ديسكتوب أولاً) ===================== */
@media (max-width:1399px){
}
@media (max-width:1199px){
}
@media (max-width:980px){
  .mj-title{ height:340px; }
  .mj-title .in{ padding:0 28px 36px; }
  /* homepage ≤980 hides every other KPI divider (its 2-column frame); here the row stays 4-across, so keep them all,
     and the homepage's 28px under-KPI space (.hero-stats-wrap ≤980) becomes the hero's bottom padding */
  .mj-hero-stats .stat + .stat::after{ display:block; }
  .mj-hero .hero-grid{ padding-bottom:28px; }
  .mj-sec{ padding:64px 0; }
  .mj-head{ margin-bottom:24px; }
}
@media (max-width:767px){
  .mj-title{ height:300px; border-radius:var(--r-md); }
  .mj-title .in{ padding:0 20px 28px; }
  .mj-title p{ font-size:16px; }
  .mj-head p{ font-size:16px; }
  .mj-head{ align-items:flex-start; flex-direction:column; gap:16px; }
  /* phone: centre card + one peeking neighbour each side; arrows sit over the peeks */
  .mj-join{ padding:64px 0 72px; }
}
@media (prefers-reduced-motion:reduce){
  #mj *,#mj *::before,#mj *::after{ animation-duration:.01ms!important; transition-duration:.01ms!important; transition-delay:0s!important; }
  .mj-rv{ opacity:1; transform:none; }
}
/* ?nomotion=1 (QA screenshots, BRIEF.md §8) */
.mj-nomotion #mj *,.mj-nomotion #mj *::before,.mj-nomotion #mj *::after{ animation:none!important; transition:none!important; }
.mj-nomotion .mj-rv{ opacity:1; transform:none; }

/* Join us: responsive */
@media (max-width:1199px){
  .mj-jrow{ gap:36px; padding:34px; }
  .mj-jrow h3{ font-size:27px; }
}
@media (max-width:980px){
  .mj-jrow{ grid-template-columns:minmax(0,1fr); gap:28px; }
  .mj-jrow .ph{ order:-1; min-height:320px; }
  .mj-jrow.flip .tx{ order:0; }
}
@media (max-width:767px){
  .mj-jrows{ gap:20px; }
  .mj-jrow{ padding:0 18px 24px; gap:20px; border-radius:var(--r-md); overflow:hidden; }
  .mj-jrow .ph{ min-height:220px; margin-inline:-18px; border-radius:0; }
  .mj-jrow h3{ font-size:23px; }
  .mj-jrow .tx > p{ font-size:16px; }
  .mj-jcta .mj-btn{ width:100%; }
}
/* the interests line stays still and can be scrolled when motion is reduced */
@media (prefers-reduced-motion:reduce){
  .mq-track{ animation:none!important; }
  #mj .mq{ overflow-x:auto; scrollbar-width:none; -webkit-mask-image:none; mask-image:none; }
  .mq .set[aria-hidden]{ display:none; }
}
.mj-nomotion #mj .mq{ overflow-x:auto; scrollbar-width:none; }
.mj-nomotion .mq .set[aria-hidden]{ display:none; }

/* Hero stats on phones (homepage 560px breakpoint): 2 x 2, divider only between the two items of a row,
   as the homepage KPI row does at small widths */
@media (max-width:560px){
  .mj-hero-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:14px; }
  .mj-hero-stats .stat + .stat::after{ display:none; }
  .mj-hero-stats .stat:nth-child(even)::after{ display:block; }
}

/* Domains list + card, domain pages: responsive */
@media (max-width:1199px){
  .mj-pk{ grid-template-columns:minmax(270px, 320px) minmax(0,1fr); gap:12px 22px; }
  #mj .mj-pk-tab{ gap:10px; padding:10px; }
  .mj-pk-tab .t{ font-size:14px; }
  .mj-pk-card .in{ padding:32px 34px; }
}
@media (max-width:980px){
  /* the list becomes one horizontal row of chips above the card (scrolls sideways); controls under the card */
  .mj-pk{ grid-template-columns:minmax(0,1fr); grid-template-areas:"list" "stage" "ctl"; grid-template-rows:auto auto auto; gap:14px; }
  /* same chips as the domain pages' list on small screens: number + name in an outlined pill */
  .mj-pk-list{ flex-direction:row; overflow-x:auto; gap:8px; margin-inline:calc(var(--gr) * -1); padding:2px var(--gr) 6px; background:none; border:0; border-radius:0; box-shadow:none; scrollbar-width:none; scroll-padding-inline:var(--gr); }
  .mj-pk-list::-webkit-scrollbar{ display:none; }
  #mj .mj-pk-tab{ flex:none; width:auto; gap:8px; padding:7px 16px; border:1px solid var(--line); border-radius:999px; background:#fff; }
  #mj .mj-pk-tab[aria-selected="true"]{ border-color:var(--base); background:#fff; }
  .mj-pk-tab .n{ width:auto; }
  .mj-pk-tab .t{ font-size:14px; white-space:nowrap; }
  .mj-pk-tab::before{ display:none; }
  .mj-pk-tab .bar{ inset-inline:16px; bottom:3px; }
  .mj-pk-stage{ min-height:480px; }
  .mj-pk-ctl{ align-self:auto; }
  .mj-back{ display:none; }                                      /* the breadcrumb leads back on small screens */
  .mj-crumbs-d{ margin-bottom:16px; }
}
@media (max-width:767px){
  .mj-pk-stage{ min-height:440px; }
  .mj-pk-card{ border-radius:var(--r-md); }
  .mj-pk-card .in{ padding:24px 20px; gap:8px; }
  .mj-pk-card .ex{ font-size:15px; }
  .mj-pk-card .go{ height:44px; padding:0 18px; font-size:14.5px; }
  .mj-pk-ctl{ flex-wrap:wrap; }
  .mj-dp{ padding-top:calc(var(--hdr) + 12px); }
}

/* Domains section head (12 Nov): homepage rhythm. Section top 64px after the hero (homepage .news), eyebrow → title 14px,
   title at the homepage h2 scale (.about h2: clamp(1.9rem,3.1vw,2.75rem), 44px at 1440), title → text 20px (.about-copy gap),
   text 17px / 2 (.about p). */
.mj-pick{ padding-top:64px; }
.mj-pick .mj-head{ margin-bottom:40px; }
.mj-pick .mj-h2{ font-size:clamp(1.9rem, 3.1vw, 2.75rem); line-height:1.35; }
#mj .mj-pick .mj-head p{ margin-top:20px; max-width:620px; line-height:2; }
@media (max-width:980px){ .mj-pick{ padding-top:56px; } .mj-pick .mj-head{ margin-bottom:28px; } #mj .mj-pick .mj-head p{ margin-top:14px; } }
@media (max-width:767px){ .mj-pick{ padding-top:48px; } }

/* Domain pages (12 Nov, designer review): services always open, no accordion arrows. Title + description per row. */
.mj-detail .mj-svc{ padding:14px 8px 14px 20px; }
.mj-detail .mj-svc .sdesc{ margin-top:4px!important; font-size:15px; line-height:1.85; color:var(--medium); text-wrap:pretty; }
.mj-detail .mj-svc.is-head{ padding:0; }
.mj-detail .mj-svc.is-head .sdesc{ margin-top:0!important; padding-inline-start:16px; }
@media (max-width:767px){ .mj-detail .mj-svc{ padding:12px 4px 12px 14px; } .mj-detail .mj-svc .sdesc{ font-size:14px; } }

/* Section rhythm (12 Nov), measured on the homepage at 1440: between two white sections the content is 184px apart
   (.news bottom 88 + .video top 48 + its 48 inner offset), the last section ends 96px above the footer (.video bottom),
   and the first section starts 64px under the hero (.news top). ≤980 the homepage uses .news 48/64 and .video 40/72,
   i.e. 144px between sections and 72px before the footer. */
.mj-pick{ padding:64px 0 88px; }
.mj-join{ padding:96px 0 96px; }                       /* 88 + 96 = 184 between the domains and «انضم إلينا» */
.mj-dp{ padding-bottom:96px; }                         /* domain pages: same space above the footer */
@media (max-width:980px){
  .mj-pick{ padding:48px 0 64px; }
  .mj-join{ padding:80px 0 72px; }                     /* 64 + 80 = 144 */
  .mj-dp{ padding-bottom:72px; }
}

/* Equal section gaps (13 Nov, designer review): one value between every two sections, measured content to content.
   96px on desktop (the homepage section token: .about / .video bottom), 64px at ≤980 (homepage .news bottom on tablet/phone).
   hero → domains = .mj-pick top; domains → «انضم إلينا» = .mj-pick bottom + .mj-join top; «انضم إلينا» → footer = .mj-join bottom. */
.mj-pick{ padding:96px 0 48px; }
.mj-join{ padding:48px 0 96px; }
.mj-dp{ padding-bottom:96px; }
@media (max-width:980px){
  .mj-pick{ padding:64px 0 32px; }
  .mj-join{ padding:32px 0 64px; }
  .mj-dp{ padding-bottom:64px; }
}
/* «انضم إلينا» head: same title → text space as the domains head (homepage .about-copy gap 20) */
#mj .mj-join-head .mj-h2{ font-size:clamp(1.9rem, 3.1vw, 2.75rem); line-height:1.35; }
#mj .mj-join-head p{ margin-top:20px; line-height:2; }
@media (max-width:980px){ #mj .mj-join-head p{ margin-top:14px; } }

/* ===================== Shared layout: areas.html list + card ⇄ domain pages (13 Nov) =====================
   One set of tokens for both pages so nothing jumps when a visitor opens a domain: same side-list width, same column gap,
   same card height, same photo card (overlay, radius, padding, type). The list rows were already identical (.mj-tab and
   .mj-pk-tab: panel padding 8, row 11×12, 15px/500, number 13px/600 on the right, active tint + orange edge). */
#mj{ --mj-side:340px; --mj-gap:40px; --mj-card-h:452px; }
@media (max-width:1199px){ #mj{ --mj-side:300px; --mj-gap:28px; } }
@media (max-width:980px){ #mj{ --mj-card-h:480px; } }
@media (max-width:767px){ #mj{ --mj-card-h:440px; } }

.mj-pk{ grid-template-columns:var(--mj-side) minmax(0,1fr); column-gap:var(--mj-gap); }
.mj-ex{ grid-template-columns:var(--mj-side) minmax(0,1fr); column-gap:var(--mj-gap); }
.mj-pk-stage{ min-height:var(--mj-card-h); }
@media (max-width:980px){ .mj-pk, .mj-ex{ grid-template-columns:minmax(0,1fr); } }

/* domain page: breadcrumb + back link share one row above the columns; the list comes first in the side column
   (top-aligned with the card, as on areas.html) and the search sits under it */
.mj-dp-top{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.mj-dp-top .mj-crumbs-d, .mj-dp-top .mj-back{ margin:0; }
.mj-aside{ display:flex; flex-direction:column; }
.mj-aside .mj-tabs{ margin-top:0; }
.mj-aside .mj-search{ margin-top:14px; }

/* domain page top: keep clear of the fixed header at every width (the generic ≤980 .mj-sec padding was overriding it) */
.mj-sec.mj-dp{ padding-top:calc(var(--hdr) + 20px); }
@media (max-width:767px){ .mj-sec.mj-dp{ padding-top:calc(var(--hdr) + 12px); } }

@media (max-width:980px){
  .mj-dp-top{ margin-bottom:16px; }
  .mj-aside .mj-search{ order:-1; margin-top:0; margin-bottom:10px; }   /* phones: search above the domain chips, as before */
}

/* Domain page card (13 Nov, designer review): the original look (white card, the domain photo fading in behind the head,
   number, title, definition, reference), sized to the shared tokens: same width as the areas.html card (grid column) and
   the photo area as tall as that card (--mj-card-h), so the eye finds the same frame on both pages. */
.mj-dbg{ height:var(--mj-card-h); }
@media (max-width:767px){ .mj-dbg{ height:190px; } }       /* phones keep the photo strip at the top of the card */

/* Soft move from the areas page to a domain page (and back): a cross-document view transition. The side list and the
   card keep their names on both pages, so they glide into place instead of the page cutting over; everything else
   cross-fades. Browsers without view transitions get a gentle fade-in of the domain page. Reduced motion: none. */
@view-transition{ navigation:auto; }
.site-header{ view-transition-name:mj-header; }
.mj-pk-list, .mj-aside .mj-tabs{ view-transition-name:mj-list; }
.mj-pk-panel.is-on .mj-pk-card, .mj-detail .mj-dbg{ view-transition-name:mj-card; }   /* the photo glides from the card to the head of the domain page */
::view-transition-group(*){ animation-duration:.6s; animation-timing-function:cubic-bezier(.22,1,.36,1); }
::view-transition-old(root){ animation:mjvtOut .35s ease both; }
::view-transition-new(root){ animation:mjvtIn .6s cubic-bezier(.22,1,.36,1) .1s both; }
::view-transition-old(mj-card), ::view-transition-new(mj-card){ animation-duration:.6s; animation-timing-function:ease; height:100%; object-fit:cover; overflow:clip; }
@keyframes mjvtOut{ to{ opacity:0; } }
@keyframes mjvtIn{ from{ opacity:0; transform:translateY(12px); } }
@supports not (view-transition-name:none){
  .mj-dp .mj-dmain, .mj-dp .mj-dp-top{ animation:mjvtIn .6s cubic-bezier(.22,1,.36,1) both; }
}
@media (prefers-reduced-motion:reduce){
  @view-transition{ navigation:none; }
  .mj-dp .mj-dmain, .mj-dp .mj-dp-top{ animation:none; }
}

/* ===================== Domain pages: intro + service-group folder cards + services popup (13 Nov redesign) =====================
   No side list any more: the content uses the full container. Order: plain intro (name, definition, reference) →
   «مجموعات الخدمات» as a grid of folder cards → previous / next domain. A card opens one popup (native <dialog>) holding
   every service of the group, numbered, one under the other; the popup scrolls inside, the page behind stays still. */

/* intro */
.mj-dintro{ max-width:860px; }
#mj .mj-dintro h1{ font-size:clamp(2rem, 3.4vw, 2.85rem); line-height:1.3; font-weight:700; color:var(--base); }
.mj-dintro .mj-def{ margin-top:16px!important; font-size:18px; line-height:1.95; color:var(--body); text-wrap:pretty; }
.mj-dintro .ref{ display:inline-flex; align-items:center; gap:6px; margin-top:14px; font-size:14px; color:var(--medium); transition:color .2s; }
.mj-dintro .ref:hover{ color:var(--base); }
#mj .mj-dintro .ref svg{ width:14px; height:14px; }

/* group cards */
.mj-fsec{ margin-top:56px; }
.mj-fhead{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
#mj .mj-fhead h2{ font-size:24px; line-height:1.4; font-weight:700; color:var(--base); }
.mj-fhead .cnt{ font-size:14px; font-weight:500; color:var(--medium); }
#mj .mj-fgrid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:28px; }
/* the card: white frame, the group photo, a «folder» panel at the bottom with a tab carrying the number (RTL: tab on the right) */
.mj-fc{ --fc:rgba(8,54,48,.76); --fr:19px; position:relative; aspect-ratio:4 / 5; padding:8px; border-radius:26px; background:#fff;
  box-shadow:var(--sh); cursor:pointer; isolation:isolate; transition:transform .35s var(--ease), box-shadow .35s; }
#mj .mj-fc img{ position:absolute; top:8px; right:8px; width:calc(100% - 16px); height:calc(100% - 16px); max-width:none; object-fit:cover; border-radius:var(--fr); z-index:-1; background:var(--soft); }
.mj-fc .fold{ position:absolute; right:8px; left:8px; bottom:8px; color:#fff; }
.mj-fc .tab, .mj-fc .body, .mj-fc .tab::after{ background:var(--fc); -webkit-backdrop-filter:blur(14px) saturate(1.15); backdrop-filter:blur(14px) saturate(1.15); }
.mj-fc .tab{ position:absolute; bottom:100%; left:0; height:44px; min-width:84px; padding:0 22px; display:flex; align-items:center; justify-content:center; border-radius:var(--fr) var(--fr) 0 0; }
.mj-fc .tab::after{ content:""; position:absolute; bottom:0; left:100%; width:var(--fr); height:var(--fr);
  -webkit-mask:radial-gradient(circle at 0 0, transparent calc(var(--fr) - .5px), #000 var(--fr)); mask:radial-gradient(circle at 0 0, transparent calc(var(--fr) - .5px), #000 var(--fr)); }
.mj-fc .tab .n{ font-size:20px; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.mj-fc .body{ display:grid; gap:6px; padding:14px 20px 16px; border-radius:0 var(--fr) var(--fr) var(--fr); }
#mj .mj-fc h3{ font-size:18px; line-height:1.5; font-weight:700; }
#mj .mj-fc-btn{ display:block; width:100%; text-align:start; font:inherit; color:#fff; }
#mj .mj-fc-btn:focus-visible{ outline:none; }
.mj-fc:has(.mj-fc-btn:focus-visible){ outline:3px solid var(--acc); outline-offset:3px; }
.mj-fc .ln{ font-size:14px; line-height:1.8; color:rgba(255,255,255,.84); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mj-fc .ft{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:4px; }
.mj-fc .ft .c{ font-size:13px; font-weight:600; color:rgba(255,255,255,.92); }
.mj-fc .ft .ar{ flex:none; width:38px; height:38px; border-radius:50%; display:grid; place-items:center; background:#fff; color:var(--base); transition:background .25s, color .25s; }
#mj .mj-fc .ft .ar svg{ width:18px; height:18px; }
@media (hover:hover){
  .mj-fc:hover{ transform:translateY(-4px); box-shadow:var(--sh-lg); }
  .mj-fc:hover .ft .ar{ background:var(--acc); color:#fff; }
}
.mj-dmain .mj-pager{ margin-top:48px; }

/* Designer review (13 Nov, later): 4 calmer cards per row on desktop. The grid is re-tuned as a whole, not just scaled:
   card 3:4, thinner frame, smaller tab / type / padding, and the folder panel has a fixed text block (title 2 lines +
   line 2 lines) so every card in a row has the same panel height and the tabs line up, whatever the text length.
   Columns: 4 (≥1200) → 3 (≥861) → 2 (≥561) → 1. */
#mj .mj-fgrid{ grid-template-columns:repeat(4, minmax(0,1fr)); gap:24px; }
.mj-fc{ --fr:16px; aspect-ratio:3 / 4; padding:6px; border-radius:22px; }
#mj .mj-fc img{ top:6px; right:6px; width:calc(100% - 12px); height:calc(100% - 12px); }
.mj-fc .fold{ right:6px; left:6px; bottom:6px; }
.mj-fc .tab{ height:38px; min-width:66px; padding:0 18px; }
.mj-fc .tab .n{ font-size:17px; }
/* fixed panel height = padding + title 2 lines + line 2 lines + footer; a shorter text leaves the space above the footer */
.mj-fc .body{ --th:16px; --lh:13px; display:flex; flex-direction:column; gap:4px; padding:12px 16px 14px;
  min-height:calc(26px + 2 * 1.55 * var(--th) + 2 * 1.75 * var(--lh) + 34px + 12px); }
#mj .mj-fc h3{ font-size:var(--th); line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.mj-fc .ln{ font-size:var(--lh); line-height:1.75; }
.mj-fc .ft{ margin-top:auto; padding-top:4px; }
.mj-fc .ft .c{ font-size:12.5px; }
.mj-fc .ft .ar{ width:34px; height:34px; }
#mj .mj-fc .ft .ar svg{ width:16px; height:16px; }
@media (max-width:1199px){ #mj .mj-fgrid{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:22px; } }
@media (max-width:980px){ .mj-fsec{ margin-top:44px; } }
@media (max-width:860px){ #mj .mj-fgrid{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:20px; } }
@media (max-width:560px){
  #mj .mj-fgrid{ grid-template-columns:minmax(0,1fr); gap:18px; }
  .mj-fc{ aspect-ratio:4 / 5; }
  .mj-fc .body{ --th:17px; --lh:14px; }
}
@media (max-width:600px){
  .mj-dintro .mj-def{ font-size:16px; }
  .mj-fsec{ margin-top:36px; }
}

/* popup */
html.mj-lock{ overflow:hidden; }
/* 17 Nov (designer: "the popup feels too big"): a reading-size popup instead of an almost full-screen one —
   940px wide at most (was 1120), a smaller photo column (260px, was 360), a smaller title, number and card padding, and
   no 88px empty strip for the close button (only the title lines keep room for it). Text sizes stay readable (15.5–17px). */
.mj-dlg{ width:min(940px, calc(100vw - 48px)); max-width:none; max-height:min(740px, calc(100dvh - 64px)); margin:auto; padding:0; border:0;
  border-radius:24px; background:#F2F6F5; color:var(--body); box-shadow:0 30px 90px rgba(6,40,36,.35); overflow:hidden; }
.mj-dlg[open]{ display:flex; flex-direction:column; animation:mjdlg .35s var(--ease); }
.mj-dlg::backdrop{ background:rgba(8,38,34,.5); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); }
.mj-dlg[open]::backdrop{ animation:mjfade .35s ease; }
@keyframes mjdlg{ from{ opacity:0; transform:translateY(14px) scale(.985); } }
@keyframes mjfade{ from{ opacity:0; } }
#mj .mj-dlg-x{ position:absolute; top:16px; right:16px; z-index:3; width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  background:#fff; color:var(--dark); box-shadow:0 6px 18px rgba(6,40,36,.14); transition:background .2s, color .2s; }
#mj .mj-dlg-x:hover{ background:var(--base); color:#fff; }
#mj .mj-dlg-x:focus-visible{ outline:3px solid var(--acc); outline-offset:2px; }
#mj .mj-dlg-x svg.i{ width:20px; height:20px; }
.mj-dlg-scroll{ flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:32px; outline:none; }
.mj-dlg-grid{ display:grid; grid-template-columns:260px minmax(0,1fr); gap:32px; align-items:start; }
.mj-dlg-fig{ position:sticky; top:0; margin:0; aspect-ratio:4 / 5; padding:5px; border-radius:20px; background:#fff; box-shadow:0 12px 30px rgba(14,91,82,.12); }
#mj .mj-dlg-fig img{ width:100%; height:100%; object-fit:cover; border-radius:16px; }
.mj-dlg-main{ min-width:0; padding-top:4px; }
.mj-dlg-main > .kick, .mj-dlg-main > h2, .mj-dlg-main > .cnt{ padding-inline-end:52px; }   /* room for the close button */
.mj-dlg .kick{ font-size:14px; font-weight:600; color:var(--acc); }
#mj .mj-dlg h2{ margin-top:6px; font-size:clamp(1.3rem, 1.9vw, 1.6rem); line-height:1.45; font-weight:700; color:var(--base); }
.mj-dlg .cnt{ margin-top:4px!important; font-size:14px; font-weight:500; color:var(--medium); }
.mj-dlg-list{ display:grid; gap:12px; margin:22px 0 0!important; padding:0!important; list-style:none; }
.mj-dsv{ display:grid; grid-template-columns:48px minmax(0,1fr); gap:16px; align-items:start; padding:20px 22px; border-radius:18px; background:#fff;
  box-shadow:0 8px 24px rgba(14,91,82,.06); }
.mj-dsv .n{ position:relative; padding-bottom:10px; font-size:28px; font-weight:700; line-height:1; color:var(--base); font-variant-numeric:tabular-nums; }
.mj-dsv .n::after{ content:""; position:absolute; left:0; bottom:0; width:28px; height:3px; border-radius:3px; background:var(--acc); }
#mj .mj-dsv h3{ font-size:17px; line-height:1.55; font-weight:700; color:var(--dark); }
.mj-dsv p{ margin-top:4px!important; font-size:15.5px; line-height:1.85; color:var(--medium); text-wrap:pretty; }
/* bottom bar: previous / position / next (always visible; the content scrolls above it) */
.mj-dlg-nav{ flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 16px;
  background:#fff; border-top:1px solid var(--line); }
#mj .mj-dlg-go{ display:flex; align-items:center; gap:10px; min-width:0; max-width:42%; min-height:48px; padding:6px 10px; border-radius:14px;
  color:var(--dark); text-align:start; transition:background .2s, color .2s; }
#mj .mj-dlg-go .ic{ flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:var(--soft); color:var(--base);
  transition:background .2s, color .2s; }
#mj .mj-dlg-go .ic svg.i{ width:18px; height:18px; stroke-width:2.2; }
#mj .mj-dlg-go .lb{ display:grid; min-width:0; line-height:1.4; }
/* 17 Nov v2 (designer: "the names make the bar crowded"): «السابق» / «التالي» only, at every size; the group names stay
   in the buttons' aria-label for screen readers (and the position «٣ من ٧» stays in the middle) */
#mj .mj-dlg-go small{ font-size:14.5px; font-weight:700; color:var(--base); }
#mj .mj-dlg-go b{ display:none; }
#mj .mj-dlg-go.next{ text-align:end; }
#mj .mj-dlg-go:hover:not(:disabled){ background:var(--soft); }
#mj .mj-dlg-go:hover:not(:disabled) .ic{ background:var(--base); color:#fff; }
#mj .mj-dlg-go:focus-visible{ outline:2px solid var(--base); outline-offset:2px; }
#mj .mj-dlg-go:disabled{ cursor:default; opacity:.4; }
#mj .mj-dlg-go:disabled b{ visibility:hidden; }
.mj-dlg-pos{ flex:none; font-size:13.5px; font-weight:600; color:var(--medium); font-variant-numeric:tabular-nums; }
.mj-dlg-list.is-one .mj-dsv{ grid-template-columns:minmax(0,1fr); }
.mj-dlg-list.is-one .mj-dsv p{ margin-top:0!important; font-size:17px; color:var(--body); }
.mj-dsv.flash{ animation:mjflash 1.6s ease; }
@keyframes mjflash{ 0%,40%{ box-shadow:0 0 0 3px rgba(242,140,40,.55), 0 10px 28px rgba(14,91,82,.07); } }

@media (max-width:860px){
  .mj-dlg{ width:calc(100vw - 40px); }
  .mj-dlg-scroll{ padding:24px; }
  .mj-dlg-grid{ grid-template-columns:200px minmax(0,1fr); gap:24px; }
  .mj-dsv{ grid-template-columns:minmax(0,1fr); gap:10px; padding:18px 20px; }
  .mj-dsv .n{ font-size:24px; }
}
@media (max-width:600px){
  .mj-dlg{ width:calc(100vw - 24px); max-height:calc(100dvh - 32px); border-radius:20px; }
  #mj .mj-dlg-x{ top:12px; right:12px; width:40px; height:40px; }
  .mj-dlg-scroll{ padding:10px 10px 18px; }
  .mj-dlg-grid{ grid-template-columns:minmax(0,1fr); gap:16px; }
  .mj-dlg-fig{ position:relative; aspect-ratio:2 / 1; padding:4px; border-radius:16px; }
  #mj .mj-dlg-fig img{ border-radius:12px; }
  .mj-dlg-main{ padding:0 6px; }
  .mj-dlg-main > .kick, .mj-dlg-main > h2, .mj-dlg-main > .cnt{ padding-inline-end:0; }   /* the close button sits on the photo */
  #mj .mj-dlg h2{ font-size:1.25rem; }
  .mj-dsv{ padding:16px; border-radius:16px; }
  #mj .mj-dsv h3{ font-size:16px; }
  .mj-dsv p{ font-size:15px; }
  /* phone bar: a little tighter */
  .mj-dlg-nav{ padding:8px 10px; }
  #mj .mj-dlg-go{ max-width:none; padding:4px 6px; gap:8px; }
  #mj .mj-dlg-go small{ font-size:14px; }
}
/* Folder-card hover (13 Nov, designer request): one interaction, one timing. The green cover slides down into the
   bottom of the photo window (its text block rises a little inside it so nothing is cut), the photo zooms a touch,
   the card lifts with a soft shadow and a thin orange border fades in. Same sizes / grid / colours as before.
   The photo and the cover sit in .ph, which clips both to the rounded photo area. */
.mj-fc{ --fe:cubic-bezier(.22,.61,.36,1); --ft:400ms; --drop:16px; --rise:7px;
  transition:transform var(--ft) var(--fe), box-shadow var(--ft) var(--fe); }
.mj-fc .ph{ position:absolute; inset:6px; border-radius:var(--fr); overflow:hidden; isolation:isolate; z-index:-1; background:var(--soft); }
#mj .mj-fc .ph img{ position:absolute; inset:0; top:0; right:0; width:100%; height:100%; border-radius:0; z-index:auto;
  transition:transform var(--ft) var(--fe); }
.mj-fc .ph .fold{ right:0; left:0; bottom:0; transition:transform var(--ft) var(--fe); }
.mj-fc .body > *{ transition:transform var(--ft) var(--fe); }
.mj-fc::after{ content:""; position:absolute; inset:0; border-radius:inherit; border:2px solid var(--acc); opacity:0;
  pointer-events:none; transition:opacity var(--ft) var(--fe); }
@media (hover:hover){
  .mj-fc:hover, .mj-fc:has(.mj-fc-btn:focus-visible){ transform:translateY(-4px); box-shadow:0 16px 34px -14px rgba(14,91,82,.26); }
  .mj-fc:hover::after{ opacity:1; }
  .mj-fc:hover .ph img, .mj-fc:has(.mj-fc-btn:focus-visible) .ph img{ transform:scale(1.05); }
  .mj-fc:hover .ph .fold, .mj-fc:has(.mj-fc-btn:focus-visible) .ph .fold{ transform:translateY(var(--drop)); }
  .mj-fc:hover .body > *, .mj-fc:has(.mj-fc-btn:focus-visible) .body > *{ transform:translateY(calc(-1 * var(--rise))); }
}
@media (prefers-reduced-motion:reduce){
  .mj-dlg[open], .mj-dlg[open]::backdrop, .mj-dsv.flash{ animation:none; }
  /* no movement: the card keeps only the orange border, the shadow and the arrow colour on hover */
  .mj-fc, .mj-fc .ph img, .mj-fc .ph .fold, .mj-fc .body > *{ transition:none; }
  .mj-fc:hover, .mj-fc:has(.mj-fc-btn:focus-visible){ transform:none; }
  .mj-fc:hover .ph img, .mj-fc:hover .ph .fold, .mj-fc:hover .body > *,
  .mj-fc:has(.mj-fc-btn:focus-visible) .ph img, .mj-fc:has(.mj-fc-btn:focus-visible) .ph .fold,
  .mj-fc:has(.mj-fc-btn:focus-visible) .body > *{ transform:none; }
}
/* All 8 domains (rolled out domain by domain on 14 Nov, designer request; .is-cap is set in areas.js): the group name sits BELOW the photo, never on it. Same card size,
   frame, radius, tab, grid and hover. The photo now ends where the green panel starts (it runs --drop px under the
   panel, so the hover slide still uncovers photo and never a gap), and the panel is solid instead of see-through glass.
   --bh = the panel's fixed height (same formula as .body min-height, + 4px more room above the title). */
#mj .mj-fgrid.is-cap .mj-fc{ --th:16px; --lh:13px; --bh:calc(30px + 2 * 1.55 * var(--th) + 2 * 1.75 * var(--lh) + 46px); }
#mj .mj-fgrid.is-cap .mj-fc .body{ --th:inherit; --lh:inherit; padding-top:16px; min-height:var(--bh); }
#mj .mj-fgrid.is-cap .mj-fc .ph img{ height:calc(100% - var(--bh) + var(--drop)); }
#mj .mj-fgrid.is-cap .mj-fc .tab, #mj .mj-fgrid.is-cap .mj-fc .body, #mj .mj-fgrid.is-cap .mj-fc .tab::after{
  background:#14453E; -webkit-backdrop-filter:none; backdrop-filter:none; }
@media (max-width:560px){ #mj .mj-fgrid.is-cap .mj-fc{ --th:17px; --lh:14px; } }


/* 21 Nov (designer): «8 مجالات لتنمية شاملة ومستدامة» always on ONE line. The title block was as wide as the
   paragraph under it (620px), so the head grows to the title and the size steps down on narrow screens to fit. */
#mj .mj-pick .mj-h2{ white-space:nowrap; }
@media (max-width:600px){ #mj .mj-pick .mj-h2{ font-size:clamp(1.1rem, 5.6vw, 1.9rem); } }

/* 21 Nov (owner): the short line under a section title stays on ONE line (e.g. «8 مجالات لتنمية شاملة ومستدامة» +
   «اختر مجالًا من القائمة…», «ثلاث منصات.. تكمل كل منها الأخرى» + its line). From 1060px up there is room for it;
   narrower screens wrap as before. Section heads only, not body text. */
@media (min-width:1060px){
  #mj .mj-head > div, #mj .mj-join-head{ max-width:none; }
  #mj .mj-pick .mj-head p, #mj .mj-join-head p{ max-width:none; white-space:nowrap; }
}
