@font-face {
    font-family: 'Garamond Condensed';
    src: url('/fonts/garamond-condensed-reg.ttf') format('truetype');
}

:root {
    --primary-color: #0d9421;
    /* Teal */
    --secondary-color: #1e3a8a;
    /* Navy Bank Blue */
    --accent-color: #f59e0b;
    /* Amber for CTAs */
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-container {
    max-width: 400px;
    margin: 0 auto 0.5rem;
}

.main-logo {
    width: 100%;
    height: auto;
    display: block;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--navy);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(30, 58, 138, 0.1);
}

/* Calculator Card */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.affiliates {
    background: #fff;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

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

.form-row.two-columns {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.three-columns {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.form-row.three-columns .input-group {
    width: 32%;
}

@media (max-width: 1100px) {
    .form-row.two-columns {
        display: block;
        margin-bottom: 0;
    }

    .form-row.two-columns .input-group {
        width: 100%;
        margin-bottom: 1rem;
    }

    .form-row.three-columns {
        display: block;
        margin-bottom: 0;
    }

    .form-row.three-columns .input-group {
        width: 100%;
        margin-bottom: 1rem;
    }
}

canvas {
    font-family: Arial, Helvetica, sans-serif;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
}

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

.symbol {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 24px;
}

input[type="number"],
input[type="text"] {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

select,
button {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

.advanced-toggle {
    margin: 1rem 0;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-section {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #cbd5e1;
}

.advanced-section.active {
    display: block;
}

.results {
    text-align: center;
}

/* Results Display */
@media (min-width: 769px) {
    .results {
        padding-top: 88px;
    }
}

.results-heading {
    margin-bottom: 1rem;
}

.monthly-payment {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Affiliate Section */
.affiliates {
    margin-top: 5rem;
}

.affiliate-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.affiliate-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    text-align: center;
}

.affiliate-card:hover {
    transform: translateY(-5px);
}

.affiliate-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.affiliate-cta {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
}

/* AI Panel */
.ai-advisor {
    background: #fde8c4;
    border-left: 4px solid #f59e0b;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.disclaimer {
    color: #999;
    font-size: 0.9rem;
    margin-top: 1rem;
    line-height: 1;
}

/* Current Rates Section */
.current-rates-section {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    color: white;
}

/*
.current-rates-section .section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: left;
    color: white;
}
*/
.section-title {
    font-family: 'Garamond Condensed', serif;
    font-size: 40px;
    margin-bottom: 1.5rem;
    text-align: left;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.current-rates-section .section-title {
    color: white;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.rate-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rate-header {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.25rem;
}

.rate-value {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
    color: #0f172a;
}

.rate-change {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rate-change .basis {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.rate-change.down {
    color: #16a34a;
}

.rate-change.up {
    color: #dc2626;
}

.rate-change.neutral {
    color: #64748b;
}

.rate-period {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.sparkline {
    width: 100%;
    /*    height: 40px; */
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.sparkline svg {
    display: block;
}

.view-rates-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3a8a;
    text-decoration: none;
    width: 100%;
    padding-top: 0.75rem;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.view-rates-link:hover {
    color: #3b82f6;
}

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