/* =====================================================================
   Árabe (RTL) — se activa con <html dir="rtl" lang="ar"> (js/i18n.js).
   La mayoría del sitio usa flex/grid, que se espeja solo; aquí se corrigen las propiedades físicas
   (left/right, márgenes, degradados de los hero) y se ajusta la tipografía: en árabe no hay mayúsculas
   ni espaciado entre letras (rompe la unión de las letras).
   ===================================================================== */

html[lang="ar"] {
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
html[lang="ar"] body { font-family: var(--font); line-height: 1.8; }
html[lang="ar"] *, html[lang="ar"] *::before, html[lang="ar"] *::after { letter-spacing: 0 !important; text-transform: none !important; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .auth-title, html[lang="ar"] .cifra__num { font-weight: 800; line-height: 1.25; }

/* Correos, contraseñas y nombres de juego siguen de izquierda a derecha */
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="password"], html[dir="rtl"] input[name="totp"] { direction: ltr; text-align: right; }
html[dir="rtl"] input[type="email"]::placeholder, html[dir="rtl"] input[type="password"]::placeholder { text-align: right; }

/* Accesibilidad y ticker */
/* El enlace "Saltar al contenido" vive fuera de pantalla y solo aparece al enfocarlo con el teclado; en RTL se esconde a la derecha */
html[dir="rtl"] .skip-link { left: auto; right: -999px; }
html[dir="rtl"] .skip-link:focus { left: auto; right: 0; }
html[dir="rtl"] .ticker__inner strong { margin-right: 0; margin-left: .35rem; }

/* Auth */
html[dir="rtl"] .pw .input { padding-right: 12px; padding-left: 44px; }
html[dir="rtl"] .pw-toggle { right: auto; left: 6px; }
html[dir="rtl"] .auth-lead, html[dir="rtl"] .field-hint { text-align: start; }

/* Hero con foto: el degradado oscuro pasa al lado derecho (donde ahora está el texto) */
html[dir="rtl"] .hero--convoy, html[dir="rtl"] .hero--community, html[dir="rtl"] .hero--requirements, html[dir="rtl"] .hero--rules, html[dir="rtl"] .hero--recognition {
  --shade: linear-gradient(270deg, rgba(5, 15, 8, .93) 0%, rgba(5, 15, 8, .74) 38%, rgba(5, 15, 8, .17) 72%, rgba(5, 15, 8, .05) 100%), linear-gradient(180deg, rgba(7, 18, 10, .42) 0%, transparent 18%);
  background-position: 37% bottom;
}
html[dir="rtl"] .hero--recognition { --shade: linear-gradient(270deg, rgba(5, 15, 8, .8) 0%, rgba(5, 15, 8, .5) 38%, rgba(5, 15, 8, .1) 72%, rgba(5, 15, 8, .02) 100%), linear-gradient(180deg, rgba(7, 18, 10, .42) 0%, transparent 18%); }
html[dir="rtl"] .hero--rules::before {
  transform: translateX(-7%);
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 40%); mask-image: linear-gradient(270deg, transparent 0%, #000 40%);
}

/* Propiedades físicas del sitio que hay que espejar */
html[dir="rtl"] .card::before { right: auto; left: -25px; }
html[dir="rtl"] .checklist li { padding-left: 0; padding-right: 1.7rem; }
html[dir="rtl"] .checklist li::before { left: auto; right: 0; }
html[dir="rtl"] .modules li { border-left: 0; padding-left: 0; border-right: 3px solid var(--lime); padding-right: 1rem; }
html[dir="rtl"] .step::after { right: auto; left: 1.25rem; }
html[dir="rtl"] .cifra__plus { margin-right: 0; margin-left: .25rem; }
html[dir="rtl"] .calc__time dd { text-align: left; }
html[dir="rtl"] .calc__table th, html[dir="rtl"] .calc__table td { text-align: right; }
html[dir="rtl"] .why__blob--a { left: auto; right: 10%; }
html[dir="rtl"] .why__blob--b { right: auto; left: 10%; }
html[dir="rtl"] .hub-card { border-left-width: 1px; border-left-color: var(--line); border-right: 4px solid var(--accent); }
html[dir="rtl"] .hub-card--left { border-left: 1px solid var(--line); border-right: 4px solid var(--accent); }
html[dir="rtl"] .hub-card--right { border-right: 1px solid var(--line); border-left: 4px solid var(--accent); }
html[dir="rtl"] .lang__chev { margin-inline-start: 0; }
