/*
 * MoneyX – Footer styles
 * Extracted from the inline <style id="hbf-styles"> block that used to be
 * printed inside footer.php on every page load. Enqueued site-wide from
 * functions.php (mx_enqueue_template_styles) so it's downloaded once and
 * cached by the browser for every subsequent page view.
 */

/* ── Variables ───────────────────────────────────────────── */
.hbf-footer {
    --hbf-bg:      #0a0c12;
    --hbf-text:    #ffffff;
    --hbf-muted:   rgba(255,255,255,.55);
    --hbf-subtle:  rgba(255,255,255,.3);
    --hbf-border:  rgba(255,255,255,.08);
    --hbf-surface: rgba(255,255,255,.05);
    --hbf-link-hover: #fff;
    font-family: 'Sora', 'DM Sans', sans-serif;
    background: var(--hbf-bg);
    color: var(--hbf-text);
    position: relative;
    overflow: hidden;
}

/* Dark mode: use site-settings dark BG if available */
body.ss-dark-mode .hbf-footer {
    --hbf-border:  rgba(255,255,255,.07);
    --hbf-surface: rgba(255,255,255,.04);
}

/* ── Decorative grain overlay ────────────────────────────── */
.hbf-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .025;
    pointer-events: none;
    z-index: 0;
}

/* Radial glow top-left */
.hbf-footer::after {
    content: '';
    position: absolute;
    top: -120px;
    left: -80px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--hbf-p-rgb),.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Top gradient line ───────────────────────────────────── */
.hbf-topline {
    height: 2px;
    background: var(--hbf-border);
    position: relative;
    overflow: hidden;
}
.hbf-topline-fill {
    position: absolute;
    inset: 0;
    background: var(--hbf-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s cubic-bezier(.16,1,.3,1);
}
.hbf-footer[data-hbf-observed="true"] .hbf-topline-fill {
    transform: scaleX(1);
}

/* ── Container ───────────────────────────────────────────── */
.hbf-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
}

/* ── Widget grid ─────────────────────────────────────────── */
.hbf-grid {
    display: grid;
    gap: 52px;
    padding: 64px 0 56px;
}
.hbf-grid-1 { grid-template-columns: 1fr; }
.hbf-grid-2 { grid-template-columns: 1.4fr 1fr; }
.hbf-grid-3 { grid-template-columns: 1.6fr 1fr 1fr; }
.hbf-grid-4 { grid-template-columns: 1.8fr 1fr 1fr 1fr; }
.hbf-grid-5 { grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; }

/* ── Reveal animation ────────────────────────────────────── */
.hbf-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease var(--delay, 0s), transform .6s cubic-bezier(.16,1,.3,1) var(--delay, 0s);
}
.hbf-footer[data-hbf-observed="true"] .hbf-reveal {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .hbf-reveal { opacity: 1 !important; transform: none !important; }
    .hbf-topline-fill { transition: none !important; }
}

/* ── Logo ────────────────────────────────────────────────── */
.hbf-logo-link { display: inline-block; margin-bottom: 20px; }
.hbf-logo { height: 40px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; transition: opacity .2s; }
.hbf-logo:hover { opacity: 1; }
.hbf-site-name-link { text-decoration: none; margin-bottom: 20px; display: block; }
.hbf-site-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.025em; background: var(--hbf-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── About text ──────────────────────────────────────────── */
.hbf-about {
    font-size: .875rem;
    line-height: 1.8;
    color: var(--hbf-muted);
    margin: 0 0 22px;
    max-width: 280px;
}

/* ── Trust badges ────────────────────────────────────────── */
.hbf-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}
.hbf-badge {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--hbf-border);
    color: var(--hbf-muted);
    background: var(--hbf-surface);
    white-space: nowrap;
}

/* ── Column title ────────────────────────────────────────── */
.hbf-col-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hbf-text);
    margin: 0 0 22px;
}
.hbf-col-title-text { white-space: nowrap; }
.hbf-col-line {
    flex: 1;
    height: 1px;
    background: var(--hbf-border);
}

/* ── Link list ───────────────────────────────────────────── */
.hbf-links { list-style: none; margin: 0; padding: 0; }
.hbf-link-item { margin-bottom: 2px; }
.hbf-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: .875rem;
    color: var(--hbf-muted);
    text-decoration: none;
    transition: color .18s, gap .18s;
    position: relative;
}
.hbf-link:hover {
    color: var(--hbf-link-hover);
    gap: 12px;
}
.hbf-link-arrow {
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .18s, transform .18s;
    color: var(--hbf-p);
}
.hbf-link:hover .hbf-link-arrow {
    opacity: 1;
    transform: translateX(0);
}
.hbf-link-price {
    margin-left: auto;
    font-style: normal;
    font-size: .72rem;
    font-weight: 700;
    color: rgba(var(--hbf-p-rgb),.8);
    background: rgba(var(--hbf-p-rgb),.1);
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.hbf-link-all {
    color: var(--hbf-p) !important;
    font-weight: 600;
    font-size: .82rem;
    margin-top: 4px;
}

/* ── Social icons ────────────────────────────────────────── */
.hbf-social { display: flex; flex-wrap: wrap; gap: 8px; }
.hbf-social-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--hbf-border);
    background: var(--hbf-surface);
    color: var(--hbf-muted);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.hbf-social-btn svg { width: 17px; height: 17px; }
.hbf-social-btn:hover {
    background: var(--hbf-p);
    border-color: var(--hbf-p);
    color: #fff;
    transform: translateY(-2px);
}

/* ── Newsletter ──────────────────────────────────────────── */
.hbf-nl-desc {
    font-size: .875rem;
    color: var(--hbf-muted);
    line-height: 1.7;
    margin: 0 0 18px;
}
.hbf-nl-row {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--hbf-border);
    background: var(--hbf-surface);
    transition: border-color .18s, box-shadow .18s;
}
.hbf-nl-row:focus-within {
    border-color: rgba(var(--hbf-p-rgb),.5);
    box-shadow: 0 0 0 3px rgba(var(--hbf-p-rgb),.12);
}
.hbf-nl-input {
    flex: 1;
    padding: 13px 16px;
    background: transparent;
    border: none;
    outline: none;
    font-size: .875rem;
    color: var(--hbf-text);
    font-family: inherit;
}
.hbf-nl-input::placeholder { color: var(--hbf-subtle); }
.hbf-nl-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 18px;
    background: var(--hbf-grad);
    color: #fff;
    border: none;
    font-size: .82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .18s;
}
.hbf-nl-btn:hover { opacity: .88; }
.hbf-nl-btn svg { flex-shrink: 0; }
.hbf-nl-note {
    font-size: .72rem;
    color: var(--hbf-subtle);
    margin: 10px 0 0;
}
.hbf-nl-success {
    font-size: .875rem;
    color: #4ade80;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Divider ─────────────────────────────────────────────── */
.hbf-divider {
    height: 1px;
    background: var(--hbf-border);
}

/* ── Bottom bar ──────────────────────────────────────────── */
.hbf-bottom {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    flex-wrap: wrap;
}
.hbf-copy {
    font-size: .78rem;
    color: var(--hbf-subtle);
    flex: 1;
    min-width: 200px;
}
.hbf-legal-nav { display: flex; align-items: center; gap: 0; }
.hbf-legal-menu,
.hbf-legal-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 4px;
}
.hbf-legal-menu a,
.hbf-legal-link {
    font-size: .78rem;
    color: var(--hbf-subtle);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: color .18s, background .18s;
    white-space: nowrap;
}
.hbf-legal-menu a:hover,
.hbf-legal-link:hover {
    color: var(--hbf-text);
    background: var(--hbf-surface);
}
.hbf-social-bottom { gap: 6px; }
.hbf-social-bottom .hbf-social-btn { width: 32px; height: 32px; border-radius: 8px; }
.hbf-social-bottom .hbf-social-btn svg { width: 14px; height: 14px; }

/* ── Scroll to top ───────────────────────────────────────── */
.hbf-stt {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--stt-bg, #7c3aed);
    color: var(--stt-color, #fff);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, visibility .25s, transform .25s, background .18s, box-shadow .18s;
}
.hbf-stt.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.hbf-stt.hbf-stt-left { right: auto; left: 24px; }
.hbf-stt:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.hbf-stt:active { transform: translateY(0); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1060px) {
    .hbf-grid-5 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
    .hbf-grid-5 .hbf-col:last-child { grid-column: 1 / -1; }
    .hbf-col-newsletter .hbf-nl-row { max-width: 480px; }
}
@media (max-width: 820px) {
    .hbf-grid-4,.hbf-grid-5 { grid-template-columns: 1fr 1fr; gap: 36px; }
    .hbf-grid-3 { grid-template-columns: 1fr 1fr; }
    .hbf-grid-3 .hbf-col-about { grid-column: 1 / -1; }
    .hbf-grid-4 .hbf-col-about,.hbf-grid-5 .hbf-col-about { grid-column: 1 / -1; }
    .hbf-about { max-width: 100%; }
    .hbf-grid { padding: 48px 0 40px; }
    .hbf-wrap { padding: 0 20px; }
}
@media (max-width: 540px) {
    .hbf-grid,.hbf-grid-2,.hbf-grid-3,.hbf-grid-4,.hbf-grid-5 { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; }
    .hbf-bottom { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 0; }
    .hbf-copy { flex: none; }
    .hbf-legal-nav { order: -1; }
    .hbf-stt,.hbf-stt.hbf-stt-left { right: 16px; left: auto; bottom: 20px; }
}
