﻿/* Urdu pages (/ur/...): loaded after the site's stylesheets, only when <html lang="ur" dir="rtl">.
   Layout mirrors through flexbox, grid and the inline-start/end properties; this file covers the rest. */

@font-face { font-family: 'Fuelbotics Urdu Nastaliq'; font-style: normal; font-weight: 400 700; font-display: swap; size-adjust: 90%; src: url(/Main/assets/fonts/noto-nastaliq-urdu-arabic-var.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
html[lang="ur"] {
    --fb-ur-font: 'Fuelbotics Urdu Nastaliq';
    --fb-ur-text: 2;
    --fb-ur-head: 1.75;
    --fb-ur-scale: .8;
    --fb-ur-bold: 500;
}

/* The site's headings are 700-800, which is heavy in Urdu script; Nastaliq's regular is already strong. */
html[lang="ur"] body *:not(i):not([class*="fa-"]) {
    font-weight: 400;
}

html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] .cx-btn,
html[lang="ur"] .quote-btn {
    font-weight: 400 !important;
}

html[lang="ur"] b,
html[lang="ur"] strong {
    font-weight: var(--fb-ur-bold) !important;
}

/* Urdu letters stand taller than Latin ones at the same size, so the big headings are scaled down. */
html[lang="ur"] .cx-home-hero h1 {
    font-size: calc(clamp(34px, 5vw, 56px) * var(--fb-ur-scale));
}

html[lang="ur"] .cx-hero h1 {
    font-size: calc(clamp(30px, 5vw, 50px) * var(--fb-ur-scale));
}

/* Gradient text is painted only inside the line box, which cuts off Nastaliq strokes that rise above it
   (the top of ک, گ and ٹ), so Urdu headings use a solid colour instead. */
html[lang="ur"] .cx-hero h1 span,
html[lang="ur"] .cx-home-hero h1 span {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    color: #5eead4;
}

/* At line-height normal, Nastaliq's tall ascent and descent make pills and badges much taller than in
   English and push the Urdu below the Latin words beside it. */
html[lang="ur"] .cx-home-hero__eyebrow,
html[lang="ur"] .cx-loss__eyebrow,
html[lang="ur"] .cx-ai__eyebrow,
html[lang="ur"] .rs-pill,
html[lang="ur"] .cx-chip,
html[lang="ur"] .cx-plan__ribbon,
html[lang="ur"] .cx-currency button,
html[lang="ur"] .cx-faq-nav a,
html[lang="ur"] .cx-legal-meta span,
html[lang="ur"] .cx-pills li,
html[lang="ur"] .cx-svc__screen,
html[lang="ur"] .bx-cover__brand span,
html[lang="ur"] .cx-tour__tabs button {
    line-height: 1.6;
}

/* Figures such as "100 (1.0%)" or "−170" are laid out right to left otherwise, which moves the
   brackets and minus signs; the columns stay in right-to-left order. */
html[lang="ur"] .rs-table .num {
    direction: ltr;
    text-align: left;
}

html[lang="ur"] .cx-section-head h2,
html[lang="ur"] .cx-about-copy h2 {
    font-size: calc(clamp(26px, 3.4vw, 38px) * var(--fb-ur-scale));
}

html[lang="ur"] .cx-plan__price--custom strong {
    font-size: 30px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Every element sets its own font-family, so the Urdu face is applied to all of them; icon fonts are left alone.
   Latin text (Fuelbotics, numbers, emails) falls through to Outfit. */
html[lang="ur"] body,
html[lang="ur"] body *:not(i):not([class*="fa-"]):not(.material-symbols-outlined) {
    font-family: var(--fb-ur-font), 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
    letter-spacing: 0 !important;
}

html[lang="ur"] p,
html[lang="ur"] li,
html[lang="ur"] summary,
html[lang="ur"] label,
html[lang="ur"] small,
html[lang="ur"] .cx-section-head p {
    line-height: var(--fb-ur-text);
}

html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] h4 {
    line-height: var(--fb-ur-head);
}

html[lang="ur"] a,
html[lang="ur"] button,
html[lang="ur"] .cx-btn,
html[lang="ur"] .quote-btn,
html[lang="ur"] .sign-in-btn {
    line-height: 1.6;
}

/* The logo is the brand mark: it stays exactly as on English pages. */
html[lang="ur"] body .site-header .brand-logo__text strong {
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}

html[lang="ur"] body .site-header .brand-logo__text small {
    font-weight: 600;
    line-height: 1;
    letter-spacing: .08em !important;
}

html[lang="ur"] body .fx-brand .fx-logo span {
    font-weight: 800;
    letter-spacing: -.01em !important;
}

/* Nastaliq runs wider than Outfit: keep the header on one line. */
html[lang="ur"] .site-header .navbar .nav-menu a,
html[lang="ur"] .site-header .quote-btn,
html[lang="ur"] .site-header .sign-in-btn {
    white-space: nowrap;
}

@media (min-width: 1101px) and (max-width: 1300px) {
    html[lang="ur"] .site-header .navbar .nav-menu a {
        padding: 8px 8px;
        font-size: 14.5px;
    }
}

/* Brochure sheets have a fixed A4 height, so Urdu text sits a little tighter there. */
html[lang="ur"] .bx-page p,
html[lang="ur"] .bx-page li,
html[lang="ur"] .bx-page td,
html[lang="ur"] .bx-page th,
html[lang="ur"] .bx-page figcaption,
html[lang="ur"] .bx-page .bx-note {
    line-height: 1.7;
}

html[lang="ur"] .bx-page h2,
html[lang="ur"] .bx-page h3 {
    line-height: 1.5;
}

/* A sheet wider than the screen overflows to the left in RTL, so it scales down from its right edge. */
[dir="rtl"] .bx-page {
    transform-origin: top right;
}

/* Arrows point the way of reading. */
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-arrow-left {
    transform: scaleX(-1);
}

[dir="rtl"] .cx-link:hover i.fa-arrow-right,
[dir="rtl"] .cx-svc .read-more:hover i.fa-arrow-right {
    transform: translateX(-3px) scaleX(-1);
}

/* Phone numbers, emails, counters like "25+" and the like stay left to right inside Urdu text. */
[dir="rtl"] .counter,
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: isolate;
}

@media (max-width: 992px) {
    /* The menu drawer opens from the right. */
    [dir="rtl"] .navbar {
        inset: 0 0 0 auto;
        transform: translateX(100%);
        box-shadow: -24px 0 40px rgba(0, 0, 0, 0.08);
    }

    [dir="rtl"] .header-actions {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }
}

/* Home hero: the dashboard and phone lean the other way. */
[dir="rtl"] .cx-home-hero__shot {
    transform: perspective(1600px) rotateY(6deg) rotateX(2deg);
    transform-origin: right center;
}

[dir="rtl"] .cx-phone.cx-home-hero__phone {
    transform: rotate(-4deg);
}

@media (max-width: 992px) {
    [dir="rtl"] .cx-home-hero__shot {
        transform: none;
    }
}

/* Floating buttons swap sides: the chat sits clear of the copy and its call-to-action buttons. */
[dir="rtl"] .fbc-launcher {
    right: auto;
    left: 24px;
}

[dir="rtl"] .fbc-launcher__badge {
    right: auto;
    left: -2px;
}

[dir="rtl"] .fbc-teaser {
    right: auto;
    left: 98px;
    border-radius: 16px 16px 16px 4px;
}

[dir="rtl"] .fbc-panel {
    right: auto;
    left: 24px;
    transform-origin: bottom left;
}

[dir="rtl"] .fbc.is-expanded .fbc-panel {
    inset: 24px 0;
}

[dir="rtl"] .fbw {
    left: auto;
    right: 24px;
    padding: 0 12px 0 16px;
}

@media (max-width: 768px) {
    [dir="rtl"] .fbw {
        right: 16px;
        padding: 0;
    }

    [dir="rtl"] .has-mbar .fbm-bar {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 70px;
    }

    [dir="rtl"] .has-mbar .fbc-launcher {
        transition: transform .2s ease, box-shadow .2s ease, border-radius .25s ease, width .25s ease, height .25s ease, bottom .25s ease, left .25s ease;
    }

    [dir="rtl"].fb-past-hero .has-mbar .fbc-launcher {
        right: auto;
        left: 12px;
    }

    [dir="rtl"].fb-past-hero .has-mbar .fbc-launcher__badge {
        right: auto;
        left: -6px;
    }
}

@media (max-width: 540px) {
    [dir="rtl"] .fbc-launcher {
        left: 16px;
    }

    [dir="rtl"] .fbc-panel,
    [dir="rtl"] .fbc.is-expanded .fbc-panel {
        inset: 0;
    }
}

/* Chat bubbles: the tail sits on the reading side. */
[dir="rtl"] .fbc-bubble {
    border-radius: 18px 18px 6px 18px;
}

[dir="rtl"] .fbc-msg--user .fbc-bubble {
    border-radius: 18px 18px 18px 6px;
}

[dir="rtl"] .cx-ai__asks li {
    border-radius: 16px 16px 4px 16px;
}
