nav * {
    transition: all 0.3s ease-in-out;
}
nav ul {
    display: flex;
    margin: 0;
    align-items: center;
}
.mobile-menu {
    display: none;
    z-index: 21;
}

nav ul li {
    margin: 0 1rem;
}
nav ul li:first-of-type {
    margin: 0 1rem 0 0;
}
nav ul li:last-of-type {
    margin: 0.5rem 0 0.5rem 1rem;
}
nav ul li > * {
    font-family: "Poppins", "Helvetica Neue", sans-serif;
    text-transform: uppercase;
    color: #212529;
    display: block;
    opacity: 0;
    transform: translateX(-15px);
    border: none;

    font-size: 85%;
    font-weight: 800;
}
html.dark nav ul li a {
    color: #fff;
}

nav ul li a:hover {
    text-decoration: none;
    color: #212529;
}

html.dark nav ul li a:hover {
    color: #fff;
}
nav ul li a:after {
    content: "";
    display: block;
    height: 3px;
    width: 0;
    background-color: transparent;
    transition: width 0.3s ease, background-color 0.3s ease;
}
nav ul li a:hover:after,
nav ul li.current-menu-item a:after {
    background-color: rgb(233, 60, 30) !important;
    width: 100%;
}

html.dark nav ul li a:hover:after,
html.dark nav ul li.current-menu-item a:after {
    background-color: #fff;
}
nav ul li.shop a {
    font-family: "Poppins", "Helvetica Neue", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 25px;

    /* background-color: rgb(233, 60, 30) !important; */
    margin-top: -0.5rem;
    color: #fff;
    transition: color 0.1s ease, background-color 0.1s ease;
}

nav ul li.shop a:hover {
    background-color: rgb(233, 60, 30) !important;
    color: #fff !important;
}

nav ul li.shop a:after {
    display: none;
}

nav ul li.shop {
    margin-top: 8px;
}
html.dark nav ul li.shop a {
    color: #212529;
    background-color: #fff;
}
/* Styles applied on load */
.loaded nav ul li > * {
    animation: enterX 0.4s ease-in-out normal forwards;
}

/* MOBILE MENU */

@media screen and (max-width: 1020px) {
    nav {
        position: absolute;
        width: 100%;
        height: 100vh;
        top: 0;
        left: 0;
        z-index: 20;
        display: none;
        opacity: 0;
    }
    .mobile-menu {
        display: block;
    }
    nav ul {
        height: 100vh;
        flex-direction: column;
        justify-content: center;
    }
    nav ul li,
    nav ul li:first-of-type,
    nav ul li:last-of-type {
        margin: 2rem 0;
        text-align: center;
    }
    nav ul li a {
        font-size: 2rem;
        line-height: 2rem;
        display: inline-block;
        opacity: 0;
        border: none;
    }
    nav ul li:last-of-type {
        margin: 4px 1rem;
    }
    main {
        transition: filter 0.3s ease-in-out;
    }
    main.blur {
        filter: blur(10px);
    }
    nav.open {
        display: block;
        opacity: 1;
    }
    /* Styles applied on open */
    nav.open ul li a {
        animation: enterY 0.4s ease-in-out normal forwards;
        border: none;
    }
    /* Override the desktop configurations for a faster fade in */
    nav ul li:nth-of-type(1) a,
    nav ul li:nth-of-type(1) > * {
        animation-delay: 200ms !important;
    }
    nav ul li:nth-of-type(2) a,
    nav ul li:nth-of-type(2) > * {
        animation-delay: 300ms !important;
    }
    nav ul li:nth-of-type(3) a,
    nav ul li:nth-of-type(3) > * {
        animation-delay: 400ms !important;
    }
    nav ul li:nth-of-type(4) a,
    nav ul li:nth-of-type(4) > * {
        animation-delay: 500ms !important;
    }
    nav ul li:nth-of-type(5) a,
    nav ul li:nth-of-type(5) > * {
        animation-delay: 600ms !important;
    }
    nav ul li:nth-of-type(6) a,
    nav ul li:nth-of-type(6) > * {
        animation-delay: 700ms !important;
    }
    nav ul li:nth-of-type(7) a,
    nav ul li:nth-of-type(7) > * {
        animation-delay: 800ms !important;
    }
    nav ul li:nth-of-type(8) a,
    nav ul li:nth-of-type(8) > * {
        animation-delay: 900ms !important;
    }
}

/* Few overrides for shorter screens */

@media screen and (max-height: 800px) and (max-width: 1020px) {
    nav ul li,
    nav ul li:first-of-type,
    nav ul li:last-of-type {
        margin: 1rem 0;
        text-align: center;
    }
}

@media screen and (max-height: 500px) and (max-width: 1020px) {
    nav ul li,
    nav ul li:first-of-type,
    nav ul li:last-of-type {
        margin: 0.5rem 0;
        text-align: center;
    }
}

@media screen and (max-width: 1100px) and (min-width: 1020px) {
    nav ul li > *{
        /*font-size: 75%;*/
    }
}

/* Hamburgler Icon */
.mobile-menu {
    width: 25px;
    height: 20px;
    position: relative;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: 0.5s ease-in-out;
    -moz-transition: 0.5s ease-in-out;
    -o-transition: 0.5s ease-in-out;
    transition: 0.5s ease-in-out;
    cursor: pointer;
}

.mobile-menu span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #212529;
    border-radius: 0;
    opacity: 1;
    left: 0;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: 0.25s ease-in-out;
    -moz-transition: 0.25s ease-in-out;
    -o-transition: 0.25s ease-in-out;
    transition: 0.25s ease-in-out;
}

html.dark .mobile-menu span {
    background: #fff;
}

.mobile-menu span:nth-child(1) {
    top: 0px;
}

.mobile-menu span:nth-child(2),
.mobile-menu span:nth-child(3) {
    top: 8px;
}

.mobile-menu span:nth-child(4) {
    top: 16px;
}

.mobile-menu.open span:nth-child(1) {
    top: 8px;
    width: 0%;
    left: 50%;
}

.mobile-menu.open span:nth-child(2) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
}

.mobile-menu.open span:nth-child(3) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.mobile-menu.open span:nth-child(4) {
    top: 8px;
    width: 0%;
    left: 50%;
}
