/* ============================================================
   Arabic / RTL layer — applied only on html[dir="rtl"] pages.
   Swaps the Latin display pairing (Cormorant + Manrope) for an
   elegant Arabic pairing (Amiri display + Tajawal text), relaxes
   letter-spacing/uppercase that don't suit Arabic, and opens up
   line-height for Arabic's taller rhythm. Layout itself mirrors
   automatically from the dir="rtl" attribute on <html>.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Tajawal:wght@300;400;500;700&family=Noto+Nastaliq+Urdu:wght@400;500;700&family=Noto+Sans+Devanagari:wght@300;400;500;700&family=Tiro+Devanagari+Hindi:ital@0;1&display=swap');

html[dir="rtl"] body { font-family: 'Tajawal', 'Manrope', sans-serif; letter-spacing: 0; }

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .hero h1, html[dir="rtl"] blockquote,
html[dir="rtl"] .fname, html[dir="rtl"] .big,
html[dir="rtl"] .entry-panel h2 {
  font-family: 'Amiri', 'Cormorant Garamond', serif;
}
html[dir="rtl"] em { font-family: 'Amiri', serif; font-style: italic; }

/* Arabic doesn't take tracking or uppercasing gracefully */
html[dir="rtl"] .label,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .btn,
html[dir="rtl"] .go,
html[dir="rtl"] .quiet-note,
html[dir="rtl"] .attribution,
html[dir="rtl"] .small,
html[dir="rtl"] .role,
html[dir="rtl"] .rc-head,
html[dir="rtl"] .crumb {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Arabic reads better with a taller line and a touch more weight */
html[dir="rtl"] p, html[dir="rtl"] .lede, html[dir="rtl"] .legal,
html[dir="rtl"] .section-intro, html[dir="rtl"] .desc, html[dir="rtl"] li {
  line-height: 2.05;
}
html[dir="rtl"] .hero h1 { line-height: 1.5; }
html[dir="rtl"] .lede { font-weight: 400; }

/* keep latin/brand fragments and numerals upright & untouched */
html[dir="rtl"] .section-num,
html[dir="rtl"] .stat .big,
html[dir="rtl"] .marquee { direction: ltr; }
html[dir="rtl"] .nav-brand .name { font-family: 'Amiri', serif; }

/* language switch pill */
.lang-switch{border:1px solid var(--gold-faint);border-radius:40px;padding:6px 15px !important;color:var(--gold) !important;font-size:0.74rem;letter-spacing:0.02em;transition:all .25s ease;}
.lang-switch:hover{background:var(--gold);color:var(--navy) !important;border-color:var(--gold);}

/* mirror the form select arrow / text alignment */
html[dir="rtl"] input, html[dir="rtl"] select, html[dir="rtl"] textarea { text-align: right; }
html[dir="rtl"] .quiet-note .dot { margin: 0 4px; }
/* the language switch is a <select>; keep the pill look but allow native dropdown */
html[dir="rtl"] #nts-lang { text-align: right; }

/* ============================================================
   Urdu (Nastaliq, RTL) + Hindi (Devanagari, LTR) typography
   (fonts imported at the top of this file — @import must be first)
   ============================================================ */
html[lang="ur"] body { font-family: 'Noto Nastaliq Urdu', 'Tajawal', sans-serif; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3,
html[lang="ur"] em, html[lang="ur"] blockquote,
html[lang="ur"] .fname, html[lang="ur"] .big, html[lang="ur"] .nav-brand .name,
html[lang="ur"] .hero h1, html[lang="ur"] .entry-panel h2 {
  font-family: 'Noto Nastaliq Urdu', 'Amiri', serif !important;
}
/* Nastaliq descenders need generous line-height */
html[lang="ur"] p, html[lang="ur"] .lede, html[lang="ur"] li,
html[lang="ur"] .desc, html[lang="ur"] .section-intro, html[lang="ur"] .legal { line-height: 2.5; }
html[lang="ur"] h1, html[lang="ur"] .hero h1 { line-height: 1.9; }

html[lang="hi"] body { font-family: 'Noto Sans Devanagari', 'Manrope', sans-serif; letter-spacing: 0; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3,
html[lang="hi"] em, html[lang="hi"] blockquote,
html[lang="hi"] .fname, html[lang="hi"] .nav-brand .name,
html[lang="hi"] .hero h1, html[lang="hi"] .entry-panel h2 {
  font-family: 'Tiro Devanagari Hindi', 'Noto Sans Devanagari', serif;
}
html[lang="hi"] .label, html[lang="hi"] .nav-links a, html[lang="hi"] .btn, html[lang="hi"] .go {
  letter-spacing: 0 !important; text-transform: none !important;
}
html[lang="hi"] p, html[lang="hi"] .lede, html[lang="hi"] li, html[lang="hi"] .desc { line-height: 2; }

/* language-switch <select> */
select.lang-switch { -webkit-appearance: none; appearance: none; background-color: transparent; cursor: pointer; outline: none; }
select.lang-switch option { background: var(--navy); color: var(--ivory); }
