/* ==========================================================================
   Arabic (right to left) fixes: the demo call to action on the homepage
   (section.demo.demo--v2: headline, button, logo strip, three steps, savings
   slider, proof line). Load after css/teradix-rtl.css.
   Every selector starts with [dir="rtl"].

   Already done by the base (sections 4 and 10 of teradix-rtl.css), not
   repeated here: button offset block and hover, arrow direction, right
   alignment of the steps, calculator and proof line, the divider side between
   steps, paragraph line-heights, the slider and its money scale kept left to
   right (a money scale is never mirrored).
   ========================================================================== */

/* ---- 1. Head ------------------------------------------------------------- */
/* One-line labels are set with line-height:1 for Latin capitals. Arabic marks
   need room above and below. */
[dir="rtl"] .demo--v2 :is(.demo2__eyebrow,.demo2__btn,.demo2__alt,.demo2__know){line-height:var(--lh-ar-ui)}
[dir="rtl"] .demo--v2 .demo2__trust p{line-height:var(--lh-ar-ui)}
/* The eyebrow box was sized around a line-height of 1. */
[dir="rtl"] .demo--v2 .demo2__eyebrow{padding-block:5px;font-size:14px}
[dir="rtl"] .demo--v2 :is(.demo2__know,.demo2__trust p){font-size:14px}
/* The lime bar under the second sentence sits lower: Arabic letters hang
   below the baseline further than Latin ones. */
[dir="rtl"] .demo.demo--v2 h2 span{background-position:0 92%;background-size:100% .3em}
/* The button label is one phrase and never breaks. */
[dir="rtl"] .demo--v2 .demo2__btn{white-space:nowrap}
[dir="rtl"] .demo--v2 .demo2__alt{font-size:16px}

/* ---- 1b. Figures -------------------------------------------------------- */
/* Every <bdi> in this section holds a Latin figure ($2.5M, 5–10%, +$10B).
   Pin it left to right and keep it on one line, so a range or a signed
   amount never splits across two lines on a narrow screen. */
[dir="rtl"] .demo--v2 bdi{direction:ltr;unicode-bidi:isolate;white-space:nowrap}

/* ---- 2. Logo strip ------------------------------------------------------- */
/* The strip scrolls by translateX(-50%) on a track anchored at the left. It
   stays left to right, like every marquee on the site, or it scrolls off into
   empty space. Logos are never mirrored. */
[dir="rtl"] .demo--v2 .dmarq{direction:ltr}

/* ---- 3. Three steps ------------------------------------------------------ */
/* The number tile leads on the right: the two-column grid follows the
   direction on its own. Only the type needs Arabic leading and size. */
[dir="rtl"] .demo--v2 .demo2__steps b{font-size:clamp(18px,1.4vw,21px)}
[dir="rtl"] .demo--v2 .demo2__steps span{font-size:15.5px}

/* ---- 4. Savings slider --------------------------------------------------- */
[dir="rtl"] .demo--v2 .demo2__in label{line-height:var(--lh-ar-ui);font-size:15.5px}
/* The amount is Latin: it sits at the right edge under its Arabic label. */
[dir="rtl"] .demo--v2 .demo2__in output{direction:ltr;text-align:right;line-height:1.2}
[dir="rtl"] .demo--v2 .demo2__out span{line-height:var(--lh-ar-ui)}
/* "من $2.5M إلى $5M" is longer than "$2.5M to $5M" and carries Arabic words,
   so the figure steps down a size and gets leading. It still never wraps. */
[dir="rtl"] .demo--v2 .demo2__out b{font-size:clamp(30px,3.7vw,58px);line-height:1.3}
[dir="rtl"] .demo--v2 .demo2__note{font-size:14px}
@media(max-width:480px){
  [dir="rtl"] .demo--v2 .demo2__out b{font-size:clamp(24px,7.6vw,30px)}
}

/* ---- 5. Proof line ------------------------------------------------------- */
[dir="rtl"] .demo--v2 .demo2__proof p{font-size:16px;line-height:1.8;text-align:center}
