.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.language-selector img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s ease-in-out;
    border: 2px solid transparent;
}

.language-selector img:hover {
    transform: scale(1.1);
}

.language-selector img.active {
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0,123,255,0.5);
}

@media (max-width: 768px) {
    .language-selector {
        padding: 5px;
    }
    
    .language-selector img {
        width: 20px;
        height: 20px;
    }
}

/* Language Dropdown */
.header-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.language-dropdown {
    position: relative;
    margin-right: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 4px;
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #292929;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    justify-content: center;
    margin: 0;
}

/* Rimuovo spazi extra */
.language-current::before,
.language-current::after,
.language-dropdown::before,
.language-dropdown::after {
    display: none;
    content: none;
}

.language-current .flag {
    font-size: 1.2em;
}

.language-current .lang-code {
    font-size: 0.9em;
    font-weight: 500;
    color: #292929;
}

.language-current i {
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #292929;
}

.language-dropdown.active .language-current i {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 160px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.language-dropdown.active .language-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    width: 100%;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option .flag {
    font-size: 1.2em;
}

.language-option.active {
    background: #f0f0f0;
    font-weight: 500;
}

/* Mobile Language Selector */
.language-selector-mobile {
    display: none;
}

@media (max-width: 768px) {
    .header-cta {
        gap: 12px;
    }
    
    .language-dropdown {
        display: none;
    }

    .language-selector-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 16px;
    }

    .language-selector-mobile .language-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        width: 100%;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .language-selector-mobile .language-option:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .language-selector-mobile .language-option.active {
        background: rgba(255, 255, 255, 0.2);
        font-weight: 500;
    }

    .language-selector-mobile .flag {
        font-size: 1.2em;
    }
}

/* Stili per il selettore mobile nell'header */
.mobile-header-language {
    display: none;
}

@media (max-width: 768px) {
    /* Mostra il selettore lingue nell'header mobile */
    .mobile-header-language {
        display: flex;
        align-items: center;
        margin-right: 16px;
        position: relative;
    }

    .mobile-header-language .language-current {
        padding: 8px;
        background: transparent;
        border: none;
        color: #333;
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.9em;
    }

    .mobile-header-language .flag {
        font-size: 1.4em;
    }

    .mobile-header-language .lang-code,
    .mobile-header-language i {
        display: none;
    }

    .mobile-header-language .language-options {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        min-width: 140px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        z-index: 1000;
    }

    .mobile-header-language.active .language-options {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mobile-header-language .language-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
        width: 100%;
        border: none;
        background: transparent;
        color: #333;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-header-language .language-option:hover {
        background: #f5f5f5;
    }

    .mobile-header-language .language-option.active {
        background: #f0f0f0;
        font-weight: 500;
    }

    /* Rimuovi il selettore dal menu mobile */
    .language-selector-mobile {
        display: none;
    }
} 