:root {
    --nav-height: 50px;
    --bg-color-nav: #3b3b3b;
    --bg-color-primary: #006699;
    --bg-color-secondary: #003870;
    --font-color-primary: #ffffff;
}

#Menusection .mod_megamenu {
    display: flex;
    position: relative;
    overflow: visible;
    height: var(--nav-height);
    background-color: var(--bg-color-nav);

    & #nav-toggle {
        padding: 0 12px;
        background-color: var(--bg-color-nav);
        border: none;
        cursor: pointer;

        &::before {
            content: '\e8cb';
            font-family: 'fontello';
            font-size: 28px;
            line-height: 50px;
            color: var(--font-color-primary);
        }
    }

    & .level_1 {
        display: none;
        flex-direction: column;
        justify-content: space-between;
        position: absolute;
        z-index: 1;
        left: 0;
        top: var(--nav-height);
        width: 100%;
        background-color: var(--bg-color-primary);

        & > li {
            position: relative;
            padding: 0 8px;
            line-height: var(--nav-height);
            font-size: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);

            & > span {
                color: #fa8535;

                &::after {
                    content: '\e8fd';
                    font-family: 'fontello';
                    font-size: 18px;
                    margin-inline-start: 4px;
                }

                &:hover {
                    text-decoration: underline;
                }
            }

            & > a {
                color: var(--font-color-primary);

                &::after {
                    color: var(--font-color-primary);
                    content: '\e8fd';
                    font-family: 'fontello';
                    font-size: 18px;
                    margin-inline-start: 4px;
                }

                &:hover {
                    text-decoration: underline;
                }
            }

            &:hover {
                background-color: var(--bg-color-primary);

                & .level_2 {
                    display: flex;
                    flex-direction: column;
                    padding: 0 8px;
                    box-shadow: -8px 0 0 var(--bg-color-secondary), 8px 0 0 var(--bg-color-secondary);

                    & > li {
                        padding: 0 8px 0 0;
                    }
                }
            }
        }

        & .level_2 {
            display: none;
            background-color: var(--bg-color-secondary);

            & a {
                color: var(--font-color-primary);
                opacity: 0.8;
            }
        }
    }

    &.open .level_1 {
        display: flex;
    }

}

@media (width >= 1200px) {
    #Menusection .mod_megamenu {
        & #nav-toggle {
            display: none;
        }

        & .level_1 {
            position: static;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            background-color: var(--bg-color-nav);

            & > li {
                & > span {
                    &::after {
                        float: right;
                    }

                }

                & > a {
                    &::after {
                        float: right;
                    }
                }

                &:hover {
                    & .level_2 {
                        box-shadow: none;
                    }
                }
            }

            & .level_2 {
                position: absolute;
                z-index: 1;
                top: var(--nav-height);
                left: 0;
                width: max-content;
                background-color: var(--bg-color-primary);
            }
        }
    }
}
