.nav-open {
    display: none;
}

.nav-overlay {
    display: none;
}

@media (max-width: 991px) {

    /*******************************************
	:--- Mobile Navigation - Slide In ---:
	*******************************************/

    html,
    body {
        height: 100%;
    }

    body.opened {
        overflow: hidden;
    }

    body.opened .page-wrap:after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(120deg, #000, #000);
        opacity: .5;
        z-index: 2;
    }

    .nav-wrap {
        padding: 0 !important;
    }

    .nav-open {
        cursor: pointer;
        display: block;
        position: absolute;
        right: 15px;
        top: calc(50% - 10px);
        z-index: 9000;
    }

    .nav-open.opened {
        position: fixed;
        right: 1.5em;
        top: 15px;
        z-index: 10000;
    }

    .nav-open.opened span:nth-child(1) {
        position: absolute;
        right: 0;
        top: 10px;
        transform: rotate(45deg);
    }

    .nav-open.opened span:nth-child(2) {
        position: absolute;
        right: 0;
        top: 10px;
        transform: rotate(-45deg);
    }

    .nav-open.opened span:nth-child(3) {
        display: none;
    }

    .nav-open span {
        background: #fff;
        content: " ";
        display: block;
        height: 4px;
        margin: 0 0 4px;
        width: 28px;
    }

    .nav-overlay {
        background: rgba(0, 0, 0, 0.8);
        height: 100vh;
        left: 0;
        opacity: 0;
        position: fixed;
        top: 0;
        transition: opacity .4s ease-out;
        width: 100%;
        z-index: 8000;
    }

    .nav-overlay.opened {
        display: block;
        opacity: 1;
    }

    .site-nav-wrap {
        background: var(--purple);
        height: 100vh;
        right: -80vw;
        /* Left for slide in left / -100vw if full coverage required  */
        opacity: 0;
        position: fixed;
        top: 0;
        width: 80vw;
        /* 100vw if full coverage required */
        transition: right .4s ease-out, opacity .4s ease-out;
        /* Left for slide-in left / Remove if slide in isn't required */
        z-index: 9000;
    }

    .site-nav-wrap.opened {
        display: block;
        opacity: 1;
        right: 0;
        overflow-y: auto;
        padding-bottom: 200px;
        /* Change to left for slide in left */
    }

    /********************************************************************/
    /* Content Push - Include to also push the page content on slide in */
    /********************************************************************/

    .page-wrap {
        margin-left: 0;
        transition: .4s margin-left ease-out;
        /* width: 100vw; */
    }

    .opened .page-wrap {
        /* margin-left: -80vw; */
        transition: .4s margin-left ease-out;
    }

    /********************/
    /* End Content Push */
    /********************/

    /* Nav items */

    nav.site-nav {
        margin: 60px 0 0;
    }

    nav.site-nav ul {
        border-top: 1px solid #ffffff14;
    }

    nav.site-nav ul .menu-item {
        border-bottom: 1px solid #ffffff14;
        float: none;
        padding: 0;
        display: block;
    }

    nav.site-nav ul .menu-item a {
        text-align: left;
        display: block;
        padding: 1em 0 1em 2em;
    }

    nav.site-nav ul>.menu-item span {
        cursor: pointer;
        display: block;
        padding: 1em 2em;
        position: absolute;
        right: 0;
        text-align: center;
        top: 0;
        border: 1px solid #ffffff14;
    }

    nav.site-nav ul>.menu-item span.closed:after {
        color: var(--gold);
        content: '\2b';
        font-family: 'Font Awesome 6 Pro';
        font-weight: 900;
        font-size: 1.2em;
        text-align: center;
    }

    nav.site-nav ul>.menu-item span.opened:after {
        color: var(--gold);
        content: '\f068';
        font-family: 'Font Awesome 6 Pro';
        font-weight: 900;
        font-size: 1.2em;
        text-align: center;
    }

    nav.site-nav ul li>ul.sub-menu .menu-item span {
        padding: .75em 2em;
        border: none;
    }

    nav.site-nav ul.sub-menu {
        position: absolute;
        width: auto;
    }

    nav.site-nav ul.sub-menu.sub-menu-open {
        display: block;
        left: auto;
        position: relative;
    }

    nav.site-nav ul.sub-menu .menu-item {
        border-bottom: 0;
    }

}

@media (max-width: 767px) {
    .site-nav-wrap {
        height: 100vh;
        right: -90vw;
        /* Left for slide in left / -100vw if full coverage required  */
        opacity: 0;
        position: fixed;
        top: 0;
        width: 90vw;
        /* 100vw if full coverage required */
        transition: right .4s ease-out, opacity .4s ease-out;
        /* Left for slide-in left / Remove if slide in isn't required */
        z-index: 9000;
        transition: .3s ease-out;
    }
}

/* MEGA menu - top level menu item */

@media screen and (min-width: 992px) {
    .has-mega-menu {
        position: static;
    }

    li.has-mega-menu .sub-menu {
        width: 100%;
        position: absolute;
        top: NNpx;
        /*insert the needed value*/
        z-index: 100;
        left: 0px;
        right: 0px;
    }

    li.has-mega-menu:hover>.sub-menu {
        /*flexbox fallback for browsers that do not support CSS GRID lyout*/
        display: flex;
        flex-wrap: wrap;
        /*CSS GRID lyout*/
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
    }
}

@media screen and (min-width: 992px) {
    li.has-mega-menu:hover>.sub-menu {
        grid-template-columns: repeat(auto-fit, minmax(33.3333%, 1fr));
    }
}

@media screen and (min-width: 1200px) {
    li.has-mega-menu:hover>.sub-menu {
        grid-template-columns: repeat(auto-fit, minmax(25%, 1fr));
    }
}

/* MEGA menu - first level sub-pages */

@media screen and (min-width: 992px) {
    li.mega-menu-column {
        width: 100%;
        max-width: 100%;
        min-height: 1px;
        padding: 10px 25px;
        flex: 1 0 calc(50%);
    }
}

@media screen and (min-width: 992px) {
    li.mega-menu-column {
        flex: 1 0 calc(33.333%);
    }
}

@media screen and (min-width: 1200px) {
    li.mega-menu-column {
        flex: 1 0 calc(25%);
    }
}