/* Loaded only by the Arabic root layout. Every rule is also locale-scoped so
   cached styles cannot affect another language after client navigation. */
html[lang="ar"][dir="rtl"] body { text-align: start; }
html[lang="ar"][dir="rtl"] :where(h1, h2, h3, h4) { letter-spacing: normal; line-height: 1.3; }
html[lang="ar"][dir="rtl"] :where(p, li, h1, h2, h3, h4, input, textarea) { overflow-wrap: break-word; }

/* Flex/grid use inherited direction; do not reverse them a second time. */
html[lang="ar"][dir="rtl"] :is(.language-panel, .site-mobile-panel, .content-mobile-panel) { right: auto; left: 0; }
html[lang="ar"][dir="rtl"] .language-panel { direction: rtl; text-align: start; }
html[lang="ar"][dir="rtl"] .language-panel a { text-align: right; }
html[lang="ar"][dir="rtl"] .language-panel a[lang="ar"] { direction: rtl; }
html[lang="ar"][dir="rtl"] .social-qr-close { right: auto; left: 10px; }

/* Isolate LTR identifiers without changing their text or the Arabic flow. */
html[lang="ar"][dir="rtl"] :is([dir="ltr"], [dir="auto"], bdi) { unicode-bidi: isolate; }
html[lang="ar"][dir="rtl"] :is(.contact-address, input[type="email"], input[type="url"], input[type="tel"], input[type="number"], code, pre) { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"][dir="rtl"] :is(input, textarea, select) { text-align: start; }
html[lang="ar"][dir="rtl"] .company-details :is(strong, address) { text-align: right; }

/* Only directional glyphs and decorative shading are mirrored, never media. */
html[lang="ar"][dir="rtl"] :is(.button > span, .rtl-forward-arrow, .pillar-topline > a, .related-grid b, .resource-grid article > a, .intelligence-directory-list i, .empty-content-state nav i) { display: inline-block; transform: scaleX(-1); }
html[lang="ar"][dir="rtl"] .pillar-topline > a,
html[lang="ar"][dir="rtl"] .resource-grid article > a { display: grid; }
html[lang="ar"][dir="rtl"] .hero-shade,
html[lang="ar"][dir="rtl"] .why-image::after { transform: scaleX(-1); }

html[lang="ar"][dir="rtl"] .route-line i::after { right: auto; left: 0; }
html[lang="ar"][dir="rtl"] .identity-grid p { border-right: 0; border-left: 1px solid var(--line); }
html[lang="ar"][dir="rtl"] .identity-grid p:first-child { border-right: 1px solid var(--line); }
html[lang="ar"][dir="rtl"] .identity-grid p::before { margin-right: 0; margin-left: 10px; }
html[lang="ar"][dir="rtl"] .value-journey article { border-right: 0; border-left: 1px solid var(--line); padding-right: 0; padding-left: 25px; }
html[lang="ar"][dir="rtl"] .value-journey article:not(:first-child) { padding-right: 25px; }
html[lang="ar"][dir="rtl"] .value-journey article::before { left: auto; right: 0; }
html[lang="ar"][dir="rtl"] .value-journey article:not(:first-child)::before { left: auto; right: 25px; }
html[lang="ar"][dir="rtl"] :is(.ecosystem-grid, .market-grid, .resource-grid) { border-left: 0; border-right: 1px solid var(--line); }
html[lang="ar"][dir="rtl"] :is(.ecosystem-grid div, .market-grid article, .resource-grid article) { border-right: 0; border-left: 1px solid var(--line); }
html[lang="ar"][dir="rtl"] .related-grid { border-left: 0; border-right: 1px solid #ffffff2e; }
html[lang="ar"][dir="rtl"] .related-grid a { border-right: 0; border-left: 1px solid #ffffff2e; }
html[lang="ar"][dir="rtl"] .check-list li { padding-right: 42px; padding-left: 20px; }
html[lang="ar"][dir="rtl"] .check-list li::before { left: auto; right: 5px; }
html[lang="ar"][dir="rtl"] .approach-grid article { border-right: 0; border-left: 1px solid #ffffff24; padding-right: 0; padding-left: 34px; }
html[lang="ar"][dir="rtl"] .approach-grid article:not(:first-child) { padding-right: 34px; }
html[lang="ar"][dir="rtl"] .faq-list :is(summary, p) { padding-right: 0; padding-left: 42px; }
html[lang="ar"][dir="rtl"] .faq-list summary::after { right: auto; left: 8px; }
html[lang="ar"][dir="rtl"] .resource-grid article > a { right: auto; left: 36px; }

html[lang="ar"][dir="rtl"] .editorial-principles span { border-right: 0; border-left: 1px solid #d9e0e3; }
html[lang="ar"][dir="rtl"] .editorial-principles span:nth-child(2),
html[lang="ar"][dir="rtl"] .editorial-principles span:last-child { padding-left: 0; padding-right: 28px; }
html[lang="ar"][dir="rtl"] .editorial-principles span:last-child { border-left: 0; }
html[lang="ar"][dir="rtl"] .content-card-type span { margin-left: 0; margin-right: 10px; }
html[lang="ar"][dir="rtl"] .article-body blockquote { border-left: 0; border-right: 3px solid #a8542e; padding-left: 0; padding-right: 28px; }
html[lang="ar"][dir="rtl"] :is(.article-callout, .article-takeaways, .article-disclaimer) { border-left: 0; border-right: 3px solid #07528d; }
html[lang="ar"][dir="rtl"] :is(.article-table th, .article-table td) { text-align: start; }
html[lang="ar"][dir="rtl"] :is(.article-body, .article-takeaways, .article-structured-section) :is(ul, ol) { padding-left: 0; padding-right: 1.25em; }
html[lang="ar"][dir="rtl"] :is(.article-body, .article-takeaways, .article-structured-section) ul { list-style-type: disc; }
html[lang="ar"][dir="rtl"] :is(.article-body, .article-takeaways, .article-structured-section) ol { list-style-type: decimal; }
html[lang="ar"][dir="rtl"] .article-pagination a:last-child { text-align: end; }

@media (max-width: 900px) {
  html[lang="ar"][dir="rtl"] .identity-grid p,
  html[lang="ar"][dir="rtl"] .identity-grid p:first-child { border: 0; text-align: start; }
  html[lang="ar"][dir="rtl"] .value-journey { border-left: 0; border-right: 1px solid var(--line); }
  html[lang="ar"][dir="rtl"] .value-journey article,
  html[lang="ar"][dir="rtl"] .value-journey article:not(:first-child) { border-left: 0; padding-right: 22px; padding-left: 22px; }
  html[lang="ar"][dir="rtl"] .value-journey article::before,
  html[lang="ar"][dir="rtl"] .value-journey article:not(:first-child)::before { left: auto; right: -4px; }
  html[lang="ar"][dir="rtl"] .pillar-path { padding-left: 0; padding-right: 42px; }
  html[lang="ar"][dir="rtl"] .pillar-path::before { left: auto; right: 11px; }
  html[lang="ar"][dir="rtl"] .pillar-phase { margin-left: 0; margin-right: -42px; text-align: start; }
  html[lang="ar"][dir="rtl"] .approach-grid article,
  html[lang="ar"][dir="rtl"] .approach-grid article:not(:first-child) { border-left: 0; padding-right: 0; padding-left: 0; }
}
@media (max-width: 650px) {
  html[lang="ar"][dir="rtl"] .editorial-principles span,
  html[lang="ar"][dir="rtl"] .editorial-principles span:nth-child(2),
  html[lang="ar"][dir="rtl"] .editorial-principles span:last-child { border-left: 0; padding-right: 0; }
  html[lang="ar"][dir="rtl"] .article-pagination a:last-child { text-align: start; }
}

