/* El-Hana Physical Therapy — one stylesheet for both directions (logical properties only). */

/* ---------- Tokens ---------- */
:root {
  --navy: #1b3a7a;
  --navy-deep: #12285a;
  --orange: #f37021;
  --orange-strong: #c2500a; /* white text on this passes 4.5:1 */
  --wa: #0f7a41; /* WhatsApp green, white text 5.3:1 */
  --wa-hover: #0b6434;
  --danger: #c5221f;

  --bg: #f7f9fd;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #0f1d3a;
  --muted: #4a5876;
  --border: #dbe3f0;
  --link: #1b3a7a;
  --accent-text: #b44a08;
  --hero-from: #e9f0fc;
  --hero-to: #fff4ec;
  --shadow: 0 1px 2px rgb(15 29 58 / 6%), 0 8px 24px rgb(15 29 58 / 8%);
  --shadow-lg: 0 20px 50px rgb(15 29 58 / 14%);

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max: 1180px;
  --header-h: 68px;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424;
    --surface: #111d33;
    --surface-2: #172642;
    --text: #e8eefb;
    --muted: #a9b6d0;
    --border: #24365a;
    --link: #9cb8ff;
    --accent-text: #ff9a52;
    --danger: #ff8a80;
    --hero-from: #0f1d38;
    --hero-to: #1d1a24;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    --shadow-lg: 0 20px 50px rgb(0 0 0 / 45%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1424;
  --surface: #111d33;
  --surface-2: #172642;
  --text: #e8eefb;
  --muted: #a9b6d0;
  --border: #24365a;
  --link: #9cb8ff;
  --accent-text: #ff9a52;
  --danger: #ff8a80;
  --hero-from: #0f1d38;
  --hero-to: #1d1a24;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  --shadow-lg: 0 20px 50px rgb(0 0 0 / 45%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
.i18n-pending body { visibility: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.2em; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .6em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--orange-strong); color: #fff; }
.btn-primary:hover { background: #a94608; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--orange); }
.btn-sm { min-height: 44px; padding: .4em 1em; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.icon-btn:hover { border-color: var(--orange); }
.lang-btn span { font-family: var(--font-en); }
html[lang="en"] .lang-btn span { font-family: var(--font-ar); }

/* theme icon: show the one you would switch to */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 1.1rem; color: var(--text); white-space: nowrap; }
.brand-text small { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 600; font-size: .98rem; white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }

@media (max-width: 1260px) {
  .header-call span { display: none; }
  .header-call { padding: 0; width: 44px; }
}
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
  .site-nav {
    position: fixed; inset-inline: 0; top: var(--header-h); margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    padding: 12px var(--gutter) 20px; display: none;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 14px; font-size: 1.05rem; border-radius: var(--radius-sm); }
}
@media (max-width: 420px) {
  .site-header .brand-text { display: none; } /* logo (with alt text) carries the brand; frees room for the actions */
  .lang-btn span { display: none; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 0; margin: 0; font-size: .92rem; color: var(--muted); }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 6px; }
[dir="ltr"] .breadcrumb li + li::before { content: "›"; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 8vw, 88px); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-text); font-weight: 800; font-size: .9rem; letter-spacing: .02em; margin-bottom: 8px;
}
.lead { font-size: 1.15rem; color: var(--muted); }
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--accent-text);
}
.card-icon .icon { width: 28px; height: 28px; }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--orange); }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; color: var(--accent-text); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding-block: clamp(36px, 6vw, 72px);
  overflow: hidden;
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.hero h1 { margin-bottom: .25em; }
.hero h1 .accent { color: var(--accent-text); }
.hero .tagline { font-size: 1.3rem; font-weight: 700; color: var(--link); margin-bottom: .6em; }
.hero .lead { margin-bottom: 1.4em; }
.hero-media { position: relative; }
.hero-media img { border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; }
.hero-badge {
  position: absolute; inset-inline-start: 16px; bottom: -18px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow);
  font-weight: 700; font-size: .95rem;
}
.hero-badge .icon { color: var(--orange); }

.page-hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); padding-block: 40px 48px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.page-hero .lead { max-width: 760px; margin: 0; }

/* ---------- Trust strip ---------- */
.trust { padding-block: 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 860px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trust-item > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 359px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item .card-icon { margin: 0; width: 46px; height: 46px; }
.trust-item strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.trust-item div > span { color: var(--muted); font-size: .92rem; }
.trust-item strong[dir="ltr"] { unicode-bidi: isolate; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 28px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; inset-inline-start: 24px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 800;
}

/* ---------- Check list ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li .icon { color: var(--orange); margin-top: .3em; }

/* ---------- Media / gallery ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gallery figure { margin: 0; }
.gallery img, .media-frame img { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); width: 100%; }
.gallery figcaption { margin-top: 8px; font-size: .92rem; color: var(--muted); }
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.banner img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }

/* ---------- Branches ---------- */
.branch-card { display: flex; flex-direction: column; gap: 10px; }
.branch-card h2 { font-size: 1.4rem; }
.branch-card h3, .branch-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.branch-card :is(h2, h3) .icon { color: var(--orange); }
.branch-card .city { color: var(--accent-text); font-weight: 700; font-size: .92rem; }
.branch-card address { font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.branch-card .phone { font-weight: 800; font-size: 1.15rem; direction: ltr; unicode-bidi: isolate; text-align: start; }
.branch-card .btn-row { margin-top: auto; padding-top: 6px; }
.branch-card .btn { flex: 1 1 120px; }

/* ---------- Accordion ---------- */
.accordion { display: grid; gap: 12px; }
.accordion details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.accordion summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent-text); font-size: 1.3rem; font-weight: 800; transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .answer { padding: 0 20px 18px; color: var(--muted); }
.accordion .answer p:last-child { margin: 0; }
.faq-group + .faq-group { margin-top: 40px; }

/* ---------- Services detail ---------- */
.service-block { scroll-margin-top: calc(var(--header-h) + 16px); }
.service-block + .service-block { border-top: 1px solid var(--border); }
.service-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.service-head .card-icon { margin: 0; }
.service-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.service-cols { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 860px) { .service-cols { grid-template-columns: repeat(3, 1fr); } }
.service-cols h3 { font-size: 1.05rem; color: var(--link); }
.service-cols ul { margin: 0; color: var(--muted); }
.course { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.course .icon { color: var(--orange); margin-top: .25em; }
.service-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.service-jump a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
}
.service-jump a:hover { border-color: var(--orange); }

/* ---------- Notice ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--orange) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--border));
  font-size: .95rem;
}
.notice .icon { color: var(--accent-text); margin-top: .25em; }

/* ---------- Doctor ---------- */
.doctor-card { display: grid; gap: 20px; align-items: center; justify-items: start; }
.doctor-card img { width: 160px; height: 160px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); }
.doctor-card .role { color: var(--accent-text); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy));
  color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 48px);
  display: grid; gap: 20px; align-items: center;
}
@media (min-width: 860px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { color: rgb(255 255 255 / 85%); margin: 0; }
.cta-band .btn-ghost { color: #fff; border-color: rgb(255 255 255 / 45%); }

/* ---------- Form ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field .req { color: var(--accent-text); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .9rem; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list .card-icon { margin: 0; width: 44px; height: 44px; }
.contact-list a { font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; background: var(--navy-deep); color: #d7e1f5; padding-top: 56px; }
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .brand-text strong { color: #fff; }
.site-footer .brand-text small, .site-footer .muted { color: #a9b8d8; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .footer-grid { grid-template-columns: 1.3fr .8fr 1.3fr 1.1fr; } }
.footer-brand p { margin-top: 14px; color: #c3cfe8; }
.footer-title { color: #fff; font-size: 1.05rem; margin: 0 0 14px; }
.footer-brand .footer-title { margin-top: 20px; }
.footer-links, .footer-branches, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-branches li { display: grid; gap: 2px; font-size: .95rem; }
.footer-branches a { direction: ltr; unicode-bidi: isolate; justify-self: start; }
.footer-contact li { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.footer-contact .icon { color: var(--orange); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgb(255 255 255 / 10%); color: #fff;
}
.socials a:hover { background: var(--orange-strong); }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / 12%); margin-top: 40px; padding-block: 18px 96px; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* ---------- Floating WhatsApp ---------- */
.fab-wa {
  position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 10px 28px rgb(15 122 65 / 40%);
}
.fab-wa .icon { width: 30px; height: 30px; }
.fab-wa:hover { transform: scale(1.06); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

a.trust-item { text-decoration: none; color: inherit; border-radius: var(--radius-sm); }
a.trust-item:hover strong { color: var(--accent-text); }
