/* ============================================================
   Header chrome
   ============================================================ */
.mpf-skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 1000;
    background: #fff; color: var(--mpf-navy); padding: 10px 16px;
}
.mpf-skip-link:focus { left: 8px; top: 8px; }

.mpf-header { position: relative; z-index: 200; }

/* ---- Top utility bar ---- */
.mpf-topbar {
    background: var(--mpf-navy);
    color: #fff;
    font-size: .85rem;
}
.mpf-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--mpf-topbar-h);
    padding-block: 7px;
}
.mpf-topbar__notice { margin: 0; color: rgba(255,255,255,.9); }
.mpf-topbar__notice strong { color: #fff; }
.mpf-topbar__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.mpf-topbar__links a { color: rgba(255,255,255,.85); font-weight: 600; }
.mpf-topbar__links a:hover { color: #fff; }

/* ---- Brand row ---- */
.mpf-brandbar { background: #fff; }
.mpf-brandbar__inner {
    display: flex;
    align-items: center;
    gap: 36px;
    padding-block: 18px;
}
.mpf-logo { flex: 0 0 auto; margin-right: 8px; }
.mpf-logo img,
.mpf-logo .custom-logo { max-height: 64px; width: auto; }
.mpf-logo__text { font-size: 1.4rem; font-weight: 800; color: var(--mpf-navy); }

.mpf-search {
    flex: 0 1 420px;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--mpf-line);
    border-radius: var(--mpf-radius-sm);
    overflow: hidden;
}
.mpf-search input {
    flex: 1; border: 0; outline: 0; padding: 11px 14px; font: inherit; font-size: .95rem;
    background: transparent; color: var(--mpf-text);
}
.mpf-search button {
    flex: 0 0 auto; background: var(--mpf-navy); border: 0; cursor: pointer;
    width: 46px; align-self: stretch; display: grid; place-items: center; color: #fff;
}
.mpf-search button svg { width: 18px; height: 18px; }
.mpf-search button:hover { background: var(--mpf-navy-dark); }

.mpf-header__cta { flex: 0 0 auto; margin-left: 0; white-space: nowrap; }

/* hamburger (mobile) */
.mpf-nav-toggle {
    display: none; flex: 0 0 auto; margin-left: auto;
    width: 46px; height: 42px; border: 0; background: var(--mpf-navy);
    border-radius: var(--mpf-radius-sm); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.mpf-nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.mpf-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mpf-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mpf-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Primary nav
   ============================================================ */
.mpf-nav { background: var(--mpf-navy); }
.mpf-menu {
    list-style: none; margin: 0; padding: 0;
    /* font-size:0 kills the whitespace anonymous inline box between menu items
       (its line-box otherwise made the bar ~6px taller than the links, showing
       a gap under the hover highlight). Links set their own font-size below. */
    font-size: 0;
    display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: center;
}
.mpf-menu .mpf-top-item { position: relative; display: flex; align-items: stretch; }
.mpf-menu .mpf-top-item > a {
    display: flex; align-items: center; gap: 7px;
    color: #fff; font-weight: 600; font-size: .95rem;
    padding: 18px; line-height: 1.2;
}
.mpf-menu .mpf-top-item > a:hover { background: rgba(255,255,255,.12); color: #fff; }
.mpf-caret { width: 11px; height: 7px; transition: transform .2s; }
.mpf-menu .mpf-top-item:hover .mpf-caret { transform: rotate(180deg); }

/* Dropdown */
.mpf-submenu {
    position: absolute; top: 100%; left: 0; z-index: 50;
    min-width: 250px; margin: 0; padding: 8px 0; list-style: none;
    background: #fff; border-radius: 0 0 var(--mpf-radius-sm) var(--mpf-radius-sm);
    box-shadow: var(--mpf-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.mpf-menu .mpf-top-item:hover > .mpf-submenu,
.mpf-menu .mpf-top-item:focus-within > .mpf-submenu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.mpf-submenu .mpf-menu-item > a {
    display: block; padding: 9px 20px; color: var(--mpf-text); font-size: .92rem; line-height: 1.35;
}
.mpf-submenu .mpf-menu-item > a:hover { background: var(--mpf-bg-alt); color: var(--mpf-navy); }

.mpf-submenu-toggle { display: none; }

/* ============================================================
   Breadcrumb (used in heroes)
   ============================================================ */
.mpf-breadcrumb ol { list-style: none; margin: 0 0 .6em; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; }
.mpf-breadcrumb li { margin: 0; display: flex; align-items: center; }
.mpf-breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; opacity: .6; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .mpf-header__cta { display: none; }
    .mpf-nav-toggle { display: flex; order: 1; }
    .mpf-search { max-width: none; order: 3; flex-basis: 100%; }
    .mpf-brandbar__inner { flex-wrap: wrap; gap: 12px 14px; }
    .mpf-logo { margin-right: auto; max-width: calc(100% - 64px); }
    .mpf-logo img, .mpf-logo .custom-logo { max-height: 46px; }

    .mpf-nav { display: none; }
    .mpf-nav.is-open { display: block; }
    /* restore stacked, full-width, left-aligned mobile menu (override desktop centring) */
    .mpf-menu { height: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; }
    .mpf-menu .mpf-top-item { display: block; }
    .mpf-menu .mpf-top-item > a { height: auto; padding: 14px 4px; justify-content: flex-start; border-bottom: 1px solid rgba(255,255,255,.12); }
    .mpf-menu .mpf-top-item > a .mpf-caret { display: none; }

    .mpf-submenu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; background: rgba(0,0,0,.15); border-radius: 0;
        display: none; padding: 0;
    }
    .mpf-menu .mpf-top-item.is-expanded > .mpf-submenu { display: block; }
    .mpf-submenu .mpf-menu-item > a { color: #fff; padding-left: 20px; }
    .mpf-submenu .mpf-menu-item > a:hover { background: rgba(255,255,255,.1); color: #fff; }

    .mpf-submenu-toggle {
        display: grid; place-items: center; position: absolute; right: 0; top: 6px;
        width: 42px; height: 42px; background: transparent; border: 0; color: #fff; cursor: pointer;
    }
    .mpf-submenu-toggle svg { width: 14px; height: 9px; transition: transform .2s; }
    .mpf-menu .mpf-top-item.is-expanded > .mpf-submenu-toggle svg { transform: rotate(180deg); }
    .mpf-menu .mpf-top-item { position: relative; }
}

@media (max-width: 600px) {
    .mpf-topbar__links { display: none; }
    .mpf-topbar__inner { justify-content: center; }
    .mpf-logo img, .mpf-logo .custom-logo { max-height: 52px; }
}
