/* ==========================================================================
   ar.css: the Arabic site (/ar-ae/..., html[lang="ar"][dir="rtl"]), 2026-11-14.
   Same approach as reliantsurveyors.com/ar/ (its rs-ar.css).
   Loaded by includes/head.php after the mirrored stylesheets (css/rtl/,
   made by tools/build-rtl.js); this file is NOT mirrored, write it for RTL.
   - IBM Plex Sans Arabic for everything (loaded in head.php)
   - no letter-spacing: it breaks the joined Arabic script
   - no uppercase (Arabic has no capitals)
   - more line height: Arabic letters are taller
   - phone numbers and e-mail addresses stay left to right
   - arrows and chevrons point the other way (below)
   ========================================================================== */
:root {
    --font: "IBM Plex Sans Arabic", "Helvetica Neue", "Inter", Helvetica, Arial, sans-serif;
}

html[lang="ar"] body,
html[lang="ar"] body *:not(#vx-ar-font) {
    font-family: var(--font) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html[lang="ar"] body :is(h1, h2, h3, h4, h5, h6, [class*="__title"], [class*="-title"]) {
    line-height: 1.4 !important;
}

html[lang="ar"] body :is(p, li, dd, [class*="__text"], [class*="__desc"], [class*="__lead"]) {
    line-height: 1.85;
}

/* Arrows and chevrons point the other way: each arrow PATH is mirrored
   around its own icon's centre (the <svg> keeps its own hover transforms).
   Covers icon() in includes/icons.php and the arrows drawn inline. */
html[dir="rtl"] :is(
    path[d^="M5 12h14"],
    path[d^="M19 12H5"],
    path[d^="m9 18 6-6"],
    path[d^="m15 18-6-6"],
    path[d^="M7 17 17 7"],
    path[d^="M1 5h21"],
    path[d^="m15 14 5-5"],
    path[d^="M9 14 4 9"],
    path[d^="M4 9h11"]
) {
    transform: scaleX(-1);
    transform-box: view-box;
    transform-origin: 50% 50%;
}

/* English titles left in English (blog articles, en_attr(false) in config.php):
   read left to right but sit on the right like the Arabic around them */
html[dir="rtl"] [data-en-inline] {
    text-align: right;
}

/* back-to-top ring: fills from the top, mirrored (anticlockwise) */
html[dir="rtl"] .vx-top__ring {
    transform: scaleX(-1) rotate(-90deg);
}

/* numbers and addresses that must read left to right inside Arabic text */
html[dir="rtl"] :is(a[href^="tel:"], a[href^="mailto:"], .vx-ltr) {
    direction: ltr;
    unicode-bidi: isolate;
}

/* the language switch reads "EN" in Latin letters (styles in style.css) */
html[lang="ar"] body .vx-lang span:not(#vx-ar-font) {
    font-family: "Helvetica Neue", "Inter", Helvetica, Arial, sans-serif !important;
    letter-spacing: .04em !important;
}
