/* ---------------------------------------------------------------------------
   Header — one responsive implementation of Royal template 105434.
   Measured off live: top bar 44px, nav bar 68px, total 112px at >=1025px;
   67 + 68 = 135px at mobile. Logo renders 110x48.
   --------------------------------------------------------------------------- */

.mp-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* top bar ----------------------------------------------------------------- */
.mp-topbar {
  background: var(--mp-blue-ui);
  color: #fff;
}
.mp-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}
.mp-topbar__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--mp-fs-body-sm);
  color: #fff;
}
.mp-topbar__email svg { width: 16px; height: 16px; }
.mp-topbar__email:hover { color: var(--mp-steel); text-decoration: none; }

.mp-topbar__social {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mp-topbar__social a { display: block; color: #fff; }
.mp-topbar__social svg { width: 18px; height: 18px; }
.mp-topbar__social a:hover { color: var(--mp-pink-mid); }

/* nav bar ------------------------------------------------------------------ */
.mp-navbar {
  background: var(--mp-scrim);
  box-shadow: var(--mp-sh-bar);
}
.mp-navbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding-block: 0 5px;
}

.mp-brand { flex: 0 0 auto; }
.mp-brand img { width: 110px; height: 48px; object-fit: contain; }
.mp-brand span { color: #fff; font-family: var(--mp-font-display); font-size: 22px; }

.mp-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.mp-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0 auto 0 0;
  padding: 0;
}

.mp-menu__item { position: relative; margin: 0 10px; }

.mp-menu__link {
  display: inline-block;
  padding: 0 7px;
  color: #fff;
  font-size: var(--mp-fs-body);
  font-weight: 500;
  line-height: 30px;
}
.mp-menu__link:hover,
.mp-menu__link:focus-visible { text-decoration: none; color: var(--mp-pink-light); }
.mp-menu__item.is-current > .mp-menu__link { text-decoration: underline; text-underline-offset: 6px; }

.mp-menu__toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  margin-left: 2px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.mp-menu__toggle svg { transition: transform .2s ease; }
.mp-menu__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* submenus ---------------------------------------------------------------- */
.mp-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 250px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--mp-rule);
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-sh-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.mp-submenu .mp-submenu { top: 0; left: 100%; }

.mp-menu__item--parent:hover > .mp-submenu,
.mp-menu__item--parent:focus-within > .mp-submenu,
.mp-menu__toggle[aria-expanded="true"] + .mp-submenu,
.mp-submenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mp-submenu .mp-menu__item { margin: 0; }
.mp-submenu .mp-menu__link {
  display: block;
  padding: 13px 15px;
  color: var(--mp-ink-heading);
  line-height: 1.3;
}
.mp-submenu .mp-menu__link:hover { background: var(--mp-blue-ui); color: #fff; }
.mp-submenu .mp-menu__toggle { color: var(--mp-ink-heading); position: absolute; right: 8px; top: 10px; }

.mp-nav__cta {
  flex: 0 0 auto;
  padding: 12px 22px;
  border-radius: 9px;
  font-weight: 500;
  letter-spacing: -.4px;
  text-transform: capitalize;
}

/* ---------------------------------------------------------------------------
   Desktop geometry, traced from the live Royal header template: the nav row is
   three columns of 16.14% / 64.753% / 18.382% with the menu CENTRED in the
   middle one (Home at x~463 on a 1440 viewport), the logo and top-bar email
   inset 10px, and the Get In Touch tab against the right edge with no icon.
   The menu used to pack against the logo (Home at x~171).
   --------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .mp-topbar__inner,
  .mp-navbar__inner { padding-inline: 10px; }
  .mp-navbar__inner { gap: 0; }
  .mp-brand { flex: 0 0 16.14%; }
  .mp-nav {
    flex: 0 0 83.86%;
    display: grid;
    grid-template-columns: 64.753fr 18.382fr;
    align-items: center;
    gap: 0;
  }
  .mp-menu { margin: 0; justify-content: center; }
  .mp-menu__link { font-size: 15px; font-weight: 400; }
  .mp-nav__cta { justify-self: end; padding: 15px 30px; }
}

/* the envelope glyph follows the link colour (it rendered black on live's blue) */
.mp-topbar__email svg,
.mp-topbar__email svg path { fill: currentColor; }

/* burger ------------------------------------------------------------------- */
.mp-burger {
  display: none;
  margin-left: auto;
  padding: 10px;
  border: 0;
  background: none;
  cursor: pointer;
}
.mp-burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}
.mp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------------------
   Mobile / tablet. Live shipped a second hidden copy of the whole header for
   this; here the same markup reflows.
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .mp-topbar__inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 8px; min-height: 67px; }
  .mp-topbar__social { gap: 12px; }

  .mp-burger { display: block; }

  .mp-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    background: #fff;
    border-top: 1px solid var(--mp-rule);
    box-shadow: var(--mp-sh-card);
    max-height: calc(100vh - var(--mp-header-h));
    overflow-y: auto;
  }
  .mp-nav.is-open { display: flex; }

  .mp-navbar { position: relative; }

  .mp-menu { flex-direction: column; align-items: stretch; margin: 0; }
  .mp-menu__item { margin: 0; border-bottom: 1px solid var(--mp-rule); }
  .mp-menu__link { display: block; padding: 14px 20px; color: #303030; line-height: 1.3; }
  .mp-menu__link:hover { background: var(--mp-pink-hot); color: #fff; }
  .mp-menu__item.is-current > .mp-menu__link { background: var(--mp-pink-hot); color: #fff; text-decoration: none; }

  .mp-menu__toggle { position: absolute; right: 10px; top: 8px; color: #303030; padding: 8px; }

  .mp-submenu {
    position: static;
    display: none;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: #f7f7f9;
  }
  .mp-submenu.is-open { display: block; }
  .mp-menu__item--parent:hover > .mp-submenu { display: none; }
  .mp-menu__item--parent:hover > .mp-submenu.is-open { display: block; }
  .mp-submenu .mp-menu__link { padding-left: 34px; }

  .mp-nav__cta { margin: 12px 20px 0; justify-content: center; }
}

/* The 20px white strip under live's header bar (an empty container at the end
   of its header template). Pages without a hero show it; a first hero is pulled
   up over it and under the translucent nav, exactly as live does. */
.mp-header-gap { height: 20px; }
