/**
 * RetireWise USA - Modern Fintech Design System
 * Lightweight, accessible, responsive, ultra-fast loading
 * Typography: 'Urbanist' for Body, 'Barlow Semi Condensed' for Headings
 */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800;1,900&family=Urbanist:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
    --font-sans: 'Urbanist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: var(--font-sans);
    --font-heading: 'Barlow Semi Condensed', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Light Theme */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    
    --border-color: #e2e8f0;
    --border-focus: #0ea5e9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    --primary: #059669; /* Fintech Emerald */
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    
    --accent: #2563eb; /* Financial Blue */
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;
    
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --max-w: 1200px;
    --header-height: 72px;
}

[data-theme="dark"] {
    --bg-base: #0b1120;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #0f172a;
    
    --border-color: #334155;
    --border-focus: #38bdf8;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: #064e3b;
    
    --accent: #38bdf8;
    --accent-hover: #0284c7;
    --accent-light: #0c4a6e;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 1.15rem; /* Increased one number higher: from 1.05rem to 1.15rem (~18.4px) */
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography: Barlow Semi Condensed strictly applied to ALL headings and title-like elements */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.brand-logo,
.stat-value,
.stat-label,
.metric-num,
.footer-heading,
.blog-title,
.blog-card-title,
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.partner-info h4,
.partner-callout h4,
.ad-label,
.result-title,
.calc-card-title,
.section-title,
.hero-title,
.modal-title,
th, .data-table th,
legend,
.form-legend,
.scenario-card h4,
.faq-question,
.faq-title {
    font-family: var(--font-heading) !important;
    letter-spacing: 0.015em;
    color: var(--text-main);
    line-height: 1.25;
    font-weight: 700;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
.blog-title a,
.footer-heading a,
.card h1 a, .card h2 a, .card h3 a, .card h4 a, .card h5 a, .card h6 a {
    font-family: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
    color: inherit;
    text-decoration: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
.blog-title a:hover {
    color: var(--primary);
}

h1, .h1 { font-size: clamp(2.35rem, 5vw, 3.25rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.85rem, 3.5vw, 2.5rem); font-weight: 800; }
h3, .h3 { font-size: clamp(1.45rem, 2.5vw, 1.9rem); font-weight: 700; }
h4, .h4 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; }
h5, .h5 { font-size: 1.25rem; font-weight: 700; }
h6, .h6 { font-size: 1.15rem; font-weight: 700; }

p {
    font-size: 1.15rem; /* Increased body text size */
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.7;
}

.card p {
    font-size: 1.12rem;
    line-height: 1.65;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main-content {
    flex: 1;
    padding-bottom: 3rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(1, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-4 { grid-template-columns: 1fr; }
    h1 { font-size: 2.15rem; }
    h2 { font-size: 1.65rem; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Navbar */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Brand Logo Design */
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-logo:hover {
    transform: translateY(-1px);
}
.brand-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(5, 150, 105, 0.3));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-logo:hover .brand-logo-mark {
    transform: scale(1.08) rotate(2deg);
}
.brand-svg {
    border-radius: 10px;
    display: block;
}
.brand-svg-full {
    height: 38px;
    width: auto;
    max-width: 225px;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.brand-logo:hover .brand-svg-full {
    filter: drop-shadow(0 2px 10px rgba(5, 150, 105, 0.25));
}
[data-theme="dark"] .brand-svg-full .rw-part-retire {
    fill: #f8fafc !important;
}
.brand-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    line-height: 1;
}
.brand-text-main {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.015em;
    text-transform: none;
}
.brand-text-accent {
    color: var(--primary);
    transition: color 0.2s ease;
}
.brand-tag-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.2rem 0.52rem;
    border-radius: 6px;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-btn {
    background: #f1f5f9; /* Light background */
    border: 2px solid #cbd5e1; /* Increased border thickness */
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
    background: #e2e8f0;
    border-color: var(--primary);
}

[data-theme="dark"] .theme-toggle-btn {
    background: #1e293b;
    border: 2px solid #475569; /* Increased border thickness in dark mode */
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: #334155;
    border-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: #f1f5f9; /* Light background */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    font-size: 1.35rem;
    cursor: pointer;
    color: var(--text-main);
}

[data-theme="dark"] .mobile-menu-toggle {
    background: #1e293b;
    border-color: #334155;
}

.mobile-theme-toggle-wrapper {
    display: none;
}

@media (max-width: 960px) {
    .mobile-menu-toggle { display: block; }
    .header-actions { display: none !important; } /* Hide theme toggle from outer header on mobile */
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.25rem;
        box-shadow: var(--shadow-lg);
        gap: 0.5rem;
    }
    .main-nav.open { display: flex; }
    .main-nav .nav-link {
        width: 100%;
        padding: 0.65rem 0.85rem;
        font-size: 1.05rem;
    }
    .mobile-theme-toggle-wrapper {
        display: block;
        margin-top: 0.75rem;
        padding-top: 0.85rem;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }
    .mobile-theme-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        padding: 0.75rem 1.25rem;
        font-size: 1.05rem;
        font-weight: 700;
        border: 2px solid #cbd5e1;
        border-radius: var(--radius-sm);
        cursor: pointer;
    }
    [data-theme="dark"] .mobile-theme-toggle {
        border: 2px solid #475569;
    }
}

/* Cards and Surfaces */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-highlight {
    border-left: 4px solid var(--primary);
}

/* Calculator Grid Layout */
.calc-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }
}

/* Form Controls and Sliders */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.form-label .val-badge {
    color: var(--primary);
    font-weight: 700;
}

.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.input-symbol {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
    font-size: 1rem;
}

.input-symbol.right {
    left: auto;
    right: 0.85rem;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.95rem;
    font-size: 1.05rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-with-symbol .form-control {
    padding-left: 2rem;
}

.input-with-symbol.has-suffix .form-control {
    padding-right: 2rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-range {
    width: 100%;
    margin-top: 0.5rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background-color: #f1f5f9; /* Light background color */
    color: var(--text-main);
    transition: all 0.15s ease;
    text-align: center;
    font-family: var(--font-sans);
}

.btn:hover {
    background-color: #e2e8f0;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
}

.btn-outline {
    background-color: #f1f5f9; /* Light background color */
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-outline:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: var(--text-main);
}

[data-theme="dark"] .btn {
    background-color: #1e293b;
    border-color: #334155;
    color: var(--text-main);
}

[data-theme="dark"] .btn:hover {
    background-color: #334155;
}

[data-theme="dark"] .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

[data-theme="dark"] .btn-outline {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .btn-outline:hover {
    background-color: #334155;
    border-color: #475569;
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

/* Results and Stat Cards */
.results-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-md);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.stat-box.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(37, 99, 235, 0.08));
    border-color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-box.featured .stat-value {
    font-size: 2.35rem;
    color: var(--primary);
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Chart Canvas Container */
.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
    margin-top: 1.25rem;
}

/* AdSense and Affiliate Slots */
.ad-slot-wrapper {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 100%;
    max-width: 728px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    position: relative;
}

.ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    display: block;
    margin-bottom: 0.5rem;
}

.ad-box {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1.25rem;
    background-color: var(--bg-base);
    border-radius: 4px;
}

/* Financial Partner Callout (Affiliate Widget) */
.partner-callout {
    background: linear-gradient(135deg, var(--bg-surface), var(--primary-light));
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 640px) {
    .partner-callout {
        flex-direction: column;
        text-align: center;
    }
}

.partner-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.partner-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Alert Boxes */
.alert-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Blog Styles */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.blog-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-base);
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-img {
    transform: scale(1.03);
}

.blog-card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.blog-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    font-family: var(--font-heading) !important;
}

.blog-excerpt {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.65;
    flex: 1;
}

/* Single Blog Article */
.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 1.5rem 0 2.5rem;
    box-shadow: var(--shadow-md);
}

.article-content {
    font-size: 1.18rem;
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    font-size: 1.95rem;
}

.article-content h3 {
    margin-top: 1.85rem;
    margin-bottom: 0.75rem;
    font-size: 1.55rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* Footer (AdSense Compliant) */
.site-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 2rem;
    margin-top: auto;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-heading {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    font-family: var(--font-heading) !important;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

/* Helpers */
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 46rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Fresh Modern Homepage Components
   ========================================================================== */
.hero-fresh {
    position: relative;
    padding: 4.5rem 0 3.5rem;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(5, 150, 105, 0.12), transparent 70%),
                radial-gradient(ellipse 60% 40% at 85% 15%, rgba(37, 99, 235, 0.08), transparent 60%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}
[data-theme="dark"] .hero-fresh {
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(16, 185, 129, 0.16), transparent 70%),
                radial-gradient(ellipse 60% 40% at 85% 15%, rgba(56, 189, 248, 0.12), transparent 60%),
                var(--bg-base);
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
    padding: 0.45rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.hero-pill-badge:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    position: relative;
    display: inline-block;
}
.pulse-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.6;
    animation: pulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes pulsePing {
    0% { transform: scale(0.9); opacity: 0.8; }
    70%, 100% { transform: scale(2.2); opacity: 0; }
}

.hero-headline {
    font-size: clamp(2.4rem, 5vw, 3.85rem);
    line-height: 1.15;
    font-weight: 900;
    max-width: 900px;
    margin: 0 auto 1.25rem;
    letter-spacing: -0.02em;
}
.hero-gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #0284c7 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero-subhead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 740px;
    margin: 0 auto 2.25rem;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}
.btn-hero-primary {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.95rem 2.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
    transition: all 0.25s ease;
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.45);
}
.btn-hero-secondary {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.95rem 2rem;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.25s ease;
}
.btn-hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Interactive Hero Freedom Estimator Widget */
.hero-estimator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    max-width: 860px;
    margin: 0 auto;
    padding: 2.25rem 2.25rem;
    position: relative;
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .hero-estimator-card {
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}
.hero-estimator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.hero-estimator-title {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}
.hero-estimator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
@media (max-width: 768px) {
    .hero-estimator-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-estimator-card { padding: 1.5rem 1.25rem; }
}
.estimator-slider-wrap {
    text-align: left;
}
.estimator-slider-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-heading);
}
.estimator-rates-toggle {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.rate-pill-btn {
    flex: 1;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    padding: 0.55rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.rate-pill-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}
.estimator-results-box {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(37, 99, 235, 0.06));
    border: 1px solid rgba(5, 150, 105, 0.25);
    border-radius: 14px;
    padding: 1.75rem;
    text-align: left;
}
[data-theme="dark"] .estimator-results-box {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(16, 185, 129, 0.3);
}
.estimator-metric-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.estimator-big-number {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}
.estimator-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-color);
}
.estimator-mini-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-heading);
}

/* Trust Proof Strip */
.trust-strip {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}
.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .trust-strip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .trust-strip-grid { grid-template-columns: 1fr; }
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}
.trust-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.trust-label-num {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.2;
    font-family: var(--font-heading);
}
.trust-label-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Fresh Bento Tool Cards */
.tool-card-fresh {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.tool-card-fresh::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.tool-card-fresh:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}
.tool-card-fresh:hover::before {
    opacity: 1;
}
.tool-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
}
.tool-category-badge {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    background: var(--accent-light);
    color: var(--accent);
    display: inline-block;
    margin-bottom: 0.75rem;
}
.tool-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
    line-height: 1.25;
}
.tool-features-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tool-feature-item {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tool-feature-item::before {
    content: '✓';
    color: var(--primary);
    font-weight: 900;
    font-size: 0.9rem;
}

/* Why Choose Us Comparison Grid */
.comparison-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}
.comparison-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    font-size: 1rem;
}
.comparison-row:last-child {
    border-bottom: none;
}
.comparison-header {
    background: var(--bg-card-hover);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}
@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.25rem;
    }
}

/* Print Mode for PDF/Export */
@media print {
    .site-header, .site-footer, .ad-slot-wrapper, .btn, .form-range, .theme-toggle-btn {
        display: none !important;
    }
    body { background: #fff !important; color: #000 !important; }
    .card, .results-card { border: none !important; box-shadow: none !important; }
    .calc-layout { display: block !important; }
}
