/* ==========================================================================
   Language-Specific Overrides (i18n.css)
   Uses :lang() selectors since Polylang sets <html lang="xx">
   ========================================================================== */

/* Turkish: no overrides — uses default Cormorant Garamond + Inter (Latin), LTR */

/* Arabic: Use Amiri for everything */
:lang(ar) {
    --hk-font-heading: 'Amiri', serif;
    --hk-font-body: 'Amiri', serif;
}

/* Scale root + body on AR only for Arabic readability (Amiri renders denser
   than Inter). Must scope to specific elements — a bare :lang(ar) rule
   matches every descendant via inheritance and clobbers component
   font-sizes (same specificity as class selectors, loaded later). */
html:lang(ar) {
    font-size: 1.15rem;
}
body:lang(ar) {
    font-size: 1.15rem;
}

/* Farsi: Amiri for headings, Vazirmatn for body (Persian Naskh) */
:lang(fa) {
    --hk-font-heading: 'Amiri', serif;
    --hk-font-body: 'Vazirmatn', sans-serif;
}
html:lang(fa),
body:lang(fa) {
    font-size: 1.15rem;
}

/* Urdu: Noto Nastaliq Urdu (authentic Nastaliq script)
   Nastaliq is vertically taller than Naskh; cursive ascenders/descenders
   need more line-height to avoid collision. */
:lang(ur) {
    --hk-font-heading: 'Noto Nastaliq Urdu', serif;
    --hk-font-body: 'Noto Nastaliq Urdu', serif;
}
html:lang(ur),
body:lang(ur) {
    font-size: 1.2rem;
    line-height: 2.2;
}

/* Arabic pages: hide the "translation" paragraph in Quran/Hadith blockquotes.
   The original Arabic text (.hk-arabic with tashkeel) IS the content —
   showing a second simplified Arabic paragraph is redundant.
   Only hides when blockquote already contains .hk-arabic (so standalone
   blockquotes without tashkeel originals are not affected). */
html:lang(ar) blockquote:has(.hk-arabic) > p:not(.hk-arabic):not(:has(cite)) {
    display: none;
}

/* RTL: flip the unicode arrow on inline CTAs that pair an arrow glyph with
   a translatable label. The arrow lives in `.hk-arrow-end` (aria-hidden) so
   we can rotate 180° on RTL pages — visual direction follows reading
   direction. Used by perspektive related-cards + "Alle Perspektiven" CTA in
   hakim-theme/single-hakim_perspektive.php. */
html[dir="rtl"] .hk-arrow-end {
    display: inline-block;
    transform: scaleX(-1);
}
