/* RTL (Right-to-Left) Support for Arabic */

body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .container,
body.rtl .row {
    direction: rtl;
}

/* Navbar RTL */
body.rtl .navbar-nav {
    direction: rtl;
    text-align: right;
    margin-left: 0 !important;
    margin-right: 13% !important;
    padding-left: 0 !important;
    padding-right: 40px !important;
}

body.rtl .navbar-nav .nav-item {
    text-align: right;
    direction: rtl;
}

body.rtl .navbar-nav .nav-link {
    direction: rtl;
    text-align: right;
}

body.rtl .navbar-nav .nav-item .nav-link:after {
    margin-left: 0 !important;
    margin-right: 15px !important;
    left: auto !important;
    right: 0 !important;
}

body.rtl .dropdown-menu {
    right: auto !important;
    left: 0 !important;
    text-align: right;
    direction: rtl;
}

body.rtl .dropdown-item {
    text-align: right;
    direction: rtl;
}

/* Dropdown toggle arrow RTL */
body.rtl .dropdown-toggle::after {
    margin-left: 0 !important;
    margin-right: 0.255em !important;
    transform: rotate(180deg);
}

/* Navbar toggler RTL */
body.rtl .navbar-toggler.ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Top social links RTL */
body.rtl header .top-social-link {
    right: auto !important;
    left: 0 !important;
}

body.rtl .top-social-link li {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

body.rtl .top-social-link li:last-child {
    margin-left: 0 !important;
}

/* Menu background RTL */
body.rtl .menu-bg:before {
    left: auto !important;
    right: 0 !important;
}

/* Header RTL */
body.rtl .top-header .text-right {
    text-align: left !important;
}

body.rtl .top-header .text-left {
    text-align: right !important;
}

body.rtl .top-info {
    border-right: none !important;
    border-left: 1px solid #ddd !important;
}

body.rtl .top-icon {
    padding-right: 0 !important;
    padding-left: 5px !important;
}

/* Content RTL */
body.rtl .text-left {
    text-align: right !important;
}

body.rtl .text-right {
    text-align: left !important;
}

body.rtl .pull-right {
    float: left !important;
}

body.rtl .pull-left {
    float: right !important;
}

/* Carousel RTL */
body.rtl .carousel-control-prev {
    right: 0;
    left: auto;
}

body.rtl .carousel-control-next {
    left: 0;
    right: auto;
}

/* Service boxes RTL */
body.rtl .single-service {
    direction: rtl;
}

body.rtl .about-right-box {
    text-align: right;
}

/* Footer RTL */
body.rtl .footer-links {
    text-align: right;
}

body.rtl .footer-btm .text-right {
    text-align: left !important;
}

/* Language selector RTL */
body.rtl .dropdown-menu-right {
    left: 0 !important;
    right: auto !important;
}

/* Navbar collapse RTL */
body.rtl .navbar-collapse {
    direction: rtl;
}

body.rtl .navbar-collapse .navbar-nav {
    direction: rtl;
}

/* Form elements RTL */
body.rtl input,
body.rtl textarea,
body.rtl select {
    direction: rtl;
    text-align: right;
}

body.rtl .form-control {
    text-align: right;
}

/* Buttons RTL */
body.rtl .btn-default {
    direction: rtl;
}

/* Row no-gutters RTL */
body.rtl .row.no-gutters {
    direction: rtl;
    margin-right: 0;
    margin-left: 0;
}

body.rtl .row.no-gutters > [class*="col-"] {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

body.rtl .row.no-gutters .col-md-5,
body.rtl .row.no-gutters .col-md-7 {
    direction: rtl;
}

body.rtl .row.no-gutters .about-right-box {
    text-align: right;
    direction: rtl;
}

/* Logo RTL */
body.rtl .logo-img {
    float: right !important;
    margin-right: 0 !important;
    margin-left: auto !important;
    display: block;
    max-width: 580px;
    height: auto;
}

body.rtl header .top-header .col-lg-3:first-child,
body.rtl header .top-header .col-md-6:first-child,
body.rtl header .top-header .col-sm-6:first-child,
body.rtl header .top-header .col-6:first-child {
    text-align: right !important;
    direction: rtl;
}

body.rtl header .top-header .col-lg-3:first-child a,
body.rtl header .top-header .col-md-6:first-child a,
body.rtl header .top-header .col-sm-6:first-child a,
body.rtl header .top-header .col-6:first-child a {
    display: inline-block;
    text-align: right !important;
    float: right;
    width: auto;
}

body.rtl header .top-header .row {
    direction: rtl;
    flex-direction: row-reverse;
}

body.rtl header .top-header .container .row {
    direction: rtl;
}

/* Testimonial wrapper RTL */
body.rtl .testimonial-wrapper {
    direction: rtl;
}

body.rtl .testimonial-wrapper .main-title {
    direction: rtl;
    text-align: right;
}

body.rtl .testimonial-wrapper .back-title {
    direction: rtl;
}

body.rtl .testimonial-wrapper .title-top-sml-txt {
    direction: rtl;
    text-align: right;
}

body.rtl .testimonial-wrapper .single-testimonial {
    direction: rtl;
    text-align: right;
}

body.rtl .testimonial-wrapper .testimonial-img {
    float: left !important;
    margin-right: 0 !important;
    margin-left: 15px !important;
}

body.rtl .testimonial-wrapper .testimonial-txt {
    text-align: right;
    direction: rtl;
}

body.rtl .testimonial-wrapper .testimonial-txt:before {
    left: auto !important;
    right: 0 !important;
}

body.rtl .testimonial-wrapper .testimonial-txt:after {
    left: auto !important;
    right: 0 !important;
}

body.rtl .testimonial-wrapper .testimonial-btm {
    text-align: right;
    direction: rtl;
}

body.rtl .testimonial-wrapper .jcarousel {
    direction: rtl;
}

body.rtl .testimonial-wrapper .jcarousel ul {
    direction: rtl;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    body.rtl .navbar-collapse {
        text-align: right;
        direction: rtl;
    }
    
    body.rtl .navbar-nav {
        text-align: right;
        margin-right: 0 !important;
        padding-right: 0 !important;
        direction: rtl;
    }
    
    body.rtl .navbar-toggler {
        margin-right: 0 !important;
        margin-left: auto !important;
    }
    
    body.rtl .logo-img {
        max-width: 220px !important;
        height: auto;
        display: block;
        margin: 10px auto !important;
        float: none !important;
        padding: 5px;
    }
    
    body.rtl header .top-header .col-lg-3:first-child,
    body.rtl header .top-header .col-md-6:first-child {
        text-align: center !important;
    }
    
    body.rtl .testimonial-wrapper .testimonial-img {
        float: none !important;
        display: block;
        margin: 0 auto 15px auto !important;
        position: relative;
        right: auto !important;
        left: auto !important;
    }
    
    body.rtl .testimonial-wrapper .testimonial-txt {
        text-align: center;
    }
    
    body.rtl .testimonial-wrapper .testimonial-btm {
        text-align: center;
    }
}

