/* ==========================================================================
   theme.css — Unified "emerald fintech" theme overlay
   Inspired by imprumutacum.ro. Loaded LAST on every page so it overrides both
   the inline <style> tokens (--primary / --dark ...) used on the main pages and
   the css/style.css tokens (--color-primary ...) used on pangad/kalkulaator.
   ========================================================================== */

/* ---- 1. Design tokens ---------------------------------------------------- */
:root {
    /* Emerald primary + orange accent (matches reference site) */
    --primary: #047857;
    --primary-dark: #065F46;
    --primary-darker: #064E3B;
    --primary-light: #059669;
    --primary-bg: #F0FDF4;

    --accent: #F97316;
    --accent-dark: #EA580C;
    --accent-light: #FB923C;

    --dark: #0F172A;
    --dark2: #1E293B;
    --text: #1E293B;
    --text-light: #475569;
    --muted: #64748B;
    --border: #E2E8F0;
    --bg: #FFFFFF;
    --bg-soft: #F0FDF4;
    --white: #FFFFFF;
    --success: #059669;

    /* Softer, larger radii + green-tinted shadows */
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-sm: 12px;
    --shadow-sm: 0 2px 8px rgba(4,120,87,.06);
    --shadow-md: 0 4px 24px rgba(4,120,87,.08);
    --shadow-lg: 0 16px 48px rgba(4,120,87,.12);
    --shadow-xl: 0 24px 60px rgba(4,120,87,.16);
    --shadow-glass: 0 8px 32px rgba(0,0,0,.08);

    /* Bridge tokens for css/style.css (pangad.html, kalkulaator.html) */
    --color-primary: #047857;
    --color-primary-dark: #065F46;
    --color-primary-light: #059669;
    --color-accent: #F97316;
    --color-accent-dark: #EA580C;
    --color-accent-light: #FB923C;
    --color-success: #059669;
    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ---- 2. Global type + background wash ------------------------------------ */
body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    background-image: linear-gradient(160deg,
        rgba(240,253,244,.55) 0%,
        rgba(255,255,255,1) 38%,
        rgba(255,255,255,1) 62%,
        rgba(240,253,244,.35) 100%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Hide page scrollbar (scrolling still works) */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---- 3. Header / nav ----------------------------------------------------- */
.header, .site-header {
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.logo {
    gap: 0 !important;
}
.logo-icon {
    background: none !important;
    box-shadow: none !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    margin-right: 10px;
}
.logo-icon svg { width: 100%; height: 100%; display: block; }
.logo-icon svg path,
.logo-icon svg rect { fill: var(--primary) !important; }
.logo-icon svg rect:last-child { fill: var(--accent) !important; }
/* Footer on dark background: lighter green for contrast */
footer .logo-icon svg path,
.footer .logo-icon svg path,
footer .logo-icon svg rect,
.footer .logo-icon svg rect { fill: var(--primary-light) !important; }
footer .logo-icon svg rect:last-child,
.footer .logo-icon svg rect:last-child { fill: var(--accent) !important; }

.logo span.tld, .logo-tld { color: var(--primary) !important; }

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(4,120,87,.22);
}
.nav-cta:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker)) !important;
    box-shadow: 0 6px 22px rgba(4,120,87,.32);
}

/* ---- 4. Buttons ---------------------------------------------------------- */
.btn-primary,
.btn-apply,
.bank-detail-cta .btn-apply {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 22px rgba(249,115,22,.32) !important;
    transition: transform .2s ease, box-shadow .3s ease, background .3s ease !important;
}
.btn-primary:hover,
.btn-apply:hover,
.bank-detail-cta .btn-apply:hover {
    background: linear-gradient(135deg, var(--accent-dark), #c2410c) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(249,115,22,.42) !important;
}

.btn-accept, .btn-offers {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: #fff !important;
}

/* ---- 5. Hero ------------------------------------------------------------- */
.hero, .page-hero {
    background: linear-gradient(135deg, #047857 0%, #065F46 45%, #064E3B 100%) !important;
}
.hero h1 .accent,
.hero h1 em,
.page-hero .accent {
    color: var(--accent-light) !important;
}
.hero-badge {
    background: rgba(255,255,255,.12) !important;
    border: 1px solid rgba(255,255,255,.25) !important;
    color: #fff !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.hero-badge .dot { background: var(--accent-light) !important; }

/* ---- 6. Section labels / titles ----------------------------------------- */
.section-label {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}

/* ---- 7. Calculator card -------------------------------------------------- */
.calc-card {
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.calc-group label span,
.calc-result .monthly strong { color: var(--primary) !important; }
.calc-result { background: var(--primary-bg) !important; }
.slider {
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 50%, var(--border) 50%, var(--border) 100%);
}
.slider::-webkit-slider-thumb { border-color: var(--primary) !important; }
.slider::-moz-range-thumb { border-color: var(--primary) !important; }

/* ---- 8. Offer cards (glassmorphism) ------------------------------------- */
.offer-card {
    background: rgba(255,255,255,.82) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-glass);
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.offer-card:hover {
    box-shadow: 0 16px 44px rgba(4,120,87,.14) !important;
    transform: translateY(-3px);
    border-color: rgba(4,120,87,.18);
}
.offer-card.featured {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 8px 30px rgba(4,120,87,.16), 0 0 0 1px rgba(4,120,87,.06) !important;
}
.offer-card.featured::before {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    box-shadow: 0 2px 10px rgba(4,120,87,.3);
}
.offer-avatar {
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.offer-badge {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}
.offer-detail .detail-value.rate { color: var(--accent-dark) !important; }
.offer-usp { color: var(--muted) !important; }
/* Offer CTA -> gradient orange to match reference */
.offer-action .btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important;
}

/* ---- 9. Generic content cards ------------------------------------------- */
.step-card, .benefit-card, .faq-item, .testimonial-card, .bank-detail-card {
    border-radius: var(--radius-lg) !important;
}
.step-card:hover, .benefit-card:hover {
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-light) !important;
}
.step-num {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
}

/* ---- 10. Trust bar / misc accents --------------------------------------- */
.trust-icon { background: var(--primary-bg) !important; }
.disclosure {
    background: var(--primary-bg) !important;
    border-bottom-color: #d1fae5 !important;
    color: var(--primary-dark) !important;
}
.disclosure a { color: var(--primary) !important; }

/* ---- 11. pangad.html specific accents ----------------------------------- */
.interest-rate, .rate-type, .rating-num { color: var(--primary) !important; }
.stars { color: var(--accent) !important; }
.filter-btn.active,
.filter-btn:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.bank-detail-card.featured,
.bank-detail-card.recommended {
    border-color: var(--primary) !important;
}
.badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: #fff !important;
}

/* Footer link hover */
.footer-links a:hover, .footer-links-col a:hover { color: var(--primary-light) !important; }

/* =====================================================================
   POLISH LAYER — professional design upgrades (tables, prose, heroes,
   callouts, CTA, cards). Loaded after per-page inline styles.
   ===================================================================== */

/* ---- Article typography (both post templates: .prose and .article-content) ---- */
.prose h2, .article-content h2 {
    border-bottom: none !important;
    border-top: none !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    padding-left: 16px;
    border-left: 4px solid var(--primary);
    margin: 44px 0 16px !important;
    line-height: 1.3;
}
.prose h3, .article-content h3 { color: var(--primary-darker, #064E3B); margin: 28px 0 10px !important; }
.prose p, .article-content p { line-height: 1.85; }
.prose a, .article-content a { text-decoration-color: rgba(4,120,87,.35); text-underline-offset: 3px; transition: color .15s; }
.prose ul li::marker, .prose ol li::marker,
.article-content ul li::marker, .article-content ol li::marker { color: var(--primary); font-weight: 700; }
.prose .lead, .article-content .lead {
    font-size: 19px !important;
    color: var(--text) !important;
    background: linear-gradient(135deg, var(--primary-bg), #fff);
    border: 1px solid #d1fae5;
    border-radius: 14px;
    padding: 20px 24px;
}

/* ---- Tables: card look, emerald header, zebra + hover ---- */
.cost-table, .prose table, .article-content table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    margin: 26px 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 18px rgba(15,23,42,.06);
    font-size: 14.5px;
}
.cost-table th, .prose table th, .article-content table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: #fff !important;
    padding: 13px 16px !important;
    text-align: left;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cost-table td, .prose table td, .article-content table td {
    padding: 13px 16px !important;
    border-bottom: 1px solid var(--border) !important;
    background: #fff;
    font-size: 14.5px;
    color: var(--text);
}
.cost-table td:first-child, .prose table td:first-child, .article-content table td:first-child { font-weight: 600; color: var(--dark); }
.cost-table tr:nth-child(even) td, .prose table tr:nth-child(even) td, .article-content table tr:nth-child(even) td { background: #f8fafb !important; }
.cost-table tbody tr:hover td, .prose table tbody tr:hover td, .article-content table tbody tr:hover td { background: var(--primary-bg) !important; }
.cost-table tr:last-child td, .prose table tr:last-child td, .article-content table tr:last-child td { border-bottom: none !important; }
@media (max-width: 640px) {
    .prose { overflow-x: hidden; }
    .cost-table, .prose table, .article-content table { display: block; overflow-x: auto !important; overflow-y: hidden !important; -webkit-overflow-scrolling: touch; }
}

/* ---- Page hero: refined gradient + glow ---- */
.page-hero {
    background:
        radial-gradient(700px 340px at 85% -10%, rgba(16,185,129,.22) 0%, transparent 60%),
        radial-gradient(520px 300px at 8% 110%, rgba(5,150,105,.16) 0%, transparent 60%),
        linear-gradient(135deg, #0b1f2a 0%, #123a35 55%, var(--primary-darker, #064E3B) 100%) !important;
}
.page-hero h1 { letter-spacing: -.02em; }
.page-hero .meta-row span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 4px 14px; border-radius: 100px; }

/* ---- Callout / infoboxes ---- */
.callout {
    background: linear-gradient(135deg, var(--primary-bg), #fff) !important;
    border: 1px solid #d1fae5 !important;
    border-left: 4px solid var(--primary) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 14px rgba(4,120,87,.07);
    padding: 20px 24px !important;
}

/* ---- Inline CTA banner in articles ---- */
.cta-inline {
    background:
        radial-gradient(420px 200px at 90% 0%, rgba(255,255,255,.14) 0%, transparent 60%),
        linear-gradient(135deg, var(--primary), var(--primary-darker, #064E3B)) !important;
    border-radius: 20px !important;
    box-shadow: 0 18px 44px rgba(4,120,87,.28);
}
.cta-inline a {
    transition: transform .2s, box-shadow .2s;
    border-radius: 12px !important;
}
.cta-inline a:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.22); }

/* ---- Related-article & blog cards ---- */
.related-card, .blog-card {
    border-radius: 18px !important;
    background: #fff;
}
.related-card:hover, .blog-card:hover {
    border-color: var(--primary-light) !important;
    box-shadow: 0 18px 44px rgba(15,23,42,.12) !important;
}
.blog-card h3 { transition: color .2s; }
.blog-card:hover h3 { color: var(--primary-dark); }
.blog-img .img-icon, .related-img { text-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* ---- Offer cards (homepage) ---- */
.offer-card { border-radius: 18px !important; }
.offer-badge { border: 1px solid #d1fae5; }

/* ---- Breadcrumbs ---- */
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Buttons: subtle lift everywhere ---- */
.btn-primary, .btn-cta, .btn-white, .nav-cta, .result-btn, .btn-submit {
    transition: transform .2s, box-shadow .2s, background .2s !important;
}
.btn-primary:hover, .btn-cta:hover, .btn-white:hover { transform: translateY(-2px); }

/* ---- Section rhythm ---- */
.prose > p:first-of-type { margin-top: 4px; }
.disclosure { border-bottom: 1px solid #d1fae5; }

/* ---- Mobile fixes ---- */
/* Cookie banner must never cover the application modal (overlay z-index 9999) */
.cookie-banner { z-index: 9998 !important; }

@media (max-width: 640px) {
    /* Tighter tables on small screens */
    .cost-table th, .cost-table td,
    .prose table th, .prose table td { padding: 9px 10px !important; font-size: 12.5px !important; }
    /* Swipe hint on tables with 3+ columns (these overflow on phones) */
    .prose table:has(tr :nth-child(3))::before,
    .cost-table:has(tr :nth-child(3))::before {
        content: '↔ Libista tabelit sõrmega';
        display: block;
        font-size: 11px;
        color: var(--text-light, #64748b);
        padding: 6px 10px;
        background: var(--primary-bg, #ecfdf5);
    }
    .offers-table-wrapper::before {
        content: '↔ Libista tabelit sõrmega';
        display: block;
        font-size: 11px;
        color: #64748b;
        padding: 4px 2px 6px;
    }
    /* Modal breathing room on small phones */
    .modal-overlay { padding: 12px !important; }
    .result-details { gap: 8px }
}

/* ---- Mobile nav dropdown: clean, tappable, professional ---- */
@media (max-width: 768px) {
    .nav-links, .nav-menu {
        padding: 10px 16px 18px !important;
        gap: 0 !important;
        box-shadow: 0 24px 40px rgba(15,23,42,.14) !important;
        border-radius: 0 0 18px 18px;
        align-items: stretch !important;
        text-align: left;
    }
    .nav-links li, .nav-menu li { width: 100%; }
    .nav-links a:not(.nav-cta), .nav-menu a:not(.nav-cta) {
        display: block !important;
        width: 100%;
        padding: 14px 14px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: var(--dark, #0f172a) !important;
        border-radius: 10px;
        border-bottom: 1px solid var(--border, #e2e8f0);
        text-align: left !important;
    }
    .nav-links li:last-of-type a:not(.nav-cta),
    .nav-menu li:last-of-type a:not(.nav-cta) { border-bottom: none; }
    .nav-links a.active, .nav-links a.active-link,
    .nav-menu a.active, .nav-menu a.active-link {
        background: var(--primary-bg, #ecfdf5) !important;
        color: var(--primary-dark, #047857) !important;
        border-bottom-color: transparent;
    }
    .nav-links a:not(.nav-cta):active { background: var(--primary-bg, #ecfdf5); }
    .nav-links .nav-cta, .nav-menu .nav-cta {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 14px !important;
        padding: 15px 24px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 18px rgba(4,120,87,.25);
    }
    /* Hamburger -> X animation (both class conventions) */
    .hamburger.active span:nth-child(1), .hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
    .hamburger.active span:nth-child(2), .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3), .hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---- Offer cards on mobile: tidy 2x2 spec grid + full-width CTA ---- */
@media (max-width: 768px) {
    .offer-card { padding: 20px 16px !important; gap: 16px !important; }
    .offer-details {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px !important;
        justify-content: stretch !important;
        width: 100%;
    }
    .offer-detail {
        text-align: left !important;
        background: var(--bg, #f8fafb);
        border: 1px solid var(--border, #e2e8f0);
        border-radius: 10px;
        padding: 9px 12px;
        min-width: 0;
    }
    .offer-detail .detail-label { font-size: 10.5px !important; margin-bottom: 2px !important; }
    .offer-detail .detail-value { font-size: 14.5px !important; }
    .offer-detail .detail-value.rate { font-size: 17px !important; }
    .offer-action { width: 100%; }
    .offer-action .btn-primary {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 15px 24px !important;
        font-size: 16px !important;
    }
    .offer-logo { gap: 12px !important; }
    .offer-avatar { width: 92px !important; height: 48px !important; min-width: 92px; }
    /* Hero: tighter rhythm on phones */
    .hero-stats { justify-content: space-between; gap: 16px !important; width: 100%; }
    .hero-stat .num { font-size: 22px !important; }
    /* Section headers breathe less on mobile */
    .section-header { margin-bottom: 32px !important; }
}

/* ---- Trust bar on mobile: neat 2-col badge grid ---- */
@media (max-width: 768px) {
    .trust-bar { padding: 16px 0 !important; background: var(--bg, #f8fafb) !important; }
    .trust-items {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-auto-flow: dense;
        gap: 10px !important;
    }
    .trust-item {
        background: var(--white, #fff);
        border: 1px solid var(--border, #e2e8f0);
        border-radius: 12px;
        padding: 10px 12px;
        gap: 8px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        color: var(--text, #334155) !important;
        min-width: 0;
        box-shadow: 0 1px 4px rgba(15,23,42,.04);
    }
    .trust-item:nth-child(4) { grid-column: 1 / -1; justify-content: center; }
    .trust-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        flex-shrink: 0;
    }
}

/* Calculator extra stats: stack as rows on small phones */
@media (max-width: 480px) {
    .calc-extra { grid-template-columns: 1fr !important; padding: 6px 16px 10px !important; }
    .calc-extra-item {
        display: flex; justify-content: space-between; align-items: center;
        padding: 9px 0 !important; text-align: left !important;
        border-left: none !important;
    }
    .calc-extra-item + .calc-extra-item { border-top: 1px solid #d1fae5; }
    .calc-extra-item span { margin-bottom: 0 !important; }
}

/* ---- Hero stats: glass badge cards ---- */
.hero-stats { gap: 12px !important; width: 100%; }
.hero-stat {
    flex: 1;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 16px;
    padding: 14px 10px 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.hero-stat .num { font-size: 26px !important; letter-spacing: -.01em; }
.hero-stat .label { color: rgba(255,255,255,.7) !important; margin-top: 3px !important; font-size: 12.5px !important; }
@media (max-width: 768px) {
    .hero-stat { padding: 12px 6px 10px; border-radius: 14px; }
    .hero-stat .num { font-size: 20px !important; }
    .hero-stat .label { font-size: 11px !important; }
}

/* ---- Lender logo tiles: rectangular wordmark frames (match homepage offer-avatar) ---- */
.bank-logo, .lender-compare-table .lender-logo-tile {
    width: 96px !important;
    height: 50px !important;
    min-width: 96px;
    border-radius: 10px !important;
    background: #fff !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    overflow: hidden;
}
.bank-logo-lg {
    width: 116px !important;
    height: 58px !important;
    min-width: 116px;
    border-radius: 10px !important;
    background: #fff !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    overflow: hidden;
}
.bank-logo img, .bank-logo-lg img, .lender-compare-table .lender-logo-tile img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 5px 8px !important;
}
@media (max-width: 640px) {
    .bank-logo, .lender-compare-table .lender-logo-tile { width: 80px !important; height: 42px !important; min-width: 80px; }
    .bank-logo-lg { width: 96px !important; height: 50px !important; min-width: 96px; }
}

/* ---- Footer parity: style.css pages (pangad/kalkulaator) match main footer ---- */
.site-footer, .site-footer .footer-top { background: var(--dark, #0f172a) !important; }
.site-footer .footer-links-col h4 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 20px !important;
}
.site-footer .footer-links-col a { color: rgba(255,255,255,.6) !important; font-size: 14px !important; }
.site-footer .footer-brand p { color: rgba(255,255,255,.7) !important; font-size: 14px; }
.site-footer .footer-disclaimer { color: rgba(255,255,255,.4) !important; font-size: 12px !important; border-top: 1px solid rgba(255,255,255,.06); }
.site-footer .footer-disclaimer p { color: inherit !important; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1) !important; font-size: 13px; color: rgba(255,255,255,.7) !important; }
.site-footer .footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* ---- Pakkuja table cell: compact on mobile so data columns stay reachable ---- */
@media (max-width: 768px) {
    .bank-cell { min-width: 150px; }
    .bank-cell .bank-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px !important; }
    .bank-cell .bank-logo { width: 76px !important; height: 40px !important; min-width: 76px; }
    .bank-cell strong { font-size: 13.5px; }
    .bank-cell .bank-badge, .bank-cell [class*="badge"] { font-size: 10px !important; padding: 2px 8px !important; }
    .offers-table th, .offers-table td,
    .lender-compare-table th, .lender-compare-table td { padding: 10px 10px !important; font-size: 13px !important; }
    .monthly-pay strong { font-size: 14px !important; }
}

/* ---- Proper half-filled star (replaces the "½" text glyph) ---- */
.stars .star-half {
    position: relative;
    display: inline-block;
    color: #d6d3d1;                 /* empty half */
}
.stars .star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: inherit;
}
.stars .star-half { color: #d6d3d1; }
.stars .star-half::before { color: #f97316; }

/* ---- Fix text colors inside dark CTA banners in articles (were overridden
   by the .prose/.article-content typography rules above) ---- */
.prose .cta-inline h3, .article-content .cta-inline h3, .cta-inline h3 {
    color: #fff !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin: 0 0 8px !important;
    text-align: center !important;
}
.prose .cta-inline p, .article-content .cta-inline p, .cta-inline p {
    color: rgba(255,255,255,.88) !important;
}
.prose .cta-inline a, .article-content .cta-inline a, .cta-inline a.btn-cta {
    color: #fff !important;
    text-decoration: none !important;
}
/* Any anchor styled as a button inside article text must never inherit link styling */
.prose a[class*="btn"], .article-content a[class*="btn"] {
    text-decoration: none !important;
    color: #fff !important;
}

/* ---- Article hero meta pills: compact, no wrap-breakage ---- */
.page-hero .meta-row {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px !important;
}
.page-hero .meta-row span {
    white-space: nowrap;
    padding: 5px 14px !important;
    font-size: 13px !important;
    line-height: 1.4;
}

/* ---- Mobile tables: show a slim scrollbar so users know they can swipe ---- */
@media (max-width: 640px) {
    /* NOTE: no scrollbar-width/scrollbar-color here — setting them makes
       Chrome ignore the ::-webkit-scrollbar styles below (overlay scrollbar
       would stay invisible until touched). Webkit styles give a permanent bar. */
    .cost-table::-webkit-scrollbar, .prose table::-webkit-scrollbar,
    .article-content table::-webkit-scrollbar, .offers-table-wrapper::-webkit-scrollbar {
        display: block !important;
        height: 6px !important;
        width: 6px;
    }
    .cost-table::-webkit-scrollbar-track, .prose table::-webkit-scrollbar-track,
    .article-content table::-webkit-scrollbar-track, .offers-table-wrapper::-webkit-scrollbar-track {
        background: #e7ebe9; border-radius: 3px;
    }
    .cost-table::-webkit-scrollbar-thumb, .prose table::-webkit-scrollbar-thumb,
    .article-content table::-webkit-scrollbar-thumb, .offers-table-wrapper::-webkit-scrollbar-thumb {
        background: var(--primary, #047857); border-radius: 3px;
    }
}

/* ---- Homepage hero: tighter, calmer rhythm on mobile ---- */
@media (max-width: 768px) {
    .hero { padding: 40px 0 56px !important; }
    .hero-badge { margin-bottom: 18px !important; padding: 7px 14px !important; font-size: 12px !important; }
    .hero h1 { margin-bottom: 12px !important; line-height: 1.12 !important; }
    .subtitle {
        font-size: 15.5px !important;
        line-height: 1.65 !important;
        margin-bottom: 20px !important;
        color: rgba(255,255,255,.78) !important;
    }
    .hero-chips { gap: 8px !important; margin-bottom: 24px !important; }
    .hero-chips > * { font-size: 12.5px !important; padding: 7px 13px !important; }
    .hero-grid { gap: 28px !important; }
    /* Sections breathe a bit less on phones */
    .section { padding: 48px 0 !important; }
    .section-title { font-size: 25px !important; }
    .section-sub { font-size: 15px !important; }
    .step-card, .benefit-card { padding: 24px 20px !important; }
}

/* ---- Calculator result panel on mobile: balanced sizes, one-line CTA ---- */
@media (max-width: 768px) {
    .calc-result-top { padding: 16px !important; gap: 10px !important; }
    .calc-result .monthly { font-size: 13px !important; line-height: 1.4; }
    .calc-result .monthly strong { font-size: 26px !important; }
    .calc-result-top .btn-primary {
        white-space: nowrap !important;
        padding: 13px 18px !important;
        font-size: 15px !important;
        flex-shrink: 0;
    }
}
