/* Header presentation; font family and weight use the shared theme tokens. */
.mhc-header {
  --header-teal: #6abfb7;
  --header-blue: #0a4e63;
  display: grid;
  grid-template-columns: minmax(24px, 1fr) minmax(0, 1000px) minmax(24px, 1fr);
  grid-template-rows: 150px auto;
  position: relative;
  z-index: 100;
  background: var(--header-teal);
}
.mhc-header__brand { grid-column: 2; grid-row: 1; align-self: start; margin: 16px 12px 0; width: fit-content; max-width: 55%; }
.mhc-header .site-logo a { display: block; }
.mhc-header .site-logo img { display: block; width: 259px; height: auto; max-height: 104px; object-fit: contain; object-position: left top; }
.mhc-header .site-title { color: var(--header-blue); font-size: 28px; font-weight: var(--font-weight-heading); }
.mhc-header .site-header__navigation { display: contents; }
.mhc-header__partners { grid-column: 2; grid-row: 1; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; padding: 24px 12px 11px; gap: 25px; }
.mhc-header__nhs-logo { display: block; width: 110px; height: 45px; object-fit: contain; }
.mhc-header__social { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mhc-header__social li { margin: 0; }
.mhc-header__social a { display: flex; justify-content: center; align-items: center; width: 39px; height: 39px; color: #fff; }
.mhc-header__social svg { width: 30px; height: 30px; fill: currentColor; }
.mhc-header__social a:hover { opacity: .8; }
.mhc-header__nav { grid-column: 1 / -1; grid-row: 2; background: var(--header-blue); min-height: 61px; }
.mhc-header__menu-wrap { max-width: 1020px; margin-inline: auto; padding-inline: 0; }
.mhc-header .primary-menu, .mhc-header .sub-menu { padding: 0; margin: 0; list-style: none; }
.mhc-header .primary-menu { display: flex; justify-content: center; align-items: stretch; gap: 0 6px; min-height: 61px; }
.mhc-header .primary-menu li { position: relative; }
.mhc-header .primary-menu > li { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.mhc-header .primary-menu a { display: block; padding: 10px; color: #fff; font-family: var(--font-secondary); font-size: var(--font-size-nav); font-weight: var(--font-weight-nav); line-height: 25px; letter-spacing: .05em; text-decoration: none; transition: color 80ms cubic-bezier(.25, 1, .5, 1), background-color 80ms cubic-bezier(.25, 1, .5, 1); }
.mhc-header .primary-menu > li > a { flex: 1; margin-block: 8px; text-align: center; white-space: nowrap; }
.mhc-header .primary-menu > li:hover > a, .mhc-header .primary-menu > li.is-submenu-open > a, .mhc-header .primary-menu > li:focus-within > a { background: var(--header-teal); }
.mhc-header .primary-menu .current-menu-item > a, .mhc-header .primary-menu .current-menu-ancestor > a { color: #fff; }
.mhc-header .sub-menu { position: absolute; z-index: 110; top: calc(100% - 8px); left: 50%; width: max-content; min-width: 100%; max-width: min(320px, calc(100vw - 32px)); padding: 10px; background: #fff; border-radius: 5px; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -3px); transition: opacity 80ms cubic-bezier(.25, 1, .5, 1), transform 80ms cubic-bezier(.25, 1, .5, 1), visibility 80ms; }
.mhc-header .sub-menu li { margin-bottom: 8px; }
.mhc-header .sub-menu li:last-child { margin-bottom: 0; }
.mhc-header .primary-menu .sub-menu a { padding: 10px; color: #000; font-family: var(--wp--preset--font-family--helvetica, "MHC Helvetica", Helvetica, Arial, sans-serif); font-size: 16px; font-weight: 400; line-height: 19px; text-align: center; white-space: nowrap; border-radius: 5px; }
.mhc-header .sub-menu a:hover, .mhc-header .sub-menu a:focus-visible, .mhc-header .sub-menu .current-menu-item > a, .mhc-header .sub-menu .current-menu-ancestor > a { color: #0057e1; background: #fff; }
.mhc-header .sub-menu .sub-menu { top: 0; left: 100%; transform: translate(0, -3px); }
.mhc-header .primary-menu > li:last-child .sub-menu .sub-menu { left: auto; right: 100%; }
.mhc-header:not(.menu-enhanced) li:hover > .sub-menu, .mhc-header:not(.menu-enhanced) li:focus-within > .sub-menu, .mhc-header li.is-submenu-open > .sub-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
.mhc-header li.is-submenu-open > .sub-menu .is-submenu-open > .sub-menu { transform: translate(0, 0); }
.mhc-header .submenu-toggle { display: inline-flex; align-items: center; justify-content: center; position: absolute; right: 3px; top: 9px; width: 24px; height: 42px; padding: 0; background: transparent; border: 0; color: #fff; cursor: pointer; opacity: 0; }
.mhc-header .submenu-toggle:focus-visible { opacity: 1; background: var(--header-blue); }
.mhc-header .sub-menu .submenu-toggle { color: var(--header-blue); }
.mhc-header .submenu-toggle::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.mhc-header .submenu-toggle[aria-expanded="true"]::before { transform: rotate(225deg); }
@media (min-width: 768px) {
  .mhc-header .submenu-toggle { display: none; }
}
.mhc-header .menu-toggle { display: none; }
.mhc-header :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mhc-header .site-logo a:focus-visible { outline-color: var(--header-blue); }
.mhc-header .sub-menu :is(a, button):focus-visible { outline-color: #0057e1; outline-offset: -2px; }
@media (hover: none), (pointer: coarse) { .mhc-header .submenu-toggle { opacity: 1; } .mhc-header .menu-item-has-children > a { padding-right: 30px; } }
@media (min-width: 768px) and (max-width: 1100px) {
  .mhc-header { grid-template-columns: 24px minmax(0, 1fr) 24px; }
  .mhc-header .site-logo img { width: 230px; }
  .mhc-header .primary-menu > li > a { padding-inline: 8px; font-size: clamp(14px, 1.46vw, 16px); }
  .mhc-header .primary-menu { gap: 0 4px; }
  .mhc-header__menu-wrap { padding-inline: 12px; }
}
@media (max-width: 767px) {
  .mhc-header { grid-template-columns: 16px minmax(0, 1fr) 16px; grid-template-rows: 96px; }
  .mhc-header__brand { align-self: center; margin: 0; max-width: calc(100% - 60px); }
  .mhc-header .site-logo img { width: 185px; max-height: 74px; }
  .mhc-header .site-title { font-size: 22px; }
  .mhc-header .menu-toggle { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 10px; background: var(--header-blue); color: #fff; cursor: pointer; }
  .mhc-header .menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
  .mhc-header.is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mhc-header.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .mhc-header.is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mhc-header .site-header__navigation { grid-column: 1 / -1; display: flex; flex-direction: column; background: var(--header-blue); color: #fff; }
  .mhc-header.menu-enhanced .site-header__navigation { position: absolute; top: 100%; left: 0; width: 100%; max-height: calc(100dvh - 96px - var(--my-health-and-cancer-admin-bar-offset, 0px)); overflow: auto; overscroll-behavior: contain; visibility: hidden; display: none; }
  .mhc-header.menu-enhanced.is-menu-open .site-header__navigation { display: flex; visibility: visible; }
  .mhc-header__nav { order: 0; flex-shrink: 0; }
  .mhc-header__menu-wrap { padding: 12px 24px; }
  .mhc-header .primary-menu { display: block; min-height: 0; }
  .mhc-header .primary-menu li { display: block; border-bottom: 1px solid rgb(255 255 255 / 25%); }
  .mhc-header .primary-menu > li > a { min-height: 48px; margin: 0; padding: 14px 10px; text-align: left; white-space: normal; }
  .mhc-header .menu-item-has-children > a { padding-right: 52px; }
  .mhc-header .submenu-toggle { position: absolute; right: 0; top: 5px; width: 44px; height: 44px; opacity: 1; }
  .mhc-header .sub-menu, .mhc-header .sub-menu .sub-menu { position: static; width: auto; min-width: 0; max-width: none; max-height: 0; overflow: hidden; padding: 0 6px; transform: none; opacity: 0; visibility: hidden; transition: max-height 160ms ease, padding 160ms ease, opacity 80ms ease, visibility 160ms; }
  .mhc-header .sub-menu li { border-bottom-color: rgb(10 78 99 / 15%); }
  .mhc-header .sub-menu li:last-child { border-bottom: 0; }
  .mhc-header .primary-menu .sub-menu a { text-align: left; white-space: normal; min-height: 44px; line-height: 24px; }
  .mhc-header li.is-submenu-open > .sub-menu, .mhc-header li.is-submenu-open > .sub-menu .is-submenu-open > .sub-menu, .mhc-header:not(.menu-enhanced) .sub-menu { max-height: 1600px; padding: 10px 6px; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .mhc-header__partners { order: 1; flex-shrink: 0; align-items: flex-start; padding: 20px 24px 28px; gap: 16px; }
  .mhc-header__social { flex-wrap: wrap; gap: 4px; }
  .mhc-header__social a { width: 44px; height: 44px; }
  body.menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .mhc-header .menu-toggle span, .mhc-header .primary-menu a, .mhc-header .sub-menu { transition: none; } }

/* Keep mobile menu focus free of a rectangular outline. */
.site-header .menu-toggle:focus,
.site-header.is-menu-open .menu-toggle:focus-visible { outline: none; box-shadow: none; }
.site-header .menu-toggle:focus-visible { background-color: #007d7d; }

.mhc-header .sub-menu > li > a {
  text-transform: capitalize;
}
