/* ==========================================================================
   PV Elements — sitewide header, slide-in menu, footer, skip link.
   Rules are scoped with .pv-header / .pv-footer: Hello's reset.css loads later and
   ties single-class rules on buttons and links (BUG-040, BUG-045).
   ========================================================================== */

/* ── Skip link ─────────────────────────────────────────────────────────── */
.pv-site .pv-skip {
    position: absolute; left: 12px; top: -60px; z-index: 10000;
    background: var(--pv-sea-deep); color: #fff; padding: 12px 20px; border-radius: 8px;
    font: 700 16px/1.2 var(--pv-font-body); text-decoration: none;
    transition: top .2s ease;
}
.pv-site .pv-skip:focus { top: 12px; color: #fff; outline: 3px solid var(--pv-gold); outline-offset: 2px; }
.pv-main:focus { outline: none; }

/* ── Header ───────────────────────────────────────────────────────────── */
.pv-header {
    position: relative; z-index: 250;
    background: #fff;
    box-shadow: var(--pv-shadow-sm);
    font-family: var(--pv-font-body);
}
/* sticky stays in the flow: no spacer needed, nothing slides under the bar (BUG-045) */
.pv-header.pv-header--sticky { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); }
@media (max-width: 600px) {
    /* WP admin bar is not fixed below 600px */
    .admin-bar .pv-header.pv-header--sticky { top: 0; }
}

.pv-header .pv-header__inner {
    max-width: 1450px; margin: 0 auto;
    padding: 22px var(--pv-gutter);
    display: flex; align-items: center; justify-content: space-between; gap: 36px;
}
.pv-header .pv-header__logo { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.pv-header .pv-header__logo img { height: var(--pv-hdr-logo, 65px); width: auto; max-width: none; display: block; }

.pv-header .pv-header__nav { display: flex; align-items: center; gap: 32px; }
.pv-header .pv-header__list { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.pv-header .pv-header__list li { margin: 0; position: relative; }
.pv-header .pv-header__list a,
.pv-header .pv-header__home,
.pv-header .pv-header__careers {
    color: var(--pv-ink); text-decoration: none;
    font-size: 1rem; font-weight: 700; line-height: 1.4;
    transition: color .2s ease;
}
.pv-header .pv-header__list a:hover,
.pv-header .pv-header__list a:focus-visible,
.pv-header .pv-header__home:hover,
.pv-header .pv-header__careers:hover { color: var(--pv-sage-ink); }
.pv-header .pv-header__list .current-menu-item > a,
.pv-header .pv-header__list .current_page_item > a,
.pv-header .pv-header__home.is-current { color: var(--pv-sage-ink); }
.pv-header .pv-header__list .current-menu-item > a::after,
.pv-header .pv-header__list .current_page_item > a::after {
    content: ""; display: block; height: 2px; border-radius: 2px; margin-top: 4px; background: var(--pv-gold);
}
/* desktop dropdowns (menu depth 2) */
.pv-header .pv-header__list .sub-menu {
    position: absolute; top: 100%; left: -16px; min-width: 220px; list-style: none; margin: 0; padding: 10px 0;
    background: #fff; border-radius: 12px; box-shadow: var(--pv-shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.pv-header .pv-header__list li:hover > .sub-menu,
.pv-header .pv-header__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.pv-header .pv-header__list .sub-menu a { display: block; padding: 8px 18px; font-weight: 600; }

/* Home + Careers live in the slide-in panel only (V7 .nav-mobile-only) */
.pv-header .pv-header__home,
.pv-header .pv-header__careers { display: none; }
.pv-header .pv-header__careers svg { width: 14px; height: 14px; vertical-align: -1px; margin-left: 2px; }

.pv-header .pv-header__cta,
.pv-header .pv-header__cta:visited {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 100px;
    background: #fff; color: var(--pv-sea-deep);
    border: 1.5px solid var(--pv-sea-deep);
    font-size: .94rem; font-weight: 700; line-height: 1.25; text-decoration: none; white-space: nowrap;
    transition: background-color .25s ease, color .25s ease, transform .25s var(--pv-spring);
}
.pv-header .pv-header__cta:hover,
.pv-header .pv-header__cta:focus-visible { background: var(--pv-sea-deep); color: #fff; }
.pv-header a:focus-visible,
.pv-header .pv-header__toggle:focus-visible { outline: 3px solid var(--pv-gold); outline-offset: 3px; border-radius: 6px; }

/* hamburger — two-class selector beats Hello's [type="button"] reset (BUG-040) */
.pv-header .pv-header__toggle {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 48px; height: 48px; padding: 0; margin: 0 -8px 0 0;
    border: 0; border-radius: 8px; background: transparent; color: var(--pv-sea-deep);
    cursor: pointer; flex-shrink: 0; position: relative; z-index: 3;
}
.pv-header .pv-header__toggle:hover, .pv-header .pv-header__toggle:focus { background: transparent; }
.pv-header .pv-header__toggle span {
    display: block; width: 26px; height: 2.5px; border-radius: 2px; background: var(--pv-sea-deep);
    transition: transform .25s ease, opacity .25s ease;
}
.pv-header .pv-header__overlay {
    position: fixed; inset: 0; z-index: 1; background: rgba(42, 63, 50, .45);
    opacity: 0; transition: opacity .3s ease;
}

/* ── Tablet + phone: slide-in panel (V7 collapses at 880; workspace tablet breakpoint is 1024) ── */
@media (max-width: 1024px) {
    .pv-header .pv-header__inner { padding: 14px var(--pv-gutter); gap: 16px; }
    .pv-header .pv-header__logo img { height: var(--pv-hdr-logo-m, 48px); }
    .pv-header .pv-header__toggle { display: flex; }

    .pv-header .pv-header__nav {
        position: fixed; top: 0; right: 0; z-index: 2;
        height: 100vh; height: 100dvh; width: min(340px, 86vw);
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
        padding: 96px 32px 32px; overflow-y: auto; overscroll-behavior: contain;
        background: #fff; box-shadow: var(--pv-shadow-lg);
        transform: translateX(100%); visibility: hidden;
        transition: transform .32s ease, visibility 0s linear .32s;
    }
    .admin-bar .pv-header .pv-header__nav { padding-top: calc(96px + var(--wp-admin--admin-bar--height, 0px)); }
    .pv-header .pv-header__list { flex-direction: column; align-items: stretch; gap: 0; }
    .pv-header .pv-header__home,
    .pv-header .pv-header__careers { display: block; }
    .pv-header .pv-header__list a,
    .pv-header .pv-header__home,
    .pv-header .pv-header__careers {
        display: block; padding: 15px 0; font-size: 1.08rem;
        border-bottom: 1px solid rgba(43, 52, 44, .08);
    }
    .pv-header .pv-header__list .current-menu-item > a::after,
    .pv-header .pv-header__list .current_page_item > a::after { display: none; }
    .pv-header .pv-header__list .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        padding: 0 0 0 16px; min-width: 0; border-radius: 0;
    }
    .pv-header .pv-header__cta { margin-top: 24px; padding: 15px 24px; font-size: 1rem; }

    body.pv-nav-open .pv-header .pv-header__nav { transform: none; visibility: visible; transition: transform .32s ease, visibility 0s; }
    body.pv-nav-open .pv-header .pv-header__overlay { opacity: 1; }
    body.pv-nav-open { overflow: hidden; }
    body.pv-nav-open .pv-header .pv-header__toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    body.pv-nav-open .pv-header .pv-header__toggle span:nth-child(2) { opacity: 0; }
    body.pv-nav-open .pv-header .pv-header__toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
    .pv-header .pv-header__nav, .pv-header .pv-header__overlay { transition: none; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.pv-footer {
    background: var(--pv-footer);
    border-radius: 20px 20px 0 0;
    padding: 56px var(--pv-gutter) 32px;
    font-family: var(--pv-font-body);
}
.pv-footer .pv-footer__inner { max-width: var(--pv-wrap); margin: 0 auto; }
.pv-footer .pv-footer__row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px 40px;
    padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.pv-footer .pv-footer__logo { display: flex; line-height: 0; }
.pv-footer .pv-footer__logo img { height: 52px; width: auto; max-width: none; }
.pv-footer .pv-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; margin: 0; padding: 0; }
.pv-footer .pv-footer__links li { margin: 0; }
.pv-footer .pv-footer__links a,
.pv-footer .pv-footer__links a:visited {
    font-size: .98rem; font-weight: 700; color: rgba(255, 255, 255, .72); text-decoration: none;
    transition: color .2s ease;
}
.pv-footer .pv-footer__links a:hover,
.pv-footer .pv-footer__links a:focus-visible { color: var(--pv-gold-soft); }
.pv-footer .pv-footer__links a:focus-visible { outline: 2px solid var(--pv-gold); outline-offset: 3px; border-radius: 4px; }
.pv-footer .pv-footer__links svg { width: 13px; height: 13px; vertical-align: -1px; margin-left: 2px; }
/* .45 white in V7 = 3.8:1 on the footer green; .58 = 4.9:1 */
.pv-footer .pv-footer__copy { font-size: .92rem; color: rgba(255, 255, 255, .58); margin: 22px 0 0; text-align: center; }
@media (max-width: 767px) {
    .pv-footer { padding-top: 44px; }
    .pv-footer .pv-footer__row { flex-direction: column; align-items: flex-start; }
    .pv-footer .pv-footer__links { flex-direction: column; gap: 14px; }
    .pv-footer .pv-footer__copy { text-align: left; }
}
.pv-footer .screen-reader-text, .pv-header .screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
