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

/* General RTL adjustments */
html[dir="rtl"] body {
    text-align: right;
}

/* Topbar */
html[dir="rtl"] .topbar-inner {
    flex-direction: row-reverse;
}

html[dir="rtl"] .topbar-contact {
    flex-direction: row-reverse;
}

html[dir="rtl"] .topbar-right {
    flex-direction: row-reverse;
}

/* Header */
html[dir="rtl"] .header-inner {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

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

/* Navigation */
html[dir="rtl"] .main-nav ul {
    flex-direction: row-reverse;
}

/* About Grid */
html[dir="rtl"] .about-grid {
    direction: rtl;
}

/* Services & Features */
html[dir="rtl"] .services-grid,
html[dir="rtl"] .features-grid {
    direction: rtl;
}

/* Footer */
html[dir="rtl"] .footer-grid {
    direction: rtl;
}

html[dir="rtl"] .footer-section ul {
    padding-right: 0;
    padding-left: 0;
}

html[dir="rtl"] .footer-section ul li:hover {
    padding-left: 0;
    padding-right: 6px;
}

/* CTA */
html[dir="rtl"] .cta-section {
    text-align: center;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 3px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-size: 0.70rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    line-height: 1;
}

.lang-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
    color: var(--site-primary);
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Mobile RTL */
@media (max-width: 768px) {
    html[dir="rtl"] .main-nav {
        left: auto;
        right: -100%;
    }

    html[dir="rtl"] .main-nav.open {
        right: 0;
    }

    html[dir="rtl"] .main-nav ul li a.active {
        border-left: none;
        border-right: 3px solid var(--site-secondary);
    }

    html[dir="rtl"] .main-nav ul {
        flex-direction: column;
    }
}
