/* NPW Design System 1.5.9.6.1 — mobile accordion for the HFE / WordPress header nav.
   Source of the menu: Header Footer Elementor Navigation Menu widget (header template 31311)
   pulling a WP nav menu. This file is a mobile-only override. Desktop is unchanged.
   Breakpoint (1.5.9.6.8): hamburger up to 1159px; HFE's own tablet hamburger covers <=1024px, our JS/CSS extends it to 1159px. */

@media (max-width: 1159px) {

  /* Full-width panel under the orange header. The HFE widget sits in a narrow
     header column, so left:0 on a position:absolute nav would stay in that column.
     Fixed positioning breaks out to the viewport. JS sets --npw-mm-top. */
  body.npw-ds #masthead {
    position: relative !important;
    z-index: 100000;
  }
  body.npw-ds #masthead nav.hfe-dropdown,
  body.npw-ds #masthead nav.hfe-dropdown-expandible,
  body.npw-ds #masthead nav.menu-is-active,
  body.npw-ds .elementor-31311 nav.hfe-dropdown,
  body.npw-ds .elementor-31311 nav.menu-is-active {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: var(--npw-mm-top, 72px) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 99999 !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    box-sizing: border-box !important;
  }

  /* —— Panel list: clean stacked rows —— */
  body.npw-ds #masthead nav.hfe-dropdown ul.hfe-nav-menu,
  body.npw-ds #masthead nav.menu-is-active ul.hfe-nav-menu,
  body.npw-ds #masthead nav.hfe-dropdown-expandible ul.hfe-nav-menu,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.hfe-nav-menu,
  body.npw-ds .elementor-31311 nav.menu-is-active ul.hfe-nav-menu {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 4px 0 8px !important;
    background: #FFFFFF !important;
    list-style: none !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item,
  body.npw-ds #masthead nav.menu-is-active ul.hfe-nav-menu > li.menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #E6EDF7 !important;
    position: relative;
    background: #FFFFFF !important;
  }
  body.npw-ds #masthead nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item:last-child,
  body.npw-ds #masthead nav.menu-is-active ul.hfe-nav-menu > li.menu-item:last-child {
    border-bottom: 0 !important;
  }

  /* Top-level links (no children): one 52px row, label left. */
  body.npw-ds #masthead nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item,
  body.npw-ds #masthead nav.menu-is-active ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 52px !important;
    padding: 12px 20px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #0F2744 !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    font-family: var(--npw-font, "Plus Jakarta Sans", "Helvetica Neue", sans-serif);
    font-weight: 700 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    white-space: normal;
  }

  /* Parent row: label + chevron on the SAME line. */
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container,
  body.npw-ds #masthead nav.menu-is-active .hfe-has-submenu-container,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-has-submenu-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    position: relative !important;
    min-height: 52px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container > a.hfe-menu-item,
  body.npw-ds #masthead nav.menu-is-active .hfe-has-submenu-container > a.hfe-menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-has-submenu-container > a.hfe-menu-item {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-height: 52px !important;
    padding: 12px 56px 12px 20px !important; /* room for the chevron button */
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Chevron: one square tap target, right-aligned, never on its own line. */
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container .hfe-menu-toggle.sub-arrow,
  body.npw-ds #masthead nav.menu-is-active .hfe-has-submenu-container .hfe-menu-toggle.sub-arrow,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container .hfe-menu-toggle,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-has-submenu-container .sub-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    right: 2px !important;
    bottom: 0 !important;
    left: auto !important;
    width: 48px !important;
    min-width: 48px !important;
    min-height: 52px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #0F2744 !important;
    cursor: pointer;
    z-index: 2;
    float: none !important;
    box-sizing: border-box !important;
    transition: transform .2s ease;
    transform-origin: center center;
  }

  /* Hide the Font Awesome glyph that HFE puts on a new line; use one CSS chevron. */
  body.npw-ds #masthead nav.hfe-dropdown .hfe-menu-toggle.sub-arrow i,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-menu-toggle.sub-arrow i:before,
  body.npw-ds #masthead nav.menu-is-active .hfe-menu-toggle.sub-arrow i,
  body.npw-ds #masthead nav.menu-is-active .hfe-menu-toggle.sub-arrow i:before,
  body.npw-ds #masthead nav.hfe-dropdown .sub-menu-active .sub-arrow i:before,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-menu-toggle.sub-arrow i,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-menu-toggle.sub-arrow i:before {
    content: none !important;
    display: none !important;
    font-size: 0 !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown .hfe-menu-toggle.sub-arrow::after,
  body.npw-ds #masthead nav.menu-is-active .hfe-menu-toggle.sub-arrow::after,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-menu-toggle.sub-arrow::after {
    content: "" !important;
    display: block !important;
    width: 9px !important;
    height: 9px !important;
    margin-top: -5px !important;
    border-right: 2px solid #0F2744 !important;
    border-bottom: 2px solid #0F2744 !important;
    border-left: 0 !important;
    border-top: 0 !important;
    background: none !important;
    transform: rotate(45deg); /* points down */
    font-size: 0 !important;
    line-height: 0 !important;
  }

  /* Open: rotate the chevron 180deg so it points up. */
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container.sub-menu-active .hfe-menu-toggle.sub-arrow,
  body.npw-ds #masthead nav.hfe-dropdown li.menu-active > .hfe-has-submenu-container .hfe-menu-toggle.sub-arrow,
  body.npw-ds #masthead nav.menu-is-active .hfe-has-submenu-container.sub-menu-active .hfe-menu-toggle.sub-arrow,
  body.npw-ds .elementor-31311 nav.hfe-dropdown .hfe-has-submenu-container.sub-menu-active .hfe-menu-toggle.sub-arrow {
    transform: rotate(180deg);
  }

  /* —— Sub-links: indented, 6% brand blue tint, slightly smaller, dividers. —— */
  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu,
  body.npw-ds #masthead nav.menu-is-active ul.sub-menu,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(37, 99, 235, 0.06) !important; /* brand blue at 6% */
    background-color: rgba(37, 99, 235, 0.06) !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    visibility: hidden;
    height: 0;
    opacity: 0;
  }

  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu.sub-menu-open,
  body.npw-ds #masthead nav.menu-is-active ul.sub-menu.sub-menu-open,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container.sub-menu-active + ul.sub-menu,
  body.npw-ds #masthead nav.hfe-dropdown li.menu-active > ul.sub-menu,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu.sub-menu-open {
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
    overflow: hidden !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu > li.menu-item,
  body.npw-ds #masthead nav.menu-is-active ul.sub-menu > li.menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu > li.menu-item {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 1px solid rgba(15, 39, 68, 0.08) !important;
    background: transparent !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item,
  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu a.hfe-menu-item,
  body.npw-ds #masthead nav.menu-is-active ul.sub-menu a.hfe-sub-menu-item,
  body.npw-ds #masthead nav.menu-is-active ul.sub-menu a.hfe-menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu a.hfe-menu-item {
    display: flex !important;
    align-items: center !important;
    min-height: 52px !important;
    padding: 10px 20px 10px 36px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #0F2744 !important;
    background: transparent !important;
    background-color: transparent !important;
    font-family: var(--npw-font, "Plus Jakarta Sans", "Helvetica Neue", sans-serif);
    font-weight: 600 !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    text-decoration: none !important;
    border-radius: 0 !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item:hover,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container:hover,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container:hover > a.hfe-menu-item,
  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item:hover,
  body.npw-ds #masthead nav.hfe-dropdown ul.sub-menu a.hfe-menu-item:hover,
  body.npw-ds .elementor-31311 nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item:hover {
    background-color: #E8F3FF !important;
    color: #0F2744 !important;
  }

  body.npw-ds #masthead nav.hfe-dropdown a.hfe-menu-item:focus-visible,
  body.npw-ds #masthead nav.hfe-dropdown a.hfe-sub-menu-item:focus-visible,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-has-submenu-container:focus-visible,
  body.npw-ds #masthead nav.hfe-dropdown .hfe-menu-toggle:focus-visible {
    outline: 3px solid #1A73E8 !important;
    outline-offset: -3px !important;
  }

  @media (prefers-reduced-motion: reduce) {
    body.npw-ds #masthead nav.hfe-dropdown .hfe-menu-toggle.sub-arrow,
    body.npw-ds #masthead nav.menu-is-active .hfe-menu-toggle.sub-arrow {
      transition: none !important;
    }
  }
}

/* ==========================================================================
   NPW 1.5.9.6.8 — DESKTOP header menu (1160px and up).
   Root causes fixed here (see readme changelog):
   1. npw-mobile-menu.js ran its mobile accordion on desktop too and wrote inline
      "position:relative; height:0; visibility:hidden" on every .sub-menu. Inline beat
      HFE's "position:absolute", so each 260px submenu sat IN the flow and widened its <li>
      to 260px (wrap + label/chevron pushed apart by justify-content:space-between), and
      HFE's hover rule (visibility:visible) could never win, so dropdowns never opened.
      The JS now leaves desktop alone and clears those inline styles.
   2. Elementor's 10px "distance from menu" margin left a hover gap above the submenu.
   3. Links were 15px/18px text with 260px width; now compact, one row, nowrap.
   The hamburger/mobile menu takes over at 1159px and below (1025-1159 is our own extension of HFE's <=1024 hamburger).
   ========================================================================== */
@media (min-width: 1160px) {
  body.npw-ds #masthead { position: relative; z-index: 100000; }
  /* theme.css forces the HFE toggle to inline-flex at every width; it was a phantom 44px box above the list. */
  body.npw-ds #masthead .hfe-nav-menu__toggle,
  body.npw-ds #masthead .hfe-nav-menu__toggle.elementor-clickable,
  body.npw-ds .elementor-31311 .hfe-nav-menu__toggle,
  body.npw-ds .elementor-31311 .hfe-nav-menu__toggle.elementor-clickable { display: none !important; }

  /* One row: logo left, nav takes the rest. */
  body.npw-ds #masthead .elementor-element-56e66c1 > .e-con-inner {
    width: calc(100% - 32px) !important;
    max-width: 1320px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0 !important;
  }
  body.npw-ds #masthead .elementor-element-8f0408f {
    flex: 0 0 180px !important;
    width: 180px !important;
    max-width: 180px !important;
    overflow: visible !important;
    padding-left: 0 !important;
    padding-right: 12px !important;
  }
  body.npw-ds #masthead .elementor-element-8f0408f .elementor-widget-image,
  body.npw-ds #masthead .elementor-element-8f0408f .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
  }
  body.npw-ds #masthead .elementor-element-8f0408f img {
    width: 168px !important;
    max-width: 100% !important;
    height: auto !important;
  }
  body.npw-ds #masthead .elementor-element-593b21c {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: flex-end !important;
  }
  body.npw-ds #masthead .elementor-element-593b21c .elementor-widget-navigation-menu {
    width: auto !important;
    max-width: 100% !important;
  }

  /* The list */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    align-items: center !important;
    gap: 2px !important;
    width: auto !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    display: block !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container {
    display: block !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
  }

  /* Compact top-level links: snug pill around label (+ chevron). */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container > a.hfe-menu-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 40px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 8px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item:hover,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item:focus-visible,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container > a.hfe-menu-item:hover,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container > a.hfe-menu-item:focus-visible,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:hover > .hfe-has-submenu-container > a.hfe-menu-item,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item.npw-open > .hfe-has-submenu-container > a.hfe-menu-item {
    color: #FFFFFF !important;
    background-color: rgba(255, 255, 255, 0.22) !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container > a.hfe-menu-item:focus-visible,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item:focus-visible {
    outline: 3px solid #FFFFFF !important;
    outline-offset: 2px !important;
  }

  @media (min-width: 1280px) {
    body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > a.hfe-menu-item,
    body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container > a.hfe-menu-item {
      padding-left: 10px !important;
      padding-right: 10px !important;
      font-size: 15px !important;
    }
  }

  /* Chevron: right after the label, small gap. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container .hfe-menu-toggle.sub-arrow {
    display: inline-flex !important;
    align-items: center !important;
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 0 6px !important;
    padding: 0 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    flex: 0 0 auto !important;
    transform: none !important;
    cursor: pointer;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > .hfe-has-submenu-container .hfe-menu-toggle.sub-arrow i {
    font-size: 11px !important;
    line-height: 1 !important;
    transition: transform .15s ease;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item.npw-open > .hfe-has-submenu-container .sub-arrow i {
    transform: rotate(180deg);
  }
  @media (hover: hover) {
    body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:hover > .hfe-has-submenu-container .sub-arrow i {
      transform: rotate(180deg);
    }
  }

  /* Submenu: out of flow, above page content, never clipped. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > ul.sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    width: max-content !important;
    min-width: 240px !important;
    max-width: min(340px, calc(100vw - 24px)) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    overflow: visible !important;
    z-index: 100001 !important;
    background: #FFFFFF !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 34px rgba(15, 39, 68, 0.22) !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
    display: block !important;
  }
  /* Right-most items open toward the left so the panel never leaves the viewport. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:nth-last-child(-n+2) > ul.sub-menu {
    left: auto !important;
    right: 0 !important;
  }
  /* Hover bridge: an invisible strip above the panel covers the gap to the label. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > ul.sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
    background: transparent;
  }
  /* Open: hover, keyboard focus (focus-visible only, so a mouse click does not pin it), JS click/tap. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:has(> .hfe-has-submenu-container:focus-visible) > ul.sub-menu,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:has(a:focus-visible) > ul.sub-menu,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item.npw-open > ul.sub-menu {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none;
    transition-delay: 0s;
  }
  /* Hover opens it on devices that really hover. Touch screens (hover: none) use tap -> .npw-open only,
     because iOS/Android keep :hover stuck on the last tapped item, which would make a second tap unable to close it. */
  @media (hover: hover) {
    body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:hover > ul.sub-menu {
      visibility: visible !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      transform: none;
      transition-delay: 0s;
    }
  }
  /* Small hover-out grace (keeps it open for 120ms if the pointer briefly leaves). */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item > ul.sub-menu { transition: opacity .14s ease .12s, transform .14s ease .12s, visibility 0s linear .26s; }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item.npw-open > ul.sub-menu,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:has(a:focus-visible) > ul.sub-menu { transition-delay: 0s; }
  @media (hover: hover) { body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) > ul.hfe-nav-menu > li.menu-item:hover > ul.sub-menu { transition-delay: 0s; } }

  /* Submenu rows */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) ul.sub-menu > li.menu-item {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) ul.sub-menu > li.menu-item > a.hfe-sub-menu-item {
    display: block !important;
    width: 100% !important;
    padding: 11px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    color: #0F2744 !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
    pointer-events: auto !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) ul.sub-menu > li.menu-item > a.hfe-sub-menu-item:hover,
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown):not(.hfe-dropdown-expandible) ul.sub-menu > li.menu-item > a.hfe-sub-menu-item:focus-visible {
    background-color: #E8F3FF !important;
    color: #0F2744 !important;
  }
}

/* 1025-1159px: HFE still renders the horizontal list, so we run the hamburger ourselves
   (npw-mobile-menu.js adds .hfe-dropdown to the nav and toggles .menu-is-active). */
@media (min-width: 1025px) and (max-width: 1159px) {
  body.npw-ds #masthead { position: relative; z-index: 100000; }
  body.npw-ds #masthead .elementor-element-56e66c1 > .e-con-inner {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  body.npw-ds #masthead .elementor-element-593b21c {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: flex-end !important;
  }
  body.npw-ds #masthead .hfe-nav-menu__toggle,
  body.npw-ds #masthead .hfe-nav-menu__toggle.elementor-clickable,
  body.npw-ds .elementor-31311 .hfe-nav-menu__toggle.elementor-clickable {
    display: inline-flex !important;
    visibility: visible !important; /* HFE hides the toggle above 1024px */
    opacity: 1 !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal.hfe-dropdown:not(.menu-is-active) {
    display: none !important;
  }
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal.hfe-dropdown.menu-is-active {
    display: block !important;
    overflow-y: auto !important;
    max-height: calc(100vh - var(--npw-mm-top, 72px)) !important;
  }
  /* Before JS adds .hfe-dropdown, never flash a wrapped list. */
  body.npw-ds #masthead nav.hfe-nav-menu__layout-horizontal:not(.hfe-dropdown) {
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
}
