body #footer .f24-language { display: flex; align-items: center; justify-content: center; direction: ltr; margin: 8px 0; padding: 0; clear: both; }
body #footer .f24-language > a { display: grid; place-items: center; position: relative; box-sizing: border-box; width: 36px; height: 44px; margin: 0; padding: 0; text-decoration: none; }
body #footer .f24-language a[aria-current]::after { content: ""; position: absolute; bottom: 7px; width: 10px; height: 2px; border-radius: 2px; background: #ff673e; }
body #footer .f24-language a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
body #footer .f24-language i { width: 18px; height: 12px; border-radius: 2px; display: block; overflow: hidden; position: relative; box-shadow: 0 0 0 1px #ffffff3a; }
.f24-ru { background: linear-gradient(#fff 33%,#2548ad 33% 67%,#cd243d 67%); }
.f24-en { background: linear-gradient(90deg,transparent 42%,#c52741 42% 58%,transparent 58%),linear-gradient(transparent 38%,#c52741 38% 62%,transparent 62%),linear-gradient(90deg,transparent 36%,white 36% 64%,transparent 64%),linear-gradient(transparent 29%,white 29% 71%,transparent 71%),linear-gradient(33deg,transparent 43%,white 43% 55%,transparent 55%),linear-gradient(-33deg,transparent 43%,white 43% 55%,transparent 55%),#253c7a; }
.f24-zh { background: #ce2733; }
.f24-zh::before { content:"★"; position: absolute; left: 1px; top: 1px; color: #ffd869; font: 7px/1 Arial; }
.f24-ar { background: linear-gradient(90deg,#ce2438 0 25%,transparent 25%),linear-gradient(#158455 33%,#fff 33% 67%,#151515 67%); }
html[lang="ar"] :is(a[href^="tel:"],a[href^="mailto:"], input[type="tel"],input[type="email"], input[type="url"]) { direction: ltr; unicode-bidi: isolate; }
/* The MODX theme positions its off-canvas menu with physical left offsets.
   Keep that coordinate system while giving the Arabic copy its own bidi context. */
html[lang="ar"][dir="rtl"], html[lang="ar"] body { direction: ltr; }
html[lang="ar"] :is(h1,h2,h3,h4,h5,h6,p,blockquote,figcaption,dt,dd,th,td,label,button,option,textarea,li > a,.section-kicker,.banner-lead,.banner-trust) {
  direction: rtl;
  unicode-bidi: isolate;
}
html[lang="ar"] input:not([type="tel"]):not([type="email"]):not([type="url"]):not([type="number"]) { direction: rtl; }
html[lang="ar"] .no-break { white-space: normal !important; }
html[lang="ar"] #header, html[lang="ar"] #mainmenu { direction: ltr; }
html[lang="en"] #mainmenu .mobile-mainmenu-button::after {content:"Menu" !important}
html[lang="zh-Hans"] #mainmenu .mobile-mainmenu-button::after {content:"菜单" !important}
html[lang="ar"] #mainmenu .mobile-mainmenu-button::after {content:"القائمة" !important}
.f24-language-notice { position:relative; background:#fff; color:#161616; padding:8px; margin:0; text-align:center; }
@media (max-width: 900px) and (pointer: coarse) {
  #footer:not(.f24-home-footer) .f24-language {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}
