/* Shared footer only. Layered important rules isolate it from the legacy
   unlayered theme overrides without changing any page/header styling. */
@layer everklin-footer {
    #everklin-footer {
        --footer-ink: #20362a;
        --footer-copy: #435749;
        --footer-accent: #5c7427;
        margin: 0 !important;
        padding: 0 !important;
        color: var(--footer-ink) !important;
        background: #fff !important;
        border-top: 3px solid #5c7427 !important;
        box-shadow: none !important;
        font-size: 16px !important;
    }

    #everklin-footer :where(h2, p, a, address, span) {
        text-shadow: none !important;
        -webkit-text-fill-color: currentColor !important;
        opacity: 1 !important;
        letter-spacing: normal !important;
    }

    #everklin-footer :is(p, address) {
        color: var(--footer-copy) !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        line-height: 1.65 !important;
        text-transform: none !important;
        font-style: normal !important;
    }

    #everklin-footer a {
        color: var(--footer-ink) !important;
        text-decoration: none !important;
        transition: color 160ms ease, background-color 160ms ease !important;
    }

    #everklin-footer a:hover {
        color: var(--footer-accent) !important;
        text-decoration: underline !important;
        text-underline-offset: 5px !important;
        text-decoration-thickness: 1px !important;
        transform: none !important;
    }

    #everklin-footer a:focus-visible {
        outline: 2px solid var(--footer-accent) !important;
        outline-offset: 5px !important;
        border-radius: 3px !important;
    }

    #everklin-footer a span { color: inherit !important; }

    #everklin-footer .container {
        width: min(calc(100% - 96px), 1360px) !important;
        max-width: 1360px !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }

    #everklin-footer .footer-main {
        display: block !important;
        padding: 64px 0 !important;
        background: #fff !important;
    }

    #everklin-footer .footer-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1fr) !important;
        gap: clamp(28px, 4vw, 64px) !important;
        background: transparent !important;
        align-items: start !important;
    }

    #everklin-footer .footer-brand {
        display: inline-flex !important;
        margin: 0 0 20px !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    #everklin-footer .footer-logo {
        width: 210px !important;
        max-width: 100% !important;
        height: auto !important;
        filter: none !important;
        opacity: 1 !important;
        mix-blend-mode: normal !important;
    }

    #everklin-footer .footer-brand-statement {
        max-width: 31ch !important;
        margin: 0 0 24px !important;
    }

    #everklin-footer .footer-team-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 24px !important;
        min-height: 48px !important;
        padding: 10px 18px !important;
        background: #f0f4e5 !important;
        border: 1px solid #d9e2c5 !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        font-weight: 650 !important;
    }

    #everklin-footer .footer-team-link:hover { background: #e4eccf !important; }

    #everklin-footer .footer-column {
        display: flex !important;
        align-items: flex-start !important;
        flex-direction: column !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 12px 0 0 !important;
        border: 0 !important;
        background: transparent !important;
    }

    #everklin-footer .footer-column h2,
    #everklin-footer .footer-connect__item h2 {
        margin: 0 0 18px !important;
        color: var(--footer-accent) !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        text-transform: uppercase !important;
        letter-spacing: .1em !important;
    }

    #everklin-footer .footer-column > a,
    #everklin-footer .footer-disclosure-links > a {
        display: inline-flex !important;
        align-items: center !important;
        min-height: 44px !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px 0 !important;
        color: var(--footer-ink) !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        line-height: 1.45 !important;
    }

    #everklin-footer .footer-column > a:hover { color: var(--footer-accent) !important; }
    #everklin-footer .footer-disclosure-links { display: flex !important; flex-direction: column !important; align-items: flex-start !important; }
    #everklin-footer .footer-disclosure-links[hidden] { display: none !important; }
    #everklin-footer .footer-disclosure { font: inherit !important; color: inherit !important; letter-spacing: inherit !important; text-transform: inherit !important; background: none !important; border: 0 !important; padding: 0 !important; opacity: 1 !important; cursor: default; }
    @media (max-width: 767px) {
        #everklin-footer .footer-main { padding: 16px 0 !important; }
        #everklin-footer .footer-grid { gap: 0 !important; grid-template-columns: 1fr !important; }
        #everklin-footer .footer-brand-column { margin-bottom: 24px !important; }
        #everklin-footer .footer-column { border-top: 1px solid #dce4d2 !important; padding: 0 !important; }
        #everklin-footer .footer-column h2 { width: 100% !important; margin: 0 !important; }
        #everklin-footer .footer-disclosure { display: flex !important; justify-content: space-between !important; align-items: center !important; min-height: 52px !important; width: 100% !important; cursor: pointer; }
        #everklin-footer .footer-disclosure::after { content: '+'; font-size: 22px; }
        #everklin-footer .footer-disclosure[aria-expanded="true"]::after { content: '−'; }
        #everklin-footer .footer-disclosure-links { padding-bottom: 16px !important; }
    }
    #everklin-footer .footer-column .footer-view-all {
        margin-top: 12px !important;
        color: var(--footer-accent) !important;
        font-weight: 700 !important;
        border-top: 1px solid #dce4d2 !important;
    }

    #everklin-footer :is(.footer-connect, .footer-legal) {
        --footer-ink: #ffffff;
        --footer-copy: #ffffff;
        --footer-accent: #ffffff;
        background: #5c7427 !important;
        color: #ffffff !important;
    }

    #everklin-footer .footer-connect { padding: 40px 0 !important; }
    #everklin-footer .footer-connect__grid {
        display: grid !important;
        grid-template-columns: 1fr 1.4fr 1fr !important;
        gap: 36px !important;
    }
    #everklin-footer .footer-connect__item { min-width: 0; padding: 0 !important; margin: 0 !important; }
    #everklin-footer .footer-connect__item + .footer-connect__item {
        border-left: 1px solid #a0b273 !important;
        padding-left: 36px !important;
    }
    #everklin-footer .footer-connect__item h2 { margin-bottom: 12px !important; }
    #everklin-footer .footer-connect__item :is(p, address) { margin: 0 !important; max-width: 43ch; }
    #everklin-footer .footer-connect__item a {
        display: flex !important;
        align-items: center !important;
        width: fit-content !important;
        min-height: 44px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
    }
    #everklin-footer .footer-connect__item .footer-phone {
        font-size: clamp(20px, 1.7vw, 25px) !important;
        font-weight: 650 !important;
        white-space: nowrap !important;
    }
    #everklin-footer .footer-support-link { gap: 16px !important; margin-top: 8px !important; }

    #everklin-footer .footer-legal { border-top: 1px solid #a0b273 !important; }
    #everklin-footer .footer-bottom {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 16px 32px !important;
        padding: 20px 0 !important;
        border: 0 !important;
        background: transparent !important;
    }
    #everklin-footer .footer-bottom p,
    #everklin-footer .footer-bottom a {
        margin: 0 !important;
        color: var(--footer-copy) !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        line-height: 1.6 !important;
    }
    #everklin-footer .footer-bottom nav { display: flex !important; gap: 8px 24px !important; flex-wrap: wrap !important; }
    #everklin-footer .footer-bottom a { display: inline-flex !important; align-items: center !important; min-height: 44px !important; }
    #everklin-footer .footer-bottom a:hover { color: var(--footer-accent) !important; }

    /* Preserve the homepage-only support invitation, with a readable light surface. */
    #everklin-footer .footer-support { background: #f0f4e5 !important; padding: 48px 0 !important; }
    #everklin-footer .footer-support__inner { display: grid !important; grid-template-columns: 1fr auto !important; gap: 32px !important; }
    #everklin-footer .footer-support__eyebrow { color: #526b28 !important; font-size: 14px !important; letter-spacing: .1em !important; }
    #everklin-footer .footer-support h2 { color: #20362a !important; font-size: clamp(30px, 3vw, 42px) !important; line-height: 1.15 !important; }
    #everklin-footer .footer-support p:not(.footer-support__eyebrow) { color: #435749 !important; font-size: 16px !important; }
    #everklin-footer .footer-support__primary {
        color: #ffffff !important;
        background: #5c7427 !important;
        border-color: #5c7427 !important;
        min-height: 52px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        white-space: normal !important;
        border-radius: 6px !important;
    }
    #everklin-footer .footer-support__primary:hover { color: #ffffff !important; background: #4d6320 !important; border-color: #4d6320 !important; }

    @media (max-width: 1050px) {
        #everklin-footer .container { width: calc(100% - 64px) !important; }
        #everklin-footer .footer-grid { grid-template-columns: 1.2fr 1fr 1fr !important; gap: 36px !important; }
        #everklin-footer .footer-brand-column { grid-column: 1 / -1 !important; }
        #everklin-footer .footer-brand-statement { max-width: 58ch !important; }
        #everklin-footer .footer-connect__grid { grid-template-columns: 1fr 1.3fr !important; gap: 28px !important; }
        #everklin-footer .footer-connect__item:last-child { grid-column: 1 / -1; border: 0 !important; padding: 24px 0 0 !important; border-top: 1px solid #a0b273 !important; }
        #everklin-footer .footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; }
        #everklin-footer .footer-bottom nav { justify-content: flex-start !important; }
        #everklin-footer .footer-support__inner { grid-template-columns: 1fr !important; }
    }

    @media (max-width: 767px) {
        #everklin-footer .container { width: calc(100% - 40px) !important; }
        #everklin-footer .footer-main { padding: 16px 0 !important; }
        #everklin-footer .footer-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
        #everklin-footer .footer-logo { width: 160px !important; }
        #everklin-footer .footer-brand { margin-bottom: 12px !important; }
        #everklin-footer .footer-brand-statement { margin-bottom: 12px !important; font-size: 15px !important; line-height: 1.6 !important; }
        #everklin-footer .footer-brand-column { padding-bottom: 20px !important; }
        #everklin-footer .footer-column { padding-top: 0 !important; border-top: 1px solid #dce4d2 !important; }
        #everklin-footer .footer-column--businesses { grid-column: 1 / -1 !important; display: flex !important; gap: 0 !important; }
        #everklin-footer .footer-column--businesses :is(h2, .footer-view-all) { grid-column: 1 / -1 !important; }
        #everklin-footer .footer-column .footer-view-all { width: fit-content !important; }
        #everklin-footer .footer-connect { padding: 20px 0 !important; }
        #everklin-footer .footer-connect__grid { grid-template-columns: 1fr !important; gap: 16px !important; }
        #everklin-footer .footer-connect__item + .footer-connect__item { padding: 16px 0 0 !important; border-left: 0 !important; border-top: 1px solid #a0b273 !important; }
        #everklin-footer .footer-connect__item h2 { margin-bottom: 8px !important; }
        #everklin-footer .footer-connect__item :is(p,address) { font-size: 15px !important; line-height: 1.6 !important; }
        #everklin-footer .footer-bottom { padding: 20px 0 32px !important; }
        #everklin-footer .footer-bottom nav { gap: 0 20px !important; }
    }
}
