/* NLT RTL fix — first pass: header, hero, buttons, footer.
   Loaded only on Arabic (dir="rtl") pages, after all theme CSS. */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Header nav: keep logo on the right, menu + phone block mirrored to the left */
html[dir="rtl"] .header-area .container,
html[dir="rtl"] .header-area .row {
    flex-direction: row-reverse;
}
html[dir="rtl"] .nav-menu,
html[dir="rtl"] .main-menu ul {
    flex-direction: row-reverse;
    padding-right: 0;
}
html[dir="rtl"] .nav-menu li,
html[dir="rtl"] .main-menu li {
    margin-left: 0;
}
html[dir="rtl"] .dropdown-menu {
    text-align: right;
    right: 0;
    left: auto;
}

/* Hero section content */
html[dir="rtl"] .hero-content,
html[dir="rtl"] .banner-content,
html[dir="rtl"] .slider-content {
    text-align: right;
}
html[dir="rtl"] .hero-btns,
html[dir="rtl"] .banner-btns {
    flex-direction: row-reverse;
}

/* Buttons: flip the arrow icon that sits after the label */
html[dir="rtl"] .theme-btn i,
html[dir="rtl"] .btn i,
html[dir="rtl"] a.theme-btn svg {
    transform: scaleX(-1);
    margin-right: 8px;
    margin-left: 0;
}

/* Generic icon-box rows (process steps, feature cards) */
html[dir="rtl"] .icon-box,
html[dir="rtl"] .feature-box {
    text-align: right;
}

/* Footer columns */
html[dir="rtl"] .footer-widget,
html[dir="rtl"] .footer-area .row {
    text-align: right;
}
html[dir="rtl"] .footer-widget ul li {
    padding-right: 0;
    padding-left: 15px;
}

/* Post navigation (Next Post / Back To Blog) keeps its original left/right arrow
   icon class even though flexbox already swapped which side the link sits on,
   so the arrow ends up pointing into the page instead of out toward the edge
   it moved to. Mirror these directional glyphs to match their new side. */
html[dir="rtl"] i[class*="arrow-left"],
html[dir="rtl"] i[class*="arrow-right"] {
    display: inline-block;
    transform: scaleX(-1);
}

/* OwlCarousel2 (vehicle gallery) auto-detects the page's RTL direction and
   mis-positions its slides off-screen because the theme's JS init never
   passed an explicit rtl option. The carousel itself needs no mirroring
   (it's just images), so force it back to ltr to keep Owl's internal math correct. */
html[dir="rtl"] .owl-carousel,
html[dir="rtl"] .owl-carousel .owl-stage,
html[dir="rtl"] .owl-carousel .owl-stage-outer {
    direction: ltr !important;
}

/* Mixed-content text (phone numbers, prices, emails, car model names like "911 GT3")
   must not be bidi-reversed. unicode-bidi: plaintext lets the browser pick the
   right direction per text run instead of inheriting the page's rtl blindly,
   so this fixes every such case site-wide, not just the ones already found. */
html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] a,
html[dir="rtl"] li,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] td,
html[dir="rtl"] div {
    unicode-bidi: plaintext;
}

/* Floating language switcher / WhatsApp button: keep on screen edge correctly */
html[dir="rtl"] .trp-language-switch-container.trp-floater-ls {
    right: auto;
    left: 20px;
}

/* Date-field calendar icon (car-search widget): the theme positions it with a
   fixed right:20px via .input1_inner::after, which sits cleanly to the right
   of LTR placeholder text (English reads left-to-right, so the icon at the
   right edge is clear of the text) but overlaps the START of RTL Arabic
   placeholder text (Arabic reads right-to-left, so the text itself starts
   at that same right edge). Padding on the input is already symmetric
   (20px both sides), so simply moving the icon to the opposite edge clears
   the overlap without needing any other layout change. */
html[dir=rtl] .input1_inner::after {
    right: auto;
    left: 20px;
}
