/* Shared PHP header/footer compatibility layer. Scoped to WebpackPro chrome only. */
:root {
    --vp-ink: #173b32;
    --vp-ink-deep: #0d2923;
    --vp-paper: #fbf8f1;
    --vp-white: #fff;
    --vp-green: #2f6b56;
    --vp-text: #29463f;
    --vp-line: #d9ded5;
    --vp-line-strong: #bdc8be;
    --vp-shadow-small: 0 12px 34px rgba(23, 59, 50, .09);
    --vp-container: 1180px;
}

.vp-container {
    width: min(calc(100% - 40px), var(--vp-container));
    margin-inline: auto;
}

.vp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(23, 59, 50, .12);
    background: rgba(251, 248, 241, .94);
    backdrop-filter: blur(14px);
}
.vp-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 78px;
}
.vp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--vp-ink-deep);
    text-decoration: none;
}
.vp-brand img { width: 38px; height: 38px; flex: 0 0 auto; }
.vp-brand__name { font-size: 19px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.vp-brand__name > span { color: var(--vp-green); font-style: italic; }
.vp-nav { display: flex; justify-content: center; gap: 28px; }
.vp-nav a {
    position: relative;
    color: var(--vp-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.vp-nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: #bd6848;
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.vp-nav a:is(:hover, :focus-visible)::after,
.vp-nav a[aria-current="page"]::after { transform: scaleX(1); }
.vp-header__actions { display: flex; align-items: center; gap: 10px; }
.vp-theme-toggle {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--vp-line);
    border-radius: 50%;
    background: var(--vp-white);
    color: var(--vp-ink);
    cursor: pointer;
}
.vp-theme-toggle:focus-visible { outline: 3px solid rgba(47, 107, 86, .3); outline-offset: 3px; }
.vp-theme-toggle__icon { display: grid; place-items: center; }
.vp-theme-toggle--mobile { display: none; }
.vp-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.vp-button--header { min-height: 42px; padding: 9px 15px; background: var(--vp-ink); color: white; font-size: 13px; }
.vp-button--primary { background: #b2593c; color: white; }
.vp-mobile-menu { display: none; }

.vp-footer {
    padding: 68px 0 24px;
    background: #0c241f;
    color: #cadbd4;
}
.vp-footer__top {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, .75fr);
    gap: 50px;
}
.vp-brand--footer { color: white; }
.vp-brand--footer .vp-brand__name > span { color: #a9c4ae; }
.vp-footer__top > div > p { max-width: 270px; margin: 18px 0 0; color: #99b1a8; }
.vp-footer nav { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.vp-footer nav strong { margin-bottom: 7px; color: white; font-size: 13px; }
.vp-footer nav a,
.vp-consent-settings {
    padding: 0;
    border: 0;
    background: none;
    color: #a9beb6;
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}
.vp-footer nav a:is(:hover, :focus-visible),
.vp-consent-settings:is(:hover, :focus-visible) { color: white; text-decoration: underline; text-underline-offset: 4px; }
.vp-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 55px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.13);
    color: #7f9b91;
    font-size: 12px;
}

html[data-theme="dark"] .vp-header {
    border-color: rgba(145, 201, 173, .18);
    background: rgba(16, 27, 26, .94);
}
html[data-theme="dark"] .vp-header :is(.vp-brand, .vp-nav a) { color: #e5f1eb; }
html[data-theme="dark"] .vp-theme-toggle { border-color: #4e7769; background: #13221f; color: #e4f6ee; }
html[data-theme="dark"] .vp-button--header { background: #b6ff2d; color: #06130d; }
html[data-theme="dark"] .vp-mobile-menu summary { border-color: #4e7769; background: #13221f; }
html[data-theme="dark"] .vp-mobile-menu summary span { background: #e5f1eb; }
html[data-theme="dark"] .vp-mobile-menu nav { border-color: #35534b; background: #101b1a; }
html[data-theme="dark"] .vp-mobile-menu nav a:not(.vp-button) { color: #e5f1eb; }

@media (max-width: 1040px) {
    .vp-header__inner { grid-template-columns: auto 1fr auto auto; gap: 10px; }
    .vp-nav,
    .vp-header__actions { display: none; }
    .vp-theme-toggle--mobile { display: grid; grid-column: 3; }
    .vp-mobile-menu { display: block; grid-column: 4; justify-self: end; }
    .vp-mobile-menu summary {
        display: grid;
        width: 44px;
        height: 44px;
        place-content: center;
        gap: 5px;
        border: 1px solid var(--vp-line-strong);
        border-radius: 10px;
        cursor: pointer;
        list-style: none;
    }
    .vp-mobile-menu summary::-webkit-details-marker { display: none; }
    .vp-mobile-menu summary span { display: block; width: 20px; height: 2px; background: var(--vp-ink); }
    .vp-mobile-menu nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        display: grid;
        gap: 4px;
        padding: 18px 20px 22px;
        border-bottom: 1px solid var(--vp-line);
        background: var(--vp-paper);
        box-shadow: var(--vp-shadow-small);
    }
    .vp-mobile-menu nav a:not(.vp-button) { padding: 10px; color: var(--vp-ink); font-weight: 800; text-decoration: none; }
    .vp-footer__top { grid-template-columns: 1.2fr repeat(2, 1fr); }
    .vp-footer__top nav:last-child { grid-column: 2; }
}

@media (max-width: 760px) {
    .vp-container { width: min(calc(100% - 28px), var(--vp-container)); }
    .vp-header__inner { min-height: 68px; }
    .vp-brand img { width: 34px; height: 34px; }
    .vp-brand__name { font-size: 17px; }
    .vp-footer__top { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
    .vp-footer__top > div { grid-column: 1 / -1; }
    .vp-footer__top nav:last-child { grid-column: auto; }
    .vp-footer__bottom { flex-direction: column; }
}

@media (max-width: 460px) {
    .vp-container { width: min(calc(100% - 22px), var(--vp-container)); }
    .vp-footer__top { grid-template-columns: 1fr; }
}

/* Step 2: shared chrome interaction and accessibility hardening. */
.vp-brand:focus-visible,
.vp-nav a:focus-visible,
.vp-mobile-menu nav a:focus-visible,
.vp-footer a:focus-visible,
.vp-consent-settings:focus-visible {
    outline: 3px solid rgba(47, 107, 86, .32);
    outline-offset: 4px;
}

.vp-mobile-menu > summary {
    touch-action: manipulation;
}

.vp-mobile-menu[open] > summary {
    border-color: var(--vp-green);
}

.vp-mobile-menu nav a[aria-current="page"] {
    color: var(--vp-green);
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 900px) {
    .vp-mobile-menu {
        z-index: 20;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vp-nav a::after,
    .vp-mobile-menu > summary,
    .vp-theme-toggle,
    .vp-button {
        scroll-behavior: auto;
        transition: none;
    }
}

/* Tablet header normalization: prevent desktop/mobile controls from coexisting. */
@media (min-width: 641px) and (max-width: 1040px) {
    .wp-static-header .vp-header__inner,
    .wp-blog-header .vp-header__inner {
        grid-template-columns: auto 1fr auto auto;
        gap: 10px;
    }

    .wp-static-header .vp-nav,
    .wp-blog-header .vp-nav,
    .wp-static-header .vp-header__actions,
    .wp-blog-header .vp-header__actions {
        display: none;
    }

    .wp-static-header .vp-theme-toggle--mobile,
    .wp-blog-header .vp-theme-toggle--mobile {
        display: grid;
        grid-column: 3;
        justify-self: end;
    }

    .wp-static-header .vp-mobile-menu,
    .wp-blog-header .vp-mobile-menu {
        display: block;
        grid-column: 4;
        justify-self: end;
        margin-left: 0;
    }
}
