/* Public menu theme + designer canvas — driven by --ksm-md-* variables */

:is(body.ksm-menu-themed, .ksm-md-canvas) {
    --ksm-md-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
    body.ksm-menu-themed .kihon-site-header,
    body.ksm-menu-themed .elan-site-header,
    body.ksm-menu-themed .meridian-site-header,
    body.ksm-menu-themed .zanshin-site-header,
    body.ksm-menu-themed header.wp-block-template-part,
    body.ksm-menu-themed .wp-site-blocks > header,
    body.ksm-menu-themed .site-header,
    body.ksm-menu-themed :where(#masthead),
    body.ksm-menu-themed .elementor-location-header,
    .ksm-md-canvas .ksm-md-header
) {
    position: var(--ksm-md-sticky, sticky) !important;
    top: 0;
    z-index: 50;
    min-height: var(--ksm-md-height, 72px);
    background: var(--ksm-md-header-bg) !important;
    color: var(--ksm-md-header-fg) !important;
    backdrop-filter: blur(var(--ksm-md-blur, 0px)) saturate(1.12);
    -webkit-backdrop-filter: blur(var(--ksm-md-blur, 0px)) saturate(1.12);
    border-bottom: var(--ksm-md-border, 0) !important;
    box-shadow: var(--ksm-md-shadow, none) !important;
}

body.ksm-menu-themed.ksm-menu-header-solid :is(
    .kihon-site-header,
    .elan-site-header,
    .meridian-site-header,
    .zanshin-site-header,
    header.wp-block-template-part,
    .wp-site-blocks > header,
    .site-header,
    :where(#masthead),
    .elementor-location-header
),
.ksm-md-canvas.ksm-menu-header-solid .ksm-md-header {
    background: var(--ksm-md-header-solid) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.ksm-menu-themed.ksm-menu-header-contrast :is(
    .kihon-site-header,
    .elan-site-header,
    .meridian-site-header,
    .zanshin-site-header,
    header.wp-block-template-part,
    .wp-site-blocks > header,
    .site-header,
    :where(#masthead),
    .elementor-location-header
),
.ksm-md-canvas.ksm-menu-header-contrast .ksm-md-header {
    background: var(--ksm-md-header-solid) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.ksm-menu-themed.ksm-menu-header-transparent:not(.is-scrolled) :is(
    .kihon-site-header,
    .elan-site-header,
    .meridian-site-header,
    .zanshin-site-header,
    header.wp-block-template-part,
    .wp-site-blocks > header,
    .site-header,
    :where(#masthead),
    .elementor-location-header
),
.ksm-md-canvas.ksm-menu-header-transparent .ksm-md-header {
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

body.ksm-menu-themed :is(
    .kihon-site-header,
    .elan-site-header,
    .meridian-site-header,
    .zanshin-site-header,
    header.wp-block-template-part,
    .wp-site-blocks > header,
    .site-header,
    :where(#masthead)
) :is(.wp-block-site-title a, .wp-block-site-title, .site-title a, .custom-logo-link + *, .ksm-md-brand strong) {
    color: var(--ksm-md-header-fg) !important;
}

:is(
    body.ksm-menu-themed .kihon-site-header,
    body.ksm-menu-themed .elan-site-header,
    body.ksm-menu-themed .meridian-site-header,
    body.ksm-menu-themed .zanshin-site-header,
    body.ksm-menu-themed header.wp-block-template-part,
    body.ksm-menu-themed .wp-site-blocks > header,
    body.ksm-menu-themed .site-header,
    body.ksm-menu-themed :where(#masthead),
    .ksm-md-canvas .ksm-md-header
) :is(
    .wp-block-navigation,
    .wp-block-navigation__container,
    .menu
) {
    gap: var(--ksm-md-link-gap) !important;
}

:is(
    body.ksm-menu-themed .kihon-site-header,
    body.ksm-menu-themed .elan-site-header,
    body.ksm-menu-themed .meridian-site-header,
    body.ksm-menu-themed .zanshin-site-header,
    body.ksm-menu-themed header.wp-block-template-part,
    body.ksm-menu-themed .wp-site-blocks > header,
    body.ksm-menu-themed .site-header,
    body.ksm-menu-themed :where(#masthead),
    body.ksm-menu-themed .elementor-location-header,
    .ksm-md-canvas .ksm-md-header
) :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content,
    .wp-block-navigation .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content,
    nav.site-navigation ul.menu > li > a:not(.ksm-md-cta),
    .menu > li > a:not(.ksm-md-cta),
    .elementor-nav-menu--main > .elementor-nav-menu > li > .elementor-item
) {
    position: relative;
    color: var(--ksm-md-item-fg, var(--ksm-md-link)) !important;
    font-size: var(--ksm-md-link-size) !important;
    font-weight: var(--ksm-md-link-weight) !important;
    letter-spacing: var(--ksm-md-link-letter) !important;
    text-transform: var(--ksm-md-link-transform) !important;
    text-decoration: none !important;
    background: var(--ksm-md-item-bg, transparent) !important;
    border-style: solid !important;
    border-width: var(--ksm-md-item-border-w, 0px) !important;
    border-color: var(--ksm-md-item-border-color, transparent) !important;
    box-shadow: var(--ksm-md-item-shadow, none) !important;
    border-radius: var(--ksm-md-item-radius, 6px) !important;
    padding: var(--ksm-md-item-pad, 0.42em 0.72em) !important;
    transition: color 0.22s var(--ksm-md-ease), background 0.22s var(--ksm-md-ease), transform 0.22s var(--ksm-md-ease), box-shadow 0.22s var(--ksm-md-ease), border-color 0.22s var(--ksm-md-ease);
}

:is(
    body.ksm-menu-themed .kihon-site-header,
    body.ksm-menu-themed .elan-site-header,
    body.ksm-menu-themed .meridian-site-header,
    body.ksm-menu-themed .zanshin-site-header,
    body.ksm-menu-themed header.wp-block-template-part,
    body.ksm-menu-themed .wp-site-blocks > header,
    body.ksm-menu-themed .site-header,
    body.ksm-menu-themed :where(#masthead),
    .ksm-md-canvas .ksm-md-header
) :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    nav.site-navigation ul.menu > li > a:not(.ksm-md-cta):hover,
    .menu > li > a:not(.ksm-md-cta):hover,
    .elementor-nav-menu--main > .elementor-nav-menu > li > .elementor-item:hover
) {
    color: var(--ksm-md-item-hover-ink, var(--ksm-md-item-hover-fg, var(--ksm-md-link-hover))) !important;
    background: var(--ksm-md-item-hover-fill, var(--ksm-md-item-hover-bg, transparent)) !important;
    border-color: var(--ksm-md-item-hover-border, var(--ksm-md-item-border-color, transparent)) !important;
    box-shadow: var(--ksm-md-item-hover-shadow, var(--ksm-md-item-shadow, none)) !important;
}

:is(
    body.ksm-menu-themed .kihon-site-header,
    body.ksm-menu-themed .elan-site-header,
    body.ksm-menu-themed .meridian-site-header,
    body.ksm-menu-themed .zanshin-site-header,
    body.ksm-menu-themed header.wp-block-template-part,
    body.ksm-menu-themed .wp-site-blocks > header,
    body.ksm-menu-themed .site-header,
    body.ksm-menu-themed :where(#masthead),
    .ksm-md-canvas .ksm-md-header
) :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-current="page"],
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-current="true"],
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-current="page"],
    nav.site-navigation ul.menu > li.current-menu-item > a:not(.ksm-md-cta),
    .menu > li.current-menu-item > a:not(.ksm-md-cta),
    .elementor-nav-menu--main > .elementor-nav-menu > li > .elementor-item.elementor-item-active
) {
    color: var(--ksm-md-item-active-ink, var(--ksm-md-item-active-fg, var(--ksm-md-link-active))) !important;
    background: var(--ksm-md-item-active-fill, var(--ksm-md-item-active-bg, transparent)) !important;
    border-color: var(--ksm-md-item-active-border, var(--ksm-md-item-hover-border, var(--ksm-md-item-border-color, transparent))) !important;
    box-shadow: var(--ksm-md-item-active-shadow, var(--ksm-md-item-hover-shadow, var(--ksm-md-item-shadow, none))) !important;
}

:is(body.ksm-menu-themed, .ksm-md-canvas).ksm-menu-links-underline.ksm-menu-hover-underline :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content,
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content,
    nav.site-navigation ul.menu > li > a,
    .menu > li > a
)::after {
    content: none !important;
}

:is(body.ksm-menu-themed, .ksm-md-canvas).ksm-menu-hover-underline :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content,
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content,
    nav.site-navigation ul.menu > li > a,
    .menu > li > a
)::after {
    content: "";
    position: absolute;
    left: 0.72em;
    right: 0.72em;
    bottom: 0.12em;
    height: 2px;
    background: var(--ksm-md-link-active);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.28s var(--ksm-md-ease);
    pointer-events: none;
}

:is(body.ksm-menu-themed, .ksm-md-canvas).ksm-menu-hover-underline :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-current="page"],
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    nav.site-navigation ul.menu > li > a:hover,
    nav.site-navigation ul.menu > li.current-menu-item > a,
    .menu > li > a:hover,
    .menu > li.current-menu-item > a
)::after {
    transform: scaleX(1);
}

:is(body.ksm-menu-themed, .ksm-md-canvas).ksm-menu-hover-lift :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    nav.site-navigation ul.menu > li > a:hover,
    .menu > li > a:hover
) {
    transform: translateY(-2px);
}

:is(body.ksm-menu-themed, .ksm-md-canvas).ksm-menu-hover-glow :is(
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    .wp-block-navigation > .wp-block-navigation-item > .wp-block-navigation-item__content[aria-current="page"],
    .ksm-md-nav > .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
    nav.site-navigation ul.menu > li > a:hover,
    nav.site-navigation ul.menu > li.current-menu-item > a
) {
    text-shadow: 0 0 18px color-mix(in srgb, var(--ksm-md-link-hover) 55%, transparent);
}

:is(
    body.ksm-menu-themed .wp-block-navigation__submenu-container,
    body.ksm-menu-themed nav.site-navigation ul.menu li ul,
    body.ksm-menu-themed nav.site-navigation .sub-menu,
    body.ksm-menu-themed .sub-menu,
    .ksm-md-canvas .wp-block-navigation__submenu-container
) {
    background: var(--ksm-md-drop-bg) !important;
    color: var(--ksm-md-drop-fg) !important;
    border-radius: var(--ksm-md-drop-radius) !important;
    box-shadow: var(--ksm-md-drop-shadow) !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
    list-style: none !important;
    margin: 0;
    padding: 8px 0 !important;
    min-width: 168px;
}

:is(
    body.ksm-menu-themed .wp-block-navigation__submenu-container,
    body.ksm-menu-themed nav.site-navigation ul.menu li ul,
    body.ksm-menu-themed nav.site-navigation .sub-menu,
    .ksm-md-canvas .wp-block-navigation__submenu-container
) > :is(.wp-block-navigation-item, li) {
    display: block !important;
    width: 100%;
    border: none !important;
}

:is(
    body.ksm-menu-themed .wp-block-navigation__submenu-container,
    body.ksm-menu-themed nav.site-navigation ul.menu li ul,
    body.ksm-menu-themed nav.site-navigation .sub-menu,
    .ksm-md-canvas .wp-block-navigation__submenu-container
) :is(.wp-block-navigation-item__content, a) {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    color: var(--ksm-md-drop-fg) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 9px 14px !important;
    text-decoration: none !important;
}

:is(
    body.ksm-menu-themed .wp-block-navigation__submenu-container,
    body.ksm-menu-themed nav.site-navigation ul.menu li ul,
    body.ksm-menu-themed nav.site-navigation .sub-menu,
    .ksm-md-canvas .wp-block-navigation__submenu-container
) :is(.wp-block-navigation-item__content:hover, a:hover) {
    background: var(--ksm-md-drop-hover) !important;
    color: var(--ksm-md-drop-hover-fg, var(--ksm-md-drop-fg)) !important;
}

body.ksm-menu-themed.ksm-menu-cta-off .ksm-menu-cta,
body.ksm-menu-themed.ksm-menu-cta-off .ksm-md-cta,
.ksm-md-canvas.ksm-menu-cta-off .ksm-md-header-inner > .ksm-md-cta,
.ksm-md-canvas.ksm-menu-cta-off .ksm-md-mobile .ksm-md-cta {
    display: none !important;
}

:is(
    body.ksm-menu-themed .kihon-header-actions,
    body.ksm-menu-themed .elan-header-actions,
    body.ksm-menu-themed .meridian-header-actions,
    body.ksm-menu-themed .zanshin-header-actions,
    body.ksm-menu-themed header .wp-block-buttons,
    .ksm-md-canvas:not(.ksm-menu-cta-off)
) :is(.wp-block-button__link, .ksm-md-cta) {
    background: var(--ksm-md-cta-bg) !important;
    color: var(--ksm-md-cta-fg) !important;
    border-radius: var(--ksm-md-cta-radius) !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--ksm-md-cta-bg) 36%, transparent) !important;
}

body.ksm-menu-themed .wp-block-navigation__responsive-container.is-menu-open,
.ksm-md-canvas .ksm-md-mobile-panel {
    background: var(--ksm-md-mobile-bg) !important;
    color: var(--ksm-md-mobile-fg) !important;
}

body.ksm-menu-themed .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.ksm-md-canvas .ksm-md-mobile-panel a {
    color: var(--ksm-md-mobile-fg) !important;
}

body.ksm-menu-themed .wp-block-navigation__responsive-container-open,
body.ksm-menu-themed .wp-block-navigation__responsive-container-close,
.ksm-md-canvas .ksm-md-burger span {
    color: var(--ksm-md-header-fg);
}

body.ksm-menu-themed.ksm-menu-mobile-overlay .wp-block-navigation__responsive-container.is-menu-open {
    background: color-mix(in srgb, var(--ksm-md-mobile-bg) 92%, transparent) !important;
}

body.ksm-menu-themed.ksm-menu-mobile-fullscreen .wp-block-navigation__responsive-container.is-menu-open {
    inset: 0 !important;
}

:is(
    body.ksm-menu-themed footer,
    body.ksm-menu-themed .kihon-site-footer,
    body.ksm-menu-themed .elan-site-footer,
    body.ksm-menu-themed .meridian-site-footer,
    body.ksm-menu-themed .zanshin-site-footer
) :is(.wp-block-navigation-item__content, .wp-block-navigation a, .menu a),
.ksm-md-canvas .ksm-md-footer a {
    color: var(--ksm-md-footer);
}

:is(
    body.ksm-menu-themed footer,
    body.ksm-menu-themed .kihon-site-footer,
    body.ksm-menu-themed .elan-site-footer,
    body.ksm-menu-themed .meridian-site-footer,
    body.ksm-menu-themed .zanshin-site-footer
) :is(.wp-block-navigation-item__content:hover, .wp-block-navigation a:hover, .menu a:hover),
.ksm-md-canvas .ksm-md-footer a:hover {
    color: var(--ksm-md-footer-hover);
}

body.ksm-menu-themed.ksm-menu-footer-pills footer :is(.wp-block-navigation-item__content, .wp-block-navigation a),
.ksm-md-canvas.ksm-menu-footer-pills .ksm-md-footer a {
    padding: 0.28em 0.7em;
    border-radius: 999px;
}

body.ksm-menu-themed.ksm-menu-footer-pills footer :is(.wp-block-navigation-item__content:hover, .wp-block-navigation a:hover),
.ksm-md-canvas.ksm-menu-footer-pills .ksm-md-footer a:hover {
    background: color-mix(in srgb, var(--ksm-md-footer-hover) 12%, transparent);
}

@media (prefers-reduced-motion: reduce) {
    body.ksm-menu-themed * {
        transition: none !important;
    }
}

/* Hello Elementor and classic headers — same bar as the designer preview */

body.admin-bar.ksm-menu-themed .site-header,
body.admin-bar.ksm-menu-themed :where(#masthead) {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar.ksm-menu-themed .site-header,
    body.admin-bar.ksm-menu-themed :where(#masthead) {
        top: 46px;
    }
}

body.ksm-menu-themed .site-header,
body.ksm-menu-themed :where(#masthead) {
    display: block !important;
    padding: 0 !important;
    width: 100%;
}

body.ksm-menu-themed .site-header .header-inner,
body.ksm-menu-themed :where(#masthead) .header-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 18px;
    position: relative;
    width: 100%;
    max-width: none;
    min-height: var(--ksm-md-height, 72px);
    padding: 8px 22px;
    box-sizing: border-box;
}

body.ksm-menu-themed .site-header .site-branding,
body.ksm-menu-themed :where(#masthead) .site-branding {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo title" "logo tag";
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    flex: 0 1 auto;
    min-width: 0;
    text-align: start !important;
}

/* Title is injected inside .site-logo — flatten so grid areas apply to logo / name / tagline */
body.ksm-menu-themed .site-header .site-branding .site-logo {
    display: contents !important;
}

body.ksm-menu-themed .site-header .site-branding .custom-logo-link {
    grid-area: logo;
    display: block !important;
    line-height: 0;
    align-self: center;
}

body.ksm-menu-themed .site-header .custom-logo,
body.ksm-menu-themed .site-header .site-logo img,
body.ksm-menu-themed :where(#masthead) .custom-logo {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain;
}

body.ksm-menu-themed .site-header .site-branding.show-logo .site-title,
body.ksm-menu-themed .site-header .site-branding .site-title,
body.ksm-menu-themed .site-header .site-branding .ksm-menu-site-title {
    grid-area: title;
    display: block !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    align-self: end;
    min-width: 0;
}

body.ksm-menu-themed .site-header .site-title a {
    color: var(--ksm-md-header-fg) !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-decoration: none !important;
}

body.ksm-menu-themed .site-header .site-branding .site-description {
    grid-area: tag;
    display: block !important;
    margin: 2px 0 0 !important;
    align-self: start;
    font-size: 9px !important;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--ksm-md-header-fg) !important;
    opacity: 0.62;
}

@media (min-width: 992px) {
    body.ksm-menu-themed .site-header .site-navigation,
    body.ksm-menu-themed :where(#masthead) .site-navigation {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
        padding-inline-end: 132px;
    }
}

@media (min-width: 992px) {
    body.ksm-menu-themed .site-header nav.site-navigation ul.menu,
    body.ksm-menu-themed :where(#masthead) nav.site-navigation ul.menu {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        gap: var(--ksm-md-link-gap, 6px);
        margin: 0;
    }

    body.ksm-menu-themed .site-header nav.site-navigation ul.menu > li > a,
    body.ksm-menu-themed :where(#masthead) nav.site-navigation ul.menu > li > a {
        white-space: nowrap;
    }

    body.ksm-menu-themed nav.site-navigation ul.menu > li.menu-item-has-children {
        padding-inline-end: 0 !important;
    }

    /* Theme arrow sits beside the link. Hide it so the chevron can live inside the item. */
    body.ksm-menu-themed nav.site-navigation ul.menu > li.menu-item-has-children::after {
        content: none !important;
        display: none !important;
    }

    body.ksm-menu-themed nav.site-navigation ul.menu > li.menu-item-has-children > a:not(.ksm-md-cta) {
        display: inline-flex !important;
        align-items: center;
        gap: 0.35em;
    }

    body.ksm-menu-themed nav.site-navigation ul.menu > li.menu-item-has-children > a:not(.ksm-md-cta)::before {
        content: "▾";
        order: 1;
        flex: 0 0 auto;
        font-size: 0.8em;
        line-height: 1;
        color: currentColor;
        pointer-events: none;
    }

    body.ksm-menu-themed nav.site-navigation ul.menu li li.menu-item-has-children::after {
        color: var(--ksm-md-drop-fg);
        font-size: 0.85em;
    }

    body.ksm-menu-themed .site-header nav.site-navigation > .menu > .ksm-menu-cta,
    body.ksm-menu-themed :where(#masthead) nav.site-navigation > .menu > .ksm-menu-cta {
        position: absolute;
        inset-inline-end: 22px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        z-index: 2;
    }

    body.ksm-menu-themed .site-header nav.site-navigation .ksm-menu-cta > a.ksm-md-cta,
    body.ksm-menu-themed .site-header nav.site-navigation .ksm-menu-cta > a.ksm-md-cta:hover,
    body.ksm-menu-themed .site-header nav.site-navigation .ksm-menu-cta > a.ksm-md-cta:focus,
    body.ksm-menu-themed :where(#masthead) nav.site-navigation .ksm-menu-cta > a.ksm-md-cta {
        background: var(--ksm-md-cta-bg) !important;
        color: var(--ksm-md-cta-fg) !important;
        border-radius: var(--ksm-md-cta-radius, 10px) !important;
        box-shadow: 0 10px 24px color-mix(in srgb, var(--ksm-md-cta-bg) 36%, transparent) !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        padding: 10px 14px !important;
    }

    body.ksm-menu-themed nav.site-navigation ul.menu > li > ul,
    body.ksm-menu-themed nav.site-navigation ul.menu > li > .sub-menu {
        top: calc(100% + 8px) !important;
        left: 0 !important;
        z-index: 6;
    }
}

body.ksm-menu-themed .ksm-menu-cta > a::after {
    display: none !important;
}

/* Hello Elementor mobile/tablet — desktop nav hidden; toggle + dropdown panel */

@media (max-width: 991px) {
    body.ksm-menu-themed .site-header .header-inner,
    body.ksm-menu-themed :where(#masthead) .header-inner {
        flex-wrap: nowrap !important;
        padding-inline: 16px;
        gap: 12px;
    }

    body.ksm-menu-themed .site-header .site-branding,
    body.ksm-menu-themed :where(#masthead) .site-branding {
        flex: 1 1 auto;
        min-width: 0;
    }

    body.ksm-menu-themed .site-header nav.site-navigation,
    body.ksm-menu-themed :where(#masthead) nav.site-navigation {
        display: none !important;
    }

    body.ksm-menu-themed .site-header.menu-dropdown-none:not(.menu-layout-dropdown) .site-navigation-toggle-holder,
    body.ksm-menu-themed .site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation-toggle-holder,
    body.ksm-menu-themed .site-header.menu-dropdown-tablet:not(.menu-layout-dropdown) .site-navigation-toggle-holder,
    body.ksm-menu-themed :where(#masthead) .site-navigation-toggle-holder {
        display: flex !important;
        flex: 0 0 auto;
        margin-inline-start: auto;
        padding: 0;
    }

    body.ksm-menu-themed .site-header .site-navigation-toggle,
    body.ksm-menu-themed :where(#masthead) .site-navigation-toggle {
        color: var(--ksm-md-header-fg);
        background: color-mix(in srgb, var(--ksm-md-header-fg) 12%, transparent);
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown {
        top: 100% !important;
        bottom: auto !important;
        left: 0;
        right: 0;
        width: 100%;
        margin-block-start: 0;
        transform-origin: top center !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu {
        display: block !important;
        background: var(--ksm-md-mobile-bg) !important;
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        width: 100%;
        margin: 0;
        padding: 0 0 20px;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu > li {
        display: block !important;
        position: relative;
        width: 100%;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children::after,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li.menu-item-has-children::after {
        content: none !important;
        display: none !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children > a,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li.menu-item-has-children > a {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 0.45em;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children > a::before,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li.menu-item-has-children > a::before {
        content: "▾";
        flex: 0 0 auto;
        order: -1;
        color: var(--ksm-md-mobile-fg);
        font-size: 1.15em;
        line-height: 1;
        opacity: 0.85;
        pointer-events: none;
        transition: transform 0.22s var(--ksm-md-ease, ease);
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children.elementor-active > a::before,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li.menu-item-has-children.elementor-active > a::before {
        transform: rotate(180deg);
    }

    body.ksm-menu-themed.ksm-menu-hover-underline .site-header .site-navigation-dropdown ul.menu li.menu-item-has-children > a::after {
        bottom: 0.35em;
        left: 2em;
        right: 0.72em;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li ul.sub-menu {
        background: color-mix(in srgb, var(--ksm-md-mobile-fg) 6%, var(--ksm-md-mobile-bg)) !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li ul.sub-menu a {
        padding-inline-start: 1.75rem !important;
        font-size: calc(var(--ksm-md-link-size, 14px) * 0.95) !important;
        font-weight: calc(var(--ksm-md-link-weight, 600) - 100) !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown .ksm-menu-cta {
        position: static !important;
        transform: none !important;
        inset: auto !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li a,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li a,
    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu > li > a:not(.ksm-md-cta),
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu > li > a:not(.ksm-md-cta) {
        background: var(--ksm-md-mobile-bg) !important;
        color: var(--ksm-md-mobile-fg) !important;
        box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ksm-md-mobile-fg) 12%, transparent);
        font-size: var(--ksm-md-link-size, 14px) !important;
        font-weight: var(--ksm-md-link-weight, 600) !important;
        border-radius: 0 !important;
        letter-spacing: normal !important;
        text-transform: none !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown ul.menu li.current-menu-item > a,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown ul.menu li.current-menu-item > a {
        background: color-mix(in srgb, var(--ksm-md-link-active) 22%, var(--ksm-md-mobile-bg)) !important;
        color: var(--ksm-md-mobile-fg) !important;
    }

    body.ksm-menu-themed .site-header .site-navigation-dropdown .ksm-menu-cta > a.ksm-md-cta,
    body.ksm-menu-themed :where(#masthead) .site-navigation-dropdown .ksm-menu-cta > a.ksm-md-cta {
        background: var(--ksm-md-cta-bg) !important;
        color: var(--ksm-md-cta-fg) !important;
        border-radius: var(--ksm-md-cta-radius, 10px) !important;
        margin: 12px 16px 20px;
        text-align: center;
    }
}

body.ksm-menu-themed.ksm-menu-mobile-overlay .site-header .site-navigation-toggle-holder.elementor-active + .site-navigation-dropdown,
body.ksm-menu-themed.ksm-menu-mobile-fullscreen .site-header .site-navigation-toggle-holder.elementor-active + .site-navigation-dropdown {
    position: fixed;
    inset: 0;
    top: var(--ksm-md-mobile-panel-top, 0);
    z-index: 100000;
    max-height: none !important;
    transform: none !important;
    overflow-y: auto;
}

/* Hello Elementor footer: menu links only (no giant logo + tagline repeat) */

body.ksm-menu-themed .site-footer .site-branding {
    display: none !important;
}
