/* ==========================================================================
   RTL overrides — loaded only by pages with <html dir="rtl"> (Arabic).
   English pages never link this file, so nothing here can affect them.
   Mirrors the v2 "Warm Authority" components for right-to-left reading.
   ========================================================================== */

/* Arabic type: the Latin display serif has no Arabic glyphs, so both the
   display and body stacks switch to IBM Plex Sans Arabic (kept first in
   the stack so Latin brand names still render with its Latin glyphs). */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] .logo-text, [dir="rtl"] .footer-brand {
  font-family: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
  font-weight: 700;
  letter-spacing: 0; /* Latin tracking looks broken on Arabic script */
}

/* The testimonial quotes borrow the display serif in English; in Arabic
   they would fall back to a mixed stack, so pin them like body text. */
[dir="rtl"] [style*="var(--display)"] {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

/* ---- Section heads and page heads are left-aligned in English ---- */
[dir="rtl"] .sec-head,
[dir="rtl"] .page-head .wrap,
[dir="rtl"] .sec-head > div { text-align: right; }
[dir="rtl"] .band .sec-head { text-align: right; }

/* ---- Physical sides in v2 components ---- */
/* Trust strip: hairline separators were on border-left */
[dir="rtl"] .trust-item { border-left: 0; border-right: 1px solid var(--line); padding-left: 0; padding-right: 28px; }
[dir="rtl"] .trust-item:first-child { border-right: 0; padding-right: 0; }
@media (max-width: 1120px) {
  [dir="rtl"] .trust-item { border-right: 0; border-left: 0; padding-right: 0; padding-left: 0; border-bottom: 1px solid var(--line); }
}

/* Hospital list rows: the "go" chevron sits on the trailing side and the
   arrow points the wrong way in RTL — mirror it. */
[dir="rtl"] .h-go svg { transform: scaleX(-1); }
[dir="rtl"] .hrow > div:first-child { text-align: right; }

/* Section-action "more" arrows point right in English */
[dir="rtl"] .sec-action svg { transform: scaleX(-1); }

/* Search results dropdown opens to the left side in RTL */
[dir="rtl"] #search-results { right: auto; left: 0; text-align: right !important; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

/* Numbers and price ranges stay readable left-to-right inside RTL text */
[dir="rtl"] .stat .num,
[dir="rtl"] .sl-score,
[dir="rtl"] .h-spec,
[dir="rtl"] .sl-meta,
[dir="rtl"] .steps .n { direction: ltr; unicode-bidi: isolate; }

/* Footer columns inherit right alignment automatically; keep the email
   and legal row readable */
[dir="rtl"] .footer-bottom { text-align: right; }
[dir="rtl"] [dir="ltr"] { unicode-bidi: isolate; }

/* Breadcrumb / FAQ chevrons are text characters ("+") — no flip needed.
   Back-to-top button stays bottom-right (physical) in both directions. */
