/* Urdu styling for nursing-theme.
   GOAL: Apply Urdu font + RTL text rendering WITHOUT breaking the
   existing LTR layout (flex/grid/floats stay as-is).
   Loaded only when Urdu mode is active. */

/* ---- 1. URDU FONT for text-bearing elements only ---- */
body.lang-ur,
body.lang-ur p,
body.lang-ur h1,
body.lang-ur h2,
body.lang-ur h3,
body.lang-ur h4,
body.lang-ur h5,
body.lang-ur h6,
body.lang-ur li,
body.lang-ur a,
body.lang-ur span,
body.lang-ur label,
body.lang-ur td,
body.lang-ur th,
body.lang-ur blockquote,
body.lang-ur figcaption,
body.lang-ur button,
body.lang-ur input[type="text"],
body.lang-ur input[type="search"],
body.lang-ur textarea,
body.lang-ur select {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Outfit', sans-serif;
    line-height: 1.9;
}

/* Headings: slightly tighter line-height so Nastaliq doesn't break the hero */
body.lang-ur h1,
body.lang-ur h2,
body.lang-ur h3 {
    line-height: 1.6;
}

/* ---- 2. RTL TEXT RENDERING for content prose only ----
   We DON'T flip header/footer/topbar paragraphs because they often
   contain mixed content (numbers, ©, year, links) that gets mangled
   when reversed. Only flip true article/page body content. */
body.lang-ur .entry-content,
body.lang-ur .post-content,
body.lang-ur .page-content,
body.lang-ur article .entry-content,
body.lang-ur main article p,
body.lang-ur main article li,
body.lang-ur main article blockquote,
body.lang-ur main article h1,
body.lang-ur main article h2,
body.lang-ur main article h3,
body.lang-ur main article h4,
body.lang-ur main article h5,
body.lang-ur main article h6 {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

/* Footer / topbar / nav: keep LTR direction so mixed content
   (©, year, phone, social icons) stays in correct visual order.
   Urdu text inside still renders RTL via unicode-bidi:plaintext. */
body.lang-ur .ftr,
body.lang-ur .ftr p,
body.lang-ur .ftr li,
body.lang-ur .ftr a,
body.lang-ur .ftr h3,
body.lang-ur .ftr h4,
body.lang-ur .topbar,
body.lang-ur .topbar p,
body.lang-ur .topbar a,
body.lang-ur .nav,
body.lang-ur .nav a,
body.lang-ur .ticker,
body.lang-ur .ticker-item {
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: inherit;
}

/* ---- 3. PRESERVE NUMERIC / LATIN BITS ---- */
body.lang-ur .tb-info a[href^="tel:"],
body.lang-ur .tb-info a[href^="mailto:"],
body.lang-ur a[href^="tel:"],
body.lang-ur a[href^="mailto:"],
body.lang-ur input[type="tel"],
body.lang-ur input[type="email"],
body.lang-ur input[type="url"],
body.lang-ur .ftr-bt p:last-child,
body.lang-ur time,
body.lang-ur .num,
body.lang-ur .stat-num {
    font-family: 'Outfit', sans-serif;
    direction: ltr;
    unicode-bidi: embed;
}

/* ---- 4. LANGUAGE SWITCHER (always loaded by inline style;
   these are only refinements when Urdu is active) ---- */
body.lang-ur .lang-switch .lang-opt[lang="ur"] {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
}

/* ---- 5. GOOGLE TRANSLATE OVERLAY: keep layout untouched ----
   Google adds <font> tags around translated text. Make sure
   they inherit our font and don't introduce odd spacing. */
body.lang-ur font {
    font-family: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: baseline !important;
}

/* Don't shift the page when Google Translate banner would have appeared */
body.lang-ur { top: 0 !important; position: static !important; }

/* ---- 6. SMALL TEXT/UI elements that look cramped in Nastaliq ---- */
body.lang-ur .ticker-item,
body.lang-ur .nav-ul a,
body.lang-ur .ftr-menu a,
body.lang-ur .adm-btn {
    line-height: 1.7;
}
