nav {
    position: sticky;
    top: 0;
    z-index: 1;
}
nav ul {
    display: flex;
    justify-content: space-around;
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}
nav ul ul {
    text-align: left;
    padding-left: 1rem;
}
nav a {
    color: inherit;
    display: block;
    position: relative;
    text-decoration: none;
    padding: 1rem 0;
}
.current a {
    color: var(--complementary);
    cursor: context-menu;
}
nav li:hover:not(:has(li:hover)) > a {
    color: var(--mainLight);
    transition: .3s;
}
nav ul ul li.submenu > a {
    color: var(--neutralLight)!important;
    pointer-events: none;
}

nav ul ul li:has(> a[href="#"]) {
    cursor: default;
}
nav ul ul li:has(> a[href="#"]) {
    cursor: default;
}
nav > ul > li > ul {
    background-color: var(--mainDark);
    display: none;
    padding: .5rem 1rem;
    position: absolute;
}
nav ul ul ul {
    display: block;
    position: static;
}
nav ul ul li {
    display: block;
    position: relative;
}
.nav li ul li ul li {
    font-style: italic;
    padding-left: 1rem;
}
.nav li ul li ul li a {
    padding: .25rem .5rem;
}
nav li {
    flex: 1;
}
nav li:has(ul) {
    position: relative;
}
nav li:has(ul) a::after {
    content: " +";
}
nav ul ul a::after {
    display: none !important;
}
nav ul ul a {
    padding: 1rem 0;
}
nav ul li:focus > ul,
nav ul li:active > ul,
nav li:focus-within > ul,
nav a:focus + ul,
nav a:active + ul,
nav li:focus-within > ul {
    display: block;
    width: 100%;
    color: var(--neutralLight);
}
#menubutton,
[for="menubutton"] {
    display: none;
}
@media only screen and (max-width: 1390px) {
    nav ul li:focus > ul,
    nav ul li:active > ul,
    nav li:focus-within > ul,
    nav a:focus + ul,
    nav a:active + ul,
    nav li:focus-within > ul {
        width: 200%;
    }
}
@media only screen and (max-width: 800px) {
    .contactDetails {
        padding-bottom: 3rem;
    }
    [for="menubutton"] {
        cursor: pointer;
        display: block;
        position: absolute;
        right: 32px;
        top: 95px;
        width: auto;
        z-index: 20;
    }
    [for="menubutton"]::before {
        content: "\2261";
        font-size: 3rem;
        transition: .3s;
    }
    #menubutton:checked+[for="menubutton"] {
        position: fixed;
        width: 41px;
    }
    #menubutton:checked+[for="menubutton"]::before {
        content: "\2716";
        font-size: 2rem;
        color: var(--mainLight);
    }
    nav {
        flex-direction: column;
        height: 0;
        overflow: hidden;
        padding: 0;
        transition: width .3s;
        width: 0;
    }
    nav ul {
        text-align: left;
    }
    nav ul ul {
        padding-left: 2rem;
    }
    nav a {
        padding-bottom: 1rem;
        display: block;
    }
    nav a[href="#"] {
        padding-bottom: 0;
    }
    li:has(ul) a::after {
        display: none;
    }
    #menubutton:checked+label+nav {
        /*background-color: #fff;*/
        left: 0;
        min-height: 250%;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: 15;
    }
    #menubutton:checked+label+nav>ul {
        display: block;
        padding-left: 1rem;    
        text-align: left;    
        background-color: var(--mainDark);
    }
    #menubutton:checked+label+nav ul ul {
        display: block;
        left: 0;
        margin: 0;
        padding: 0 2rem;
        position: static;
        transform: none; 
    }
    nav li:has(ul) {
        position: static;
    }
    nav li:has(ul)::after {
        display: none;
    }
}
