/* مَكَان — الهوية المعتمدة فقط: لا ألوان جديدة. مصمم للجوال أولاً. */
:root {
  --navy: #14233c;
  --cream: #f5f1ea;
  --rust: #a8492a;
  --green: #5f7458;
  --sky: #8fa9bf;
  --stone: #d6d3cc;
  --muted: #5b6575;
  --paper: #fbf9f5;
  --rust-soft: #f2e2d9;
  --radius: 10px;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--navy); font-family: var(--font); font-size: 16px; line-height: 1.8; overflow-x: hidden; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .4em; font-weight: 800; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.7rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }
[hidden], .card[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; right: 16px; background: var(--navy); color: var(--cream); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.js .no-js-only { display: none; }

.wrap { width: min(1160px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { width: min(780px, 100%); }
.section { padding: 48px 0; }
.section.tight { padding-top: 28px; }
.section.alt { background: var(--paper); border-block: 1px solid var(--stone); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
@media (min-width: 720px) { :root { --gutter: 24px; } .section { padding: 72px 0; } }

/* ---------- الهيدر ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(245, 241, 234, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--stone); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand img { display: block; width: 76px; height: auto; }
.nav-toggle { margin-inline-start: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.lang-switch ~ .nav-toggle { margin-inline-start: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav { position: fixed; inset: 64px 0 auto 0; background: var(--cream); border-bottom: 1px solid var(--stone); padding: 8px var(--gutter) 20px; display: none; flex-direction: column; max-height: calc(100dvh - 64px); overflow: auto; }
.site-nav.open { display: flex; }
.site-nav > a { text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--stone); font-weight: 600; }
.site-nav > a[aria-current="page"] { color: var(--rust); }
.site-nav > a.btn { margin-top: 14px; border: 0; padding: 12px; }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 2px; margin-inline-start: auto; padding: 0; border: 0; background: none; max-height: none; overflow: visible; }
  .site-nav > a { border: 0; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
  .site-nav > a:hover { background: rgba(20, 35, 60, .06); }
  .site-nav > a.btn { margin: 0 8px 0 0; padding: 8px 16px; }
}

/* ---------- الأزرار والشارات ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, filter .15s; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .92rem; }
.btn-rust { background: var(--rust); color: #fff; }
.btn-rust:hover { filter: brightness(.92); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { filter: brightness(1.25); }
.btn-ghost { border-color: var(--navy); background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.btn-outline-light { border-color: rgba(245, 241, 234, .55); color: var(--cream); background: transparent; }
.btn-outline-light:hover { border-color: var(--cream); background: rgba(245, 241, 234, .08); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { color: var(--rust); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }
.arrow::after { content: "←"; font-family: system-ui; margin-inline-start: 4px; }

.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.b-type { background: var(--rust-soft); color: var(--rust); }
.b-open { background: rgba(95, 116, 88, .16); color: var(--green); }
.b-soon { background: var(--rust-soft); color: var(--rust); }
.b-closed { background: var(--stone); color: var(--muted); }
.b-light { background: rgba(245, 241, 234, .14); color: var(--cream); }

.hex { --s: 40px; width: var(--s); height: calc(var(--s) * 1.12); flex: none; display: inline-grid; place-items: center; background: var(--rust); color: #fff; clip-path: var(--hex); font-weight: 800; font-size: calc(var(--s) * .4); }
.hex-sm { --s: 34px; }
.hex-lg { --s: 64px; }
.hex-navy { background: var(--navy); color: var(--cream); }
.hex-stone { background: var(--stone); color: var(--muted); }
.hex-text { font-size: 11px; letter-spacing: .5px; }

/* ---------- البطاقات ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .g2, .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid { gap: 18px; } }
@media (min-width: 1024px) { .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); padding: 20px; }
a.card { text-decoration: none; display: block; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20, 35, 60, .07); }
.card h2, .card h3 { margin-bottom: .25em; }
.card p:last-child { margin-bottom: 0; }

.guide-card { display: flex !important; flex-direction: column; gap: 6px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--stone); font-size: .82rem; color: var(--muted); }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 15px; height: 15px; }

/* ---------- الرئيسية ---------- */
.hero { background: var(--navy); color: var(--cream); position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/img/plan-light.svg") left center / auto 130% no-repeat; opacity: .16; }
.hero .wrap { position: relative; }
.hero-logo { display: block; width: 104px; margin-bottom: 28px; }
.hero h1 { max-width: 14ch; margin-bottom: .35em; }
.hero .lead { color: rgba(245, 241, 234, .82); font-size: 1.08rem; max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions .btn { flex: 1 1 180px; }
@media (min-width: 720px) { .hero { padding: 88px 0 112px; } .actions .btn { flex: 0 0 auto; } }

.entry { padding-top: 0; margin-top: -40px; position: relative; }
.entry-card { display: flex !important; align-items: center; gap: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(20, 35, 60, .08); }
.entry-card h2 { font-size: 1.1rem; margin: 0; }
.entry-card p { margin: 0; font-size: .9rem; }
.entry-card .arrow { margin-inline-start: auto; color: var(--rust); font-weight: 800; }

.featured { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; background: var(--navy); color: var(--cream); border-radius: var(--radius); padding: 22px; }
.featured .muted { color: rgba(245, 241, 234, .72); }
.featured h3 { font-size: 1.35rem; }
.featured .btn { grid-column: 1 / -1; }
.featured .date-block { background: var(--cream); color: var(--navy); }
@media (min-width: 720px) { .featured { grid-template-columns: auto minmax(0, 1fr) auto; padding: 28px; } .featured .btn { grid-column: auto; } }

.voice-card { display: flex !important; flex-direction: column; gap: 12px; min-height: 200px; position: relative; overflow: hidden; }
.voice-card > .badge, .big-card > .badge { align-self: flex-start; }
.voice-card blockquote { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.7; }
.voice-card .who { margin-top: auto; color: var(--muted); font-weight: 600; }
.voice-card.is-expert { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.voice-card.is-expert .who { color: rgba(245, 241, 234, .75); }
.voice-card::after { content: ""; position: absolute; left: -26px; bottom: -34px; width: 110px; height: 124px; background: var(--stone); clip-path: var(--hex); opacity: .4; }
.voice-card.is-expert::after { background: var(--sky); opacity: .18; }
.empty-voice .who { color: var(--rust); }
.voice-card.is-expert.empty-voice .who { color: var(--rust-soft); }

.big-card { display: flex !important; flex-direction: column; gap: 6px; align-items: flex-start; }
.big-card .hex { margin-bottom: 8px; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { display: inline-block; border: 1px solid var(--stone); background: #fff; padding: 4px 14px; border-radius: 999px; text-decoration: none; font-size: .92rem; font-weight: 600; }
.chip:hover { border-color: var(--navy); }

.partners-strip { padding: 26px 0; border-top: 1px solid var(--stone); }
.partners-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.partner-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.partner-logos a { text-decoration: none; font-weight: 700; color: var(--muted); }
.partner-logos img { height: 36px; width: auto; filter: grayscale(1); opacity: .8; }

/* ---------- رؤوس الصفحات ---------- */
.page-hero { padding: 36px 0 24px; border-bottom: 1px solid var(--stone); background: var(--paper); }
.page-hero .lead { color: var(--muted); font-size: 1.05rem; max-width: 680px; margin: 0; }
.page-hero .badge { margin-top: 12px; }
@media (min-width: 720px) { .page-hero { padding: 56px 0 36px; } }
.crumbs { display: flex; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--rust); }

/* ---------- المكتبة ---------- */
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.filters .search { grid-column: 1 / -1; }
.filters input, .filters select { width: 100%; min-height: 46px; padding: 8px 14px; border: 1px solid var(--stone); border-radius: 10px; background: #fff; }
.filters input:focus, .filters select:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(20, 35, 60, .1); }
@media (min-width: 960px) { .filters-4 { grid-template-columns: 2fr repeat(3, 1fr) auto; } .filters-4 .search { grid-column: auto; } }
.filters-1 { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.series-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.series-chips::-webkit-scrollbar { display: none; }
.series-chips .chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px; }
.series-chips .chip small { font-size: .75rem; color: var(--muted); font-weight: 700; }
.series-chips .chip.on { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.series-chips .chip.on small { color: var(--sky); }
.result-count { margin: 0 0 14px; font-size: .9rem; }
.empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--stone); border-radius: var(--radius); color: var(--muted); }
.empty h1, .empty h2 { color: var(--navy); }
.empty .hex { margin: 0 auto 12px; }
.cta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); }

/* ---------- صفحة الدليل ---------- */
.guide-head h1 { margin-top: 8px; }
.byline { color: var(--muted); font-size: .92rem; margin: 6px 0 16px; }
.byline b { color: var(--navy); }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.prose { font-size: 1.06rem; line-height: 2; padding: 28px 0 8px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.3em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 0 0 1em; padding: 12px 18px; border-inline-start: 4px solid var(--rust); background: var(--rust-soft); border-radius: 0 8px 8px 0; font-weight: 600; }
.prose a { color: var(--rust); font-weight: 600; }
.prose strong { font-weight: 800; }
.guide .tags { margin: 6px 0 24px; }
.feedback { margin: 20px 0; }
.feedback h2 { font-size: 1.1rem; }
.fb-buttons { display: flex; gap: 8px; }
.fb-buttons .btn[aria-pressed="true"] { background: var(--navy); color: var(--cream); }
.fb-more { margin-top: 12px; display: grid; gap: 10px; }
.ask-card { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.ask-card h2 { font-size: 1.1rem; margin: 0; }
.ask-card p { margin: 0; }

/* ---------- النماذج ---------- */
.split { display: grid; gap: 18px; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; } }
.form { display: grid; gap: 16px; }
.form h2 { margin: 0; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, fieldset.field legend { font-weight: 700; font-size: .95rem; }
.field i, legend i { color: var(--rust); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--stone); border-radius: 10px; background: #fff; font-size: 16px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(20, 35, 60, .1); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio-row label { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.radio-row input, .consent input { width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.consent a { color: var(--rust); font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-actions .btn { flex: 1 1 auto; }
@media (min-width: 720px) { .form-actions .btn { flex: 0 0 auto; } }
.form-msg { font-weight: 700; color: var(--rust); }
.note { background: var(--rust-soft); padding: 10px 14px; border-radius: 8px; margin: 0; }
.note a { font-weight: 700; }
.narrow-form { max-width: 820px; margin: 24px auto 0; }
.form-done { text-align: center; padding: 28px 12px; display: grid; justify-items: center; gap: 8px; }
.form-done .hex { --s: 56px; }
.form-done h2 { margin: 6px 0 0; }
.code-box { display: grid; justify-items: center; gap: 8px; background: #fff; border: 1px solid var(--stone); border-radius: var(--radius); padding: 16px 20px; margin-top: 8px; }
.code-box b { font-size: 1.6rem; letter-spacing: 2px; direction: ltr; }
.code-box svg { width: 180px; height: 180px; }

.steps-card h2 { font-size: 1.15rem; }
.steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 34px; flex: none; display: grid; place-items: center; background: var(--rust); color: #fff; clip-path: var(--hex); font-size: .85rem; }

/* ---------- الفرص ---------- */
.list-title { font-size: 1.2rem; margin: 26px 0 12px; }
.list-title:first-child { margin-top: 0; }
.opp-list { display: grid; gap: 10px; }
.opp-card { display: grid !important; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; }
.opp-card .badge { grid-column: 2; justify-self: start; }
.opp-card h3 { margin: 0; }
.opp-info p, .opp-info span { margin: 0; display: block; }
@media (min-width: 720px) { .opp-card { grid-template-columns: auto minmax(0, 1fr) auto; } .opp-card .badge { grid-column: auto; } }
.date-block { width: 64px; text-align: center; background: var(--rust-soft); color: var(--rust); border-radius: 10px; padding: 8px 4px; line-height: 1.2; }
.date-block b { display: block; font-size: 1.6rem; font-weight: 800; }
.date-block span { font-size: .8rem; font-weight: 700; }
.empty-line { padding: 14px 0; margin: 0; }
.past { margin-top: 28px; }
.past summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 0; }
.past .opp-list { opacity: .7; }
.facts { display: grid; gap: 0; margin: 0 0 8px; border: 1px solid var(--stone); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--stone); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- عن مكان والانضمام ---------- */
.vm { display: grid; gap: 14px; }
.vm > div { background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); padding: 24px; }
.vm h2 { color: var(--rust); font-size: 1rem; }
.vm p { font-size: 1.12rem; font-weight: 700; margin: 0; }
@media (min-width: 720px) { .vm { grid-template-columns: 1fr 1fr; } }
.person { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.person b { display: block; }
.person small { color: var(--muted); }
.person.vacant b { color: var(--muted); font-weight: 600; }
.team-tech { border-color: var(--navy); box-shadow: inset 0 3px 0 var(--rust); }
.team-tech .grid { margin-top: 4px; }
.uni-card h3 { margin-top: 4px; }
.cta-card { display: flex !important; flex-direction: column; justify-content: center; border-style: dashed; }
.tracks .card .hex { margin-bottom: 10px; }
.tracks h2 { font-size: 1.1rem; }
.partner { display: grid !important; justify-items: center; gap: 10px; text-align: center; }
.partner img { height: 56px; width: auto; }

/* ---------- التحقق والشهادة ---------- */
.verify-form { display: flex; gap: 10px; flex-wrap: wrap; }
.verify-form .field { flex: 1 1 220px; }
.verify-result { margin-top: 18px; display: flex; gap: 16px; align-items: flex-start; }
.verify-result svg { width: 44px; height: 44px; flex: none; color: #fff; background: var(--green); border-radius: 50%; padding: 8px; }
.verify-result.ok { border-color: var(--green); }
.verify-result.bad { border-color: var(--rust); display: block; }
.verify-result .facts { margin-top: 10px; }

.cert-page { min-height: 100vh; display: grid; place-items: center; gap: 16px; padding: 24px 12px; background: var(--stone); }
.cert-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.certificate { position: relative; width: min(1000px, 100%); aspect-ratio: 297 / 210; background: var(--paper); border: 10px solid var(--navy); outline: 2px solid var(--rust); outline-offset: -20px; padding: clamp(18px, 5%, 56px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.cert-hex { position: absolute; left: -60px; top: -60px; width: 240px; height: 270px; background: var(--rust-soft); clip-path: var(--hex); }
.cert-logo { position: relative; width: clamp(70px, 12%, 120px); height: auto; margin-bottom: 1.5%; }
.cert-kicker { color: var(--rust); font-weight: 800; letter-spacing: 1px; font-size: clamp(1rem, 2.4vw, 1.5rem); margin: 0; }
.cert-line { font-size: clamp(.85rem, 1.8vw, 1.2rem); margin: .6% 0; }
.cert-name { font-size: clamp(1.6rem, 5vw, 3.2rem); margin: 1% 0; border-bottom: 2px solid var(--stone); padding: 0 6% 1%; }
.cert-date { color: var(--muted); font-size: clamp(.8rem, 1.6vw, 1rem); }
.cert-foot { position: absolute; bottom: clamp(16px, 5%, 44px); right: clamp(16px, 5%, 52px); display: flex; gap: 12px; align-items: center; text-align: start; }
.cert-foot small { display: block; color: var(--muted); font-size: clamp(.55rem, 1vw, .75rem); max-width: 220px; line-height: 1.5; }
.cert-foot b { display: block; font-size: clamp(.8rem, 1.6vw, 1rem); }
.cert-qr svg { width: clamp(60px, 11vw, 110px); height: auto; display: block; }
@page { size: A4 landscape; margin: 0; }

/* ---------- الفوتر والعناصر العائمة ---------- */
.site-footer { background: var(--navy); color: rgba(245, 241, 234, .8); padding-top: 44px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 28px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 92px; height: auto; display: block; margin-bottom: 10px; }
.footer-grid h2 { color: var(--cream); font-size: 1rem; margin-bottom: 8px; }
.footer-grid a { display: block; text-decoration: none; padding: 4px 0; font-size: .95rem; }
.footer-grid a:hover { color: var(--cream); }
.ltr-start { direction: ltr; text-align: right; }
.muted-light { color: rgba(245, 241, 234, .55); font-size: .92rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 88px; border-top: 1px solid rgba(245, 241, 234, .15); font-size: .85rem; }
.footer-bottom a { text-decoration: none; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } .footer-bottom { padding-bottom: 20px; } }

.wa-float { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(20, 35, 60, .25); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; }
.toast { position: fixed; bottom: 84px; left: 50%; transform: translate(-50%, 160px); z-index: 200; background: var(--navy); color: var(--cream); padding: 12px 22px; border-radius: 999px; transition: transform .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--rust); }

/* ---------- لوحة الفريق ---------- */
body[data-page="admin"] .wa-float { display: none; }
.admin-shell { min-height: calc(100vh - 65px); }
.login-box { max-width: 420px; margin: 48px auto; padding-inline: var(--gutter); }
.admin { display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-side { background: var(--paper); border-bottom: 1px solid var(--stone); padding: 14px var(--gutter); }
.admin-user b { display: block; }
.admin-side nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-top: 8px; scrollbar-width: thin; }
.admin-side nav .grp { display: none; }
.admin-side nav button { flex: none; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--stone); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: .9rem; white-space: nowrap; }
.admin-side nav button.on { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.admin-side .count { background: var(--rust); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 7px; min-width: 20px; text-align: center; }
.admin-main { padding: 20px var(--gutter) 48px; min-width: 0; }
.admin-main h1 { font-size: 1.5rem; }
@media (min-width: 960px) {
  .admin { grid-template-columns: 240px minmax(0, 1fr); }
  .admin-side { border-bottom: 0; border-inline-end: 1px solid var(--stone); padding: 20px 12px; min-height: calc(100vh - 65px); }
  .admin-user { padding: 0 8px 14px; border-bottom: 1px solid var(--stone); }
  .admin-side nav { flex-direction: column; overflow: visible; gap: 2px; }
  .admin-side nav .grp { display: block; font-size: .78rem; color: var(--muted); padding: 12px 10px 2px; font-weight: 700; }
  .admin-side nav button { justify-content: space-between; background: none; border: 0; border-radius: 8px; padding: 7px 10px; }
  .admin-side nav button:hover { background: var(--cream); }
  .admin-main { padding: 28px 36px 64px; }
}
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.admin-tools .spacer { flex: 1; }
.admin-tools select, .admin-tools input, .sub-actions select, .sub-actions input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--stone); border-radius: 8px; background: #fff; }
.sub-list { display: grid; gap: 10px; }
.sub { background: var(--paper); border: 1px solid var(--stone); border-radius: var(--radius); padding: 16px; }
.sub-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.sub dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; font-size: .93rem; }
.sub dt { color: var(--muted); margin-top: 6px; font-size: .85rem; }
.sub dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
@media (min-width: 720px) { .sub dl { grid-template-columns: 150px minmax(0, 1fr); gap: 4px 14px; } .sub dt { margin: 0; } }
.sub-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.st-new { background: rgba(143, 169, 191, .3); color: var(--navy); }
.st-done, .st-accepted { background: rgba(95, 116, 88, .16); color: var(--green); }
.st-rejected { background: var(--rust-soft); color: var(--rust); }
.table-wrap { overflow-x: auto; border: 1px solid var(--stone); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--stone); vertical-align: middle; }
th { font-weight: 700; font-size: .82rem; color: var(--muted); background: var(--cream); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.editor { display: grid; gap: 14px; }
.editor textarea.body { min-height: 320px; line-height: 1.9; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check-grid label { display: flex; gap: 6px; align-items: center; font-size: .92rem; }
.field .check-grid input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--navy); }
.hint { font-size: .82rem; color: var(--muted); }
.cred { background: var(--navy); color: var(--cream); padding: 14px 18px; border-radius: 8px; font-family: ui-monospace, monospace; direction: ltr; text-align: left; white-space: pre-wrap; }
.checkin-result { text-align: center; padding: 24px; }
.checkin-result .hex { --s: 64px; margin: 0 auto 10px; }
.danger { color: var(--rust); border-color: var(--rust); }
dialog.modal { border: 0; padding: 0; border-radius: 14px; width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 32px); background: var(--cream); color: var(--navy); box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
dialog.modal::backdrop { background: rgba(20, 35, 60, .6); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--stone); }
.modal-head h2 { font-size: 1.1rem; margin: 0; }
.modal-close { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.modal-body { padding: 20px; }

/* ---------- الطباعة (تحميل الدليل PDF) ---------- */
@media print {
  .site-header, .site-footer, .wa-float, .toast, .guide-actions, .feedback, .ask-card, .no-print, .skip { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .page-hero { background: none; border: 0; padding: 0 0 8pt; }
  .prose { padding-top: 8pt; }
  .cert-page { background: none; padding: 0; min-height: 0; display: block; }
  .certificate { width: 297mm; height: 210mm; aspect-ratio: auto; border-width: 8mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- اللغة الإنجليزية (LTR) ---------- */
[dir="ltr"] .arrow::after { content: "→"; }
[dir="ltr"] .prose blockquote { border-radius: 8px 0 0 8px; }
.lang-switch { margin-inline-start: auto; text-decoration: none; font-weight: 700; font-size: .9rem; padding: 6px 12px; border: 1px solid var(--stone); border-radius: 999px; background: #fff; }
.lang-switch:hover { border-color: var(--navy); }
.lang-switch + .nav-toggle { margin-inline-start: 4px; }
@media (min-width: 960px) {
  .lang-switch { order: 3; margin-inline-start: 4px; }
  .site-nav { order: 2; }
}

/* ---------- زر «تواصل معنا» العائم ---------- */
.contact-float { position: fixed; inset-inline-end: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: var(--cream); text-decoration: none; font-weight: 700; box-shadow: 0 6px 18px rgba(20, 35, 60, .25); transition: transform .15s; }
.contact-float:hover { transform: translateY(-2px); }
.contact-float svg { width: 22px; height: 22px; }
body[data-page="admin"] .contact-float { display: none; }

/* ---------- صفحة التواصل ---------- */
.section-sub { margin: -10px 0 16px; }
.phone-field { display: flex; border: 1px solid var(--stone); border-radius: 10px; background: #fff; overflow: hidden; }
.phone-field b { display: grid; place-items: center; padding: 0 12px; background: var(--paper); border-inline-end: 1px solid var(--stone); color: var(--muted); font-weight: 700; }
.field .phone-field input { border: 0; border-radius: 0; min-width: 0; }
.field .phone-field:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(20, 35, 60, .1); }
.field .phone-field input:focus { box-shadow: none; }
.contact-side h2 { font-size: 1.15rem; }
.social-list { display: grid; gap: 8px; margin-bottom: 16px; }
.social-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--stone); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 700; }
.social-item:hover { border-color: var(--navy); }
.social-dot { width: 32px; height: 36px; display: grid; place-items: center; clip-path: var(--hex); background: var(--navy); color: var(--cream); font-size: .85rem; }
.btn-whatsapp { width: 100%; background: var(--green); color: #fff; margin-bottom: 10px; }
.btn-whatsapp:hover { filter: brightness(.92); }

/* ---------- شروط كلمة السر ---------- */
.pw-rules { list-style: none; padding: 0; margin: -6px 0 0; display: grid; gap: 4px; font-size: .88rem; color: var(--muted); }
.pw-rules li::before { content: "○"; margin-inline-end: 8px; }
.pw-rules li.ok { color: var(--green); font-weight: 700; }
.pw-rules li.ok::before { content: "✓"; }

/* ---------- زر تسجيل الدخول في الهيدر ---------- */
.login-link { order: 0; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; background: var(--navy); color: var(--cream); white-space: nowrap; }
.login-link:hover { filter: brightness(1.25); }
.login-link svg { width: 16px; height: 16px; }
@media (min-width: 960px) { .login-link { order: 4; margin-inline-start: 4px; } }
