
/* ===== Tri-Health Header Safety CSS =====
   Purpose: Guarantee header/nav visibility & usability across themes/caches.
   Scope: Elementor Header (HFE) + Nav Menu widget.
   Last updated: 2025-08-11
====================================================== */

/* Keep header above all page content */
.elementor-location-header { position: relative; z-index: 1000; }

/* Ensure the HFE nav menu and its dropdown stack on top */
.hfe-nav-menu__container,
.hfe-nav-menu--dropdown,
.hfe-nav-menu .sub-menu { z-index: 9999; position: relative; }

/* Fallback header heights (if responsive controls are overridden) */
@media (min-width: 1025px) {
  .elementor-location-header .elementor-section { min-height: 85px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-location-header .elementor-section { min-height: 75px; }
}
@media (max-width: 767px) {
  .elementor-location-header .elementor-section { min-height: 65px; }
}

/* High-contrast default link colors for menu items */
.hfe-nav-menu a.hfe-menu-item,
.hfe-nav-menu a.hfe-sub-menu-item { color: #111111 !important; text-decoration: none; }
.hfe-nav-menu a.hfe-menu-item:hover,
.hfe-nav-menu a.hfe-sub-menu-item:hover { color: #0F3A5B !important; }

/* Active state color */
.hfe-nav-menu .current-menu-item > a,
.hfe-nav-menu .current-menu-ancestor > a { color: #0F3A5B !important; }

/* Dropdown panel readability */
.hfe-nav-menu--dropdown,
.hfe-nav-menu .sub-menu {
  background: #FFFFFF !important;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  border: 1px solid #e5e7eb;
}

/* Submenu item spacing */
.hfe-nav-menu .sub-menu a.hfe-sub-menu-item {
  padding-top: 10px; padding-bottom: 10px;
}

/* Prevent right-edge overflow for submenus */
@media (min-width: 1025px) {
  .hfe-nav-menu__layout-horizontal .menu-item-has-children:hover > .sub-menu {
    left: auto; right: 0;
  }
}

/* Hamburger/toggle visibility on mobile */
.elementor-menu-toggle,
.hfe-nav-menu .elementor-clickable { color: #111111 !important; }

/* Place hamburger on the right for mobile layouts that ignore widget setting */
@media (max-width: 1024px) {
  .hfe-nav-menu__toggle { display: flex; justify-content: flex-end; }
}

/* Accessible focus indicators */
.hfe-nav-menu a:focus,
.elementor-menu-toggle:focus {
  outline: 2px solid #0F3A5B;
  outline-offset: 2px;
}

/* Make sure header dropdowns can overflow outside the header if needed */
.elementor-location-header,
.elementor-location-header .elementor-section {
  overflow: visible !important;
}

/* Optional: sticky header polish (uncomment if you enable sticky)
.elementor-sticky--effects.elementor-location-header {
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
  backdrop-filter: saturate(1.2);
}
*/
