/* Site styles: one file, no build step. Mobile first, RTL, light theme. */

:root {
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-2: #eef5f2;
  --text: #15201c;
  --text-2: #4a5a54;
  --text-3: #6b7a74;
  --line: #dbe5e1;
  --brand: #0f7a5c;       /* deep clinic green */
  --brand-ink: #0b5c45;
  --brand-soft: #e1f2ec;
  --accent: #25d366;      /* WhatsApp green, used sparingly */
  --warn-soft: #fff5e0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 32, .06), 0 8px 24px rgba(16, 40, 32, .06);
  --max: 1080px;
  --gutter: 16px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { inset-inline-start: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(247, 249, 248, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: none; gap: 22px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--brand); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--brand-ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: .92rem; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Sections */
section { padding-block: 56px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.lead { color: var(--text-2); font-size: 1.08rem; max-width: 46rem; }

/* Hero */
.hero { padding-block: 40px 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero h1 span { color: var(--brand); }
.promises { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.promises li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.promises strong { display: block; }
.promises small { color: var(--text-3); font-size: .9rem; line-height: 1.6; display: block; }
.tick {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-top: 2px;
}
.tick svg { width: 16px; height: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.note { color: var(--text-3); font-size: .9rem; margin-top: 12px; }

/* Chat mock */
.phone {
  max-width: 360px; margin-inline: auto; width: 100%;
  background: #e9e3da; border-radius: 26px; padding: 0 0 14px;
  border: 8px solid #1d2a26; box-shadow: var(--shadow); overflow: hidden;
}
.phone-top { background: #0b5c45; color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.phone-top .avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff3; display: grid; place-items: center; font-weight: 700; }
.phone-top b { display: block; font-size: .95rem; line-height: 1.3; }
.phone-top small { opacity: .8; font-size: .78rem; }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 0; font-size: .92rem; line-height: 1.6; }
.msg { max-width: 85%; padding: 7px 11px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg time { display: block; font-size: .7rem; color: #667; text-align: end; direction: ltr; }
.msg.in { background: #fff; align-self: flex-start; border-start-start-radius: 2px; }
.msg.out { background: #d9fdd3; align-self: flex-end; border-start-end-radius: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chips span { background: #fff; border: 1px solid #cfe9df; color: #0b6b9a; border-radius: 8px; padding: 2px 10px; font-size: .82rem; }

/* Cards and grids */
.grid { display: grid; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 1px 2px rgba(16,40,32,.04);
}
.section-alt .card { background: var(--bg); }
.card p { color: var(--text-2); margin: 0; }
.icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 12px;
}
.icon svg { width: 22px; height: 22px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li { position: relative; padding-inline-start: 58px; }
.steps li::before {
  counter-increment: step; content: counter(step, arabic-indic);
  position: absolute; inset-inline-start: 20px; top: 20px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; line-height: 1;
}

.features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.features li .icon { margin: 0; flex: none; width: 38px; height: 38px; border-radius: 10px; }
.features strong { display: block; }
.features span { color: var(--text-2); font-size: .95rem; line-height: 1.7; }

.control { display: grid; gap: 28px; align-items: start; }
.control ul { padding-inline-start: 1.2em; margin: 0; }
.control li { margin-bottom: .6em; color: var(--text-2); }
.control li strong { color: var(--text); }
.callout { background: var(--brand-soft); border: 1px solid #c5e6da; border-radius: var(--radius); padding: 18px 20px; }
.callout h3 { color: var(--brand-ink); }
.callout p:last-child { margin: 0; }

/* FAQ */
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 16px 14px; color: var(--text-2); }
.faq .answer p:last-child { margin: 0; }

/* Contact */
.contact-box { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }
.contact-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-lines li { display: flex; gap: 10px; align-items: center; }
.contact-lines .ltr { direction: ltr; unicode-bidi: isolate; }

/* Footer */
.site-footer { background: #10201b; color: #c9d6d1; padding-block: 32px; font-size: .92rem; }
.site-footer a { color: #e6f2ed; }
.site-footer .wrap { display: grid; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.site-footer p { margin: 0; }

/* Legal pages */
.doc { padding-block: 32px 56px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
.doc h2 { font-size: 1.3rem; margin-top: 1.8em; padding-top: .2em; scroll-margin-top: 76px; }
.doc h3 { margin-top: 1.2em; }
.doc ul, .doc ol { padding-inline-start: 1.3em; }
.doc li { margin-bottom: .45em; }
.meta { color: var(--text-3); font-size: .92rem; }
.summary-box { background: var(--brand-soft); border: 1px solid #c5e6da; border-radius: var(--radius); padding: 16px 20px; margin: 20px 0 8px; }
.summary-box ul { margin: 0; }
.clinic-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 12px 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 18px; margin: 20px 0; }
.toc ol { margin: 6px 0 0; columns: 1; }
.toc a { text-decoration: none; }
.table-scroll { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; line-height: 1.6; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.cmd { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-weight: 600; white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Wider screens */
@media (min-width: 720px) {
  section { padding-block: 72px; }
  .nav { display: flex; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-box { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 32px; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
  .toc ol { columns: 2; }
}
@media (min-width: 960px) {
  .hero { padding-block: 64px 80px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
  .control { grid-template-columns: 1.1fr .9fr; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; font-size: 12pt; }
}
