/* Prevent flash of untranslated content */
html {
    transition: opacity 0.1s ease-in;
}

/* Ensure header_wrap has relative positioning for absolute children */
.header_wrap {
    position: relative;
}

/* Language Switcher Dropdown Styles */
.language-switcher {
    position: absolute;
    right: 180px;
    top: 50%;
    margin-top: 5px;
    transform: translateY(-50%);
    display: inline-block;
    z-index: 100;
}

.language-switcher-toggle {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 15px;
    transition: all 0.3s ease;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.language-switcher-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-switcher-toggle:focus {
    outline: none;
    border-color: #fff;
}

.language-switcher-toggle::after {
    content: '▼';
    font-size: 10px;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #808080;
    min-width: 180px;
    box-shadow: 0px -4px 8px rgba(0, 0, 0, 0.3), 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 0;
    margin-top: 5px;
    display: none;
    border-bottom: solid 2px #ff0e3b;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.language-dropdown.active {
    display: block;
}

.language-dropdown button {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    display: block;
}

.language-dropdown button:last-child {
    border-bottom: none;
}

.language-dropdown button:hover {
    color: #ff0e3b;
    background-color: rgba(0, 0, 0, 0.1);
}

.language-dropdown button.active {
    color: #ff0e3b;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Mobile menu language switcher */
.menu_lang_switcher {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.menu_lang_switcher button {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu_lang_switcher button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.menu_lang_switcher button.active {
    background-color: #fff;
    color: #000;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .language-switcher {
        display: none;
    }
}
