/* ═══════════════════════════════════════════════════════════════
   footer.css — CalculatorFix.com
   Append or @import into style.css, or link separately.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   FOOTER — Wave Divider
───────────────────────────────────────────── */
.site-footer {
    background: var(--clr-bg-soft);
    border-top: 1px solid var(--clr-border);
    margin-top: auto; /* pushes footer to bottom in flex-column body */
}

.footer-wave {
    line-height: 0;
    overflow: hidden;
}

.footer-wave svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* ─────────────────────────────────────────────
   FOOTER — Body
───────────────────────────────────────────── */
.footer-body {
    padding-block: var(--sp-16) var(--sp-12);
}

/* Four-column grid — collapses gracefully */
.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: var(--sp-10) var(--sp-8);
    align-items: start;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-10) var(--sp-8);
    }
    .footer-brand {
        grid-column: 1 / -1; /* full width on tablet */
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-8);
    }
    .footer-brand { grid-column: auto; }
}

/* ─────────────────────────────────────────────
   FOOTER — Brand Column
───────────────────────────────────────────── */
.footer-logo {
    margin-bottom: var(--sp-4);
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--clr-text-secondary);
    line-height: var(--lh-relaxed);
    max-width: 340px;
    margin-bottom: var(--sp-5);
}

/* Social icons */
.footer-social {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    color: var(--clr-text-secondary);
    transition: color var(--dur-fast) var(--ease),
                background var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}

.social-link:hover {
    color: var(--clr-accent);
    background: var(--clr-accent-light);
    border-color: var(--clr-accent);
    box-shadow: 0 2px 8px rgb(14 165 233 / 0.15);
}

/* ─────────────────────────────────────────────
   FOOTER — Nav Columns
───────────────────────────────────────────── */
.footer-col {}

.footer-heading {
    font-family: var(--font-head);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--clr-text-primary);
    margin-bottom: var(--sp-4);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    list-style: none;
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--clr-text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    transition: color var(--dur-fast) var(--ease),
                gap var(--dur-fast) var(--ease);
}

.footer-links a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--clr-border);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}

.footer-links a:hover {
    color: var(--clr-accent);
    gap: var(--sp-3); /* subtle nudge on hover */
}

.footer-links a:hover::before {
    background: var(--clr-accent);
}

/* ─────────────────────────────────────────────
   FOOTER — Bottom Bar
───────────────────────────────────────────── */
.footer-bottom {
    background: var(--clr-bg-muted);
    border-top: 1px solid var(--clr-border);
    padding-block: var(--sp-4);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.footer-copy {
    font-size: var(--text-sm);
    color: var(--clr-text-muted);
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    list-style: none;
}

.footer-bottom-links a {
    font-size: var(--text-sm);
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

.footer-bottom-links a:hover {
    color: var(--clr-accent);
}

@media (max-width: 480px) {
    .footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ─────────────────────────────────────────────
   BACK-TO-TOP BUTTON
───────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: var(--sp-6);
    right: var(--sp-6);
    z-index: 500;
    width: 44px;
    height: 44px;
    border-radius: var(--r-full);
    background: var(--clr-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgb(14 165 233 / 0.35);
    border: none;
    cursor: pointer;

    /* Hidden until user scrolls */
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--dur-base) var(--ease),
                visibility 0s linear var(--dur-base),
                transform var(--dur-base) var(--ease),
                background var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--dur-base) var(--ease),
                transform var(--dur-base) var(--ease),
                background var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}

.back-to-top:hover {
    background: var(--clr-accent-dark);
    box-shadow: 0 6px 20px rgb(14 165 233 / 0.45);
}

.back-to-top:active {
    transform: scale(0.94);
}

@media (max-width: 640px) {
    .back-to-top {
        bottom: var(--sp-4);
        right: var(--sp-4);
        width: 40px;
        height: 40px;
    }
}
