/* ============================================================
   RTL overrides — loaded only for Arabic (dir="rtl").
   The dir attribute handles text flow; this fixes elements
   that hardcode left/right positioning, alignment, or accents.
   ============================================================ */

/* Arabic reads better with slightly taller line spacing */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] p, [dir="rtl"] li { line-height: 1.9; }

/* Default text alignment follows direction; undo hardcoded left aligns */
[dir="rtl"] .enterprise-hero-content,
[dir="rtl"] .enterprise-hero-copy,
[dir="rtl"] .section-split-head,
[dir="rtl"] .home-why-head-copy,
[dir="rtl"] .page-hero .container { text-align: right; }

/* Keep centered heroes centered */
[dir="rtl"] .enterprise-hero-content { align-items: center; text-align: center; }

/* ── Eyebrow / section accent lines (drawn on the left in LTR) ── */
[dir="rtl"] .eyebrow::before,
[dir="rtl"] .hero-eyebrow::before,
[dir="rtl"] .section-desc-label::before { margin-left: 10px; margin-right: 0; }

/* ── Left-accent bars on cards → move to the right edge ── */
[dir="rtl"] .home-why .proof-card::before,
[dir="rtl"] .whitelabel-trust .proof-card::before,
[dir="rtl"] .mvp-fit .proof-card::before { left: auto; right: 0; }

[dir="rtl"] .post-body blockquote {
  border-left: 0;
  border-right: 4px solid #12202B;
  padding: 12px 20px;
}

/* ── Buttons with leading icons / arrows ── */
[dir="rtl"] .btn-ghost,
[dir="rtl"] .hero-cta a,
[dir="rtl"] .back-link { direction: rtl; }
/* Flip the → arrows that are written as literal characters */
[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-outline,
[dir="rtl"] .btn-ghost { unicode-bidi: plaintext; }

/* ── Navigation ── */
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .mega-menu,
[dir="rtl"] .lang-menu { text-align: right; }
[dir="rtl"] .lang-menu-item { flex-direction: row-reverse; justify-content: flex-end; }

/* ── Footer ── */
[dir="rtl"] .footer-inner,
[dir="rtl"] .footer-links { text-align: right; }
[dir="rtl"] .footer-bottom .container { direction: rtl; }

/* ── Split landing hero: keep the copy column first (right side) ── */
[dir="rtl"] .landing-hero-grid .hero-cta { justify-content: flex-end; }

/* ── Corner widgets: mirror sides so they don't cover Arabic UI ── */
[dir="rtl"] .back-to-top { left: auto; right: 24px; }
[dir="rtl"] .ai-widget { right: auto; left: 24px; align-items: flex-start; }
[dir="rtl"] .ai-widget--chat-offset { left: 24px; }

@media (max-width: 700px) {
  [dir="rtl"] .back-to-top { right: 18px; left: auto; }
  [dir="rtl"] .ai-widget { left: 16px; right: auto; }
}

/* ── Lists inside post body ── */
[dir="rtl"] .post-body ul,
[dir="rtl"] .post-body ol { margin: 0 1.5em 1.2em 0; }

/* ── Tables ── */
[dir="rtl"] .post-body th,
[dir="rtl"] .post-body td { text-align: right; }

/* Keep code blocks left-to-right (code is not RTL) */
[dir="rtl"] .post-body pre,
[dir="rtl"] .post-body code { direction: ltr; text-align: left; unicode-bidi: embed; }
