/* Ajustes para las páginas traducidas (/en/, /fr/, /ar/). */

/* Árabe: letra propia, sin espaciado entre letras (rompe la escritura ligada) y de derecha a izquierda. */
html[lang="ar"] body :not(.fa):not(.fas):not(.far):not(.fab):not([class*=" fa-"]) {
    font-family: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Inter', system-ui, sans-serif !important;
    letter-spacing: 0 !important;
}

html[lang="ar"] em,
html[lang="ar"] i:not([class*="fa"]) {
    font-style: normal;
}

html[lang="ar"] [class*="title"] em,
html[lang="ar"] h1 em,
html[lang="ar"] h2 em {
    font-weight: 700;
}

html[lang="ar"] body {
    line-height: 1.75;
}

html[lang="ar"] [class*="kicker"],
html[lang="ar"] [class*="eyebrow"],
html[lang="ar"] [class*="crumb"] {
    text-transform: none;
}

/* Flechas apuntando en el sentido de lectura */
html[dir="rtl"] .ui-arrow,
html[dir="rtl"] .hx-arrow,
html[dir="rtl"] .sh-caret + *,
html[dir="rtl"] [class*="arrow"]:not(svg) {
    display: inline-block;
    transform: scaleX(-1);
}

/* Párrafos justificados también en árabe y francés, sin cortar palabras */
html[dir="rtl"] main p:not([class*="kicker"]):not([class*="eyebrow"]) {
    text-align: justify;
}

html[dir="rtl"] main p[class*="kicker"],
html[dir="rtl"] main p[class*="eyebrow"] {
    text-align: right;
}

/* Sello giratorio de la portada: el texto curvo se coloca de izquierda a derecha sobre el círculo. */
html[dir="rtl"] .hx-seal svg text {
    direction: ltr;
    font-size: 9.5px;
}

/* Botón de cerrar de la ventana de contacto, a la izquierda en árabe */
html[dir="rtl"] .ct-close {
    right: auto;
    left: 16px;
}

/* Alemán: las palabras compuestas largas pueden partirse en títulos y etiquetas en móvil. */
html[lang="de"] :is(h1, h2, h3, h4, [class*="title"], [class*="kicker"], .ui-tabs a, .pg-chip, dt, strong) {
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: break-word;
}

html[lang="de"] .pg-people > li,
html[lang="de"] .pg-people > li * {
    min-width: 0;
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: anywhere;
}

/* El selector de idioma se lee siempre igual: bandera | código */
html[dir="rtl"] .sh-lang-btn,
html[dir="rtl"] .sh-lang-menu a {
    direction: ltr;
}

/* Vídeo de la cabecera de Actividades: en árabe va a la izquierda y se funde hacia el texto. */
@media (min-width: 901px) {
    html[dir="rtl"] .ph--split .ph-video {
        right: auto;
        left: 0;
    }

    html[dir="rtl"] .ph--split .ph-video video {
        -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 9%);
        mask-image: linear-gradient(270deg, transparent 0, #000 9%);
    }
}

html[dir="rtl"] .ph--split .ph-video figcaption {
    right: auto;
    left: 18px;
}
