/**************************************
 * Common
 */
/**
 * (Common) Topbar
 */
#mainmenu {
    --navbar-height: 60px;
    --occupied-top: calc(var(--navbar-height) + var(--wp-admin--admin-bar--height, 0px));
    --available: calc(100vh - var(--occupied-top));
    
    --onscroll-transition: all 0.200s ease-in-out 0s;
    --rainbow: linear-gradient(90deg, rgba(83, 38, 124, 1), rgba(232, 57, 140, 1), rgba(237, 105, 53, 1), rgba(250, 181, 62, 1));
    
    --contact-us-height: calc(var(--available) / (var(--first-level-item-count) + 1));
    
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 10;
    
    pointer-events: all;
}
#mainmenu .mobile-topbar {
    height: var(--navbar-height);
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 13px 27px;
    background-color: white;
}
#mainmenu[data-scroll="down"] .mobile-topbar {
    transform: translateY(-100%);
}

/**
 * (Common) any menu-item content
 */
#mainmenu .menu-item-link,
#mainmenu .menu-item > button {
    width: 100%;
    height: 100%;
    
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
}
.menu-item-label,
.submenu-heading {
    color: black;
}

/**
 * (Common) Level 1
 */
.menu-item-level-1.menu-item-has-children > .menu-item-link > .menu-item-level-1__label {
    font-weight: 700;
}
.menu-item-level-1.menu-item-has-children > .menu-item-link > .menu-item-level-1__label:hover,
.menu-item-level-2__label:hover {
    color: var(--orange);    
}

.menu-item-level-1 > .menu-item-link:hover {
    font-weight: 700;
}
/**
 * (Common) Level 2
 */
.menu-item-level-2__label {
    font-weight: 700;
    text-transform: uppercase;
}

/*
 * (Common) Topbar logo
 */
#mainmenu .site-logo-link {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    width: min-content;
}
#mainmenu .site-logo-static-img {
    display: block;
    height: 42px;
}
#mainmenu .mobile-topbar,
#mainmenu .site-logo-static-img {
    transition: var(--onscroll-transition);
    transition-property: transform;
}
#mainmenu .site-logo-text {
    height: 16px;
    margin-left: 10px;
}

/**
 * buttons Reset
 */
#mainmenu #burger-button,
.submenu-button {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
}


/**
 * (Common) Contact us Button
 */
#mainmenu .contact-us-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
    color: #FFF;
    font-size: 15px;
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    line-height: 22px;
    height: 60px;
    border: 1px solid black;
    transition: var(--onscroll-transition);
    transition-property: background, color, transform;
}
#mainmenu .phone-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    margin-right: 10px;
}
#mainmenu .phone-icon svg {
    fill: white; 
    transition: var(--onscroll-transition);
    transition-property: fill;
}
#mainmenu .contact-us-btn:hover {
    background: transparent;
    color: #000;
}
#mainmenu .contact-us-btn:hover .phone-icon svg {
    fill: black; 
}

/**
 * (Common) menu-item level 0
 */
#mainmenu .menu-item-level-0 {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    flex: 1;
}
#mainmenu .menu-item-level-0__label {
    display: flex;
    position: relative;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
#mainmenu .menu-item-level-0__label::after {
    content: "";   
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--rainbow);
    bottom: -7px;
    border-radius: 50px;
    
    opacity: 0;
    transition: opacity 350ms ease-in-out;
}
#mainmenu .menu-item-level-0:hover .menu-item-level-0__label::after {
    opacity: 1;
}
/**
 * (Common) Level 1 & 2
 */
#mainmenu .submenu-container {
    position: absolute;
    
    display: none;
    background-color: white;
}
.submenu-heading {
    font-weight: 700;
}

/****************************************************
 * Mobile only
 */
@media screen and (max-width: 1179px) {
    /*
     * (Mobile) Topbar
     */
    #mainmenu .mobile-topbar {
        box-shadow: 0 0 50px 10px rgba(0, 0, 0, 0.1);
    }
    /**
     * (Mobile) any menu-item content
     */
    #mainmenu .menu-item > a,
    #mainmenu .menu-item > button {
        width: 100%;
        height: 100%;
        padding: 0 30px;
    }
    /**
     * (Mobile) level 0
     */
    #mainmenu > .main-menu-list {
        display: none;
        position: fixed;
        flex-flow: column nowrap;
        
        top: var(--occupied-top);
        right: 0px;
        bottom: calc(var(--available) / (var(--first-level-item-count) + 1));
        left: 0px;
    
        background-color: white;
    }
    #mainmenu[data-state="open"] > .main-menu-list {
        display: flex;
    }
    
    #mainmenu .main-menu-list.translated {
        transform: translateX(-100%);
    }
    
    /**
     * (Mobile) level 1 & 2
     */
    #mainmenu .submenu-container {
        top: 0px;
        right: 0px;
        bottom: 0px;
        left: 0px;
    }
    #mainmenu .submenu-button[aria-expanded="true"] ~ .submenu-container {
        display: block;
    }
    /**
     * (Mobile) Topbar Burger button
     */
    #mainmenu[data-state="closed"] .close-burger-img,
    #mainmenu[data-state="open"] .open-burger-img {
        display: none;
    }
    /**
     * (Mobile) Level 1
     */
    #mainmenu .menu-item-level-0 > .submenu-container > .submenu-list {
        overflow-y: scroll;
        --submenu-height: calc(var(--available) - 1 * var(--contact-us-height));
        height: var(--submenu-height, 50px);
        background: white;
    }
    #mainmenu .submenu-header > .arrow-img {
        transform: rotateZ(180deg);
        margin: 0 39px 0 9px;
    }
    #mainmenu .menu-item-level-1.menu-item-has-children {
        height: auto;
    }
    #mainmenu .menu-item-level-1.menu-item-has-children > .menu-item-link {
        height: calc(var(--contact-us-height) - 10px);
    }
    
    /**
     * (Mobile) Contact us Button
     */
    #mainmenu .contact-us-btn {
        position: fixed;
        top: auto;
        right: 0px;
        bottom: 0px;
        left: 0px;
    }
    #mainmenu[data-state="closed"] .contact-us-btn {
        height: 60px;
    }
    #mainmenu[data-state="open"] .phone-icon {
        display: none;
    }
    
    /**
     * (Mobile) (Open) Contact-us Button
     */
    #mainmenu[data-state="open"] .contact-us-btn {
        justify-content: flex-start;
        height: var(--contact-us-height);
        padding-left: 30px;
        
        text-transform: uppercase;
        font-family: "Figtree", sans-serif;
        font-weight: 700;
        color: white;
        background: var(--rainbow);
        border: none;
        z-index: -1;
    }
    
    /**
     * (Mobile) menu-item level 0
     */
    #mainmenu .menu-item-level-0 {
        border-top: 1px solid rgba(0, 0, 0, 0.15);
    }
    
    /**
     * (Mobile) Level 1 & 2
     */
    #mainmenu .submenu-container {
        transform: translateX(100%);
        /* grid-template-rows: repeat(var(--first-level-item-count), 1fr); */
    }
    .menu-item-level-1,
    .menu-item-level-2 {
        height: calc(var(--contact-us-height) - 10px);
        border-top: 1px solid rgba(0, 0, 0, 0.15);
    }
    .submenu-list > .menu-item:last-child {
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    }
    .submenu-list::-webkit-scrollbar {
        display: none;
    }
    
    /**
     * (Mobile) Level 1 header
     */
    #mainmenu .submenu-header {
        position: relative;
        height: var(--contact-us-height);
        border-top: 1px solid rgba(0, 0, 0, 0.15);
        text-transform: uppercase;
        
        display: flex;
        flex-flow: row nowrap;
        justify-content: flex-start;
        align-items: center;
        padding: 0 30px;
        width: 100%;
    }
    #mainmenu .submenu-header::after {
        position: absolute;
        content: "";
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--rainbow);
    }
    
    /*#submenu-of-menu-item-918 > .submenu-list::after,
    #submenu-of-menu-item-1959 > .submenu-list::after {
        content: "";
        height: 30vh;
        display: block;
    }*/
    
    .menu-item-level-0 > .submenu-container > ul.submenu-list::after {
        content: "";
        display: block;
        height: calc(var(--contact-us-height) - 10px);
    }
}







/******************************
 * Ajustements Desktop
 */
@media screen and (min-width: 1180px) {
    /**
     * (Desktop) Topbar
     */
    #mainmenu {
        --navbar-height: 80px;
        min-height: var(--navbar-height);
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        align-items: center;
        /*padding: 13px 27px;*/
    }
    #mainmenu::before {
        content: "";
        position: absolute;
        top: 0px;
        right: 0px;
        bottom: 0px;
        left: 0px;
        background-color: white;
        box-shadow: 0 0 50px 10px rgb(0 0 0 / 10%);
        z-index: -1;
    }
    #mainmenu .mobile-topbar {
        box-shadow: none;
    }
    
    /**
     * (Desktop) Topbar animation
     */
    #mainmenu::before,
    #mainmenu > .main-menu-list {
       transition: var(--onscroll-transition);
    }
    #mainmenu[data-scroll="down"]::before,
    #mainmenu[data-scroll="down"] .main-menu-list,
    #mainmenu[data-scroll="down"] .contact-us-btn {
        transform: translateY( calc(-1 * var(--navbar-height) ) );
    }
    
    /**
     * (Desktop) burger button
     */
    #mainmenu #burger-button {
        display: none;
    }
    
    /**
     * (Desktop) level 0
     */
    #mainmenu > .main-menu-list {
        display: flex;
        position: static;
        flex-direction: row;
        /*column-gap: 40px;*/
        column-gap: min(3vw - 14px, 40px);
        align-self: stretch;
        margin-right: 27px;
    }
    #mainmenu .menu-item-level-0 {
        border-top: none;
    }
    
    /**
     * (Desktop) any arrows and back-buttons
     */
    #mainmenu .submenu-header,
    #mainmenu .arrow-img {
        display: none;
    }
    
    /**
     * (Desktop) Contact-us button
     */
    #mainmenu[data-state] .contact-us-btn {
        position: static;
        height: auto;
        display: inline-flex;
        padding: 16px 20px;
        border-radius: 50px;
        height: auto;
        white-space: nowrap;
        
        margin-right: 26px;
        font-family: 'Figtree', sans-serif;
        text-transform: initial;
    }
    
    /**
     * (Desktop) Level 1 & 2
     */
    #mainmenu .main-menu-list.translated {
        transform: none;
    }
    
    .menu-item-level-1, .menu-item-level-2 {
        border: none;
    }
    
    /**
     * (Desktop) Level 1
     */
    #mainmenu .menu-item-level-0 > .submenu-container {
        display: none;
        top: var(--navbar-height);
        right: 0;
        left: 0;
        background: white;
        z-index: -2;
        padding: 0 var(--global-sides-margin);
    }
    #mainmenu .menu-item-level-0:hover > .submenu-container {
        display: initial;
        transform: none;
    }
    
    /** 
     * (Desktop) Logo animation
     */
    #mainmenu[data-scroll="down"] .site-logo-static-img {
        /*transform: none;*/
        
        animation-duration: 0.5s;
        animation-timing-function: ease-in-out;
        animation-delay: 0.2s;
        animation-iteration-count: 1;
        animation-direction: normal;
        animation-fill-mode: forwards;
        animation-play-state: running;
        animation-name: scroll-down;
        
        /*transform:  translateY(var(--navbar-height));*/
        /*opacity: 1;*/
    }
    #mainmenu[data-scroll="up"] .site-logo-static-img {
        /*transform: none;*/
        
        animation-duration: 0.7s;
        animation-timing-function: ease-in-out;
        animation-delay: 0s;
        animation-iteration-count: 1;
        animation-direction: normal;
        animation-fill-mode: forwards;
        animation-play-state: running;
        animation-name: scroll-up;
    }
    @keyframes scroll-down {
        0%   { transform: translateY(var(--navbar-height)); opacity: 0; }
        100% { transform: translateY(var(--navbar-height)); opacity: 1; }
    }
    
    @keyframes scroll-up {
        0%   { opacity: 1; transform: translateY(var(--navbar-height)); }
        20%  { opacity: 0; }
        40%  { opacity: 0; transform: translateY(0px); }
        100% { opacity: 1; transform: translateY(0px); }
    }
    
    #mainmenu .menu-item-level-1 > .menu-item-link {
        align-items: flex-start;
    }
    
    #mainmenu .menu-item-has-children.menu-item-level-1 {
        padding: 25px 0;
    }
    #mainmenu .menu-item-has-children.menu-item-level-1 > .menu-item-link {
        height: auto;
        margin-bottom: 25px;
    }
    
    .menu-item-has-children.menu-item-level-0 > .submenu-container {
        box-shadow: 0 4px 20px 0px rgb(0 0 0 / 10%);
    }
    .menu-item-level-0 > .submenu-container > .submenu-list {
        display: grid;
        width: 80%;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px 25px;
        /* grid-auto-rows: 22px; */
        grid-auto-rows: auto;
        padding-top: 25px;
        padding-bottom: 25px;
        height: 100%;
    }
    .menu-item-level-1.menu-item-has-children {
        position: absolute;
        right: var(--global-sides-margin);
        height: 100%;
        top: 0;
    }
    .menu-item-level-1.menu-item-has-children::before {
        content: "";
        position: absolute;
        top: 0;
        left: -40px;
        width: 1px;
        height: 100%;
        background: #E9E9EB;
    }
    .menu-item-level-1.menu-item-has-children > .submenu-list {
        display: flex;
        flex-flow: column nowrap;
        row-gap: 25px;
    }
    .menu-item-has-children.menu-item-level-0 > .submenu-container > .submenu-list {
        font-size: 13px;
    }
    
    /* weird */
    #submenu-of-menu-item-918 > .submenu-list,
    #submenu-of-menu-item-1959 > .submenu-list {
        min-height: calc(5 * 25px + 4 * 22px);
    }
}