/* ==========================================================================
   Bin Sadiq Builders — RTL overrides
   --------------------------------------------------------------------------
   assets/css/main.css is written with logical properties, so this file only
   has to correct the handful of places where a physical value is unavoidable:
   gradients, the drawer slide direction, the before/after divider, timeline
   rails and directional icons. Enqueued only when the active language is Urdu
   or the WordPress locale is RTL.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

body,
input,
select,
textarea,
button {
    font-family: var(--bsb-font-urdu);
}

h1,
h2,
h3,
h4,
h5,
h6,
.bsb-btn,
.bsb-label,
.bsb-nav-menu a,
.bsb-footer__heading,
.bsb-entry-meta,
.bsb-chip,
.bsb-hero__eyebrow,
.bsb-section-title {
    font-family: var(--bsb-font-urdu);
    letter-spacing: 0;
}

body {
    line-height: 2;
}

.bsb-hero__title,
.bsb-page-header__title,
.bsb-section-title,
.bsb-not-found__title {
    line-height: 1.55;
}

/* Latin numerals, phone numbers, times and references stay LTR. */
.bsb-stat__value,
.bsb-boq__total,
.bsb-boq__breakdown dd,
.bsb-review dd,
.bsb-spec-list dd,
.bsb-fact__value,
.bsb-header__logo-img,
.bsb-footer__logo,
[dir="ltr"] {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Keep Urdu text from being letter-spaced by the eyebrow treatment. */
.bsb-hero__eyebrow {
    letter-spacing: 0;
    font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Header & hero gradients
   -------------------------------------------------------------------------- */

.bsb-hero__scrim {
    background: linear-gradient(
        260deg,
        rgba(8, 27, 51, 0.82) 0%,
        rgba(8, 27, 51, 0.58) 48%,
        rgba(8, 27, 51, 0.22) 100%
    );
}

@media (max-width: 1023px) {
    .bsb-hero__scrim {
        background: linear-gradient(180deg, rgba(8, 27, 51, 0.74) 0%, rgba(8, 27, 51, 0.6) 100%);
    }
}

.bsb-hero__eyebrow::before {
    order: 1;
}

.bsb-cta-band::before {
    inset-inline-end: auto;
    inset-inline-start: -120px;
}

.bsb-scroll-progress {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

/* --------------------------------------------------------------------------
   Directional icons
   -------------------------------------------------------------------------- */

.bsb-btn svg,
.bsb-link-list a svg,
.bsb-side-card__link svg,
.bsb-service-card__link svg,
.bsb-post-card__link svg {
    transform: scaleX(-1);
}

.bsb-service-card:hover .bsb-service-card__link svg {
    transform: scaleX(-1) translateX(3px);
}

.bsb-faq__marker {
    transform: scaleX(-1);
}

.bsb-faq__item.is-open .bsb-faq__marker {
    transform: scaleX(-1) rotate(-90deg);
}

.bsb-breadcrumbs__sep {
    transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */

.bsb-drawer__panel {
    inset-inline-end: auto;
    inset-inline-start: 0;
    transform: translateX(-100%);
    border-inline-end: 1px solid var(--bsb-border-grey);
}

.bsb-drawer.is-open .bsb-drawer__panel {
    transform: translateX(0);
}

/* --------------------------------------------------------------------------
   Before / after comparison
   -------------------------------------------------------------------------- */

.bsb-ba__before {
    clip-path: inset(0 0 0 calc(100% - var(--bsb-ba-pos)));
}

.bsb-ba__divider {
    left: auto;
    right: var(--bsb-ba-pos);
}

/* --------------------------------------------------------------------------
   Timeline rails
   -------------------------------------------------------------------------- */

.bsb-process-step::before {
    background: linear-gradient(
        180deg,
        rgba(191, 154, 69, 0.55),
        rgba(191, 154, 69, 0.12)
    );
}

@media (min-width: 1024px) {
    .bsb-process-step::before {
        background: linear-gradient(
            270deg,
            rgba(191, 154, 69, 0.55),
            rgba(191, 154, 69, 0.12)
        );
    }
}

/* --------------------------------------------------------------------------
   Fine alignment corrections
   -------------------------------------------------------------------------- */

.bsb-review dd,
.bsb-spec-list dd {
    text-align: start;
}

.bsb-wizard__nav .bsb-btn--primary {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

.bsb-contact__list li,
.bsb-footer__contact-item,
.bsb-form-privacy,
.bsb-note-pill,
.bsb-principle,
.bsb-team-card,
.bsb-estimator__head,
.bsb-alert,
.bsb-trust-item {
    flex-direction: row-reverse;
}

.bsb-entry-meta,
.bsb-project-card__meta {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.bsb-entry-meta li + li::before {
    inset-inline-start: auto;
    inset-inline-end: -8px;
}

.bsb-project-card__year {
    margin-inline-start: 0;
    margin-inline-end: auto;
    padding-inline-start: 0;
    padding-inline-end: 10px;
}

.bsb-search-form__input {
    text-align: start;
}

/* Native range direction stays physical so the fill matches the thumb. */
.bsb-range {
    direction: ltr;
}

.bsb-ba__range {
    direction: ltr;
}

/* Urdu Nastaliq needs slightly more room in dense UI labels. */
.bsb-wizard__progress-item,
.bsb-chip,
.bsb-btn {
    line-height: 1.6;
}

.bsb-footer__links a,
.bsb-drawer__menu a {
    min-height: 44px;
}
