/*
 * Avizone Tech Arabic layout corrections.
 * Loaded after the legacy theme bundle; every rule is scoped to RTL documents.
 */

html[dir="rtl"] body {
    overflow-x: clip;
}

html[dir="rtl"] main,
html[dir="rtl"] section,
html[dir="rtl"] .container,
html[dir="rtl"] .container-fluid {
    max-width: 100%;
}

/* Keep Arabic copy readable while product names, APIs and other Latin tokens
   retain their natural order. */
html[dir="rtl"] p,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] li {
    unicode-bidi: plaintext;
}

html[dir="rtl"] .section-heading,
html[dir="rtl"] .heading,
html[dir="rtl"] .banner-new-content,
html[dir="rtl"] .our-process-heading,
html[dir="rtl"] .testimonial-new-heading {
    text-align: right;
}

html[dir="rtl"] .section-heading.text-center,
html[dir="rtl"] .heading.text-center,
html[dir="rtl"] .our-process-heading,
html[dir="rtl"] .testimonial-new-heading {
    text-align: center;
}

/* Desktop product/service mega menus. */
@media (min-width: 992px) {
    html[dir="rtl"] .navbar-nav {
        float: left !important;
        padding: 0;
    }

    html[dir="rtl"] .navbar-nav > li {
        float: right;
    }

    html[dir="rtl"] .navbar-nav > li ul.dropdown {
        right: auto !important;
        left: 0 !important;
        direction: rtl;
        text-align: right;
    }

    html[dir="rtl"] .navbar-nav > li ul.dropdown > li {
        float: right;
        text-align: right;
    }

    html[dir="rtl"] .navbar-nav > li ul.dropdown > li a,
    html[dir="rtl"] .navbar-nav > li ul.dropdown > li ul li a {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 7px;
        text-align: right;
        white-space: normal;
    }

    /* The legacy broad selector gives every nested product link a 134px
       minimum height, making four menu columns over 1200px tall and clipping
       most entries. Only the column heading needs spacing. */
    html[dir="rtl"] .navbar-nav > li ul.dropdown > li ul li a {
        min-height: 0;
        line-height: 1.35;
    }

    html[dir="rtl"] .navbar-nav > li ul.drop-new > li {
        height: auto;
        min-height: 400px;
    }

    html[dir="rtl"] .navbar-nav > li ul.dropdown a img {
        flex: 0 0 auto;
        margin: 0 !important;
    }

    html[dir="rtl"] .navbar-nav > li ul.dropdown > li::before,
    html[dir="rtl"] .navbar-nav > li ul.dropdown > li::after {
        right: auto;
        left: 0;
    }
}

/* Generic Bootstrap/card grids: reverse visual order without reversing the
   text inside cards. */
html[dir="rtl"] .row {
    direction: rtl;
}

html[dir="rtl"] [class*="col-"] {
    float: right;
}

html[dir="rtl"] .card,
html[dir="rtl"] [class*="-box"],
html[dir="rtl"] [class*="-content"] {
    direction: rtl;
}

/* Numbered workflow/process layouts. */
html[dir="rtl"] #our-process ul.tabb {
    direction: rtl;
    padding: 0;
}

html[dir="rtl"] #our-process ul.tabb li {
    float: right;
}

html[dir="rtl"] .process-box-1 .row,
html[dir="rtl"] .process-box-2 .row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

html[dir="rtl"] .process-box-1 .process-box-content,
html[dir="rtl"] .process-box-2 .process-box-content {
    text-align: right;
}

html[dir="rtl"] .our-process-section .row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

html[dir="rtl"] .our-process-section .our-process-box,
html[dir="rtl"] .process-card,
html[dir="rtl"] [class*="process-card"] {
    text-align: right;
}

html[dir="rtl"] .our-process-section .our-process-box.arrow-on-the-left::before {
    transform: scaleX(-1);
}

/* Lists in process cards were showing chevrons against the text. */
html[dir="rtl"] .process-box-content ul,
html[dir="rtl"] .our-process-box ul,
html[dir="rtl"] [class*="process"] ul {
    padding-right: 0;
    padding-left: 0;
    list-style-position: inside;
}

html[dir="rtl"] .process-box-content li,
html[dir="rtl"] .our-process-box li,
html[dir="rtl"] [class*="process"] li {
    padding-right: 18px;
    padding-left: 0;
    text-align: right;
}

/* Sliders run LTR internally because Slick/Owl calculate transforms in LTR.
   Content is restored to RTL per slide and navigation is mirrored only once. */
html[dir="rtl"] .slick-slider,
html[dir="rtl"] .owl-carousel {
    direction: ltr;
}

html[dir="rtl"] .slick-slide,
html[dir="rtl"] .owl-item,
html[dir="rtl"] .testimonial-content,
html[dir="rtl"] .testimonial-about,
html[dir="rtl"] .testimonial-reply,
html[dir="rtl"] .test-cnt {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .slick-prev::before,
html[dir="rtl"] .slick-next::before,
html[dir="rtl"] .owl-prev i,
html[dir="rtl"] .owl-next i {
    display: inline-block;
    transform: scaleX(-1);
}

html[dir="rtl"] .testimonial-img {
    float: right;
    margin-left: 18px;
    margin-right: 0;
}

html[dir="rtl"] .testimonial-about {
    margin-right: 0;
}

/* Floating back-to-top control: prevent inherited RTL offsets from pushing
   its chevron outside the circle. */
html[dir="rtl"] .scroll-top,
html[dir="rtl"] .back-to-top,
html[dir="rtl"] #back-to-top,
html[dir="rtl"] .go-top {
    direction: ltr;
}

html[dir="rtl"] .scroll-top i,
html[dir="rtl"] .back-to-top i,
html[dir="rtl"] #back-to-top i,
html[dir="rtl"] .go-top i {
    position: absolute;
    inset: 50% auto auto 50%;
    margin: 0;
    transform: translate(-50%, -50%) !important;
}

@media (max-width: 991px) {
    html[dir="rtl"] .mobile-nav,
    html[dir="rtl"] .mobile-nav nav,
    html[dir="rtl"] .mob-navigation {
        direction: rtl;
        text-align: right;
    }

    html[dir="rtl"] .mobile-nav nav li a {
        padding-right: 20px;
        padding-left: 44px;
        text-align: right;
    }

    html[dir="rtl"] .mobile-nav nav li .arrow,
    html[dir="rtl"] .mobile-nav nav li .menu-arrow {
        right: auto;
        left: 12px;
        transform: scaleX(-1);
    }

    html[dir="rtl"] .process-box-1 .row,
    html[dir="rtl"] .process-box-2 .row {
        display: block;
    }

    html[dir="rtl"] .process-box-1 .process-box-content,
    html[dir="rtl"] .process-box-2 .process-box-content,
    html[dir="rtl"] .process-box-1 .process-box-img,
    html[dir="rtl"] .process-box-2 .process-box-img {
        width: 100%;
        float: none;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"] h1,
    html[dir="rtl"] h2,
    html[dir="rtl"] h3 {
        overflow-wrap: anywhere;
    }

    html[dir="rtl"] .testimonial-img {
        float: none;
        margin: 0 auto 16px;
    }

    html[dir="rtl"] .our-process-section .row {
        display: block;
    }
}
/* Logical-direction foundations for translated theme components. */
.is-rtl .top-bar-list-2, .is-rtl .top-bar-list-3, .is-rtl .meeting-content,
.is-rtl .foot-menu, .is-rtl .footer-menu-2, .is-rtl .footer-menu-3,
.is-rtl .side-bar-heading, .is-rtl .side-bar-form { text-align: start; }
.is-rtl input[type="email"], .is-rtl input[type="tel"], .is-rtl input[type="url"],
.is-rtl .email, .is-rtl .phone { direction: ltr; text-align: left; }
.is-rtl .fa-angle-right::before { content: "\f104"; }
.is-rtl .fa-angle-left::before { content: "\f105"; }
