/* موقع شفاء — الأنماط المشتركة لكل الصفحات. الألوان من shifaa_logo/README.txt و AppColors. */

@font-face { font-family: 'Tajawal'; src: url('/fonts/Tajawal-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('/fonts/Tajawal-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('/fonts/Tajawal-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Tajawal'; src: url('/fonts/Tajawal-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --brand: #0284C7;
  --brand-deep: #0369A1;
  --light-blue: #E6F3FA;
  --background: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --muted: #5B6B7F;
  --line: #E3E8EF;
  --navy: #0B2540;
  --navy-line: #1D3B5C;
  --sky: #38BDF8;
  --star: #F5A524;
  --r-control: 12px;
  --r-card: 16px;
  --r-panel: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #0284C7;
    --brand-deep: #7DD3FC;
    --light-blue: #12304A;
    --background: #0B1220;
    --surface: #111A2B;
    --ink: #E8EEF6;
    --muted: #9AA9BC;
    --line: #233047;
    --navy: #0E2238;
    --navy-line: #24415F;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, system-ui, sans-serif;
  background: var(--background);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-deep); }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { top: 12px; }

/* ───── الشريط العلوي ───── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; color: var(--brand); text-decoration: none; }
.wordmark img { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  font-size: 15.5px; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--ink); background: var(--background); }
.nav a[aria-current="page"] { color: var(--brand-deep); background: var(--light-blue); font-weight: 700; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; color: var(--brand-deep);
  background: var(--light-blue); padding: 6px 13px; border-radius: 999px;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.nav-toggle {
  display: none; margin-inline-start: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ───── عناصر عامة ───── */
main { flex: 1; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section.white { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--brand-deep); margin-bottom: 10px; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
.section-head p { font-size: 17px; color: var(--muted); margin-top: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: var(--r-control);
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
}
.btn:hover { background: #0369A1; border-color: #0369A1; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--surface); }
.btn svg { width: 18px; height: 18px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }
.more svg { width: 16px; height: 16px; }

.icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--light-blue); color: var(--brand-deep);
  display: grid; place-items: center; flex: none;
}
.icon svg { width: 23px; height: 23px; }

/* ───── الواجهة الرئيسية ───── */
.hero { background: var(--surface); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 58px); font-weight: 800; line-height: 1.22; }
.hero h1 span { color: var(--brand); }
.lead { font-size: 19px; color: var(--muted); margin-top: 18px; max-width: 31em; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; font-size: 14.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 17px; height: 17px; color: var(--brand); flex: none; }
/* خط النبض: نفس خط الشعار، يفصل الواجهة عمّا بعدها */
.pulse-line { position: absolute; inset-inline: 0; bottom: -23px; z-index: 1; height: 46px; width: 100%; color: var(--line); pointer-events: none; }
.pulse-line .beat { color: var(--brand); }

.phone-stage { display: flex; justify-content: center; }
.phone {
  width: 296px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 38px; padding: 10px;
  box-shadow: 0 30px 60px -22px rgba(15, 23, 42, .22), 0 8px 20px -8px rgba(2, 132, 199, .2);
}
.screen { background: var(--background); border-radius: 29px; overflow: hidden; }
.appbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  height: 54px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 20px; font-weight: 800; color: var(--brand);
}
.appbar img { width: 24px; height: 24px; }
.screen-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.search {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-control);
  height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  font-size: 12.5px; color: var(--muted);
}
.search svg { width: 16px; height: 16px; flex: none; }
.chips { display: flex; gap: 6px; }
.chip { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.chip.on { background: var(--light-blue); border-color: transparent; color: var(--brand-deep); }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px; display: flex; gap: 10px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--light-blue); flex: none; display: grid; place-items: center; color: var(--brand-deep); font-weight: 700; font-size: 15px; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 13px; font-weight: 700; }
.doc-meta { font-size: 11.5px; color: var(--muted); }
.rating { font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rating b { color: var(--star); font-weight: 400; }
.book { background: var(--brand); color: #fff; border-radius: var(--r-control); height: 42px; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; margin-top: 2px; }
.tabbar {
  background: var(--surface); border-top: 1px solid var(--line); height: 56px; margin-top: 4px;
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.tabbar .on { color: var(--brand-deep); }
.tabbar i { display: block; width: 44px; height: 6px; margin: 0 auto 6px; border-radius: 999px; background: var(--line); }
.tabbar .on i { background: var(--brand); }

/* ثلاث حقائق تحت الواجهة */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.fact { padding: 22px 24px; display: flex; gap: 14px; align-items: flex-start; }
.fact + .fact { border-inline-start: 1px solid var(--line); }
.fact b { display: block; font-size: 16.5px; }
.fact span { font-size: 14.5px; color: var(--muted); }

/* الخطوات الثلاث */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; inset-inline: 28px; height: 2px; background: var(--line); }
.step { position: relative; counter-increment: step; }
.step::before {
  content: counter(step); position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px;
  background: var(--brand); color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 0 0 8px var(--surface);
}
.step h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 16px; max-width: 26em; }

/* لوحتا الجمهور في الرئيسية */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 36px; display: flex; flex-direction: column; }
.panel h2 { font-size: 28px; font-weight: 800; }
.panel > p { color: var(--muted); margin-top: 8px; font-size: 16.5px; }
.ticks { list-style: none; margin: 24px 0 28px; display: grid; gap: 16px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { width: 22px; height: 22px; flex: none; margin-top: 3px; color: var(--brand); }
.ticks b { display: block; font-size: 16.5px; }
.ticks span { color: var(--muted); font-size: 15px; }
.panel .more { margin-top: auto; }
.panel.navy { background: var(--navy); border-color: var(--navy); color: #F1F6FB; }
.panel.navy .eyebrow, .panel.navy .more, .panel.navy .ticks svg { color: var(--sky); }
.panel.navy > p, .panel.navy .ticks span { color: #A9BDD2; }

/* شريط أطباء المستقبل */
.band { background: var(--light-blue); border-radius: var(--r-panel); padding: 40px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.band h2 { font-size: 28px; font-weight: 800; }
.band p { color: var(--muted); margin-top: 8px; font-size: 16.5px; max-width: 38em; }

/* الخصوصية */
.trust { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.trust-list { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.section.white .trust-list, .section.white .rows { background: var(--background); }
.trust-list div { padding: 18px 22px; }
.trust-list div + div { border-top: 1px solid var(--line); }
.trust-list b { display: block; font-size: 16.5px; }
.trust-list span { color: var(--muted); font-size: 15px; }

/* الأسئلة الشائعة */
.faq { display: grid; gap: 10px; max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-size: 17px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none; margin-inline-end: 4px;
  border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details > div { padding: 0 22px 20px; color: var(--muted); font-size: 16px; max-width: 46em; }

/* الدعوة الختامية */
.closing { text-align: center; }
.closing img { width: 72px; height: 72px; margin: 0 auto 20px; }
.closing h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; }
.closing p { color: var(--muted); font-size: 17px; margin: 10px auto 26px; max-width: 34em; }
.closing .hero-actions { justify-content: center; margin-top: 0; }

/* ───── صفحات الميزات ───── */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 56px 0 52px; }
.page-hero h1 { font-size: clamp(32px, 4.6vw, 46px); font-weight: 800; max-width: 17em; }
.page-hero .lead { max-width: 38em; }
.page-hero.navy { background: var(--navy); border-color: var(--navy); color: #F1F6FB; }
.page-hero.navy .eyebrow, .page-hero.navy .crumbs a { color: var(--sky); }
.page-hero.navy .lead, .page-hero.navy .crumbs { color: #A9BDD2; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; font-weight: 500; }
.crumbs a:hover { text-decoration: underline; }

.group { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; padding: 56px 0; }
.group + .group { border-top: 1px solid var(--line); }
.group-head { position: sticky; top: 96px; }
.group-head .num { font-size: 14px; font-weight: 700; color: var(--brand-deep); }
.group-head h2 { font-size: 28px; font-weight: 800; margin: 4px 0 8px; }
.group-head p { color: var(--muted); font-size: 16px; }
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.row { display: flex; gap: 18px; padding: 26px 28px; align-items: flex-start; }
.row + .row { border-top: 1px solid var(--line); }
.row h3 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.row p { color: var(--muted); font-size: 16px; max-width: 40em; }

/* مراحل الحجز */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 18px; max-width: 420px; }
.stage { position: relative; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--muted); padding-top: 26px; }
.stage::before { content: ""; position: absolute; top: 8px; inset-inline: 0; height: 2px; background: var(--line); }
.stage:first-child::before { inset-inline-start: 50%; }
.stage:last-child::before { inset-inline-end: 50%; }
.stage::after { content: ""; position: absolute; top: 2px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.stage.done { color: var(--brand-deep); }
.stage.done::before { background: var(--brand); }
.stage.done::after { background: var(--brand); border-color: var(--brand); }

.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; color: var(--muted); font-size: 15.5px; }
.note b { color: var(--ink); }

/* بطاقة نموذجية لطبيب المستقبل */
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 24px; max-width: 340px; margin-inline: auto; }
.sample-top { display: flex; gap: 14px; align-items: center; }
.sample .avatar { width: 58px; height: 58px; border-radius: 16px; font-size: 22px; }
.sample-name { font-size: 18px; font-weight: 800; }
.sample-meta { font-size: 14px; color: var(--muted); }
.sample p { font-size: 15px; color: var(--muted); margin: 16px 0; }
.hearts { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-deep); background: var(--light-blue); border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.hearts svg { width: 17px; height: 17px; }

/* ───── النصوص القانونية والصفحات البسيطة ───── */
.prose { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 40px 44px; }
.prose h2 { font-size: 20px; font-weight: 800; margin: 30px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 16.5px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 15px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 26px; }
.contact-card h2 { font-size: 19px; font-weight: 800; margin: 14px 0 6px; }
.contact-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 12px; }
.mail { font-weight: 700; direction: ltr; unicode-bidi: isolate; }

.index-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.index-col h2 { font-size: 18px; font-weight: 800; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 2px solid var(--brand); }
.index-col ul { list-style: none; }
.index-col li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.index-col a { font-weight: 700; font-size: 17px; text-decoration: none; }
.index-col a:hover { text-decoration: underline; }
.index-col span { display: block; color: var(--muted); font-size: 14.5px; }

/* ───── التذييل ───── */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 36px; }
.foot p { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 24em; }
.foot h2 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.foot ul { list-style: none; display: grid; gap: 8px; }
.foot li a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot li a:hover { color: var(--brand-deep); }
.foot-end { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }

/* ───── الشاشات الأصغر ───── */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-header .pill { display: none; }
  .nav {
    display: none; position: absolute; top: 68px; inset-inline: 0; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 17px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; padding-top: 48px; padding-bottom: 84px; text-align: center; }
  .lead { margin-inline: auto; }
  .hero-actions, .hero-note { justify-content: center; }
  .duo, .trust, .band { grid-template-columns: 1fr; }
  .trust { gap: 28px; }
  .group { grid-template-columns: 1fr; gap: 22px; padding: 44px 0; }
  .group-head { position: static; }
  .foot { grid-template-columns: 1fr 1fr; }
  .contact-grid, .index-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { border-inline-start: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { display: none; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; }
  .step::before { grid-row: span 2; margin-bottom: 0; box-shadow: none; }
  .panel, .band { padding: 28px 22px; }
  .prose { padding: 28px 22px; }
  .row { padding: 22px 20px; gap: 14px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .lead { font-size: 17px; }
  .phone { width: 100%; max-width: 296px; }
  .btn { width: 100%; }
  .foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill::before { animation: none; }
}
