/* NAVIGATION */

nav {
    text-align: center;
    position: relative;
    z-index:2;
    -moz-user-select:none;
    -webkit-user-select:none;
    user-select:none;
}
nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
    width: 100%;
}
nav>ul {
    letter-spacing:-0.31em;
    text-rendering: optimizespeed;
}
nav>ul>li {
    padding: 0 0.9em;
    line-height: 2em;
    position: relative;
    display: inline-block;
    letter-spacing:normal;
    text-rendering: auto;
}
nav a {
    color: inherit;
    text-decoration: none;
}
nav .sub-menu {
    display: none;
    background: #111;
    width: 20em;
    position: absolute;
    top: 2em;
    left: 0;
    text-align: left;
    z-index:2;
}
nav ul li:hover>.sub-menu { display: block }
nav .sub-menu li {
    padding: 0.6em;
    position: relative;
}

nav>ul>li>.sub-menu>li .sub-menu {
    left: 100%;
    top: 0;
}

.navigation-toggle {
    display: none;
}

@media (min-width:769px) {
    nav.has-mobile-toggle > ul {
        max-height: none !important;
    }
}

@media (max-width:768px) {
    .has-mobile-toggle .navigation-toggle + ul {
        position:absolute;
        visibility: hidden;
        overflow: hidden;
        -webkit-transition: max-height .5s ease;
        -moz-transition: max-height .5s ease;
        transition: max-height .5s ease;
    }

    .has-mobile-toggle .navigation-toggle.is-active + ul {
        position:static;
        visibility: visible;
    }

    .has-mobile-toggle .navigation-toggle {
        display: block;
        background-color: #aaa;
        display: -webkit-flex;
        display: flex;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
        user-select:none;
        font-size:0.5em;
    }

    .has-mobile-toggle .c-hamburger {
        display: block;
        text-align: left;
        position: relative;
        z-index:1;
        overflow: hidden;
        margin: 0;
        padding: 0;
        width: 6em;
        height: 6em;
        text-indent: -9999em;
        appearance: none;
        box-shadow: none;
        border-radius: none;
        border: none;
        cursor: pointer;
        transition: background 0.3s;
    }

    .has-mobile-toggle .c-hamburger:focus {
        outline: none;
    }

    .has-mobile-toggle .c-hamburger span {
        display: block;
        position: absolute;
        z-index:1;
        top: 2.75em;
        left: 1.125em;
        right: 1.125em;
        height: 0.5em;
        background: white;
    }

    .has-mobile-toggle .c-hamburger span::before,
    .has-mobile-toggle .c-hamburger span::after {
        position: absolute;
        z-index:1;
        display: block;
        left: 0;
        width: 100%;
        height: 0.5em;
        background-color: #fff;
        content: "";
    }

    .has-mobile-toggle .c-hamburger span::before {
        top: -1.25em;
    }

    .has-mobile-toggle .c-hamburger span::after {
        bottom: -1.25em;
    }

    .has-mobile-toggle .c-hamburger--htx {
    }

    .has-mobile-toggle .c-hamburger--htx span {
        transition: background 0s 0.3s;
    }

    .has-mobile-toggle .c-hamburger--htx span::before,
    .has-mobile-toggle .c-hamburger--htx span::after {
        transition-duration: 0.3s, 0.3s;
        transition-delay: 0.3s, 0s;
    }

    .has-mobile-toggle .c-hamburger--htx span::before {
        transition-property: top, transform;
    }

    .has-mobile-toggle .c-hamburger--htx span::after {
        transition-property: bottom, transform;
    }

    /* active state, i.e. menu open */
    .has-mobile-toggle .is-active .c-hamburger--htx {
    }

    .has-mobile-toggle .is-active .c-hamburger--htx span {
        background: none;
    }

    .has-mobile-toggle .is-active .c-hamburger--htx span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .has-mobile-toggle .is-active .c-hamburger--htx span::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    .has-mobile-toggle .is-active .c-hamburger--htx span::before,
    .has-mobile-toggle .is-active .c-hamburger--htx span::after {
        transition-delay: 0s, 0.3s;
    }

    #main-navigation > ul:before {
        content:"";
        display: block;
        padding-top:1em;
    }

    #main-navigation>ul>li {
        padding-left:0;
        padding-right:0;
        line-height: normal;
        display: block;
    }

    #main-navigation .sub-menu {
        display: block;
        background: transparent;
        width: auto;
        position: static;
        text-align: left;
        padding-left:0.5em;
    }

    #main-navigation .sub-menu li {
        padding:0;
    }

    nav>ul>li a {
        display: block;
        margin-bottom:1em;
    }
}