/* MiDash Solutions microsite - RTL (Arabic) overrides.
   The runtime (kit/i18n.js) sets <html dir="rtl" lang="ar"> when Arabic is
   active. Flexbox/grid auto-reverse under dir=rtl, and block text auto-aligns
   to the start (= right). So we only: set Arabic typography, right-align prose,
   flip explicitly-left components, keep Latin/brand bits LTR, mirror arrows, and
   (critically) preserve CENTERED content - never force it right. */

html[dir="rtl"] body {
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

/* Prose right-aligns. Centered blocks (higher specificity below) stay centered. */
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] dt,
html[dir="rtl"] dd { text-align: right; letter-spacing: 0; }

/* Explicitly left-aligned components in LTR -> right in RTL */
html[dir="rtl"] .lang-opt,
html[dir="rtl"] .pp-card,
html[dir="rtl"] .faq-q,
html[dir="rtl"] .q-btn,
html[dir="rtl"] .acc-q,
html[dir="rtl"] .term-item,
html[dir="rtl"] .term-stats,
html[dir="rtl"] .field input,
html[dir="rtl"] .field select,
html[dir="rtl"] .field textarea { text-align: right; }

/* Preserve CENTERED content - ONLY the hero stays centered in RTL (do NOT let
   the prose rule above pull it right). Inline text-align:center is also kept. */
html[dir="rtl"] .inst-hero-grid,
html[dir="rtl"] .inst-hero-grid h1,
html[dir="rtl"] .inst-hero-grid h2,
html[dir="rtl"] .inst-hero-grid .lead,
html[dir="rtl"] .inst-hero-grid .eyebrow,
html[dir="rtl"] [style*="text-align: center"],
html[dir="rtl"] [style*="text-align:center"] { text-align: center; }

/* Section headings (eyebrow + title + sub) read RIGHT-aligned in RTL, mirroring
   their start-alignment in LTR. Children inherit; the hero above stays centered. */
html[dir="rtl"] .section-head { text-align: right; }

/* Keep brand wordmark, language control, code, email/numeric fields LTR */
html[dir="rtl"] .logo,
html[dir="rtl"] .midash-wave,
html[dir="rtl"] .lang-switch,
html[dir="rtl"] .lang-current,
html[dir="rtl"] .kw,
html[dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .field input[type="email"],
html[dir="rtl"] input#email { direction: ltr; text-align: left; }

/* Mirror ALL directional arrows 180° in RTL (CTA arrows, process-flow arrows,
   generic .arrow, carousel controls). Down-carets (lang/nav dropdowns) are left
   alone - they point down regardless of reading direction. */
html[dir="rtl"] .btn svg,
html[dir="rtl"] .flow-arrow,
html[dir="rtl"] .arrow,
html[dir="rtl"] [class*="-arrow"],
html[dir="rtl"] .carousel-prev,
html[dir="rtl"] .carousel-next,
html[dir="rtl"] .guard-prev,
html[dir="rtl"] .guard-next {
  transform: rotate(180deg);
  transform-origin: center;
  display: inline-block;
}

/* Legal/FAQ prose blocks read right-aligned */
html[dir="rtl"] .terms-body,
html[dir="rtl"] .policy-body,
html[dir="rtl"] .faq-answer,
html[dir="rtl"] .note { text-align: right; }
