#nav {
    background-color: var(--background-color);
    width: 100vw;
    height: 4.5rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    transition: top 0.3s ease-in-out;
}

nav button {
    display: none;
}

.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 83%;
    max-width: 1133px;
    margin: 0 auto;
}

.nav-container {
    height: 100%;
    width: 83%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.nav-logo {
    width: 200px;
    height: 120px;
    margin-top: 90px;
}

.nav-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;

}

.nav-items li:hover {
    display: block;
    flex-direction: column;
    top: 0px;
}

.nav-items li a {
    position: relative;
    text-decoration: none;
    color: var(--main-color);
    font-weight: bold;
    padding: 0.5em;
}

.nav-items li a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--blue-color);
    transition: width 0.2s ease-in;
}

.nav-items li a:hover::before {
    width: 100%;
}

.nav-items li a input{
    color: white;
    font-weight: bold;
    background-color: var(--blue-color);
    border-color:var(--blue-color);
    text-align: left;
    font-size: 16px;
}

.nav-logo img {
    width: 250px;
    transition: width 0.3s ease;
}

.nav-logo img:hover {
    width: 255px;
}

#open-nav span {
    display: block;
    width: 24px;
    height: 4px;
    margin: 5px auto;
    background-color: var(--main-color);
}

#close-nav {
    font-size: 38px;
}

/*==========================================Media==========================================================*/
@media screen and (max-width:1160px) {
    nav button {
        display: inline-block;
        font-size: 1.5rem;
        background-color: transparent;
        color: white;
        cursor: pointer;
    }

    nav button#close-nav {
        display: none;
        color: var(--main-color);
    }

    .nav-container {
        position: relative;
    }

    .nav-items {
        position: absolute;
        flex-direction: column;
        display: none;
        top: 100%;
        right: 0;
        width: 12rem;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        perspective: 400px;
    }

    .nav-items li {
        width: 100%;
        height: 4.5rem;
        display: flex;
        align-items: center;
        box-shadow: -2rem 3rem 7rem rgba(0, 0, 0, 0.7);
        background-color: var(--gray-color);
        border-top: 1px solid black;
        animation: animateDropdown 0.5s 0s ease forwards;
        transform-origin: top;
        opacity: 0;

    }

    .nav-items li:nth-child(2) {
        animation-delay: 100ms;
    }

    .nav-items li:nth-child(3) {
        animation-delay: 200ms;
    }

    .nav-items li:nth-child(4) {
        animation-delay: 300ms;
    }

    .nav-items li:nth-child(5) {
        animation-delay: 400ms;
    }

    .nav-items li:nth-child(6) {
        animation-delay: 500ms;
    }

    .nav-items li:nth-child(7) {
        animation-delay: 500ms;
    }
    .nav-items li a {
        width: 100%;
        height: 100%;
        padding: 0 2rem;
        display: flex;
        align-items: center;
        text-align: center;

    }

    @keyframes animateDropdown {
        0% {
            transform: rotateX(90deg);
            opacity: 0;
        }

        100% {
            transform: rotateX(0deg);
            opacity: 1;
        }
    }
}

@media screen and (max-width:900px) {
    .nav-logo {
        margin-top: 95px;
    }

    .nav-logo img {
        width: 200px;
    }
    .nav-items li a input{
        width:100%;
        height: 100%;
        border-radius: 0px;
        padding: 0 2rem;
    }
}