header {
    display: flex;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    z-index: 9998;
    width: 100%;
    max-width: 100%;
    background-color: #4d5061;
    box-shadow: 0 2px 5px #4d5061;
    border-top: outset 4px #2b2d36;
    border-bottom: outset 4px #2b2d36;
}

#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.company-icon {
    display: block;
    padding: 5px 5px 5px 10px;
    max-height: 80px;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.4))
}

#menu-open, #menu-close {
    display: none;
    font-size: 40px;
    padding: 5px;
    background: none;
    color: #fff;
    border: none;
    cursor: pointer;
}

#menu-close{
    padding-left: 20px;
}

#overlay{
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 25px;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 5px;
    height: 100%;
    gap: 20px;
}

nav a {
    display: flex;
    align-items: center;
    padding: 0 5px;
    height: 100%;
    color: #fff;
    font-size: 1.125rem;
    font-weight: bold;
    text-decoration: none;
    word-break: keep-all;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

#lang-selector{
    display: flex;
    position: relative;
    height: 80%;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#lang-selector select{
    font-family: "Poppins", sans-serif;
    font-size: 1.125rem;
    font-weight: bold;
    padding: 0 30px 0 5px;
    color: #fff;
    cursor: pointer;
    border: solid 3px #fff;
    background-color: #4d5061;
    border-radius: 15px;
}

#lang-selector select:hover{
    filter: drop-shadow(0 0 0.2rem #fff);
}

#lang-selector select:focus {
    outline: none;
}

#custom-arrow{
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 2.0rem;
    height: 100%;
    background-color: #3b3c47;
    border-top: solid 3px #fff;
    border-bottom: solid 3px #fff;
    pointer-events: none;
}

#custom-arrow::before{
    content:"";
    position: absolute;
    top: 30px;
    right: 10px;
    height: 0;
    width: 0;
    border-left: solid 0.5em transparent;
    border-right: solid 0.5em transparent;
    border-top: solid 0.5em #fff;
}

#lang-selector select:hover + #custom-arrow::before{
    transform: scale(1.2);
}

@media(min-width: 768px) {
    nav a:hover {
        transform: scale(1.05) translateY(-5px);
        background-color: #fff;
        color: #4d5061;
        border-bottom: solid 5px #3b3c47;
        border-radius: 0 0 15px 15px;
    }
}

/* -------- MOBILE -------- */
@media (max-width: 768px) {
    #menu-open, #menu-close {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(15em, 100%);
        background-color: #4d5061;
        flex-direction: column;
        padding: 20px 0;
        border-left: 1px solid rgba(0, 0, 0, 0.3);
        transition: right 300ms ease-out;
        z-index: 9999;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    nav li {
        width: 100%;
    }

    nav a {
        display: block;
        width: 100%;
        padding: 15px 20px;
        height: auto;
        transform: none !important;
    }

    nav a:hover {
        background-color: #fff;
        color: #4d5061;
    }

    nav.show {
        right: 0;
    }
    
    nav.show ~ #overlay{
        display: block;
    }
    
    #lang-selector{
        position: absolute;
        right: 0;
        top: 80%;
        height: auto;
    }
    
    #lang-selector select{
        width: 100%;
        padding: 15px 20px;
    }
}