/* Localization-only additions: retain the existing brand, typography and shell. */
.site-header .language-menu__options {
  max-height: min(560px, calc(100dvh - 150px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-header .language-menu__option { direction: ltr; }
.site-header .language-menu__option[lang="ar"] span:last-child { direction: rtl; unicode-bidi: isolate; text-align: start; }
html[dir="rtl"] { text-align: start; }
html[dir="rtl"] .site-header .site-nav { direction: ltr; }
html[dir="rtl"] .site-header :is(.mega-menu__trigger, .mega-panel__intro, .mega-panel__links, .mega-panel__tertiary, .site-search__inner) { direction: rtl; text-align: start; }
html[dir="rtl"] .site-header .mega-panel__inner { direction: ltr; }
html[dir="rtl"] :is(svg, video, img, .engineering-visual, .flow-diagram, .solution-result-flow) { direction: ltr; }
html[dir="rtl"] :is(.flow-diagram, .solution-result-flow) :is([data-flow-text], [data-inspection-text], [data-i18n]) { direction: rtl; unicode-bidi: isolate; }
html[dir="rtl"] :is(main, .site-footer) :is(h1, h2, h3, p, label, li) { text-align: start; }
html[dir="rtl"] .site-footer__bottom nav { direction: ltr; }
html[dir="rtl"] :is(input, textarea, select) { text-align: start; }
html[dir="rtl"] :is(input[type="email"], input[type="tel"], a[dir="ltr"], bdi[dir="ltr"]) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] :is(a[href^="mailto:"], a[href^="tel:"], a[href^="https://wa.me/"]) { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] bdi[data-i18n-ltr] { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] bdi[data-i18n-ltr="contact"] { white-space: nowrap; }
html[lang="ar"] .home-inquiry-channel { direction: rtl; unicode-bidi: isolate; }
/* Arabic footer only: isolate Latin content without reversing the whole footer. */
html[lang="ar"] .site-footer { text-align: start; }
html[lang="ar"] .site-footer :is(.site-footer__company, [data-footer-ltr]) { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] .site-footer [data-footer-ltr] { white-space: nowrap; }
html[lang="ar"] .site-footer__main nav a { overflow-wrap: normal; word-break: normal; }
html[lang="ar"] .site-footer__contact > a { flex-direction: row-reverse; }
html[lang="ar"] .site-footer__contact > a[href^="tel:"] > span { direction: rtl; unicode-bidi: isolate; }
html[lang="ar"] .site-footer__contact [data-site-text="footerPhone"] { direction: rtl; unicode-bidi: isolate; }
/* Keep physical process diagrams in their original order; only their text is RTL. */
html[dir="rtl"] :is(.engineering-illustration, .engineering-operator, .flow-illustration, .flow-operator) { direction: ltr; }
html[dir="rtl"] :is(.engineering-illustration, .engineering-operator, .flow-illustration, .flow-operator) :is([data-flow-text], [data-assembly-text], [data-packaging-text], [data-assembly-diagram], [data-packaging-diagram]) { direction: rtl; unicode-bidi: isolate; }
/* The inspection hero has a physical photo/fade on the right. Keep its copy
   in the original left column, while Arabic text retains its reading direction. */
html[dir="rtl"] .inspection-hero > .inspection-container { direction: ltr; }
html[dir="rtl"] .inspection-hero__copy { direction: rtl; }
html[dir="rtl"] :is(.about-eyebrow, .home-section-heading, .brochure-eyebrow) { letter-spacing: normal; }
html:is([lang="es"], [lang="fr"], [lang="ar"]) .mega-panel__links > :is(a, button, div) { min-width: 0; }
html:is([lang="es"], [lang="fr"], [lang="ar"]) .mega-panel__links a { white-space: normal; overflow-wrap: break-word; }
@media (max-width: 1150px) {
  .site-header .language-menu__options { max-height: calc(100dvh - 100px); }
}
