/* ============================================================
   FOOTER — Complete Redesign
   freecalculatortool.com / Astra Child Theme
   ============================================================ */

/* ---- BASE FOOTER RESET ---- */
#colophon,
.site-footer,
.ast-small-footer,
footer.site-footer {
    background: #0f172a !important;
    color: #94a3b8 !important;
    border-top: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- MAIN FOOTER BODY ---- */
.fct-footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 32px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

/* ---- COLUMN 1: BRAND ---- */
.fct-footer-brand .fct-footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fct-footer-brand .fct-footer-logo span {
    background: #2563eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.fct-footer-brand p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 20px;
    max-width: 280px;
}

/* Social icons */
.fct-footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fct-footer-social a {
    width: 36px;
    height: 36px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    font-size: 14px;
}

.fct-footer-social a:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* ---- COLUMNS 2 & 3: LINKS ---- */
.fct-footer-col h4 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin: 0 0 16px !important;
}

.fct-footer-col ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fct-footer-col ul li {
    margin-bottom: 10px !important;
}

.fct-footer-col ul li a {
    font-size: 0.875rem !important;
    color: #64748b !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fct-footer-col ul li a:hover {
    color: #ffffff !important;
}

.fct-footer-col ul li a::before {
    content: '›';
    color: #2563eb;
    font-weight: 700;
}

/* ---- COLUMN 4: NEWSLETTER ---- */
.fct-footer-newsletter h4 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin: 0 0 8px !important;
}

.fct-footer-newsletter p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.6;
}

.fct-footer-newsletter .fct-subscribe-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fct-footer-newsletter input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.fct-footer-newsletter input[type="email"]::placeholder {
    color: #475569;
}

.fct-footer-newsletter input[type="email"]:focus {
    border-color: #2563eb;
}

.fct-footer-newsletter button,
.fct-footer-newsletter input[type="submit"] {
    width: 100%;
    padding: 10px 16px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.fct-footer-newsletter button:hover,
.fct-footer-newsletter input[type="submit"]:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ---- DIVIDER ---- */
.fct-footer-divider {
    border: none;
    border-top: 1px solid #1e293b;
    margin: 0 32px;
}

/* ---- BOTTOM BAR ---- */
.fct-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.fct-footer-bottom .fct-copyright {
    font-size: 0.8rem;
    color: #475569;
}

.fct-footer-bottom .fct-copyright a {
    color: #64748b !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.fct-footer-bottom .fct-copyright a:hover {
    color: #fff !important;
}

.fct-footer-bottom-links {
    display: flex;
    gap: 20px;
}

.fct-footer-bottom-links a {
    font-size: 0.8rem;
    color: #475569 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.fct-footer-bottom-links a:hover {
    color: #ffffff !important;
}

/* ---- HIDE EXISTING BROKEN FOOTER ELEMENTS ---- */
.ast-small-footer .ast-footer-copyright,
.ast-small-footer-wrap,
.footer-widget-area,
.ast-subscribe-form,
.elementor-location-footer,
[data-elementor-type="footer"] .elementor-widget-wp-widget-wysija_widget,
.wp-block-group.has-background {
    /* These will be replaced by fct-footer-* elements */
}

/* Override Astra footer widget styles */
.footer-adv .footer-adv-overlay,
#colophon .ast-small-footer,
#colophon .ast-small-footer-section-1 {
    background: transparent !important;
    padding: 0 !important;
}

#colophon .ast-footer-row-inline,
#colophon .ast-footer-row-stack {
    justify-content: flex-start !important;
    text-align: left !important;
}

/* Fix broken subscribe button text wrap */
#colophon button,
#colophon input[type="submit"],
.ast-small-footer button,
.ast-small-footer input[type="submit"] {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: visible !important;
    min-width: fit-content !important;
}

/* Fix social icons position */
.ast-social-inner-wrap,
.ast-header-social-1-wrap {
    justify-content: flex-start !important;
}

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 900px) {
    .fct-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 40px 24px 32px;
    }

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

@media (max-width: 600px) {
    .fct-footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 20px 24px;
    }

    .fct-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 20px;
    }

    .fct-footer-divider {
        margin: 0 20px;
    }
}
