// Navigation
@media screen and (min-width: 992px) {
    .wp-block-navigation {


        &:not(.has-background) {
            .wp-block-navigation__submenu-container {
                border: none;
            }
        }

        .wp-block-page-list {
            width: 100%;
        }

        ul {


            li {
                ul {
                    border: none !important;
                    box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.0509803922);
                    transform: translateY(-5px);
                    transform: translateY(0) scaleY(.8);
                    transform-origin: top;
                    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
                    transition-duration: .3s;
                    transition-property: opacity, visibility, transform;
                    transition-timing-function: cubic-bezier(.1, 0, .2, 1);
                    transition-timing-function: ease;
                    top: 35px !important;

                    li {
                        border-bottom: 1px solid rgba(146, 146, 146, 0.231372549);

                        &:last-child {
                            border: none;
                        }

                        ul {
                            top: -10px !important;
                        }
                    }
                }

                &.open-on-click {
                    ul {
                        top: 50px;
                    }
                }

                &.open-on-hover-click {
                    ul {
                        opacity: 0;
                        visibility: hidden;
                        border: none !important;
                        box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.0509803922);
                        transform: translateY(0) scaleY(.8);
                        pointer-events: none;
                        z-index: 999;
                        transition: transform 0.4s ease !important;
                    }

                    &:hover>ul,
                    &:focus>ul,
                    &:active>ul {
                        opacity: 1;
                        visibility: visible;
                        transform: translateY(10px);
                        pointer-events: auto;
                    }
                }
            }
        }
    }

    .wp-block-navigation .wp-block-navigation__submenu-icon {
        height: 0.85em;
        width: 0.85em;
    }

    /* Desktop */
    .wp-block-navigation {
        ul {
            li {
                ul {
                    width: 230px !important;

                    &::after {
                        content: "";
                        position: absolute;
                        width: 100%;
                        height: 45px;
                        top: -25px;
                    }
                }

                &.open-on-hover-click {
                    ul {
                        width: 320px;
                        max-height: none;
                    }
                }
            }
        }
    }
}

/* Mobile (max-width: 600px) */
@media screen and (max-width: 991px) {
    .wp-block-navigation {
        ul.wp-block-page-list {
            width: 100%;
        }

        .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open),
        .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
            background: var(--wp--preset--color--background) !important;
        }

        .wp-block-navigation__responsive-container {
            transform: translateX(100%) !important;
            transition: all .7s ease !important;
            visibility: hidden !important;
            display: block !important;
            animation: inherit !important;
            animation-fill-mode: inherit !important;
            background: var(--wp--preset--color--background);

            &.is-menu-open {
                transform: translateX(0) !important;
                visibility: visible !important;
                display: block !important;

            }
        }

        .wp-block-navigation__responsive-container-close {
            right: 1.5rem;
            top: 1rem;
        }

        .wp-block-navigation__responsive-container-content {
            ul.wp-block-navigation__container {
                width: 100%;
                gap: 0 !important;
                border: 1px solid rgba(0, 0, 0, 0.0509803922);
                border-bottom: none;

                li.wp-block-navigation-item {
                    width: 100%;
                    border-bottom: none;

                    a {
                        width: 100%;
                        border-bottom: 1px solid rgba(0, 0, 0, 0.0509803922);
                        padding: 0.625rem 3.125rem 0.625rem 1.25rem;
                        box-sizing: border-box;
                    }

                    ul {
                        padding: 0 !important;
                        transform: inherit !important;
                        top: 0 !important;

                        li {
                            a {
                                padding: 0.625rem 3.125rem 0.625rem 2.25rem !important;
                            }

                            li {
                                a {
                                    padding: 0.625rem 3.125rem 0.625rem 3.25rem !important;
                                }
                            }
                        }
                    }

                    .wp-block-navigation__submenu-icon {
                        display: block !important;
                        position: absolute;
                        right: 1rem;
                        top: 0;
                        height: 42px;
                        width: 42px;
                        z-index: 99;

                        svg {
                            width: 15px;
                            height: 15px;
                        }
                    }

                    ul.wp-block-navigation__submenu-container {
                        display: none;
                        width: 100%;
                        box-shadow: none;
                        position: inherit !important;
                        padding-top: 0;
                        margin-bottom: 10px;
                        margin-top: 0;
                    }

                    .wp-block-navigation-submenu__toggle[aria-expanded="true"]+ul {
                        display: block;
                    }
                }
            }
        }

        &.is-responsive {
            .wp-block-navigation__responsive-container {
                height: 100vh;
            }
        }
    }

    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        background-color: inherit;
        display: block;
        position: fixed;
        width: 100%;
        z-index: auto;
    }
}

// For Alwas Open Menu
@media (min-width: 992px) {
    .wp-block-navigation:has(.always-shown) {
        .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon svg {
            transform: rotate(180deg)
        }

        ul.wp-block-page-list {
            width: 100%;
        }

        .has-modal-open .wp-block-navigation__responsive-close {
            margin-left: auto;
            margin-right: auto;
            max-width: var(--wp--style--global--content-size, 100%);
            padding-top: var(--wp--preset--spacing--50);
        }

        .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open),
        .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
            background: var(--wp--preset--color--background) !important;
        }

        .wp-block-navigation__responsive-container {
            transform: translateY(-100%) !important;
            transition: all .7s ease !important;
            visibility: hidden !important;
            display: block !important;
            animation: inherit !important;
            animation-fill-mode: inherit !important;
            background: var(--wp--preset--color--background);

            &.is-menu-open {
                transform: translateY(0) !important;
                visibility: visible !important;
                display: block !important;

            }
        }

        .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
            padding-top: calc(5rem + 24px);
        }

        .wp-block-navigation__responsive-container-close {
            right: 1.5rem;
            top: 1rem;
        }

        .wp-block-navigation__responsive-container-content {
            ul.wp-block-navigation__container {
                width: 100%;
                gap: 0 !important;

                border-bottom: none;

                li.wp-block-navigation-item {
                    width: 100%;
                    border-bottom: none;

                    a {
                        width: 100%;
                        border-bottom: 1px solid rgba(0, 0, 0, 0.0509803922);
                        padding: 1rem 0;
                        box-sizing: border-box;
                    }

                    ul {
                        padding: 0 !important;
                        transform: inherit !important;
                        top: 0 !important;

                        li {
                            a {
                                padding: 0.625rem 3.125rem 0.625rem 2.25rem !important;
                            }

                            li {
                                a {
                                    padding: 0.625rem 3.125rem 0.625rem 3.25rem !important;
                                }
                            }
                        }
                    }

                    .wp-block-navigation__submenu-icon {
                        display: block !important;
                        position: absolute;
                        right: 1rem;
                        top: 0;
                        height: 42px;
                        width: 42px;
                        z-index: 99;

                        svg {
                            width: 15px;
                            height: 15px;
                        }
                    }

                    ul.wp-block-navigation__submenu-container {
                        display: none;
                        width: 100% !important;
                        box-shadow: none;
                        position: inherit !important;
                        padding-top: 0;
                        margin-bottom: 10px;
                        margin-top: 0;
                    }

                    .wp-block-navigation-submenu__toggle[aria-expanded="true"]+ul {
                        display: block;
                    }
                }
            }
        }

        &.is-responsive {
            .wp-block-navigation__responsive-container {
                height: 100vh;
            }
        }
    }

    body.home .up-down-sticky-header.header-transparent-only-home-enabled:not(.wp-header--fixed) :not(.wp-block-gutenify-mega-menu-mega-menu) .wp-block-navigation:has(.always-shown)>li>.wp-block-navigation-item__content {
        color: #000000;
    }

    body.home .up-down-sticky-header.header-transparent-only-home-enabled:not(.wp-header--fixed) :not(.wp-block-gutenify-mega-menu-mega-menu) .wp-block-navigation:has(.always-shown) .wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
        color: #000 !important;
    }
}

@media (max-width: 991px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: block;
    }
}