/* mSamex blog — RTL / Persian overrides (v1). Loaded ONLY by /fa/blog/* pages, after blog.css. */

/* --- typography: Vazirmatn leads, Geist keeps the Latin fallback --------- */
[dir="rtl"] .bl,
[dir="rtl"] .bl-hero h1,
[dir="rtl"] .bl h2,
[dir="rtl"] .bl h3,
[dir="rtl"] .bl-lead,
[dir="rtl"] .bl-kicker,
[dir="rtl"] .bl-meta,
[dir="rtl"] .bl-stat span,
[dir="rtl"] .bl-callout .t,
[dir="rtl"] .bl-note,
[dir="rtl"] .bl-table th,
[dir="rtl"] .bl-table td,
[dir="rtl"] .bl-steps li b,
[dir="rtl"] .bl-steps li span,
[dir="rtl"] .bl-faq summary,
[dir="rtl"] .bl-faq details p,
[dir="rtl"] .bl-cta .tx b,
[dir="rtl"] .bl-cta .tx span,
[dir="rtl"] .bl-cta .go,
[dir="rtl"] .bl-card h2,
[dir="rtl"] .bl-card p,
[dir="rtl"] .bl-card .cat,
[dir="rtl"] .bl-card .meta,
[dir="rtl"] .bl-figure figcaption{font-family:Vazirmatn,Geist,system-ui,sans-serif}

/* Persian script is cursive — tracking breaks letter joining. */
[dir="rtl"] .bl-hero h1,
[dir="rtl"] .bl h2,
[dir="rtl"] .bl h3,
[dir="rtl"] .bl-kicker,
[dir="rtl"] .bl-stat span,
[dir="rtl"] .bl-callout .t,
[dir="rtl"] .bl-table th,
[dir="rtl"] .bl-card .cat{letter-spacing:normal}

/* Persian needs a little more leading than Geist's Latin rhythm. */
[dir="rtl"] .bl{line-height:1.95}
[dir="rtl"] .bl-hero h1{line-height:1.35}
[dir="rtl"] .bl h2{line-height:1.5}
[dir="rtl"] .bl-lead{line-height:1.85}

/* --- mirrored ornaments -------------------------------------------------- */
[dir="rtl"] .bl-mesh{right:auto;left:0}
[dir="rtl"] .bl h2::before{left:auto;right:0}

[dir="rtl"] .bl-callout{border-left:0;border-right:3px solid var(--mint,#00D68F);border-radius:12px 0 0 12px}
[dir="rtl"] .bl-note{border-left:0;border-right:3px solid #E8B44C;border-radius:12px 0 0 12px}

[dir="rtl"] .bl-table th{text-align:right}

[dir="rtl"] .bl-steps li{padding:0 52px 22px 0}
[dir="rtl"] .bl-steps li::before{left:auto;right:0}
[dir="rtl"] .bl-steps li::after{left:auto;right:15.5px}

/* --- numbers, tickers and URLs stay left-to-right ------------------------ */
/* Bidi isolation: without it "0.0200%" renders as "%0.0200" inside RTL text.
   NOTE: .mono is deliberately NOT in this list. It marks two different things —
   Latin numeric runs AND pulled quotations, which in Persian are Persian text.
   Forcing direction:ltr on a Persian quote flips its guillemets and reorders any
   embedded Latin. Numeric .mono spans carry .ltr explicitly instead. */
[dir="rtl"] .bl .ltr,
[dir="rtl"] .bl-stat b,
[dir="rtl"] .bl-table td.n{direction:ltr;unicode-bidi:isolate;text-align:right}
[dir="rtl"] .bl .ltr{display:inline-block}

/* A Persian quotation set in .mono still needs the Persian face — Geist Mono
   has no Arabic-script coverage, so it would silently fall back. */
[dir="rtl"] .bl .mono{font-family:Vazirmatn,Geist,system-ui,sans-serif}
/* ...but .mono.ltr is a number: keep it monospaced, tabular and isolated. */
[dir="rtl"] .bl .mono.ltr{font-family:'Geist Mono',ui-monospace,monospace;
  font-variant-numeric:tabular-nums}

/* The FAQ chevron sits on the far edge in both directions (flex handles it),
   but the summary's own text must start from the right. */
[dir="rtl"] .bl-faq summary{text-align:right}

/* .bl-lang itself lives in blog.css and is already logical-property based
   (margin-inline-start), so it mirrors correctly with no override needed. */
