/**
 * AffirmFunding Compliance Footer v2.0
 * =====================================
 * Full footer: upper grid (logo, links, contact, form)
 * + compliance bar + sticky CTA + scroll-to-top
 *
 * Color Palette:
 *   Primary Dark:   #1a1a2e
 *   Deeper Dark:    #12121f
 *   Accent Gold:    #c9a84c
 *   Gold Light:     #dfc06a
 *   Text Muted:     #8888a0
 *   Text Light:     #b0b0c0
 *   Text Bright:    #e0e0e8
 */

/* ─── Container ─────────────────────────────── */
#afcf-compliance-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #12121f 100%);
    color: #b0b0c0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border-top: 3px solid #c9a84c;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 100;
}

.afcf-compliance-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════════
 * UPPER FOOTER — 4-Column Grid
 * ═══════════════════════════════════════════════ */
.afcf-upper-footer {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr 1.4fr;
    gap: 40px;
    padding: 48px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── Column Headings ─────────────────────── */
.afcf-footer-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c9a84c;
    margin: 0 0 18px;
    position: relative;
    padding-bottom: 12px;
}

.afcf-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #c9a84c, transparent);
    border-radius: 2px;
}

/* ─── Col 1: Brand ────────────────────────── */
.afcf-footer-col--brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.afcf-footer-logo-link {
    display: inline-block;
}

.afcf-footer-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.afcf-footer-tagline {
    font-size: 14px;
    color: #8888a0;
    margin: 0;
    line-height: 1.5;
}

/* Social Icons */
.afcf-social-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.afcf-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8888a0;
    transition: all 0.25s ease;
    text-decoration: none;
}

.afcf-social-link:hover {
    background: rgba(201, 168, 76, 0.15);
    border-color: rgba(201, 168, 76, 0.4);
    color: #c9a84c;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ─── Col 2: Quick Links ──────────────────── */
.afcf-footer-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.afcf-footer-link-list li {
    margin-bottom: 8px;
}

.afcf-footer-link-list a {
    color: #b0b0c0;
    text-decoration: none;
    font-size: 13.5px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.afcf-footer-link-list a::before {
    content: '›';
    color: #c9a84c;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.afcf-footer-link-list a:hover {
    color: #c9a84c;
    text-decoration: none;
}

.afcf-footer-link-list a:hover::before {
    transform: translateX(3px);
}

/* ─── Col 3: Contact Info ─────────────────── */
.afcf-footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.afcf-footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}

.afcf-footer-contact-list svg {
    color: #c9a84c;
    flex-shrink: 0;
    margin-top: 2px;
}

.afcf-footer-contact-list a {
    color: #b0b0c0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.afcf-footer-contact-list a:hover {
    color: #c9a84c;
}

/* ─── Col 4: Lead Capture Form ────────────── */
.afcf-lead-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.afcf-lead-form input,
.afcf-lead-form select {
    width: 100%;
    padding: 11px 14px;
    font-size: 13.5px;
    font-family: inherit;
    color: #e0e0e8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.afcf-lead-form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.afcf-lead-form select option {
    background: #1a1a2e;
    color: #e0e0e8;
}

.afcf-lead-form input::placeholder {
    color: #6a6a80;
}

.afcf-lead-form input:hover,
.afcf-lead-form select:hover {
    border-color: rgba(201, 168, 76, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.afcf-lead-form input:focus,
.afcf-lead-form select:focus {
    outline: none;
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.afcf-lead-form input.is-filled,
.afcf-lead-form select.is-filled {
    border-color: rgba(201, 168, 76, 0.4);
}

/* Submit Button */
.afcf-lead-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #1a1a2e;
    background: linear-gradient(135deg, #c9a84c 0%, #dfc06a 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.afcf-lead-btn:hover {
    background: linear-gradient(135deg, #dfc06a 0%, #e8d07a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
}

.afcf-lead-btn:active {
    transform: translateY(0);
}

.afcf-lead-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.afcf-lead-btn-arrow {
    transition: transform 0.2s ease;
}

.afcf-lead-btn:hover .afcf-lead-btn-arrow {
    transform: translateX(3px);
}

/* Form Messages */
.afcf-lead-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.afcf-lead-msg--success {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.25);
}

.afcf-lead-msg--error {
    background: rgba(255, 59, 48, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 59, 48, 0.25);
}

/* Security Note */
.afcf-lead-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    color: #6a6a80;
    margin: 2px 0 0;
}

.afcf-lead-note svg {
    color: #6a6a80;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
 * COMPLIANCE SECTION
 * ═══════════════════════════════════════════════ */

/* ─── NMLS Badges Row ────────────────────── */
.afcf-compliance-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.afcf-eho-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e8;
    flex-shrink: 0;
}

.afcf-eho-icon {
    width: 36px;
    height: 40px;
    color: #c9a84c;
    flex-shrink: 0;
}

.afcf-eho-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.35;
    color: #b0b0c0;
}

.afcf-nmls-badges {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.afcf-nmls-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #e0e0e8;
    padding: 8px 18px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 6px;
    transition: all 0.25s ease;
    background: rgba(201, 168, 76, 0.04);
}

.afcf-nmls-link:hover,
.afcf-nmls-link:focus {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.6);
    color: #ffffff;
    text-decoration: none;
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2);
}

.afcf-nmls-label {
    font-size: 11px;
    font-weight: 400;
    color: #8888a0;
    letter-spacing: 0.02em;
}

.afcf-nmls-link:hover .afcf-nmls-label {
    color: #b0b0c0;
}

.afcf-nmls-number {
    font-size: 14px;
    font-weight: 700;
    color: #c9a84c;
    letter-spacing: 0.04em;
}

.afcf-nmls-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 18px;
    line-height: 1;
}

/* ─── Legal Disclaimer ───────────────────── */
.afcf-compliance-disclaimer {
    text-align: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.afcf-compliance-disclaimer p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: #8888a0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Copyright + Legal Links ────────────── */
.afcf-compliance-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 0;
}

.afcf-copyright {
    font-size: 12px;
    color: #6a6a80;
}

.afcf-legal-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.afcf-legal-links a {
    color: #8888a0;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.afcf-legal-links a:hover,
.afcf-legal-links a:focus {
    color: #c9a84c;
    text-decoration: underline;
}

.afcf-link-sep {
    color: rgba(255, 255, 255, 0.12);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════
 * STICKY MOBILE CTA BAR
 * ═══════════════════════════════════════════════ */
.afcf-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(18, 18, 31, 0.95) 0%, rgba(18, 18, 31, 0.99) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.afcf-sticky-cta.is-visible {
    transform: translateY(0);
}

.afcf-sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}

.afcf-sticky-btn--call {
    color: #e0e0e8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.afcf-sticky-btn--call:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    text-decoration: none;
}

.afcf-sticky-btn--apply {
    color: #1a1a2e;
    background: linear-gradient(135deg, #c9a84c 0%, #dfc06a 100%);
    border: 1px solid transparent;
}

.afcf-sticky-btn--apply:hover {
    background: linear-gradient(135deg, #dfc06a 0%, #e8d07a 100%);
    color: #1a1a2e;
    text-decoration: none;
}

.afcf-sticky-btn svg {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
 * SCROLL TO TOP BUTTON
 * ═══════════════════════════════════════════════ */
.afcf-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c9a84c 0%, #dfc06a 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.afcf-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.afcf-scroll-top:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.4), 0 0 0 4px rgba(201, 168, 76, 0.15);
}

.afcf-scroll-top:active {
    transform: translateY(0) scale(1);
}

.afcf-scroll-top svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
    display: block;
    transition: transform 0.2s ease;
}

.afcf-scroll-top:hover svg {
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════
 * RESPONSIVE
 * ═══════════════════════════════════════════════ */

/* ─── Tablet (≤ 992px) ────────────────────── */
@media (max-width: 992px) {
    .afcf-upper-footer {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .afcf-footer-col--form {
        grid-column: 1 / -1;
    }
}

/* ─── Mobile (≤ 768px) ────────────────────── */
@media (max-width: 768px) {
    .afcf-sticky-cta {
        display: flex;
        gap: 10px;
    }

    body {
        padding-bottom: 72px;
    }

    .afcf-scroll-top {
        bottom: 84px;
        right: 16px;
    }

    .afcf-compliance-inner {
        padding: 0 16px;
    }

    .afcf-upper-footer {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 0 28px;
    }

    .afcf-footer-col--brand {
        align-items: center;
        text-align: center;
    }

    .afcf-social-icons {
        justify-content: center;
    }

    .afcf-footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .afcf-footer-col--links,
    .afcf-footer-col--contact {
        text-align: center;
    }

    .afcf-footer-link-list a {
        justify-content: center;
    }

    .afcf-footer-contact-list li {
        justify-content: center;
    }

    .afcf-compliance-top {
        flex-direction: column;
        gap: 18px;
    }

    .afcf-nmls-badges {
        flex-direction: column;
        gap: 10px;
    }

    .afcf-nmls-divider {
        display: none;
    }

    .afcf-nmls-link {
        width: 100%;
        max-width: 260px;
    }

    .afcf-compliance-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .afcf-legal-links {
        justify-content: center;
    }

    .afcf-scroll-top {
        bottom: 84px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ─── Small Mobile (≤ 480px) ──────────────── */
@media (max-width: 480px) {
    .afcf-compliance-disclaimer p {
        font-size: 11px;
    }

    .afcf-eho-icon {
        width: 28px;
        height: 32px;
    }

    .afcf-sticky-btn {
        font-size: 13px;
        padding: 11px 12px;
    }

    .afcf-footer-logo {
        max-width: 140px;
    }
}