/* ==========================================================================
   Faseeh — Arabic / RTL layer (loaded on /ar/ only, see inc/i18n.php)
   --------------------------------------------------------------------------
   The page reuses the English blocks and stylesheets. This file only:
   1. switches the UI typography to Noto Sans Arabic (Arabic screens of the app
      in Figma) and gives Arabic its own line heights;
   2. turns the few physical left/right rules of the theme into their RTL mirror;
   3. keeps media, waveforms, timestamps and Qur'anic text in their own direction.
   Qur'anic text keeps its font (.fsh-arabic → Scheherazade New) and is never mirrored.
   ========================================================================== */

/* ------------------------------------------------------------ 1. Typography */
body.fsh-rtl {
  --font-sans:    'Noto Sans Arabic', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Noto Sans Arabic', 'PP Mori', 'Inter', system-ui, sans-serif;
  --font-mono:    'Noto Sans Arabic', 'Poppins', 'Inter', sans-serif;
  overflow-x: clip;
}
/* Arabic letters must stay joined: no tracking, no case transforms anywhere. */
.fsh-rtl, .fsh-rtl * { letter-spacing: 0 !important; }

/* Headings: Arabic needs more line height (stacked diacritics and descenders). */
.fsh-rtl h1, .fsh-rtl h2 { line-height: 1.38; }
.fsh-rtl h3 { line-height: 1.55; }
.fsh-rtl .fsh-hero__title { line-height: 1.3; font-weight: 500; }
.fsh-rtl .fsh-challenge__title,
.fsh-rtl .fsh-features__title,
.fsh-rtl .fsh-audience__title,
.fsh-rtl .fsh-learn__title,
.fsh-rtl .fsh-cta__title,
.fsh-rtl .fsh-showcase__title { font-weight: 500; }
.fsh-rtl p { line-height: 1.8; }
.fsh-rtl .fsh-hero__sub { line-height: 1.85; }

/* Eyebrows and tags: Arabic has no capitals; slightly larger to match the Latin cap height. */
.fsh-rtl .fsh-eyebrow,
.fsh-rtl .fsh-tag { text-transform: none; font-size: 13px; padding-inline: 11px 14px; }

/* Latin brand words inside Arabic text (Faseeh AI, AI Tutor…) stay in Inter. */
.fsh-rtl .fsh-latin { font-family: 'Inter', system-ui, sans-serif; }

/* ------------------------------------------------------------ 2. Mirrors */

/* Skip link: hidden off the start edge (left:-9999px would make the RTL page scroll). */
.fsh-rtl .skip-link { left: auto; right: 0; transform: translateY(-120%); border-radius: 0 0 0 8px; }
.fsh-rtl .skip-link:focus { left: auto; transform: none; }

/* Header pill: logo at the start (right). */
/* Logo side (inline start) keeps the larger padding, as in English. */
.fsh-rtl .fsh-header-inner { padding-left: 12px; padding-right: 23px; }
@media (min-width: 861px) and (max-width: 960px) { .fsh-rtl .fsh-header-inner { padding-right: 16px; } }
@media (max-width: 860px) { .fsh-rtl .fsh-header-inner { padding-left: 14px; padding-right: 18px; } }
.fsh-rtl .fsh-nav__cta { margin-left: 0; margin-inline-start: 4px; }
.fsh-rtl .fsh-nav__cta + .fsh-nav__cta { margin-inline-start: 0; }
.fsh-rtl .fsh-nav__toggle { margin-left: 0; margin-inline-start: auto; }
@media (min-width: 961px) {
  .fsh-rtl .fsh-nav__list > li > a, .fsh-rtl .fsh-nav__group-toggle { font-size: 14.5px; }
}
@media all {
  .fsh-rtl .fsh-nav__list a::after { transform-origin: right; }
}

/* Learn dropdown cards: arrow points to the reading direction. */
.fsh-rtl .fsh-nav-card__arrow { transform: scaleX(-1); }
.fsh-rtl .fsh-nav-card:hover .fsh-nav-card__arrow { transform: scaleX(-1) translateX(3px); }
.fsh-rtl .fsh-nav-card__desc { line-height: 1.6; }

/* Button / link arrows. */
.fsh-rtl .fsh-icon--arrow-right,
.fsh-rtl .fsh-icon--arrow-up-right,
.fsh-rtl .fsh-learn-card__link svg { transform: scaleX(-1); }
@media all {
  .fsh-rtl .fsh-btn:hover .fsh-icon--arrow-right { transform: scaleX(-1) translateX(4px); }
  .fsh-rtl .fsh-btn:hover .fsh-icon--arrow-up-right { transform: scaleX(-1) translate(3px, -3px); }
}
.fsh-rtl .fsh-learn-card__link:hover svg { transform: scaleX(-1) translateX(3px); }

/* More ways to learn: lab strip link sits at the end. */
.fsh-rtl .fsh-learn-lab .fsh-learn-card__link { margin-left: 0; margin-inline-start: auto; }
@media (max-width: 860px) {
  .fsh-rtl .fsh-learn-lab .fsh-learn-card__link { margin-inline-start: 0; }
}

/* Illustrations — interface fragments laid out as in the Arabic app (RTL),
   while the verse card keeps its geometry (reference, hint and focus word are
   positioned on the verse itself, which already reads right to left). */
.fsh-rtl .fsh-learn-note { left: auto; right: 2.9cqw; padding: 11px 12px 11px 16px; }
.fsh-rtl .fsh-learn-note__text { text-align: right; }
.fsh-rtl .fsh-learn-dock { padding: 0 10px 0 12px; }
.fsh-rtl .fsh-learn-wave { margin-left: 0; margin-inline-start: auto; }

/* Showcase mocks. */
.fsh-rtl .fsh-mock__hint { line-height: 1.7; }
.fsh-rtl .fsh-mini-progress__label { line-height: 1.5; }
.fsh-rtl .fsh-chip__check { right: auto; left: -9px; }
@media (max-width: 860px) {
  .fsh-rtl .fsh-round__tabs { margin-left: 0; }
}

/* Hero video frame: the notch faces the text (top-right in RTL). The video itself is not flipped:
   /ar/ plays the RTL-framed render of the same loop (demo offset to the left, clear of the notch). */
.fsh-rtl .fsh-hero__media {
  --notch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 678 647' preserveAspectRatio='none'%3E%3Cpath d='M518.4 0 L24 0 A24 24 0 0 0 0 24 L0 623 A24 24 0 0 0 24 647 L654 647 A24 24 0 0 0 678 623 L678 347.5 A24 24 0 0 0 654 323.5 L566.4 323.5 A24 24 0 0 1 542.4 299.5 L542.4 24 A24 24 0 0 0 518.4 0 Z' fill='%23000'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ 3. Kept as is */

/* Media rows (play, time, waveform, time) and waveforms stay left-to-right,
   like every audio player; timestamps and verse numbers are never reversed. */
.fsh-rtl .fsh-wave,
.fsh-rtl .fsh-learn-wave,
.fsh-rtl .fsh-player__controls,
.fsh-rtl .fsh-teach-player__controls,
.fsh-rtl .fsh-player--lg,
.fsh-rtl .fsh-player__time { direction: ltr; }

/* The hero video, posters and app screenshots are images: never flipped. */
.fsh-rtl .fsh-hero__media,
.fsh-rtl .fsh-hero__video { direction: ltr; transform: none; }

/* Footer: e-mail stays LTR (dir="ltr" in the markup). */
.fsh-rtl .fsh-footer-mail { unicode-bidi: isolate; }
.fsh-rtl .fsh-lang__menu { transform-origin: 0 0; }
