/*
 * Sangimitans header/footer repair - 20261003.2
 * These selectors belong ONLY to the matching Blade partials.
 * Old .smss-header / .smss-nav / .smss-footer overrides do not apply.
 * Do not replace site-polish.css or mobile-responsive.css with this file.
 */

#smss-site-header,
#smss-site-header *,
#smss-site-footer,
#smss-site-footer * {
    box-sizing: border-box;
}

#smss-site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid #e7ece9;
    background: #fff;
    box-shadow: 0 3px 16px rgba(17, 26, 21, .045);
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.4;
}

#smss-site-header .smss-chrome-shell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: calc(100% - 40px);
    max-width: 1240px;
    min-height: 82px;
    height: auto;
    margin: 0 auto;
    padding: 8px 0;
}

#smss-site-header .smss-chrome-brand {
    display: flex;
    align-items: center;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

#smss-site-header .smss-chrome-brand img {
    display: block;
    width: 64px;
    height: 64px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

#smss-site-navigation {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: auto;
    max-width: 100%;
    min-height: 0;
    height: auto;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    background: #fff;
}

#smss-site-header .smss-chrome-link,
#smss-insights-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    gap: 7px;
    width: auto;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 11px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #202a25;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transform: none;
    appearance: none;
    -webkit-appearance: none;
}

#smss-site-header .smss-chrome-link:hover,
#smss-site-header .smss-chrome-link.is-current,
#smss-insights-links a:hover {
    color: #007b35;
    background: #f0f7f3;
    text-decoration: none;
}

#smss-site-header a:focus-visible,
#smss-site-header button:focus-visible,
#smss-site-footer a:focus-visible {
    outline: 3px solid #67b485;
    outline-offset: 3px;
}

#smss-site-header .smss-chrome-insights {
    position: relative;
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
}

#smss-site-header .smss-chrome-chevron {
    display: inline-block;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin: 0;
    transition: transform .15s ease;
}

#smss-insights-toggle[aria-expanded="true"] .smss-chrome-chevron {
    transform: rotate(180deg);
}

#smss-insights-links {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 190px;
    margin: 0;
    padding: 8px;
    border: 1px solid #e4eae6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 30, 20, .12);
}

#smss-insights-links[hidden] {
    display: none !important;
}

#smss-insights-links a {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    font-size: 14px;
}

#smss-site-header #smss-site-navigation .smss-chrome-donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 0;
    width: auto;
    min-width: 138px;
    min-height: 44px;
    height: auto;
    margin: 0 0 0 8px;
    padding: 11px 18px;
    border: 1px solid #00923f;
    border-radius: 9px;
    background: #00923f;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transform: none;
}

#smss-site-header #smss-site-navigation .smss-chrome-donate:hover {
    border-color: #007b35;
    background: #007b35;
    color: #fff;
}

#smss-site-header .smss-chrome-donate::before,
#smss-site-header .smss-chrome-donate::after {
    display: none;
    content: none;
}

#smss-site-header .smss-chrome-toggle {
    display: none;
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0 0 0 auto;
    padding: 10px;
    border: 1px solid #e1e8e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

#smss-site-header .smss-chrome-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    padding: 0;
    border-radius: 2px;
    background: #202a25;
}

#smss-site-header .smss-chrome-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#smss-site-header .smss-chrome-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
#smss-site-header .smss-chrome-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile disclosure. Closed is actually hidden; no unconditional display override. */
@media (max-width: 1199px) {
    #smss-site-header .smss-chrome-shell {
        width: calc(100% - 32px);
        min-height: 72px;
        padding: 8px 0;
        gap: 16px;
        flex-wrap: nowrap;
    }
    #smss-site-header .smss-chrome-brand,
    #smss-site-header .smss-chrome-brand img {
        width: 56px;
        height: 56px;
    }
    #smss-site-header .smss-chrome-brand {
        flex-basis: 56px;
    }
    #smss-site-header .smss-chrome-toggle {
        display: block;
    }
    #smss-site-header #smss-site-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 6;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex: none;
        gap: 0;
        width: 100%;
        min-height: 0;
        height: auto;
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        margin: 0;
        padding: 8px;
        border: 1px solid #e0e7e2;
        border-radius: 0 0 12px 12px;
        background: #fff;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 12px 28px rgba(17, 32, 21, .13);
    }
    #smss-site-header.is-menu-open #smss-site-navigation {
        display: flex;
    }
    #smss-site-header #smss-site-navigation > .smss-chrome-link,
    #smss-site-header #smss-insights-toggle {
        display: flex;
        flex: none;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 44px;
        height: auto;
        max-height: none;
        margin: 0;
        padding: 11px 12px;
        font-size: 16px;
        line-height: 22px;
        text-align: left;
        white-space: normal;
    }
    #smss-site-header .smss-chrome-insights {
        flex: none;
        width: 100%;
        min-height: 0;
        height: auto;
        margin: 0;
        padding: 0;
        text-align: left;
    }
    #smss-insights-links {
        position: static;
        width: auto;
        min-height: 0;
        height: auto;
        margin: 0 0 4px 12px;
        padding: 2px 0 2px 10px;
        border: 0;
        border-left: 2px solid #dae7df;
        border-radius: 0;
        background: #f6f9f7;
        box-shadow: none;
        transform: none;
    }
    #smss-insights-links a {
        font-size: 15px;
        white-space: normal;
    }
    #smss-site-header #smss-site-navigation .smss-chrome-donate {
        display: flex;
        flex: none;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        height: auto;
        margin: 6px 0 0;
        padding: 11px 12px;
        font-size: 16px;
        white-space: normal;
    }
}

/* Footer and agency credit. No old text-replacement scripts required. */
#smss-site-footer {
    display: block;
    width: 100%;
    margin: 0;
    padding: 48px 0 0;
    background: #151b18;
    color: #d9e0dc;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
}

#smss-site-footer .smss-chrome-footer-shell {
    width: calc(100% - 40px);
    max-width: 1240px;
    margin: 0 auto;
    padding: 0;
}

#smss-site-footer .smss-chrome-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, .6fr);
    align-items: start;
    gap: 32px;
}

#smss-site-footer .smss-chrome-footer-grid > div {
    min-width: 0;
}

#smss-site-footer .smss-chrome-footer-logo {
    display: inline-flex;
    width: 104px;
    height: 104px;
    margin: 0 0 16px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
}

#smss-site-footer .smss-chrome-footer-logo img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

#smss-site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

#smss-site-footer p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.75;
    color: #d9e0dc;
    overflow-wrap: anywhere;
}

#smss-site-footer .smss-chrome-footer-links {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

#smss-site-footer .smss-chrome-footer-links li {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
}

#smss-site-footer a {
    color: #d9e0dc;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#smss-site-footer .smss-chrome-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 0;
}

#smss-site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

#smss-site-footer .smss-chrome-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 24px;
    margin: 30px 0 0;
    padding: 18px 0 22px;
    border-top: 1px solid rgba(255, 255, 255, .13);
    font-size: 13px;
    line-height: 1.7;
    color: #c3cdc6;
}

#smss-site-footer .smss-credit-link {
    display: inline;
    margin: 0;
    padding: 0;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transform: none;
}

#smss-site-footer .smss-credit-link::before,
#smss-site-footer .smss-credit-link::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 900px) {
    #smss-site-footer .smss-chrome-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (max-width: 575px) {
    #smss-site-footer {
        padding-top: 36px;
    }
    #smss-site-footer .smss-chrome-footer-shell {
        width: calc(100% - 32px);
    }
    #smss-site-footer .smss-chrome-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    #smss-site-footer .smss-chrome-footer-bottom {
        display: block;
        text-align: left;
    }
    #smss-site-footer .smss-chrome-footer-bottom > span {
        display: block;
        margin: 5px 0;
    }
    #smss-site-footer .smss-chrome-footer-links a {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #smss-site-header .smss-chrome-chevron {
        transition: none;
    }
}
