/* Home's existing footer palette, shared only by the site-footer component. */
.kg-site-footer {
    --footer-panel: #fff;
    --footer-ink: #152033;
    --footer-muted: #64748b;
    --footer-line: #d9e1ee;
    --footer-bottom: #737373;
    --footer-separator: #e5e5e5;
    --footer-social-line: #e5e5e5;
    --footer-logo-accent: #4f46e5;
    background: var(--footer-panel) !important;
    border-color: var(--footer-line) !important;
    color: var(--footer-ink) !important;
    font-family: Inter, system-ui, sans-serif;
    font-size: 16px;
    line-height: 24px;
}

.dark .kg-site-footer {
    --footer-panel: #111c2a;
    --footer-ink: #f3f5fc;
    --footer-muted: #9aa9bf;
    --footer-line: #2a3a50;
    --footer-separator: #262626;
    --footer-social-line: #404040;
}

.kg-site-footer p,
.kg-site-footer a:not(.kg-brand) { color: var(--footer-muted) !important; }
.kg-site-footer ul { color: #525252 !important; }
.kg-site-footer .kg-site-footer-logo-accent { color: var(--footer-logo-accent) !important; }
.kg-site-footer .kg-site-footer-separator { border-color: var(--footer-separator) !important; }
.kg-site-footer .kg-site-footer-bottom { color: var(--footer-bottom) !important; }
.kg-site-footer .kg-site-footer-social { border-color: var(--footer-social-line) !important; }
.kg-site-footer .kg-site-footer-shield { color: #6366f1 !important; }


/* Preserve the four-column desktop footer, including the company/social stack. */
@media (min-width: 768px) {
    .kg-site-footer-navigation {
        grid-column: span 3 / span 3;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 2rem;
        align-content: start;
    }
    .kg-site-footer-links { display: contents; }
    .kg-site-footer-help, .kg-site-footer-services { grid-row: 1 / span 2; }
    .kg-site-footer-company, .kg-site-footer-social-section { grid-column: 3; }
}

@media (max-width: 767px) {
    .kg-site-footer-grid { grid-template-columns: minmax(0, 1fr); }
    .kg-site-footer-navigation { min-width: 0; }
    .kg-site-footer-links {
        display: flex;
        gap: 2rem;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding-bottom: 0.75rem;
        scrollbar-width: thin;
        scrollbar-color: var(--footer-line) var(--footer-panel);
    }
    .kg-site-footer-column { flex-shrink: 0; width: max-content; }
    .kg-site-footer-column :is(h4, a) { white-space: nowrap; }
    .kg-site-footer-links::-webkit-scrollbar { height: 4px; }
    .kg-site-footer-links::-webkit-scrollbar-thumb { background: var(--footer-line); border-radius: 999px; }
    .kg-site-footer-links:focus-visible { outline: 2px solid var(--footer-logo-accent); outline-offset: 4px; }
    .kg-site-footer-social-section { margin-top: 1.5rem; }
}
