/* DD Header Motion 1.5.0
   Elementor keeps ownership of internal pill design and dimensions. */
.dd-floating-nav {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.ddhm-floating {
    position: fixed !important;
    top: var(--ddhm-top-desktop, 24px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    translate: -50% -10px;
    z-index: var(--ddhm-z, 9999) !important;
    visibility: visible !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity var(--ddhm-duration, 420ms) ease,
                translate var(--ddhm-duration, 420ms) ease;
    will-change: opacity, translate;
}
.ddhm-floating.ddhm-visible {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    translate: -50% 0;
}
.ddhm-original-row-hidden {
    display: none !important;
}
.ddhm-floating-row-collapsed {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}
body.ddhm-blur-band.ddhm-active::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--ddhm-blur-height, 76px);
    z-index: calc(var(--ddhm-z, 9999) - 1);
    pointer-events: none;
    background: rgba(255,255,255,.20);
    -webkit-backdrop-filter: blur(var(--ddhm-blur-strength, 18px)) saturate(1.25);
    backdrop-filter: blur(var(--ddhm-blur-strength, 18px)) saturate(1.25);
}
@media (prefers-reduced-motion: reduce) {
    .ddhm-floating { transition: none !important; }
}

/* Elementor editor safety: restore row layout if a state class is present.
   Floating pill visibility is handled only for the actual Header template preview
   by a conditional wp_head style; ordinary page/post editors keep it hidden. */
body.elementor-editor-active .ddhm-original-row-hidden,
body.elementor-editor-active .ddhm-floating-row-collapsed,
body.elementor-editor-preview .ddhm-original-row-hidden,
body.elementor-editor-preview .ddhm-floating-row-collapsed {
    display: revert !important;
    height: auto !important;
    min-height: initial !important;
    max-height: initial !important;
    margin: revert !important;
    padding: revert !important;
    border: revert !important;
    overflow: visible !important;
}

/* Responsive safeguards for narrow phones and tablet widths. */
.ddhm-floating { max-width: calc(100vw - 24px) !important; }
.ddhm-floating > .e-con-inner { max-width: 100% !important; }
@media (max-width: 767px) {
  .ddhm-floating { top: var(--ddhm-top-mobile, 12px) !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .ddhm-floating { top: var(--ddhm-top-tablet, 20px) !important; }
}

/* Prevent the hidden Elementor pill source row from reserving space before JS initializes.
   Critical equivalent is also printed in wp_head for first-paint stability. */
body:not(.elementor-editor-active):not(.elementor-editor-preview) .dd-header-wrap:has(.dd-floating-nav) {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Explicit high-specificity reveal state: the pill must win over its initial hidden rule. */
.dd-header-wrap .dd-floating-nav.ddhm-floating.ddhm-visible {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}


/* Mega Menu screen-wide backdrop: rendered as a real fixed layer so it can
   dim the full viewport without applying filters to the menu/header itself. */
.ddhm-mega-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: var(--ddhm-overlay-color, #000000);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--ddhm-overlay-duration, 350ms) ease,
                visibility var(--ddhm-overlay-duration, 350ms) ease;
}
.ddhm-mega-backdrop.ddhm-backdrop-visible {
    opacity: var(--ddhm-overlay-opacity, .45);
    visibility: visible;
    pointer-events: auto;
}
body.ddhm-scroll-locked {
    overscroll-behavior: none;
}
body.ddhm-mega-open .elementor-location-header {
    position: relative;
    z-index: 10000 !important;
}
body.ddhm-mega-open .ddhm-floating {
    z-index: 10001 !important;
}
body.ddhm-mega-open .dd-mega-menu,
body.ddhm-mega-open .dd-mega-menu .e-n-menu-content,
body.ddhm-mega-open .dd-mega-menu .elementor-nav-menu--dropdown {
    position: relative;
    z-index: 10002;
}
@media (prefers-reduced-motion: reduce) {
    .ddhm-mega-backdrop { transition: none !important; }
}


/* 1.6.1: non-positioning scroll lock avoids scroll restoration jumps */
html.ddhm-scroll-locked,
body.ddhm-scroll-locked {
    overscroll-behavior: none !important;
}
body.ddhm-scroll-locked {
    overflow: hidden !important;
}

/* Mobile Mega Menu gets its own viewport-bounded vertical scroll region. */
.ddhm-menu-scroll-panel {
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y;
    scrollbar-width: thin;
}
.ddhm-menu-scroll-panel > * {
    overscroll-behavior: contain;
}


/* 1.6.2: keep the floating pill above the white menu shell and its scroll area. */
body.ddhm-mega-open .elementor-location-header {
    z-index: 10020 !important;
}
body.ddhm-mega-open .ddhm-floating {
    z-index: 10060 !important;
}
body.ddhm-mega-open .dd-mega-menu .e-n-menu-content,
body.ddhm-mega-open .dd-mega-menu .elementor-nav-menu--dropdown {
    z-index: 10030 !important;
}

/* Only the inner coloured-card wrapper scrolls on mobile.
   The white outer shell and floating pill remain outside this scroll region. */
@media (max-width: 767px) {
    .ddhm-menu-scroll-panel {
        max-height: var(--ddhm-mobile-menu-scroll-height, 70vh) !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
        scrollbar-width: thin;
    }
}


/* 1.6.3: enforce document-level scroll lock, including themes that override
   normal html/body overflow declarations. Event-level guards in ddhm.js also
   stop wheel/touch scroll libraries from moving the page behind the menu. */
html.ddhm-scroll-locked,
body.ddhm-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}
body.ddhm-scroll-locked {
}
