header {
    position: fixed;
    top: 0;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    height: 72px;
    background-color: #ffffff;
    width: 100vw;
    z-index: 10000;
    margin: 0 auto;
    left: 0;
    right: 0;
    padding-left: 20px;
    padding-right: 20px;
}

header > nav > ul > li:nth-child(2) > ul > li > span > svg {
    transition: transform 0.3s ease;
}

header > nav > ul > li:nth-child(2).active > ul > li.active > span > svg {
    transform: rotate(180deg);
}

header > nav {
    display: flex;
    align-items: center;
    height: 100%;
}

header > nav > ul {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

header > nav > ul > li {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

header > nav > ul > li > a {
    text-decoration: none;
    color: black;
    display: flex;
    align-items: center;
}

header > nav > ul > li > a.logo {
    margin-left: 20px;
    width: 150px;
}


header > button#hamburger {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    align-items: center;
    aspect-ratio: 1.25/1;
    background-color: #598EA7;
    border: none;
    padding: 0;
    margin: 0;
}

button#hamburger span {
    display: block;
    width: 30px;
    height: 4px;
    background-color: #1E1E1E;
    border-radius: 2px;
}

button:focus {
    outline: 3px solid #000000;
}

button#hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
}

button#hamburger.active span:nth-child(2) {
    opacity: 0;
}

button#hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
}

/* Mobile devices (0 up to 767px) */
@media (max-width: 1067px) {
    header > nav > ul > li:nth-child(2) {
        position: fixed;
        left: 100vw;
        top: 72px;
        justify-content: center;
        height: calc(100dvh - 72px);
        width: 100vw;
        z-index: 75;
        background-color: #6D6D6D;
    }

    @keyframes slideright {
        from {
            left: 100vw;
        }
        to {
            left: 0;
        }
    }

    @keyframes slideleft {
        from {
            left: 0;
        }
        to {
            left: 100vw;
        }
    }

    header > nav > ul > li:nth-child(2).active {
        display: flex;
        top: 72px;
        background-color: #6D6D6D;
        animation: slideright 0.5s forwards;
    }

    header > nav > ul > li:nth-child(2).inactive {
        display: flex;
        animation: slideleft 0.5s forwards;
    }

    header > nav > ul > li:nth-child(2) > ul {
        margin: 0 auto;
        width: 90%;
    }

    header > nav > ul > li:nth-child(2) > ul > li {
        display: block;
        box-sizing: border-box;
        align-items: center;
        color: #ffffff;
        font-weight: 900;
        margin: 0;
        width: 100%;
        padding: 20px;
        border-bottom: 3px solid #ffffff;
    }

    header > nav > ul > li:nth-child(2) > ul > li > span {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    header > nav > ul > li:nth-child(2) > ul > li > span > svg {
        float: right;
        width: 24px;
    }

    header > nav > ul > li:nth-child(2) > ul > li ul {
        padding: 0;
        margin: 0;
    }

    header > nav > ul > li:nth-child(2) > ul > li > ul > li {
        display: none;
        margin: 0;
        padding: 0;
    }

    header > nav > ul > li:nth-child(2) > ul > li.active > ul > li {
        display: block;
        margin: 0;
        font-weight: 400;
    }

    header > nav > ul > li:nth-child(2) > ul > li.active > ul {
        padding: 20px 0;
    }

    header > nav > ul > li:nth-child(2) > ul {
        margin: 0;
        padding: 0;
    }
}

/* Mobile and tablet */
@media (max-width: 1067px) {
    header {
        margin: 0;
        padding: 0;
        left: 0;
        right: 0;
    }
    header > nav > ul li:not(:nth-child(1)) {
        display: none;
    }
}

/* Desktop devices (1068px and up) */
@media (min-width: 1068px) {
    header > nav {
        width: 100%;
    }

    header > nav > ul > li:nth-child(2) > ul > li.li-button a {
        border-radius: 7px;
        color: #ffffff;
        background-color: #6D6D6D;
        padding: 10px;
        text-decoration: none;
    }

    header > nav > ul > li:nth-child(2) > ul > li.li-button:last-of-type a {
        border-radius: 7px;
        color: #ffffff;
        background-color: #598EA7;
        padding: 10px;
        text-decoration: none;
    }

    header > nav > ul > li:nth-child(1) {
        flex: 2;
    }

    header > nav > ul > li:nth-child(2) {
        flex: 6;
    }

    header > nav > ul {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    header > nav > ul > li > ul > li > ul {
        display: none;
    }

    header {
        width: 90%;
        max-width: 1440px;
        margin: 0 auto;
        border: none;
        background-color: #ffffff;
    }

    header > nav > ul > li > ul {
        position: relative;
        display: flex;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
        width: 100%;
    }

    header > nav > ul > li > ul > li {
        margin: 0 auto;
    }

    header > nav > ul > li > ul > li.li-button {
        margin-right: 10px;
    }

    header > nav > ul > li > ul > li.li-button:last-of-type {
        margin: 0;
    }

    header > nav > ul > li > ul > li > ul {
        list-style: none;
    }

    header > nav > ul > li:nth-child(2) > ul > li.active > span > svg {
        transform: rotate(180deg);
    }

    header > nav > ul > li:nth-child(2) > ul > li > span > svg {
        height: 8px;
    }

    header > nav > ul > li:nth-child(2) > ul > li.active > ul {
        position: fixed;
        left: 0;
        top: 72px;
        display: block;
        padding: 3rem 0 5rem 20rem;
        width: 100vw;
        background-color: #6D6D6D;
    }

    header > nav > ul > li:nth-child(2) > ul > li > span:hover {
        text-decoration: underline;
        text-decoration-skip-ink: none;
    }

    header > nav > ul > li > a.logo {
        margin-left: 0;
    }

    header > button#hamburger {
        display: none;
    }

    header > nav > ul > li:nth-child(2) > ul > li > ul > li {
        flex: 1;
        display: block;
        box-sizing: border-box;
        align-items: center;
        color: #ffffff;
        font-weight: 500;
        margin: 0;
        width: 100%;
        padding: 10px;
    }
}

/** Search nav **/

.search-nav {
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 10px 10px 10px;
    box-sizing: border-box;
    position: fixed;
    display: flex;
    height: 60px;
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    background-color: #ffffff;
    overflow-anchor: none;
    z-index: 50;
}

.search-nav .input-group {
    display: flex;
    width: 100%;
    margin: 0;
}

.search-nav .input-group input {
    flex: 1;
    height: 100%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-nav button {
    height: 100%;
    flex: 0 0 auto;
    padding: 0 20px;
    border: none;
    background-color: #184C65;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
}

.search-nav button:hover {
    background-color: #598EA7;
}

@media (max-width: 1067px) {
    .search-nav {
        width: 100%;
        padding: 6px;
        border-bottom: 1px solid #598EA7;
    }
}