/* --- Language Switcher Styles --- */
.language-switcher {
    position: relative;
    margin-left: 24px;
}

.language-switcher .current-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1B263B;
    color: #F0F4F8;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #2A3A54;
    font-weight: 600;
    transition: background-color 0.3s ease;
    min-width: 60px;
    gap: 8px;
}

.language-switcher .current-lang:hover {
    background-color: #2A3A54;
}

.language-switcher .current-lang::after {
    content: '▲';
    font-size: 0.6em;
    transition: transform 0.3s ease;
    transform: rotate(0deg);
}

.language-switcher:not(.active) .current-lang::after {
    transform: rotate(180deg);
}

.language-switcher .lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: #1B263B;
    border: 1px solid #2A3A54;
    border-radius: 8px;
    list-style: none;
    padding: 8px;
    margin: 0;
    /* --- THE FIX --- */
    /* REMOVED fixed "width: 160px;" */
    /* ADDED min-width to ensure it aligns nicely with the button */
    min-width: 100%;
    /* --- END FIX --- */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 101;
}

.language-switcher.active .lang-dropdown {
    display: block;
}

.language-switcher .lang-dropdown li {
    padding-left: 0;
    margin-bottom: 0;
}

.language-switcher .lang-dropdown li::before {
    content: none;
}

.language-switcher .lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8D99AE;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* ADDED to prevent text from wrapping */
    white-space: nowrap;
}

.language-switcher .lang-dropdown a:hover {
    background-color: #2A3A54;
    color: #F0F4F8;
}

.lang-flag {
    width: 20px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}