nav {
    background-color: #171a21;
}

nav #nav {
    align-items: center;
    display: grid;
    grid-gap: 16px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100%;
    padding: 0px 16px 16px 16px;
    width: 100%;
}

nav #nav > .item {
    background-color: #1b2838;
}

nav #nav .menu {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
}

nav #nav .menu > li {
    float: left;
}

nav #nav .button {
    background-color: #1b2838;
    display: block;
    font-weight: 700;
    padding: 8px 16px;
    text-decoration: none;
}

nav #nav .button:hover {
    background: linear-gradient(120deg, #2e4a5f, #36617d);
}

nav #nav .grid {
    align-items: center;
    display: grid;
    grid-gap: 0px;
    grid-template-columns: 1fr max-content;
    grid-template-rows: 1fr;
    height: 100%;
    width: 100%;
}

nav #nav .icon {
    background-color: #9fbbcb;
    display: block;
    height: 24px;
    mask-image: url("/data/icons/arrow.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: url("/data/icons/arrow.svg");
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    transition: transform 0.4s ease-out;
    width: 24px;
}

nav #nav .sub-menu {
    list-style-type: none;
    margin: 0px;
    max-height: 0px;
    overflow: hidden;
    padding: 0px;
    position: absolute;
    transition: max-height 0.4s ease-out;
    z-index: 700;
}

nav #hamburger {
    display: none;
}

#modal {
    opacity: 0.0;
}

@media screen and (max-width: 1023px) {
    body.hidden {
        overflow: hidden;
    }

    nav {
        left: 0px;
        position: absolute;
        top: 0px;
    }

    nav #nav {
        align-items: normal;
        background-color: #1b2838;
        height: 100%;
        left: -256px;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 16px;
        position: fixed;
        top: 0px;
        transition: left 0.4s ease-out;
        width: 256px;
        z-index: 700;
    }

    nav #nav.visible {
        left: 0px;
    }

    nav #nav .menu > li {
        float: none;
    }

    nav #nav .icon.rotate {
        transform: rotate(180deg);
    }

    nav #nav .sub-menu {
        position: relative;
    }

    nav #nav .sub-menu > li {
        padding-left: 16px;
    }

    nav #hamburger {
        background-color: #1b2838;
        display: block;
        left: 0px;
        position: fixed;
        top: 0px;
        z-index: 600;
    }

    nav #hamburger .icon {
        background-color: #9fbbcb;
        display: block;
        height: 32px;
        mask-image: url("/data/icons/hamburger.svg");
        mask-position: center;
        mask-repeat: no-repeat;
        mask-size: contain;
        -webkit-mask-image: url("/data/icons/hamburger.svg");
        -webkit-mask-position: center;
        -webkit-mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        width: 32px;
    }

    #modal {
        background-color: #000000;
        height: 100%;
        left: 0px;
        position: fixed;
        top: 0px;
        transition: visibility 0.4s, opacity 0.4s ease-out;
        visibility: hidden;
        width: 100%;
        z-index: 500;
    }

    #modal.visible {
        opacity: 0.7;
        visibility: visible;
    }
}
