/*
 * Footer, V2 design (listing-parts/footer-v2.php, included by footer.php when $config['footer_design'] = 'v2').
 * Used by every page, with or without the other V2 designs: scoped to footer.ft-v2, own color tokens.
 */

footer.ft-v2 {
    --ft-brand: #42b983;
    --ft-brand-600: #2f9a6b;
    --ft-brand-700: #23794f;
    --ft-brand-50: #effaf4;
    --ft-ink: #0f172a;
    --ft-text: #334155;
    --ft-muted: #64748b;
    --ft-subtle: #94a3b8;
    --ft-border: #e2e8f0;
    --ft-soft: #f8fafc;

    margin: 48px 0 0;
    padding: 0;
    border-top: 1px solid var(--ft-border);
    background: var(--ft-soft);
    color: var(--ft-text);
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

footer.ft-v2 .ft-inner {
    box-sizing: border-box;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 28px;
}

footer.ft-v2 a {
    color: var(--ft-text);
    text-decoration: none;
}

footer.ft-v2 a:hover {
    color: var(--ft-brand-700);
    text-decoration: underline;
}

footer.ft-v2 h3 {
    display: block;
    margin: 0 0 12px;
    color: var(--ft-ink);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ───────────── Brand + link columns ───────────── */

footer.ft-v2 .ft-top {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--ft-border);
}

footer.ft-v2 .ft-logo img {
    display: block;
    max-width: 210px;
    height: auto;
    border-radius: 0;
}

footer.ft-v2 .ft-tagline {
    margin: 12px 0 0;
    color: var(--ft-muted);
}

footer.ft-v2 .ft-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

footer.ft-v2 .ft-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border: 1.5px solid var(--ft-brand);
    border-radius: 10px;
    background: #fff;
    color: var(--ft-brand-700);
    font-weight: 700;
}

footer.ft-v2 .ft-btn:hover {
    background: var(--ft-brand-50);
    color: var(--ft-brand-700);
    text-decoration: none;
}

footer.ft-v2 .ft-btn-primary {
    background: var(--ft-brand);
    color: #fff;
}

footer.ft-v2 .ft-btn-primary:hover {
    border-color: var(--ft-brand-600);
    background: var(--ft-brand-600);
    color: #fff;
}

footer.ft-v2 .ft-copilot {
    margin: 14px 0 0;
    color: var(--ft-muted);
    font-size: 13px;
}

footer.ft-v2 .ft-copilot a {
    color: var(--ft-brand-700);
    font-weight: 700;
}

footer.ft-v2 .ft-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

footer.ft-v2 .ft-col li {
    margin: 0;
    padding: 0;
}

footer.ft-v2 .ft-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

footer.ft-v2 .ft-icon {
    width: 16px;
    height: 16px;
    flex: none;
}

footer.ft-v2 .ft-count {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--ft-brand-50);
    color: var(--ft-brand-700);
    font-size: 11.5px;
    font-weight: 700;
}

footer.ft-v2 .ft-rod {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-weight: 600;
}

footer.ft-v2 .ft-rod img {
    border-radius: 50%;
}

/* ───────────── Category / job page links ───────────── */

footer.ft-v2 .ft-links {
    padding: 26px 0 0;
}

footer.ft-v2 .ft-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

footer.ft-v2 .ft-chips li {
    min-width: 0;
    margin: 0;
}

footer.ft-v2 .ft-chips a {
    display: inline-block;
    max-width: 320px;
    overflow: hidden;
    padding: 4px 11px;
    border: 1px solid var(--ft-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ft-text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
}

footer.ft-v2 .ft-chips a:hover {
    border-color: var(--ft-brand);
    background: var(--ft-brand-50);
    color: var(--ft-brand-700);
    text-decoration: none;
}

footer.ft-v2 .ft-more {
    margin-top: 10px;
}

footer.ft-v2 .ft-more summary {
    display: inline-block;
    padding: 4px 0;
    color: var(--ft-brand-700);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

footer.ft-v2 .ft-more summary::-webkit-details-marker {
    display: none;
}

footer.ft-v2 .ft-more summary::after {
    content: " ↓";
}

footer.ft-v2 .ft-more[open] summary::after {
    content: " ↑";
}

footer.ft-v2 .ft-more[open] summary {
    margin-bottom: 8px;
}

/* ───────────── Bottom: legal, climate, projects, featured on ───────────── */

footer.ft-v2 .ft-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid var(--ft-border);
    color: var(--ft-muted);
    font-size: 13px;
}

footer.ft-v2 .ft-bottom p {
    margin: 0 0 8px;
}

footer.ft-v2 .ft-bottom a {
    color: var(--ft-muted);
    text-decoration: underline;
    text-decoration-color: var(--ft-border);
    text-underline-offset: 3px;
}

footer.ft-v2 .ft-bottom a:hover {
    color: var(--ft-brand-700);
    text-decoration-color: currentColor;
}

footer.ft-v2 .ft-legal b {
    color: var(--ft-text);
}

footer.ft-v2 .ft-climate a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

footer.ft-v2 .ft-climate-icon {
    width: 26px;
    height: 18px;
    flex: none;
}

/* Badges strip (listing-parts/footer-badges.php): quieter until hovered */
footer.ft-v2 .lb-badges {
    margin-top: 18px;
    opacity: .75;
    transition: opacity .2s;
}

footer.ft-v2 .lb-badges:hover {
    opacity: 1;
}

footer.ft-v2 .lb-badges a {
    color: var(--ft-muted);
    font-size: 12px;
}

/* ───────────── Responsive ───────────── */

@media (max-width: 900px) {
    footer.ft-v2 .ft-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 600px) {
    footer.ft-v2 .ft-inner {
        padding: 36px 16px 24px;
    }

    footer.ft-v2 .ft-top {
        grid-template-columns: 1fr 1fr;
        gap: 26px 20px;
    }

    footer.ft-v2 .ft-chips a {
        max-width: calc(100vw - 48px);
    }
}

@media (prefers-reduced-motion: reduce) {
    footer.ft-v2 .lb-badges-track {
        animation: none;
    }
}
