.menu {
    list-style: none;

    margin: 0;
    padding: 0;

    .menu-item {
        width: auto;
        a {
            color: var(--black);
            text-decoration: none;

            cursor: pointer;

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

    .menu--sub-menu {
        list-style: none;
        padding-left: 0;

        overflow: hidden;

        .menu-item--sub-menu {
            display: flex;
            flex-direction: row;
            align-items: baseline;
            grid-gap: 10px;

            font-weight: bold;

            &:before {
                content: "→";
                font-family: var(--font-family-accent);
                font-weight: bold;
            }
        }
    }
}

.menu--main {
    display: flex;
    flex-direction: row;

    @media(max-width: 991px) {
        display: none;
    }

    .menu-item {
        padding: calc(var(--gutter-width) / 2) calc(var(--gutter-width));
    }

    .menu-item.below {
        position: relative;

        .menu--sub-menu {
            position: absolute;

            width: max-content;

            background: var(--white);

            transition: all var(--animation-duration) ease-in;

            &.level--1 {
                bottom: 0;
                left: 0;

                transform: translateY(100%);
            }
            &.level--2 {
                top: 0;
                left: 100%;
            }
            &.level--3 {

            }
        }

        &:not(:hover) {
            .menu--sub-menu {
                max-height: 0 !important;
                overflow: hidden;
            }
        }
        &:hover {
            > .menu--sub-menu {
                max-height: fit-content;
                /*overflow: visible;*/
                &:has(.menu-item--sub:hover) {
                    overflow: visible;
                }
            }
        }
        .menu-item--sub {

        }
    }
}

.menu--mobile {
    > .menu-item {
        padding: var(--gutter-width) 0;
    }
    .menu-item {
        position: relative;
        font-size: var(--font-size-h3);

        a {
            display: flex;
            justify-content: space-between;
            align-items: center;

            font-weight: 700;
            text-decoration: none;

            &:hover, &:focus {
                text-decoration: none;
            }
        }

        &.below {
            > a {
                &::after {
                    content: '\E136';

                    font-family: var(--font-family-icons);
                }
            }

            &:has(.menu--sub-menu.open) {
                > a {
                    &::after {
                        content: '\E13C';
                    }
                }
            }

            .menu--sub-menu {
                max-height: 0;

                transition: all var(--animation-duration) var(--animation-timing);

                &.open {
                    padding: var(--gutter-width) 0;
                }

                .menu-item {
                    a {
                        display: block;

                        padding-top: var(--gutter-width);
                        padding-left: var(--gutter-width);
                    }
                    &:first-child {
                        a {
                            /*padding-top: 0;*/
                        }
                    }
                    &:last-child {
                        a {
                            padding-bottom: var(--gutter-width);
                        }
                    }
                }
            }
        }
    }
}