/* Specific fix for Arabic language switcher positioning */

/* Override for RTL navigation to place language switcher at the end */
[dir="rtl"] .navbar .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    width: auto !important;
    margin-left: auto !important;
}

[dir="rtl"] .nav-menu .nav-list {
    order: 1 !important;
    flex: 0 0 auto !important;
}

[dir="rtl"] .nav-menu .nav-language {
    order: 2 !important;
    margin-left: 30px !important;
    margin-right: 0 !important;
}

/* Ensure consistent spacing for both languages */
[dir="rtl"] .navbar .container {
    justify-content: space-between !important;
}

[dir="ltr"] .navbar .container {
    justify-content: space-between !important;
}

/* Match the same margin/padding for consistent look */
[dir="rtl"] .nav-menu {
    margin-left: 0 !important;
}

[dir="ltr"] .nav-menu {
    margin-left: 0 !important;
}

/* Ensure language switcher stays at the end in RTL */
[dir="rtl"] .header .nav-menu .nav-language {
    position: relative !important;
    left: auto !important;
    right: 0 !important;
}

/* For mobile RTL */
@media (max-width: 768px) {
    [dir="rtl"] .nav-menu {
        flex-direction: column !important;
    }

    [dir="rtl"] .nav-language {
        order: 3 !important;
        margin-top: 15px !important;
    }
}
