.header-inner {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.logo {
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.mobile-nav-panel a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.mobile-nav-panel a:hover {
    background: rgba(251, 146, 60, 0.14);
    color: var(--color-accent);
}

.mobile-nav-panel a:active {
    background: var(--color-primary);
    color: var(--color-bg);
    transform: scale(0.97);
}

/* Current page — persistent orange + white, set via aria-current="page" in header.php */
.mobile-nav-panel a[aria-current="page"] {
    background: var(--color-primary);
    color: var(--color-bg);
}

.mobile-nav-panel a[aria-current="page"]:hover {
    background: var(--color-hover);
    color: var(--color-bg);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(63, 42, 29, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    font-size: 0.9rem;
    color: var(--color-text);
}

.meta-pill svg {
    flex-shrink: 0;
}

.meta-divider {
    display: inline-block;
    width: 1px;
    height: 1rem;
    background: rgba(63, 42, 29, 0.16);
}

/* Burger menu toggle — used at every width now (nav links live only in the
   dropdown it controls, see .mobile-nav-panel below), not just on mobile. */
.mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.24rem;
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.mobile-menu:hover {
    background: rgba(251, 146, 60, 0.14);
}

.mobile-menu.is-open {
    background: var(--color-primary);
}

.mobile-menu.is-open:hover {
    background: var(--color-hover);
}

.mobile-menu span {
    display: block;
    width: 1.15rem;
    height: 2px;
    background: var(--color-text);
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.mobile-menu.is-open span {
    background: var(--color-bg);
}

.mobile-menu.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Burger dropdown — collapsed/expanded mechanics used at every width now.
   Positioning (full-width block on mobile vs. anchored dropdown on desktop)
   is split out below. */
.mobile-nav-panel {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    padding: 0 0 1rem;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* Used briefly (JS adds/removes it in the same tick) when the search popup
   is about to open on top of this panel — without it, the panel's own
   0.25s fade-out is still visible bleeding through the popup's translucent
   backdrop, looking like the links/location-time reappeared inside search. */
.mobile-nav-panel.no-transition {
    transition: none;
}

.mobile-nav-panel.is-open {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-panel a {
    align-self: flex-start;
}

.mobile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(63, 42, 29, 0.08);
}

/* Same glass reflection + inner glow treatment as .glass-shell, so the open
   panel reads as a continuation of the header rather than a separate flat
   dropdown. */
.mobile-nav-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 60%);
    pointer-events: none;
}

.mobile-nav-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 24px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.mobile-nav-panel > * {
    position: relative;
    z-index: 1;
}

/* At desktop widths the panel only ever holds nav links (search/location-time
   already show inline elsewhere in the header — see header-search.css) so it
   reads as a small anchored dropdown under the burger button, not a
   full-width bar. */
@media (min-width: 769px) {
    .mobile-nav-panel {
        position: absolute;
        top: 100%;
        right: 1.5rem;
        width: 220px;
        margin-top: 0.5rem;
        padding: 1rem 1.25rem 1.25rem;
        background: rgba(255, 253, 248, 0.72);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border: 1px solid rgba(255, 255, 255, 0.42);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
    }
}

/* Below that, it's a full-width block under the header row, same as before. */
@media (max-width: 768px) {
    .mobile-nav-panel {
        position: relative;
        margin-top: 0.5rem;
        padding: 1rem 1.25rem 1.25rem;
        background: rgba(255, 253, 248, 0.72);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border: 1px solid rgba(255, 255, 255, 0.42);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
    }
}

/* =====================================
   MORPHING GLASS HEADER
===================================== */

header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
}

header.site-header .container {
    position: relative;

    width: 100%;
    max-width: calc(var(--content-width));

    margin-inline: auto;
    padding-inline: 1rem;

    border-radius: 0;

    transform-origin: top center;

    will-change:
        transform,
        width,
        border-radius;

    transition:
        transform .15s linear;
}

.glass-shell {
    padding:0 60px;

    position: relative;
    overflow: hidden;

    border-radius: inherit;

    /* Matches what header.js computes at scroll progress 0 (see updateHeader()).
       Without these, the shell has no border/shadow/blur at all until the first
       JS paint sets them — border-style flipping from "none" to "solid" can't be
       transitioned, so that first update snapped in visibly instead of fading in. */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0), inset 0 1px 0 rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);

    transition:
        background .15s linear,
        border .15s linear,
        box-shadow .15s linear,
        backdrop-filter .15s linear,
        -webkit-backdrop-filter .15s linear;
}

/* Glass Reflection */

.glass-shell::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 50%;

    opacity: var(--glass-progress, 0);

    background: linear-gradient(
        180deg,
        rgba(255,255,255,.30),
        transparent
    );

    pointer-events: none;
}

/* Glass Inner Glow */

.glass-shell::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    opacity: var(--glass-progress, 0);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.35),
        inset 0 0 24px rgba(255,255,255,.06);

    pointer-events: none;
}

/* Prevent pseudo-elements from blocking clicks */

.glass-shell::before,
.glass-shell::after {
    z-index: 1;
}

.glass-shell > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 1024px) {
    .header-inner {
        min-height: 90px;
    }

    .glass-shell {
        padding: 0 2rem;
    }

    .header-meta {
        padding: 0.6rem 0.8rem;
    }

    .meta-pill {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .site-header .container {
        padding-inline: 1rem;
    }

    .glass-shell {
        padding: 0 1.25rem;
    }

    .header-meta {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-inner {
        min-height: 82px;
    }

    .glass-shell {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.35rem;
    }

    .mobile-nav-panel a {
        font-size: 0.95rem;
    }
}
