.mobileMenuSubSelector,
.sub-menu-toggle
{
    display: none;
}
#mainMenu a
{
    display: block;
    padding-left: 0.5em;
    padding-right: 0.5em;
    padding-top: 1em;
    padding-bottom: 1em;
    color: var(--bs-dark);
    font-weight: 400;
    font-size: 1.1em;
    text-decoration: none;

    -webkit-transition: all 0.5s  ease-in-out; /* Safari */
    transition: all 0.5s ease-in-out;
}

#mainMenu .menuLinkLevel1
{
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.notouch #mainMenu li.level1:hover .menuLinkLevel1
{
    color: var(--primaryclr);
    background-color:  #F0F0F0;
}

#mainMenu
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 2em;
    width: 100%;
    height: 4em;
}

#mainMenuWrapper .current-item .menuLinkLevel1
{
    border-bottom: 1px var(--secondaryclr) solid;
}

.notouch #mainMenuWrapper .level2 a:hover
{
    background-color: #fbfbfb;
    text-decoration: none;
}

.notouch #mainMenuWrapper li.level2:hover .menuLinkLevel1
{
    color: #cd3f30;
    background-color: #fbfbfb;
    box-shadow: 4px -2px 4px 2px #C0C0C0;
}

#mainMenuWrapper li.level2.current-item a
{
    background-color: #fbfbfb;
}


#mainMenuWrapper li.level1
{
    position: relative;
    flex-grow: 1;
    height: 100%;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px transparent solid;
}

.notouch #mainMenuWrapper li.level1:hover
{
    border-bottom-color: var(--secondaryclr);
}

#mainMenuWrapper li.level1.last-item
{
    background: none;
}

#mainMenuWrapper li.level1 ul.level2
{
    position: absolute;
    top: 2.5em;
    left: 0;
    max-width: 0;
    min-width: 100%;
    max-height: 0;
    height: auto;
    margin-left:  0;
    margin-top: 1.5em;
    padding-left: 0;
    padding-top: 0;
    text-align: left;
    list-style: none;
    overflow: clip;
    opacity: 0;

    -webkit-transition: all 0.8s ease-in-out;
    transition: all 0.8s ease-in-out;
}

#mainMenuWrapper ul.level1 li.level1 ul.level2 li
{
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    background: #FFF;
}

.notouch #mainMenuWrapper ul.level1 li.level1:hover ul.level2,
#mainMenuWrapper ul.level1 li.level1.opened ul.level2
{
    max-width: 80vw;
    max-height: 80vh;
    opacity: 1;
    box-shadow: 1px 1px 1px 1px rgba(0,0,0,0.25);
    overflow: visible;
}

.notouch #mainMenu li.level1 li.level2:hover
{
    z-index: 100;
}

.notouch #mainMenuWrapper li.level1 li.level2 a:hover
{
    background-color: var(--bg-clr);
    color: var(--primaryclr);
}

#mainMenuWrapper li.level1 li.level2
{
    position: relative;
    border-left: 3px transparent solid;
}

li.level2.hasSub .menuLinkLevel2:after
{
    content: ">";
    position: absolute;
    top: 0.35em;
    right: 0.6em;

    transition: all 0.8s ease-in-out;
}

li.level2.hasSub.opened .menuLinkLevel2:after,
.notouch li.level2.hasSub:hover .menuLinkLevel2:after
{
    top: 0.55em;
    transform: rotate(90deg);
}

#mainMenuWrapper li.level1 li.level2,
#mainMenuWrapper li.level1 li.level3
{
    border-bottom: 1px #999 dotted;
}

#mainMenuWrapper li.level1 li.level2:last-child,
#mainMenuWrapper li.level1 li.level3:last-child
{
    border-bottom: none;
}

#mainMenuWrapper li.level1.current-item li.level2
{
    width: 100%;
    background-color: var(--secondaryclr);
    border-left: 3px var(--primaryclr) solid;
}

#mainMenuWrapper li.level1.current-item li.level2.current-item
{
    background-color: #fbfbfb;
    border-left: 3px var(--primaryclr) solid;

    -webkit-transition: all 0.4s linear;
    transition: all 0.5s linear;
}

#mainMenuWrapper li.level1.current-item li.level2.current-item a
{
    border-left: 3px #fbfbfb solid;
}

.notouch #mainMenuWrapper li.level1 li.level2:hover
{
    border-left: 3px var(--primaryclr) solid;
}

#mainMenuWrapper li.level2 ul.level3
{
    position: absolute;
    top: 0;
    left: 100%;
    width: auto;
    height: auto;
    max-width: 0;
    max-height: 0;
    margin-left: 0px;
    margin-top: 0px;
    min-width: 10em;
    padding-bottom: 0;
    padding-top: 0px;
    padding-left: 0;
    overflow: clip;

    z-index: 101;

    -webkit-transition: all 0.5s linear;
    transition: all 0.5s linear;
}

#mainMenuWrapper ul.menu.fourColMenu,
#mainMenuWrapper ul.menu.threeColMenu,
#mainMenuWrapper ul.menu.twoColMenu
{
    display: grid;
    grid-column-gap: 1.5rem;
    background-color: white;
}

#mainMenuWrapper ul.level3.menu.fourColMenu,
#mainMenuWrapper ul.level3.menu.threeColMenu,
#mainMenuWrapper ul.level3.menu.twoColMenu
{
    font-size: 0.9rem;
}

#mainMenuWrapper ul.level2.menu.fourColMenu
{
    transform: translateX(-60%);
}

#mainMenuWrapper ul.menu.fourColMenu
{
    grid-template-columns: repeat( 4, 1fr );
}

#mainMenuWrapper ul.menu.threeColMenu
{
    grid-template-columns: repeat( 3, 1fr );
}

#mainMenuWrapper ul.menu.twoColMenu
{
    grid-template-columns: repeat( 2, 1fr );
}

.notouch #mainMenuWrapper li.level2:hover ul.level3,
#mainMenuWrapper li.level2.opened ul.level3
{
    max-width: 50vw;
    max-height: 80vh;
    margin-left: -8px;
    margin-top: -2px;
    border: 2px #fbfbfb outset;
    opacity: 1;
}


#mainMenuWrapper ul.level2 li.level3
{
    width: 100%;
    z-index: 102;
}

.notouch #mainMenuWrapper li.level2:hover ul.level3:hover
{
    border-color: #fbfbfb;
}

.notouch #mainMenuWrapper ul.level2 li.level3:hover
{
    color: #FFF;
}

#mainMenuWrapper ul.level2 li.level3
{
    display: block;
    width: 100%;
}

@media screen and (max-width: 1700px)
{
    #mainMenuWrapper ul.level2.menu.fourColMenu
    {
        font-size: 1rem;
        max-width: unset !important;
    }
}

@media screen and (max-width: 1200px)
{
    #mainMenuWrapper ul.level2.menu.fourColMenu
    {
        font-size: 0.9rem;
        transform: translateX(-70%);
    }
}

@media screen and (max-width: 1000px)
{
    #mainMenuWrapper ul.level2.menu.fourColMenu
    {
        font-size: 0.8rem;
        transform: translateX(-65%);
    }
}

@media screen and (max-width: 860px)
{
    #mainMenuWrapper ul.level2.menu.fourColMenu
    {
        font-size: 0.75rem;
        /*transform: translateX(-65%);*/
    }
}
