/* MNBE v1.5.0 / ElementsKit header dropdown stacking fix.
   Applies to header/nav wrappers only; not to user-edited page sections or photos. */

/* A positioned header stacking context must sit above the hero and other sections.
   Keep native Elementor/ElementsKit sticky behavior: don't force position on sticky states. */
:where(.ekit-template-content-header, .elementskit-template-content-header, .elementor-location-header, [data-elementor-type="header"]) {
  z-index: 99990 !important;
  overflow: visible !important;
}
/* Common static header template wrappers. Sticky positioning is handled by inner widgets. */
:where(.ekit-template-content-header, .elementskit-template-content-header, .elementor-location-header):not(.elementor-sticky--active):not(.ekit-sticky--active) {
  position: relative;
}
/* Theme headers containing an ElementsKit navigation widget (modern-browser fallback). */
:where(header:has(.elementor-widget-elementskit-nav-menu), #masthead:has(.elementskit-navbar-nav)) {
  z-index: 99990 !important;
  overflow: visible !important;
}
:where(header:has(.elementor-widget-elementskit-nav-menu), #masthead:has(.elementskit-navbar-nav)):not(.elementor-sticky--active):not(.ekit-sticky--active) {
  position: relative;
}

/* Only the Elementor layout ancestors INSIDE header templates may be unclipped.
   The offcanvas/mobile drawer retains ElementsKit's own overflow and transition rules. */
:where(.ekit-template-content-header, .elementskit-template-content-header, .elementor-location-header, [data-elementor-type="header"]) :is(
  .elementor, .elementor-section, .elementor-container, .elementor-column,
  .elementor-widget-wrap, .elementor-widget-elementskit-nav-menu, .e-con, .e-con-inner
) {
  overflow: visible !important;
}

/* Relative submenus keep their built-in open/close behavior; raise only their layer. */
.elementor-widget-elementskit-nav-menu,
.elementor-widget-elementskit-nav-menu > .elementor-widget-container,
.elementor-widget-elementskit-nav-menu .ekit-wid-con {
  overflow: visible !important;
}
.elementor-widget-elementskit-nav-menu {
  z-index: 99991 !important;
}
.elementor-widget-elementskit-nav-menu :is(.elementskit-dropdown, .elementskit-megamenu-panel, .elementskit-submenu-panel) {
  z-index: 99992 !important;
}

/* The page's own hero and cinematic sections remain below the navigation overlay. */
body.kmm-cinematic-page .elementor-section.kmm-section {
  z-index: 0;
}
