/* RTL Specific Styles */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

html[dir="rtl"] .hero-buttons {
    justify-content: flex-start;
}

html[dir="rtl"] .btn i {
    order: -1;
    margin-left: 0;
    margin-right: var(--space-sm);
}

html[dir="rtl"] .feature-icon {
    margin: 0 auto var(--space-lg) auto;
}

html[dir="rtl"] .stat-icon {
    margin: 0 auto var(--space-lg) auto;
}

html[dir="rtl"] .feature-card {
    text-align: center;
    align-items: center;
    justify-content: center;
}

html[dir="rtl"] .stat-item {
    text-align: center;
}

html[dir="rtl"] .feature-content {
    text-align: center;
    width: 100%;
}

html[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-item i {
    margin-left: 0;
    margin-right: var(--space-md);
}

/* Partners RTL Support - توحيد السلايدر في اللغتين */
html[dir="rtl"] .partners-track {
    direction: ltr; /* Keep consistent sliding direction */
    animation-direction: normal; /* Same animation direction */
}

html[dir="rtl"] .partners-slider {
    direction: ltr; /* Maintain consistent container direction */
}

/* توحيد الـ gradients في اللغتين */
html[dir="rtl"] .partners-slider::before {
    left: 0;
    background: linear-gradient(90deg, var(--white) 0%, transparent 100%);
}

html[dir="rtl"] .partners-slider::after {
    right: 0;
    background: linear-gradient(270deg, var(--white) 0%, transparent 100%);
}

html[dir="rtl"] .partners-btn.partners-prev {
    order: 2;
}

html[dir="rtl"] .partners-btn.partners-next {
    order: 1;
}

/* تحسين عرض النصوص العربية في السلايدر */
html[dir="rtl"] .partner-name {
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
}

html[dir="rtl"] .section-title {
    font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] .section-subtitle {
    font-family: 'Tajawal', sans-serif;
}

/* Language Flags RTL Support */
html[dir="rtl"] .flag-icon {
    margin-right: 0;
    margin-left: 0.25rem;
}

html[dir="rtl"] .dropdown-item .flag-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] .footer-bottom-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-bottom-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .newsletter-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

html[dir="rtl"] .newsletter-form {
    flex-direction: row-reverse;
}

html[dir="rtl"] .newsletter-form button i {
    order: -1;
    margin-left: 0;
    margin-right: var(--space-sm);
}

html[dir="rtl"] .social-links {
    direction: ltr; /* Keep social icons in LTR */
}

html[dir="rtl"] .search-input-wrapper {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search-input {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

html[dir="rtl"] .search-submit-btn {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

html[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .logo a {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-logo {
    flex-direction: row-reverse;
}

/* RTL Animation Adjustments */
html[dir="rtl"] .animate-fade-in-left {
    animation: fadeInRight 0.6s ease-out;
}

html[dir="rtl"] .animate-fade-in-right {
    animation: fadeInLeft 0.6s ease-out;
}

/* RTL Responsive Adjustments */
@media (max-width: 1024px) {
    html[dir="rtl"] .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        direction: rtl;
    }
    
    html[dir="rtl"] .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        direction: rtl;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .header-content {
        flex-direction: column;
    }
    
    html[dir="rtl"] .newsletter-form {
        flex-direction: column;
    }
    
    html[dir="rtl"] .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Navigation RTL Spacing */
html[dir="rtl"] .navbar-nav {
    margin-right: 0;
    margin-left: 2rem;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .navbar-nav {
        margin-left: 1.5rem;
    }
}

@media (max-width: 992px) {
    html[dir="rtl"] .navbar-nav {
        margin-left: 0;
        margin-top: 1rem;
    }
}

