/* Language Switcher Container */
.navbar-language-switcher {
    display: flex;
    align-items: center;
    margin-left: auto !important;
    padding-right: 0.75rem;
    list-style: none !important;
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block !important;
    z-index: 1;
}

/* Hover functionality - keep dropdown open when hovering over button or menu */
.language-switcher:hover .dropdown-menu,
.language-switcher .dropdown-menu:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure smooth transition between button and menu */
.language-btn::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 5px;
}

/* Match navbar link style exactly */
.language-btn {
    background: transparent !important;
    border: none !important;
    color: #222222 !important;
    padding: 0 0.75rem !important;
    border-radius: 0 !important;
    font-family: "Roboto", sans-serif !important;
    font-size: inherit !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    position: relative !important;
}

.language-btn:hover {
    color: #A30301 !important;
    background: transparent !important;
    text-decoration: none !important;
}

.language-btn:focus {
    outline: none !important;
    color: #A30301 !important;
}

/* Clean dropdown */
.language-switcher .dropdown-menu {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
    margin-top: 0px !important;
    padding: 6px 0 !important;
    display: none !important;
    opacity: 0 !important;
    transition: opacity 0.15s ease !important;
    visibility: hidden !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 1000 !important;
    min-width: 100px !important;
    list-style: none !important;
    padding-left: 0 !important;
}

.language-switcher .dropdown-menu li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.language-switcher .dropdown-menu li::before {
    display: none !important;
    content: none !important;
}

.language-switcher .dropdown-item {
    padding: 10px 18px !important;
    color: #222222 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.language-switcher .dropdown-item:hover {
    background: #f5f5f5 !important;
    color: #A30301 !important;
}

.language-switcher .dropdown-item:hover::before {
    display: none !important;
    content: none !important;
}

/* Mobile responsiveness */
@media (max-width: 991px) {
    .navbar-language-switcher {
        margin-left: 0 !important;
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start !important;
        padding-left: 0 !important;
    }
    
    .language-switcher {
        width: auto !important;
        z-index: 1 !important;
    }
    
    .language-btn {
        width: auto !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }
    
    .language-switcher .dropdown-menu {
        width: auto !important;
        min-width: 100px !important;
        left: 0 !important;
        right: auto !important;
    }
}

@media (min-width: 992px) {
    .navbar-language-switcher {
        margin-left: auto !important;
        padding-right: 0.75rem;
    }
}

/* Ensure dropdown toggle arrow is hidden */
.language-switcher .dropdown-toggle::after {
    display: none;
}

/* Show dropdown on click */
.language-switcher .dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}
