/* Urdu (right-to-left) layer on top of style.rtl.css (redesign 2026-11-20).
   Loaded only by the redesigned /urdu/ pages, which set <html lang="ur" dir="rtl">.
   style.rtl.css is GENERATED from style.css by .tools/make_rtl_css.py (re-run it after editing style.css).
   This file adds the Urdu typeface, Bootstrap direction fixes and the few things the generator does not flip. */

/* ---------- Typeface ----------
   !important because page stylesheets set Raleway/Open Sans on specific headings, and those fonts have no Urdu
   letters (phones would fall back to a random font). Latin bits ([lang="en"], [dir="ltr"]) keep Open Sans. */
html[dir="rtl"] body,
html[dir="rtl"] :is(h1, h2, h3, h4, h5, h6, p, a, li, span, small, strong, b, em, button, summary, dt, dd, label, legend,
                    input, textarea, select, option, th, td, figcaption, blockquote, div) {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Open Sans", sans-serif !important;
}
html[dir="rtl"] :is([lang="en"], [dir="ltr"]), html[dir="rtl"] :is([lang="en"], [dir="ltr"]) * { font-family: "Open Sans", sans-serif !important; }
/* Nastaliq joins letters: letter spacing breaks the words, capitals do not exist. */
html[dir="rtl"] * { letter-spacing: 0 !important; text-transform: none !important; }
/* Nastaliq is tall: give lines room so ascenders/descenders don't collide. */
html[dir="rtl"] body { line-height: 2; }
html[dir="rtl"] p, html[dir="rtl"] li { line-height: 2.1; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { line-height: 1.75; font-weight: 700; }

/* ---------- Generic direction fixes ---------- */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .text-left { text-align: right !important; }
/* Arrow icons point the reading direction (left in Urdu). */
html[dir="rtl"] .bx-right-arrow-alt, html[dir="rtl"] .bx-chevron-right, html[dir="rtl"] .bx-right-arrow,
html[dir="rtl"] .icofont-arrow-right, html[dir="rtl"] .ri-arrow-right-line,
html[dir="rtl"] .bx-chevron-left, html[dir="rtl"] .bx-left-arrow-alt, html[dir="rtl"] .bx-left-arrow, html[dir="rtl"] .icofont-arrow-left { display: inline-block; transform: scaleX(-1); }

/* "EN" badge: link opens an English page. */
.nav-en { display: inline-block; margin-inline-start: 6px; padding: 0 6px; border-radius: 6px; background: rgba(255,102,0,.14); color: #ff6600; font-family: "Open Sans", sans-serif !important; font-size: 10px; font-weight: 700; line-height: 18px; vertical-align: middle; }

/* ---------- Header ---------- */
html[dir="rtl"] #header .logo.mr-auto { margin-right: 0 !important; margin-left: auto !important; }

/* ---------- Headings: Nastaliq reads larger and taller than Raleway, so scale down and open up lines ---------- */
html[dir="rtl"] .solutions-heading h2, html[dir="rtl"] .partners-copy h2,
html[dir="rtl"] .about-story__heading { font-size: clamp(30px, 3.3vw, 46px); line-height: 1.85; }
html[dir="rtl"] .presence-heading h2, html[dir="rtl"] .clientele-heading h2,
html[dir="rtl"] .news-heading h2 { font-size: clamp(30px, 3.1vw, 44px); line-height: 1.85; }
html[dir="rtl"] .footer-intro .footer-statement { line-height: 2; }
html[dir="rtl"] #hero .gradient-heading { line-height: 1.6; gap: 0 .3em; }
html[dir="rtl"] #hero .gradient-heading__word { padding-bottom: .25em; transform-origin: right bottom; }

/* ---------- Readability: Nastaliq needs a slightly bigger, darker size for small text ---------- */
html[dir="rtl"] .service-card .description { font-size: 15px; line-height: 2.1; color: #4a5268; }
html[dir="rtl"] .solution-tile__content small { font-size: 14px; line-height: 1.9; }
html[dir="rtl"] .solution-tile__content strong { line-height: 1.6; }
html[dir="rtl"] .partners-copy p, html[dir="rtl"] .news-heading p, html[dir="rtl"] .presence-heading p,
html[dir="rtl"] .clientele-heading p, html[dir="rtl"] .presence-copy p { font-size: 16px; line-height: 2.1; }
html[dir="rtl"] .news-list__item p, html[dir="rtl"] .news-featured__content p { font-size: 14.5px; line-height: 2.1; }
html[dir="rtl"] .about-story__card p { font-size: 17px; line-height: 2.1; }

/* ---------- Transforms are not mirrored by make_rtl_css.py: flip the few that slide sideways ---------- */
html[dir="rtl"] .service-card__hover-bg { transform: translateX(-101%); }
html[dir="rtl"] .solution-tile:hover .solution-tile__arrow,
html[dir="rtl"] .solution-tile:focus-visible .solution-tile__arrow { transform: translateX(-3px); }

/* ---------- Numbers like "Rs 770 m+" / "55+" keep their left-to-right order inside Urdu text ---------- */
html[dir="rtl"] [data-count], html[dir="rtl"] .presence-stats strong, html[dir="rtl"] .news-ticker__date,
html[dir="rtl"] .ab-timeline__date, html[dir="rtl"] .hero-stats strong, html[dir="rtl"] .ov-stat strong, html[dir="rtl"] .plan-speeds strong { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- News ticker: in RTL the duplicate group sits to the LEFT of the first, so the loop must slide right ---------- */
html[dir="rtl"] .news-ticker__track { animation-name: news-ticker-scroll-rtl; }
@keyframes news-ticker-scroll-rtl { to { transform: translateX(50%); } }

/* ---------- English stories on Urdu pages (news feed): normal Latin line height, left-to-right alignment ---------- */
html[dir="rtl"] :is(h1, h2, h3, h4)[lang="en"], html[dir="rtl"] :is(h1, h2, h3, h4) [lang="en"] { line-height: 1.3; }
html[dir="rtl"] :is(p, div)[lang="en"] { line-height: 1.7; }
html[dir="rtl"] [dir="ltr"]:is(h1, h2, h3, h4, p, div) { text-align: left; }
html[dir="rtl"] :is(h1, h2, h3, h4):has(> [lang="en"], > a > [lang="en"]) { line-height: 1.3; }
