#header {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    place-items: center;
    height: 140px;
    padding: 20px clamp(20px, 5vw, 50px);
}

#header #logo {
    justify-self: start;
    height: 90px;
}

#switch {
    position: relative;
    justify-self: center;
    width: 80px;
    height: 42px;
    border: 1px solid #7ba9c0;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
}

#lang-form {
    justify-self: end;
}

#lang-select {
    width: 80px;
    cursor: pointer;
}

#switch .checkbox {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

#switch .icon {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fdb7135e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.4s ease;
}

#switch .icon::before {
    content: '☀️';
}

#switch.winter .icon {
    left: 38px;
    background: #e6f0ff;
}

#switch.winter .icon::before {
    content: '❄️';
}

.language_select_box{
    display: flex;
    justify-content: flex-end;
}

.language_select {
    position: relative; 
    width: max-content;
    border: 1px solid #3b82a0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    user-select: none;
}

.language_select .language_select_option {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.language_select img {
    width: 34px;
    height: auto;
    display: block;
}

.language_select .arrow {
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #333;
    transition: transform 0.25s ease;
}

.language_select.open .arrow {
    transform: rotate(180deg);
}

.language_select_options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid #3b82a0;
    border-radius: 12px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-1px);
    transition:
        max-height 0.3s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
    z-index: 999;
}

.language_select.open{
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
}

.language_select.open .language_select_options {
    max-height: 300px;
    opacity: 1;
    border-radius: 0 0 12px 12px;
    transform: translateX(-1px);
    width: calc(100% + 2px);
    border-top: 0;
}

.language_select_options .language_select_option:hover {
    background: rgba(0,0,0,0.05);
}




/* --------------- RESPONSIVE -------------- */

@media (max-width: 768px) {

    #header {
        grid-template-columns: 1fr auto;
        grid-template-rows: 40px 1fr;
        align-items: start;
        height: auto;
        gap: 10px;
    }

    #logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .language_select_box {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    #switch {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

}