/* Site-wide header: white, sticky, navy logo. Overrides the legacy Elementor header colours. */
html {
  scroll-padding-top: 96px;
}

#masthead {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 #e3eaf4, 0 8px 24px rgba(11, 30, 63, 0.07);
}
#masthead .elementor,
#masthead header.elementor-element,
#masthead header.e-con,
#masthead .e-con {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
}

/* Layout: compact bar, everything centred vertically, logo clear of the edge */
#masthead header.e-con {
  align-items: center !important;
  min-height: 0 !important;
  padding: 8px 32px !important;
}
#masthead .e-con {
  align-items: center !important;
}
#masthead .elementor-widget-site-logo,
#masthead .elementor-widget-site-logo > .elementor-widget-container,
#masthead .hfe-site-logo {
  height: auto !important;
  min-height: 0 !important;
}

/* Logo */
#masthead .hfe-site-logo a {
  display: inline-flex;
  align-items: center;
}
#masthead .hfe-site-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
#masthead .enl-logo-icon {
  display: block;
  width: 44px;
  height: 44px;
  flex: none;
}
#masthead .enl-logo-text {
  color: #0b1e3f;
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* Menu */
#masthead .hfe-nav-menu a.hfe-menu-item {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
#masthead .hfe-nav-menu a.hfe-menu-item,
#masthead .hfe-nav-menu a.hfe-sub-menu-item {
  color: #0b1e3f !important;
}
#masthead .hfe-nav-menu a.hfe-menu-item:hover,
#masthead .hfe-nav-menu .current-menu-item > a.hfe-menu-item,
#masthead .hfe-nav-menu a.hfe-menu-item.hfe-menu-item-active {
  color: #146892 !important;
}
#masthead .hfe-nav-menu .hfe-menu-item .hfe-menu-toggle,
#masthead .hfe-nav-menu .hfe-menu-item .sub-arrow {
  color: #0b1e3f;
}
#masthead .hfe-nav-menu__toggle,
#masthead .hfe-nav-menu__toggle i,
#masthead .hfe-nav-menu__toggle svg {
  color: #0b1e3f !important;
  fill: #0b1e3f !important;
}
#masthead nav.hfe-dropdown,
#masthead .hfe-nav-menu__layout-horizontal .sub-menu {
  background: #fff !important;
}

@media (max-width: 600px) {
  #masthead header.e-con {
    padding: 6px 14px !important;
  }
  #masthead .hfe-site-logo-container {
    gap: 8px;
  }
  #masthead .enl-logo-text {
    font-size: 16px;
  }
  #masthead .enl-logo-icon {
    width: 34px;
    height: 34px;
  }
}

/* Keep the menu (or the phone menu button) at the right edge of the bar */
#masthead .elementor-widget:has(.hfe-nav-menu) {
  margin-left: auto;
}
#masthead header.e-con > .e-con {
  width: 100%;
  justify-content: space-between;
}
#masthead .hfe-nav-menu__toggle {
  margin: 0 0 0 auto !important;
}

/* ---------- Phone and tablet menu: white panel, large dark text ---------- */
@media (max-width: 1024px) {
  #masthead nav.hfe-dropdown {
    position: fixed !important;
    top: 87px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - 87px);
    overflow-y: auto;
    padding: 6px 0 14px;
    background: #fff !important;
    border-top: 1px solid #e3eaf4;
    box-shadow: 0 22px 40px rgba(11, 30, 63, 0.22);
  }
  #masthead nav.hfe-dropdown ul {
    margin: 0;
    padding: 0;
  }
  #masthead nav.hfe-dropdown li {
    background: transparent !important;
    border: 0 !important;
  }
  #masthead nav.hfe-dropdown a.hfe-menu-item,
  #masthead nav.hfe-dropdown a.hfe-sub-menu-item {
    display: block;
    padding: 18px 24px !important;
    background: #fff !important;
    border-bottom: 1px solid #eef2f8 !important;
    color: #0b1e3f !important;
    font-size: 19px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
  }
  #masthead nav.hfe-dropdown a.hfe-menu-item:hover,
  #masthead nav.hfe-dropdown a.hfe-menu-item:focus,
  #masthead nav.hfe-dropdown a.hfe-sub-menu-item:hover {
    background: #eaf1fa !important;
    color: #146892 !important;
  }
  #masthead nav.hfe-dropdown .current-menu-item > a.hfe-menu-item {
    padding-left: 20px !important;
    background: #eaf1fa !important;
    border-left: 4px solid #146892 !important;
    color: #146892 !important;
  }
  #masthead nav.hfe-dropdown a.hfe-menu-item::before,
  #masthead nav.hfe-dropdown a.hfe-menu-item::after {
    display: none !important;
  }
}
@media (max-width: 600px) {
  #masthead nav.hfe-dropdown {
    top: 76px !important;
    max-height: calc(100vh - 76px);
  }
}
