@media (width >=1024px) {
    #cms-header .m4-menu {
        --custom-menu-v4-2-bg: var(--dropdown-bg-color);
        --custom-menu-v4-2-text: var(--dropdown-text-color);
        --custom-menu-v4-2-hover: color-mix(in srgb, var(--custom-menu-v4-2-text) 8%, transparent);
        --custom-menu-v4-2-accent: var(--nav-color);

        .m4--menu-item-active-line {
            display: none;
        }

        .m4--menu-item:not(#m4-menu--bar-dropdown-button):has(> button[aria-expanded="true"]) {
            anchor-name: --open-nav-item;
        }

        .m4-menu--dropdown-item-wrapper .m4--menu-item-icon svg {
            transform: rotate(90deg);
        }

        .m4-menu--drawer {
            position-anchor: --open-nav-item;
            top: anchor(bottom);
            left: anchor(left) !important;
            right: auto !important;
            position-try-fallbacks: flip-inline;

            width: max-content;
            min-width: 240px;
            max-width: 320px;
            min-height: 0;
            max-height: none;
            padding: 8px 0;
            flex-direction: column !important;
            overflow: visible;
            border-top: 3px solid var(--custom-menu-v4-2-accent);
            border-radius: 0 0 8px 8px;

            .m4-menu--drawer-title {
                display: none;
            }

            .m4-menu--drawer-content-wrapper {
                margin: 0;
                max-width: none;
                flex-wrap: nowrap;
                overflow: visible;
            }

            .m4--drawer-element {
                position: relative;
                margin: 0;
                padding: 0;
                width: 100%;
            }

            .m4--drawer-element-title {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 12px;
                min-height: 0;
                padding: 10px 18px;

                &:hover {
                    background: var(--custom-menu-v4-2-hover);
                }
            }

            .m4--drawer-element-title-text {
                min-width: 0;
            }

            .m4--menu-item-link,
            .item-type-header {
                white-space: normal;
                overflow-wrap: anywhere;
                color: var(--custom-menu-v4-2-text);
                font-size: 0.9375rem;
                font-weight: 500;
                line-height: 1.4;
                text-decoration: none;
                text-transform: none;
            }

            .has-children>.m4--drawer-element-title {
                position: relative;
                cursor: pointer;

                .m4--drawer-element-title-icon {
                    position: static;

                    &::after {
                        content: "";
                        position: absolute;
                        inset: 0;
                    }

                    svg {
                        transform: rotate(-90deg);
                    }
                }
            }

            .has-children:has(> .m4--drawer-element-title [aria-expanded="true"])>.m4--drawer-element-title {
                background: var(--custom-menu-v4-2-hover);
                box-shadow: inset 3px 0 0 var(--custom-menu-v4-2-accent);
            }

            .has-children {
                anchor-scope: --dd-section;

                >.m4--drawer-element-title {
                    anchor-name: --dd-section;
                }
            }

            .m4--drawer-children {
                position: absolute;
                position-anchor: --dd-section;
                top: anchor(top);
                left: anchor(right);
                position-try-fallbacks: flip-inline;

                width: max-content;
                min-width: 220px;
                max-width: 300px;
                padding: 8px 0;
                background: var(--custom-menu-v4-2-bg);
                border-radius: 0 8px 8px 8px;
                box-shadow: 0 6px 25px #0000004d;
                z-index: 1;

                .m4--drawer-element-title {
                    padding: 9px 18px;
                }

                .m4--menu-item-link {
                    font-weight: 400;

                    &:hover,
                    &:focus-visible {
                        text-decoration: underline;
                        text-underline-offset: 3px;
                    }
                }
            }
        }

        .m4--menu-item[style*="none"]+div>.m4-menu--drawer,
        .m4-menu--drawer.isHidden {
            display: none !important;
        }

        .m4-menu--dropdown-item-wrapper {
            overflow: visible;
            max-height: none !important;
            height: auto !important;
        }

        .m4--menu-dropdown-item {
            position: relative;
            overflow: visible;
        }

        .m4--menu-dropdown-item .m4-menu--drawer {
            position: absolute;
            position-anchor: none;
            top: -8px !important;
            right: 100% !important;
            left: auto !important;
            bottom: auto !important;
            position-try-fallbacks: none;
            transform: none;
            background: var(--custom-menu-v4-2-bg);
            border-top: none;
            border-right: 3px solid var(--custom-menu-v4-2-accent);
            border-radius: 8px 0 0 8px;
            box-shadow: 0 6px 25px #0000004d;
            z-index: 999;

            .has-children>.m4--drawer-element-title .m4--drawer-element-title-icon svg {
                transform: rotate(90deg);
            }

            .m4--drawer-children {
                display: none !important;
                position-anchor: none;
                top: -8px;
                right: 100%;
                left: auto;
                position-try-fallbacks: none;
                border-radius: 8px 0 8px 8px;
            }

            .m4--drawer-element:is(:hover, :focus-within) .m4--drawer-children {
                display: block !important;
            }

            .has-children:is(:hover, :focus-within)>.m4--drawer-element-title {
                background: var(--custom-menu-v4-2-hover);
                box-shadow: inset -3px 0 0 var(--custom-menu-v4-2-accent);
            }
        }

        .m4--menu-dropdown-item:is(:hover, :focus-within, [is-active="true"]) .m4-menu--drawer {
            display: flex !important;
        }
    }

    @supports not (anchor-name: --a) {
        #cms-header .m4-menu .m4-menu--drawer:not(.isHidden) {
            top: 100%;

            .m4--drawer-children {
                top: 0;
                left: 100%;
            }
        }
    }
}