/* RTL Support for Arabic Language */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

/* Language Switcher Styles */
.language-switcher a,
.mobile-language-switcher a {
    color: #fff;
    text-decoration: none;
    padding: 5px;
    transition: all 0.3s ease;
}

.language-switcher a:hover,
.mobile-language-switcher a:hover {
    color: #f5a425;
}

.language-switcher a.active,
.mobile-language-switcher a.active {
    color: #f5a425;
    font-weight: bold;
}

/* Header RTL adjustments */
body.rtl .logo-left {
    flex-direction: row-reverse;
}

body.rtl .congat_menu ul {
    padding-right: 0;
}

body.rtl .congat_menu ul li {
    float: right;
}

body.rtl .logo-left .col-md-3 {
    order: 2; /* Moves the logo to the right in RTL mode */
}

body.rtl .logo-left .col-md-9 {
    order: 1; /* Moves the menu to the left in RTL mode */
}
/* Add RTL text alignment for txbdscontent paragraphs */
body.rtl .txbdscontent {
    text-align: right;
}

body.rtl .txbdscontent p {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
}

body.rtl .tx_right_otherx {
    margin-right: auto;
    margin-left: 0;
}

body.rtl .menu-item-has-children > a:after {
    margin-right: 5px;
    margin-left: 0;
}

body.rtl .sub-menu .sub-menu {
    right: 100%;
    left: auto;
}

/* Slider RTL adjustments */
body.rtl .allleft {
    text-align: right;
}

body.rtl .txbdsbtn.allcostyle {
    text-align: right;
}

/* Fix arrow icons to consistently show double arrows */
body.rtl .ti-angle-double-right:before {
    transform: rotate(180deg);
    display: inline-block;
}

body.rtl .icofont-thin-double-right:before {
    transform: rotate(180deg);
    display: inline-block;
}

/* Fix spacing between text and arrow icons in buttons for RTL */
body.rtl .txbdsbtn a i {
    margin-right: 30px;
    margin-left: 0;
}

body.rtl .witr_btn .pluse_btn_icon {
    margin-right: 15px;
    margin-left: 0;
    align-items: left;
}

body.rtl .btnallt i {
    margin-right: 15px;
    margin-left: 0;
}

/* Fix for donate button in header */
body.rtl .donate-btn-header .dtbtn i,
body.rtl .dtbtn i {
    margin-right: 15px;
    margin-left: 0;
}

/* Responsive adjustments for button spacing in RTL */
@media (max-width: 767px) {
    body.rtl .txbdsbtn a i {
        margin-right: 15px;
    }
    
    body.rtl .witr_btn .pluse_btn_icon {
        margin-right: 10px;
    }
    
    body.rtl .btnallt i {
        margin-right: 10px;
    }
    
    body.rtl .btn i {
        margin-right: 10px;
    }
    
    body.rtl .donate-btn-header .dtbtn i,
    body.rtl .dtbtn i {
        margin-right: 10px;
    }
}

/* Feature boxes RTL adjustments */
body.rtl .thbdspanposi {
    right: auto;
    left: 10px;
}

body.rtl .txbdsva .txbdicon {
    float: none;
    margin: 0 auto 20px;
    display: block;
    text-align: center;
}

body.rtl .txbdsva .txbdcon {
    text-align: center;
    display: block;
    width: 100%;
}

/* Service boxes RTL adjustments */
body.rtl .txbdsva.text-left .txbdicon {
    margin-left: 20px;
    margin-right: 0;
}

/* About section RTL adjustments */
body.rtl .ab_left_smimg {
    right: auto;
    left: 0;
}

body.rtl .icon-list-items .icon-list-item {
    display: flex;
    align-items: center;
    padding: 0;
    vertical-align: bottom;
}

body.rtl .icon-list-items .icon-list-item .icon-list-icon {
    margin-left: 5px;
    margin-right: 0;
    margin-bottom: 5px;
    display: flex;
    align-items: baseline;
    vertical-align: text-bottom;
}

body.rtl .icon-list-items .icon-list-item .icon-list-text {
    display: flex;
    align-items: center;
    margin-top: 0 !important;
    line-height: 1.5;
    vertical-align: text-bottom;
}


/* Tab section RTL adjustments */
body.rtl .witr_adv_tab_menu {
    padding-right: 0;
}

body.rtl .witr_adv_tab_menu .nav-item {
    margin-left: 5px;
    margin-right: 0;
}

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

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

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

body.rtl .mr {
    margin-left: 15px;
    margin-right: 0;
}

body.rtl .ml {
    margin-right: 15px;
    margin-left: 0;
}

body.rtl .pr {
    padding-left: 15px;
    padding-right: 0;
}

body.rtl .pl {
    padding-right: 15px;
    padding-left: 0;
}

/* Carousel and slider RTL adjustments */
body.rtl .slick-slider {
    direction: ltr; /* Keep slider direction ltr for proper functionality */
}

body.rtl .slick-slider .slick-slide {
    direction: rtl; /* But make slide content rtl */
}

body.rtl .witr_pslide_custom {
    right: auto;
    left: 0;
}

/* Remove positioning overrides for slick arrows */
/* body.rtl .slick-prev {
    right: auto;
    left: 0;
}

body.rtl .slick-next {
    right: 0;
    left: auto;
} */

/* Remove the rotation transform for slick arrows */
body.rtl .slick-prev:before,
body.rtl .slick-next:before {
    display: inline-block;
}

/* Footer RTL adjustments */
body.rtl .footer-middle ul {
    padding-right: 0;
}
body.rtl .mobile_menu_inner {
    right: unset;
    left: 600%;
}
body.rtl .mobile_menu_inner.mobile_p.tx-s-open{
    left: -11px;
}
body.rtl .footer-middle .icon-list-items .icon-list-item .icon-list-icon {
    float: right;
    margin-left: 10px;
    margin-right: 0;
}

/* Contact form RTL adjustments */
body.rtl .twr_form_box input,
body.rtl .twr_form_box textarea {
    text-align: right;
    padding-right: 15px;
    padding-left: 15px;
}

/* Remove the rotation transform for button icons to fix arrow direction issues */
body.rtl .btn i {
    /* transform: rotate(180deg); - Removed to fix arrow direction */
    display: inline-block;
    margin-right: 15px;
    margin-left: 0;
}
@media (max-width: 767px) {
    body.rtl  .mobile_menu_logo img {
        margin-right: 6px;
    }
}
/* Mobile menu RTL adjustments */
body.rtl .mobile_menu_option {
    right: auto;
    left: 10px;
}

body.rtl .mobile_menu_content {
    /* right: auto; */
    /* left: -100%; */
}

body.rtl .mobile_menu_content.on {
    right: auto;
    left: 0;
}

body.rtl .mobile_menu_o {
    right: auto;
    left: 0px !important;
}

/* RTL image flipping for directional icons and images */
body.rtl .rtl-flip {
    transform: scaleX(-1);
}

/* Fix for search icon in RTL */
body.rtl .em-quearys-menu i.t-quearys {
    margin-right: 0;
}

/* Fix for accordion icons in RTL */
body.rtl .card-link:after {
    float: left;
    transform: rotate(180deg);
}

/* Fix for video play button icon in RTL */
body.rtl .video-item a i.flaticon-play-button-2 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0 auto;
}

/* Fix for video play button in RTL */
body.rtl .play-overlay {
    left: auto;
    right: 50%;
    transform: translateX(50%);
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Center only the play icon inside the button */
body.rtl .play-overlay a i.flaticon-play-button-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Fix for tab area layout in RTL */
body.rtl .cg_tab_area .row {
    flex-direction: row-reverse;
}

/* Adjust text alignment in tab area for RTL */
body.rtl .tab_inner .tts.text-left {
    text-align: right !important;
}

/* Fix tab content layout in RTL */
body.rtl .tab-content .tab-pane .row {
    flex-direction: row-reverse;
}

/* Ensure tab navigation is properly aligned */
body.rtl .witr_adv_tab_menu .nav-tabs {
    padding-right: 0;
    display: flex;
    flex-direction: row-reverse;
}

/* Fix spacing in tab navigation */
body.rtl .witr_adv_tab_menu .nav-item {
    margin-right: 5px;
    margin-left: 0;
}

/* Ensure text alignment in tab content */
body.rtl .tab-content .tts.text-left {
    text-align: right !important;
}

/* Fix alignment of check icon and text in RTL mode */
body.rtl .tab-content .icon-list-items .icon-list-item {
    padding-right: 0;
    text-align: right;
    width: 100%;
}

body.rtl .tab-content .icon-list-items .icon-list-item .icon-list-text {
    text-align: right;
    width: calc(100% - 25px);
}

body.rtl .tab-content .icon-list-items .icon-list-item .icon-list-icon {
    float: right;
    margin-left: 5px;
    margin-right: 0;
}

/* Fix for accordion dropdown arrows in RTL */
body.rtl .witr_ac_style:before {
    right: auto;
    left: 20px;
}

body.rtl .witr_ac_style {
    text-align: right;
    padding-right: 20px;
    padding-left: 40px;
}

/* Fix for contact information alignment in RTL mode */
body.rtl .cont_left_btm .tts.text-left {
    text-align: right !important;
}

body.rtl .cont_left_btm .txbdstitle {
    text-align: right;
}

body.rtl .icon-list-items.inline-items {
    padding-right: 0;
    margin-right: 0;
}

/* Restore original styling but fix alignment */
body.rtl .icon-list-item.inline-item {
    text-align: right;
}

body.rtl .icon-list-item.inline-item .icon-list-icon {
    float: right;
    margin-left: 10px;
    margin-right: 0;
}

body.rtl .icon-list-item.inline-item .icon-list-text {
    text-align: right;
}

/* Specific fix for email and location to align right */
body.rtl .icon-list-item.inline-item:first-child,
body.rtl .icon-list-item.inline-item:last-child {
    float: right;
    clear: right;
}

/* Fix background position for tab area in RTL mode */
body.rtl .cg_tab_area {
    background-position: top right;
    background-image: url("../images/tabs-bg-mir.jpg"); /* Use the mirrored version of the image */
}

/* Fix background for FAQ area in RTL mode */
body.rtl .cg_faq_area {
    background-position: center right;
    background-image: url("../images/faq-bg-mir.jpg"); /* Use the mirrored version of the image */
}

/* Fix for capabilities section in RTL mode */
body.rtl .all_list_color {
    text-align: right;
}

body.rtl .all_list_color h2 {
    text-align: right;
}

body.rtl .all_list_color ul li a, 
body.rtl .all_list_color ul li span {
    text-align: right;
}

/* Specific fix for phone to align left on big screens */
body.rtl .icon-list-item.inline-item:nth-child(2) {
    float: left;
}

/* On smaller screens, align all to right */
@media (max-width: 767px) {
    body.rtl .icon-list-item.inline-item:nth-child(2) {
        float: right;
        clear: right;
    }
}