/* RTL (Right-to-Left) Styles for Arabic Language */

/* Language Switcher Styles */
.mainmenu li.language-switcher {
    display: inline-block;
    vertical-align: middle;
    margin-left: 20px;
    position: relative;
    z-index: 100;
    text-transform: none !important;
}

.language-switcher {
    display: inline-block;
    vertical-align: middle;
    margin-left: 20px;
    position: relative;
    z-index: 100;
}

/* Desktop specific styles */
@media (min-width: 769px) {
    .mainmenu li.language-switcher {
        display: inline-block !important;
        position: relative;
        z-index: 100;
        text-transform: none !important;
    }
    
    .language-switcher {
        display: inline-block !important;
        position: relative;
        z-index: 100;
    }
    
    .lang-toggle {
        display: inline-flex !important;
        position: relative;
        z-index: 101;
    }
    
    .lang-btn {
        cursor: pointer !important;
        pointer-events: auto !important;
        position: relative;
        z-index: 102;
        background: transparent !important;
        border: none !important;
    }
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4px;
    backdrop-filter: blur(10px);
    vertical-align: middle;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #fff;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 55px;
    justify-content: center;
    text-transform: none;
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.lang-btn img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* RTL Layout Adjustments */
body.rtl {
    direction: rtl;
    text-align: right;
}

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

/* Navigation RTL */
body.rtl .main-menu ul {
    direction: rtl;
}

body.rtl .main-menu ul li {
    float: right;
}

body.rtl .language-switcher {
    flex-direction: row-reverse;
}

/* Text alignment for RTL */
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6,
body.rtl p,
body.rtl .sec-title {
    text-align: right;
}

/* Hero section RTL */
body.rtl .hero-area .hero-content {
    text-align: right;
}

body.rtl .hero-area .hero-content h1,
body.rtl .hero-area .hero-content p {
    text-align: right;
}

/* Features section RTL */
body.rtl .feature-box-info {
    text-align: right;
}

body.rtl .feature-box-info h4,
body.rtl .feature-box-info p {
    text-align: right;
}

/* Showcase section RTL */
body.rtl .single-showcase-box {
    text-align: right;
}

body.rtl .single-showcase-box h4,
body.rtl .single-showcase-box p {
    text-align: right;
}

/* Download buttons RTL */
body.rtl .download-btn {
    flex-direction: row-reverse;
}

body.rtl .download-btn-text {
    text-align: right;
}

/* Footer RTL */
body.rtl .contact-form {
    text-align: right;
}

body.rtl .contact-form h4,
body.rtl .contact-address h4 {
    text-align: right;
}

body.rtl .contact-address {
    text-align: right;
}

body.rtl .contact-address ul li {
    text-align: right;
    flex-direction: row-reverse;
}

body.rtl .contact-address-info {
    text-align: right;
    margin-right: 15px;
    margin-left: 0;
}

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

body.rtl button {
    direction: rtl;
}

/* Media carousel RTL */
body.rtl .media-carousel {
    direction: rtl;
}

body.rtl .owl-nav {
    direction: ltr;
}

/* Modal RTL */
body.rtl .modal-content {
    direction: rtl;
    text-align: right;
}

body.rtl .modal-title {
    text-align: right;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
    body.rtl .language-switcher {
        justify-content: center;
        margin-top: 10px;
        margin-left: 0;
    }
    
    body.rtl .main-menu ul li {
        float: none;
        text-align: center;
    }
    
    .lang-toggle {
        padding: 3px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 50px;
    }
    
    .lang-btn img {
        width: 20px;
        height: 15px;
    }
}

/* General responsive styles for language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 0;
        margin-top: 10px;
        display: block;
        text-align: center;
    }
    
    .lang-toggle {
        padding: 3px;
        display: inline-flex;
    }
    
    .lang-btn {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 45px;
    }
    
    .lang-btn img {
        width: 18px;
        height: 13px;
    }
    .rtl .slicknav_nav{
        transform: translateX(50px);
    }
}

/* Arabic font improvements */
body.rtl {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl h5, body.rtl h6 {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    font-weight: 600;
}

/* Ensure proper spacing for Arabic text */
body.rtl p, body.rtl span, body.rtl div {
    line-height: 1.6;
    word-spacing: 0.1em;
}

/* Fix for icons in RTL */
body.rtl .icofont {
    margin-left: 5px;
    margin-right: 0;
}

body.rtl .download-btn .icofont {
    margin-right: 10px;
    margin-left: 0;
}