/* Site-wide header nav + footer chrome */
:root {
    --ba-cream: #FBFAF5;
    --ba-sand: #F4F1E8;
    --ba-forest: #1E3A2A;
    --ba-dark: #14251B;
    --ba-orange: #D96F32;
    --ba-rust: #BF5C22;
    --ba-peach: #E8935B;
    --ba-text: #171A16;
    --ba-muted: #6B695F;
    --heading-font: 'Barlow Condensed', sans-serif;
    --body-font: 'Barlow', sans-serif;
    --chrome-max: 1240px;
}

/* Glass header */
.site-chrome-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 250, 245, 0.72);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid rgba(23, 26, 22, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
    padding: 0;
}

.site-chrome-header .header-inner {
    max-width: var(--chrome-max);
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-text-logo {
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.04em;
    color: var(--ba-forest);
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.site-text-logo span { color: var(--ba-orange); }

.site-chrome-header .custom-logo-link,
.site-chrome-header .custom-logo {
    display: none !important;
}

.site-text-logo--footer {
    margin: 0 0 16px;
    font-size: 30px;
    color: var(--ba-cream);
}

.site-text-logo--footer span { color: var(--ba-peach); }

/* Primary nav */
.site-chrome-header .main-navigation {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-direction: row;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
}

.site-chrome-header .nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-chrome-header .nav-menu > li {
    position: relative;
    margin: 0;
}

.site-chrome-header .nav-item-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.site-chrome-header .nav-menu > li > .nav-item-row > a,
.site-chrome-header .nav-menu > li > a {
    color: var(--ba-text);
    font-family: var(--body-font);
    font-size: 15px;
    font-weight: 600;
    padding: 0.5rem 0;
    text-decoration: none;
    white-space: nowrap;
}

.site-chrome-header .nav-menu > li:hover > .nav-item-row > a,
.site-chrome-header .nav-menu > li:hover > a {
    color: var(--ba-rust);
}

.site-chrome-header .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0 0 0 2px;
    margin: 0;
    color: var(--ba-muted);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-chrome-header .submenu-toggle:hover,
.site-chrome-header .menu-item-has-children:hover .submenu-toggle {
    color: var(--ba-rust);
}

.site-chrome-header .menu-item-has-children.active .submenu-toggle {
    transform: rotate(180deg);
}

/* Glass dropdowns (desktop) */
@media (min-width: 1200px) {
    .site-chrome-header .submenu-toggle {
        pointer-events: none;
    }

    .site-chrome-header .nav-menu > .menu-item-has-children::before {
        content: '';
        position: absolute;
        left: -12px;
        right: -12px;
        top: 100%;
        height: 16px;
        z-index: 1001;
    }

    .site-chrome-header .nav-menu .sub-menu {
        display: none;
        position: absolute;
        top: calc(100% - 8px);
        left: 0;
        min-width: 240px;
        margin: 0;
        padding: 8px 6px;
        list-style: none;
        background: rgba(251, 250, 245, 0.94);
        backdrop-filter: blur(16px) saturate(1.3);
        -webkit-backdrop-filter: blur(16px) saturate(1.3);
        border: 1px solid rgba(23, 26, 22, 0.1);
        border-radius: 14px;
        box-shadow: 0 16px 48px rgba(20, 37, 27, 0.14);
        z-index: 1002;
        max-height: none !important;
        overflow: visible;
    }

    .site-chrome-header .nav-menu > .menu-item-has-children:hover > .sub-menu,
    .site-chrome-header .nav-menu > .menu-item-has-children.is-dropdown-open > .sub-menu {
        display: block;
    }

    .site-chrome-header .nav-menu .sub-menu a {
        display: block;
        padding: 10px 14px;
        color: var(--ba-text);
        font-family: var(--body-font);
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        margin: 0;
        border-radius: 8px;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .site-chrome-header .nav-menu .sub-menu a:hover {
        color: var(--ba-rust);
        background: rgba(217, 111, 50, 0.08);
    }

    /* Hide legacy FA chevron boxes from style.css mobile rules bleeding through */
    .site-chrome-header .nav-menu .menu-item-has-children::after {
        display: none;
    }
}

.nav-cta-compare {
    background: var(--ba-orange);
    color: #fff !important;
    font-family: var(--body-font);
    font-weight: 700;
    font-size: 15px;
    padding: 11px 22px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cta-compare:hover {
    background: var(--ba-rust);
    color: #fff !important;
}

/* Footer redesign (all pages) */
.site-footer--redesign {
    background: var(--ba-dark);
    color: rgba(251, 250, 245, 0.7);
    padding: 80px 0 0;
    margin-top: auto;
}

.site-footer--redesign .container {
    max-width: var(--chrome-max);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-redesign-grid {
    display: grid;
    grid-template-columns: 4fr 2fr 2fr 2fr 2fr;
    gap: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(251, 250, 245, 0.12);
}

.footer-redesign-tagline {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.65;
    max-width: 320px;
    color: rgba(251, 250, 245, 0.75);
}

.footer-redesign-disclosure {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: rgba(251, 250, 245, 0.45);
    max-width: 320px;
}

.footer-redesign-heading {
    margin: 0 0 18px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ba-peach);
}

.footer-redesign-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer--redesign .footer-redesign-links a {
    color: rgba(251, 250, 245, 0.75);
    font-weight: 500;
    font-size: 14.5px;
    text-decoration: none;
    display: block;
    margin-bottom: 0;
}

.site-footer--redesign .footer-redesign-links a:hover {
    color: var(--ba-cream);
}

.footer-redesign-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 32px;
    font-size: 13px;
    color: rgba(251, 250, 245, 0.45);
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 1199px) {
    /* Logo left, hamburger right — nav is off-canvas */
    body .site-chrome-header .header-inner {
        justify-content: space-between;
        gap: 16px;
    }

    .site-chrome-header .site-branding {
        flex-shrink: 0;
    }

    .site-chrome-header .hamburger {
        display: block;
        flex-shrink: 0;
        margin-left: auto;
    }

    .site-chrome-header .hamburger span {
        background: var(--ba-forest);
    }

    /* Override desktop chrome nav so style.css drawer rules apply */
    .site-chrome-header .header-inner .main-navigation {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        margin-left: 0;
        padding: 72px 0 24px;
        background: rgba(251, 250, 245, 0.98);
        backdrop-filter: blur(16px) saturate(1.3);
        -webkit-backdrop-filter: blur(16px) saturate(1.3);
        border-left: 1px solid rgba(23, 26, 22, 0.08);
        box-shadow: -8px 0 32px rgba(20, 37, 27, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    .menu-open .site-chrome-header .header-inner .main-navigation {
        right: 0;
    }

    .site-chrome-header .header-inner .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 0 15px;
    }

    .site-chrome-header .header-inner .nav-menu > li {
        margin: 12px 0;
        width: 100%;
    }

    .site-chrome-header .header-inner .nav-menu > li > .nav-item-row > a,
    .site-chrome-header .header-inner .nav-menu > li > a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        white-space: normal;
    }

    .site-chrome-header .header-inner .nav-menu .sub-menu {
        position: relative;
        top: auto;
        left: auto;
        display: block !important;
        max-height: 0;
        overflow: hidden;
        min-width: 0;
        margin: 0 0 0 15px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .site-chrome-header .header-inner .menu-item-has-children.active > .sub-menu {
        max-height: 500px;
    }

    .site-chrome-header .header-inner .submenu-toggle {
        pointer-events: auto;
    }
}

@media (max-width: 1200px) {
    .footer-redesign-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-redesign-brand {
        grid-column: 1 / -1;
    }

    .nav-cta-compare {
        display: none;
    }
}

@media (max-width: 768px) {
    .site-chrome-header .header-inner,
    .site-footer--redesign .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-redesign-grid {
        grid-template-columns: 1fr;
    }

    .footer-redesign-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
