.language-switcher {
    display: flex;
    align-self: center;
    align-items: center;
    position: relative;
    margin-left: 15%;
}

.language-toggle {
    height: 0;
    width: 0;
    padding: 20px;
    visibility: hidden;
}

#lang-toggle {
    display: inline-flex ;
    justify-content: space-around;
    align-items: center;
    cursor: pointer;
    background: #ffffff;
    width: 150px;
    height: 45px;
    padding: 0 10px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Subtle shadow for depth */
    transition: box-shadow 0.3s ease-in-out, transform 0.2s ease
}

#lang-toggle :hover{
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.flag-icon {
    position: relative;
    height: 2em !important;
    width: 2em !important;
    transition: opacity 0.3s;
}

#lang-br {
    right: 5px;
    opacity: 0.2;
}

.language-toggle:checked + label #lang-co{
    opacity: 0.2;
}

.language-toggle:checked + label #lang-br {
    opacity: 1;
}

/* === TABLETS (Pantallas medianas) === */
@media (max-width: 1090px) {
    .language-switcher {
        margin-left: -12%;
    }

    #lang-toggle {
        width: 130px; 
        height: 40px;
    }

    .flag-icon {
        height: 1.8em !important;
        width: 1.8em !important;
    }
}

/* === MÓVILES (Pantallas pequeñas) === */
@media (max-width: 830px) {
    .language-switcher {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .language-switcher-mobile{
        display: none;
    }
    #lang-toggle {
        width: 120px;
        height: 38px;
        padding: 0 8px;
    }
    .flag-icon {
        height: 1.6em !important;
        width: 1.6em !important;
    }
}

@media (max-width: 768px) {
    .language-switcher {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .language-switcher-mobile{
        display: none;
    }
    #lang-toggle {
        width: 120px;
        height: 38px;
        padding: 0 8px;
    }
    .flag-icon {
        height: 1.6em !important;
        width: 1.6em !important;
    }
}

/* === PANTALLAS MUY PEQUEÑAS (Móviles pequeños) === */
@media (max-width: 480px) {
    .language-switcher {
        margin-right: 50px;
    }
    .language-switcher-mobile{
        display: flex;
        align-items: center;
        justify-content: center;
    }
    #lang-toggle {
        width: 100px;
        height: 35px;
        padding: 0 5px;
    }

    .flag-icon {
        height: 1.4em !important;
        width: 1.4em !important;
    }
}

@media (max-width: 350px) {
    .language-switcher {
        left: -40px;
        margin-right: 10px;
    }
    #lang-toggle {
        width: 100px;
        height: 35px;
        padding: 0 5px;
    }

    .flag-icon {
        height: 1.4em !important;
        width: 1.4em !important;
    }
}