/* =========================================================
   ADJUST AS NEEDED — SHARED BLOG HEADER
   Loaded by header-blog.php only.
   Requires: body_class( 'aan-blog-site' )
   ========================================================= */

body.aan-blog-site {
    --aan-lavender-mist: #e4e2e9;
    --aan-warm-taupe: #cbc4b9;
    --aan-dusty-blue: #828499;
    --aan-plum: #6a4b75;
    --aan-deep-teal: #374e4c;

    --blog-primary: var(--aan-plum);
    --blog-secondary: var(--aan-deep-teal);
    --blog-accent: var(--aan-dusty-blue);
    --blog-text: #262626;
    --blog-muted: #5f5f5f;
    --blog-surface: #ffffff;
    --blog-border: var(--aan-warm-taupe);
    --blog-focus: var(--aan-deep-teal);

    background-color: var(--blog-surface);
    background-image: none !important;
}

body.aan-blog-site #page.site,
body.aan-blog-site #aan-site-header {
    background-image: none !important;
}

/* =========================================================
   HEADER LAYOUT
   ========================================================= */

#aan-site-header {
    width: 100%;
    margin: 0;
    border: 0;
    background-color: var(--blog-surface);
}

.aan-header-inner {
    display: grid;
    grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 72px);
    width: min(calc(100% - 60px), 1380px);
    margin-inline: auto;
    padding-block: clamp(28px, 3vw, 46px);
}

.aan-brand {
    display: block;
    justify-self: start;
    width: min(100%, 340px);
    margin: 0;
    line-height: 0;
}

.aan-logo {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto !important;
    margin: 0;
}

.aan-navigation {
    justify-self: end;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.aan-menu {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px clamp(16px, 2vw, 34px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.aan-menu > li {
    display: block;
    float: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aan-menu > li::before,
.aan-menu > li::marker {
    content: none;
    display: none;
}

.aan-menu > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 0;
    color: var(--blog-text);
    font-family: 'AvenirNextLTW01-Medium', Arial, sans-serif;
    font-size: clamp(12px, 0.8vw, 14px);
    font-weight: normal;
    line-height: 1.25;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.aan-menu > li > a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 2px;
    background: var(--blog-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease-out;
}

.aan-menu > li > a:hover,
.aan-menu > li > a:focus-visible,
.aan-menu > .current-menu-item > a,
.aan-menu > .current-menu-ancestor > a,
.aan-menu > .current-category-ancestor > a {
    color: var(--blog-primary);
}

.aan-menu > li > a:hover::after,
.aan-menu > li > a:focus-visible::after,
.aan-menu > .current-menu-item > a::after,
.aan-menu > .current-menu-ancestor > a::after,
.aan-menu > .current-category-ancestor > a::after {
    transform: scaleX(1);
}

.aan-menu .mm-icon {
    flex: 0 0 auto;
    margin-right: 0.45em;
    font-size: 0.9em;
    line-height: 1;
}

#aan-site-header :focus-visible {
    outline: 3px solid var(--blog-focus);
    outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE HEADER
   ========================================================= */

@media (max-width: 1100px) {
    .aan-header-inner {
        grid-template-columns: minmax(210px, 285px) minmax(0, 1fr);
        gap: 24px;
        width: min(calc(100% - 40px), 1380px);
    }

    .aan-brand,
    .aan-logo {
        max-width: 285px;
    }

    .aan-menu {
        gap: 4px 18px;
    }

    .aan-menu > li > a {
        font-size: 12px;
        letter-spacing: 0.075em;
    }
}

@media (max-width: 900px) {
    .aan-header-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-block: 24px;
    }

    .aan-brand {
        justify-self: center;
        width: min(100%, 320px);
    }

    .aan-logo {
        max-width: 320px;
        margin-inline: auto;
    }

    .aan-navigation {
        justify-self: stretch;
        width: 100%;
    }

    .aan-menu {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .aan-header-inner {
        width: min(calc(100% - 28px), 1380px);
    }

    .aan-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 8px;
        width: 100%;
    }

    .aan-menu > li > a {
        width: 100%;
        min-height: 48px;
        padding-inline: 6px;
        text-align: center;
        white-space: normal;
    }
}