/* ============================================================
   ASAS — Arabic (right-to-left) fixes. Loaded last, only on ar/*.html.
   The mirrored layout itself comes from the generated *.rtl.css copies
   (see _library/tools/rtl_flip.py); this file holds what mirroring can't do.
   Fonts: IBM Plex Sans Arabic (text), Saudi Typeface (headings).
   ============================================================ */
/* Headings: the Saudi Typeface (Ministry of Culture, free to use; file served unmodified as the
   designer asks). Only a Regular weight exists, so the browser must not fake a bold. */
@font-face{font-family:'Saudi';src:url('../fonts/saudi/Saudi-Regular.otf') format('opentype');font-weight:400;font-style:normal;font-display:swap}
html[lang="ar"]{
  --mellis-font:'IBM Plex Sans Arabic','Manrope',sans-serif;
  --mellis-font-two:'Saudi','Libre Baskerville','Noto Naskh Arabic',serif;
}
/* homepage sections use their own font variables: headings Saudi, text IBM Plex */
html[lang="ar"]{--ah-serif:'Saudi','Libre Baskerville','Noto Naskh Arabic',serif;--ah-sans:'IBM Plex Sans Arabic','Manrope',sans-serif}
html[lang="ar"] .ah-logos__label,html[lang="ar"] .footer-widget__title,
html[lang="ar"] .asas-sector__title,html[lang="ar"] .asas-hcert__name{font-family:'Saudi','Noto Naskh Arabic',serif;font-weight:400}
html[lang="ar"] .ah-logos__label{font-size:17px;line-height:1.5}
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3,html[lang="ar"] h4,html[lang="ar"] h5,html[lang="ar"] h6{font-synthesis:none}
/* Arabic letters must stay joined: no letter-spacing, no uppercase */
html[lang="ar"] body *{letter-spacing:0 !important;text-transform:none !important;font-style:normal}

/* phone numbers and emails read left-to-right inside Arabic text */
html[lang="ar"] a[href^="tel:"],html[lang="ar"] a[href^="mailto:"]{direction:ltr;unicode-bidi:isolate}
html[lang="ar"] .footer-widget__contact a,html[lang="ar"] a[href^="mailto:"],html[lang="ar"] a[href^="tel:"]{text-align:right}
/* a phone link with an Arabic label (contact page) keeps Arabic order; only the number is LTR */
html[lang="ar"] a[href^="tel:"]:has(span[dir="ltr"]){direction:rtl}

/* arrows point the reading direction */
html[lang="ar"] .fa-arrow-right::before,html[lang="ar"] .fa-angle-right::before,html[lang="ar"] .icon-right-arrow::before,
html[lang="ar"] .fa-long-arrow-alt-right::before{transform:scaleX(-1);display:inline-block}

/* menu: the English switch keeps the Latin font */
html[lang="ar"] .main-menu__list>li.asas-lang>a{font-family:'Manrope',sans-serif}

/* homepage logo marquee keeps running left (its track is built left-to-right) */
html[lang="ar"] .ah-logos__viewport{direction:ltr}
html[lang="ar"] .ah-logos__track{direction:ltr;margin-right:auto}
