/* Arabic (RTL) — loaded only when locale is ar */
html[dir="rtl"] body {
   font-family: "Tajawal", "Montserrat", serif;
}

html[dir="rtl"] body h1,
html[dir="rtl"] body h2,
html[dir="rtl"] body h3,
html[dir="rtl"] body h4,
html[dir="rtl"] body h5,
html[dir="rtl"] body h6 {
   font-family: "Tajawal", "Josefin Sans", serif;
}

html[dir="rtl"] .navbar-nav.ms-auto {
   margin-right: auto !important;
   margin-left: 0 !important;
}

html[dir="rtl"] .lang-toggle-wrap {
   margin-right: 0.75rem;
   margin-left: 0;
}

html[dir="rtl"] .text-start {
   text-align: right !important;
}

html[dir="rtl"] .text-end {
   text-align: left !important;
}

html[dir="rtl"] .modal-header .close,
html[dir="rtl"] #contact-popup .close {
   left: 1rem;
   right: auto;
}

/* --- Service inner banner: hero art is absolutely positioned with right:0 in LTR --- */
html[dir="rtl"] .bg-banner-inner-service-img {
   right: auto !important;
   left: 0 !important;
   text-align: left;
}

/* Avoid odd vertical centering + RTL stacking on the inner service banner */
html[dir="rtl"] .position-relative-customs .container-wrapper {
   top: auto;
   transform: none;
}

/* --- CTA blocks: decorative ::before uses right:0 / background-position:right --- */
html[dir="rtl"] .cta-ghost:before,
html[dir="rtl"] .cta-one:before {
   right: auto !important;
   left: 0 !important;
   background-position: left center;
}

/* --- List bullets (.custom-ul.ctaul) use left:0; flip for RTL --- */
html[dir="rtl"] .custom-ul.ctaul ul li:after {
   left: auto !important;
   right: 0 !important;
}

html[dir="rtl"] .custom-ul.ctaul li {
   padding: 0 25px 8px 26px !important;
}

html[dir="rtl"] .services-inner-banner-style .custom-ul.ctaul ul li:after {
   left: auto !important;
   right: 0 !important;
}

/* --- Service cards: keep copy readable and separated from artwork --- */
html[dir="rtl"] .mybox-services-main .content-services {
   display: flex;
   flex-direction: column;
   align-items: stretch;
   overflow-wrap: anywhere;
   word-break: break-word;
}

html[dir="rtl"] .mybox-services-main .position-image {
   position: relative !important;
   left: auto !important;
   right: auto !important;
   margin-top: 1.25rem;
   flex-shrink: 0;
}

/* Bottom-anchored image (sibling of .content-services): reserve space so long Arabic lines do not paint over the image */
html[dir="rtl"] .mybox-services-main .position-image-custom-ab {
   z-index: 0;
}

html[dir="rtl"] .mybox-services-main:has(.position-image-custom-ab) .content-services {
   position: relative;
   z-index: 1;
   padding-bottom: min(42vw, 260px);
}

/* --- Misc alignment from LTR-only margins --- */
html[dir="rtl"] .imgright {
   text-align: left;
}

html[dir="rtl"] .padding-left-customs-desktop {
   padding: 0 50px 0 0 !important;
}

html[dir="rtl"] .imagetrustd-text {
   margin-left: 0;
   margin-right: 10px;
}

html[dir="rtl"] .btnflex a.web-black-btn {
   margin-right: 0;
   margin-left: 20px;
}

html[dir="rtl"] .mycustomctanew p {
   padding-right: 0 !important;
   padding-left: 40px;
}

/* Mega menu: CTA arrow points logically “forward” in RTL */
html[dir="rtl"] .mega-menu__featured-cta svg {
   transform: scaleX(-1);
}
