
ul.level2
{
    max-height: 0;
    overflow: hidden;
    transition: max-height 0s !important;
}

.opened ul.level2
{
    max-height: 200vh;
}

@media only screen and (max-width: 900px)
{
    #mainMenuWrapper {
        width: 100vw;
        left: auto;
        right: 1em;
        background-color: transparent;
        font-size: 1.2rem;
        transition: unset;
    }

    #mainMenuWrapper a,
    #mainMenuWrapper a:visited
    {
        padding-block: 1em;
    }

    #mainMenuMobile {
        display: flex;
        justify-content: space-between;
        flex-flow: row-reverse;
    }

    .menuTitle
    {
        display: none;
    }

    #mainMenuMobile a#menuButton
    {
        display: flex;
        justify-content: space-between;
        flex-flow: column;
        width: 1.5em;
        height: 1em;
        padding-bottom: 0.5em !important;
        padding-top: 0.5em !important;
        background-color: transparent;
        /* transform: scale(0.85); */
        transition: all 1s ease-in-out;
        cursor: pointer;
    }

    #mainMenuWrapper .bar
    {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #000000;
    }

    ul#mainMenu {
        max-height: 0;
        transition: max-height 1s ease-in-out;
    }

    #mainMenu
    {
        display: none;
        width: 300px;
        max-width: 100%;
        height: fit-content;
        max-height: 100vh;
        overflow: hidden;
    }
    #mainMenu.active
    {
        display: block;
    }

    #langMenu
    {
        margin-top: 15px;
    }

    #langMenu img
    {
        height: 20px;
    }

    #logo
    {
        position: absolute;
    }

    #logo img
    {
        width: auto;
    }

    #langMenu
    {
        font-size: 14px;
    }

    .subMenuOpener,
    .menuInfoItemWrap
    {
        display: block;
    }

    .subMenuOpener
    {
        position: absolute;
        width: fit-content;
        padding-left: 0.3em;
        padding-right: 0.3em;
        top: 0.1em;
        right: 0;
        transform: rotate(90deg);
        transition: all 0.1s ease-in-out;
        font-size: 1.5em;
        background-color: #ffffff;
        cursor: pointer;
        z-index: 10;
    }

    #mainMenuWrapper.active #mainMenu
    {
        display:flex;
        flex-direction: column;
    }

    #mainMenuWrapper ul.level1 li.level1
    {
        background-image: unset;
    }

    div#header,
    #mainMenuWrapper ul.level1 li.level1
    {
        font-size: 14px;
    }

    ul#mainMenu li
    {
        height: fit-content;
        border-bottom: solid 1px #ffffff;
    }

    .subMenuOpener
    {
        margin-top: 5px;
    }

    .opened .subMenuOpener
    {
        transform: rotate(0deg);
    }

    #mainMenuWrapper ul.level1 li.level1.opened ul.level2
    {
        display: block;
        position: relative;
        top: 0;
        left: -1px;
        padding: 0;
        width: calc(100% + 9px);
    }
    /*
        .opened ul#mainMenu
        {
            overflow: visible;
        }

     */
    .menuImgWrapper img
    {
        display: none;
    }
    .menuItem
    {
        background-image: unset !important;
        padding-block: 0.5rem;
    }
    #header
    {
        position: relative;
    }
    #headerMenuWrapper
    {
        position: absolute;
        top: 0;
        right: 0;
    }
    #topMenu
    {
        position: absolute;
        width: 100%;
        top: 6rem;
        padding: 1rem;
        background-color: #fff;
        opacity: 0.95;
    }
    .menuItem a,
    .menuItem a:visited
    {
        color: var(--primaryclr);
        border-bottom: 1px solid var(--primaryclr);
    }
    .subMenu .menuItem a,
    .subMenu .menuItem a:visited
    {
        color: var(--pmBlue);
        border-bottom: unset;
    }
    .subMenuLevel2
    {
        display: none;
    }
    .menuItemLevel1.active .subMenuLevel2
    {
        display: block;
    }
    #mainMenu input
    {
        display: none;
    }
    a.menuItemLinkLevel1
    {
        font-size: 1.3em;
    }
    #mainMenu .menuToggleWrapper
    {
        position: relative;
    }
    #mainMenu .menuToggleWrapper::after
    {
        content: "";
        position: absolute;
        top: -0.6rem;
        right: -2.5rem;
        width: 2.5rem;
        height: 3rem;
        background: currentColor;
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat center / contain;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat center / contain;
    }

    .ce-textpic.ce-right .ceBodyTextInner
    {
        flex-direction: column;
    }
    body:not(.indexPage) #teaserWrapper
    {
        padding-inline: unset;
    }
}

@media only screen and (max-width: 540px)
{
    #langMenu
    {
        font-size: 10px;
        margin-right: 6em;
    }

    #mainMenuMobile a#menuButton
    {
        width: 1em;
        height: 0.8em;
    }

    #logo img
    {
        width: 200px;
    }
}
