/* Import Arabic fonts */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@100;200;300;400;500;600;700;800;900&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Scheherazade+New:wght@400;500;600;700&display=swap");

/* Global Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-dropdown-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.language-dropdown-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 120px;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.language-option {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.language-option:hover {
    background: #f8f9fa;
}

.language-option.active {
    background: #007bff;
    color: white;
}

.language-option.active:hover {
    background: #0056b3;
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Sans Arabic', 'Amiri', 'Scheherazade New', 'Arial Unicode MS', 'Tahoma', sans-serif !important;
}

[dir="rtl"] * {
    font-family: 'Noto Sans Arabic', 'Amiri', 'Scheherazade New', 'Arial Unicode MS', 'Tahoma', sans-serif !important;
}

[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .language-dropdown-content {
    right: auto;
    left: 0;
}

/* Responsive Design for Language Switcher */
@media (max-width: 768px) {
    .language-dropdown-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .language-dropdown-content {
        min-width: 100px;
        font-size: 12px;
    }
    
    .language-option {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .language-dropdown-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
    
    .language-dropdown-content {
        min-width: 90px;
        font-size: 11px;
    }
    
    .language-option {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Arabic Font Support */
body[lang="ar"] {
    font-family: 'Arial', 'Tahoma', 'Segoe UI', sans-serif;
}

body[lang="ar"] h1,
body[lang="ar"] h2,
body[lang="ar"] h3,
body[lang="ar"] h4,
body[lang="ar"] h5,
body[lang="ar"] h6 {
    font-family: 'Arial', 'Tahoma', 'Segoe UI', sans-serif;
    font-weight: 600;
}

/* Responsive Design for Language Switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .language-dropdown-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .language-dropdown-content {
        min-width: 100px;
    }
    
    .language-option {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    [dir="rtl"] .language-switcher {
        margin-left: 0;
        margin-right: 10px;
    }
}

/* Animation for Language Switch */
.lang-transition {
    transition: all 0.3s ease;
}

/* Form RTL Adjustments */
[dir="rtl"] .contact-form {
    text-align: right;
}

[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
}

[dir="rtl"] .contact-form label {
    text-align: right;
}

[dir="rtl"] .radio-box-container {
    text-align: right;
}

[dir="rtl"] .block-rbc {
    text-align: right;
}

/* Contact Info RTL */
[dir="rtl"] .wrapper-ci {
    flex-direction: row-reverse;
}

[dir="rtl"] .left-wci {
    text-align: right;
}

[dir="rtl"] .right-wci {
    text-align: left;
}

/* Navbar RTL Adjustments */
[dir="rtl"] .navbar-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-container ul:first-child {
    order: 3;
}

[dir="rtl"] .navbar-container ul:last-child {
    order: 1;
}

[dir="rtl"] .navbar-container img {
    order: 2;
}
