:root {
    --primary: #0056b3;
    --secondary: #00a0e9;
    --accent: #ffc107;
    --dark: #333;
    --light: #f8f9fa;
    --light-blue: #e6f7ff;
    --light-yellow: #fff8e6;
    --success: #28a745;
    --danger: #dc3545;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
}

.logo-text { font-size: 24px; font-weight: 700; margin-left: 10px; }

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 20px; }
nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}
nav ul li a:hover { color: var(--primary); }

.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 80px 0;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1 1 500px;
    margin-right: 30px;
    margin-bottom: 30px;
}

.hero-form {
    flex: 1 1 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 30px;
    color: var(--dark);
}

.hero h1 { font-size: 2.5rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }
.hero-meta-note {
    display: inline-flex;
    align-items: center;
    margin: -12px 0 24px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    font-size: 0.92rem;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent);
    color: var(--dark);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.btn-primary { background-color: var(--accent); color: var(--dark); }
.btn-outline { background-color: transparent; border: 2px solid white; color: white; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

section { padding: 60px 0; }
.bg-alt { background-color: var(--light-blue); }
.bg-calculator { background-color: var(--light-yellow); }
.bg-advice { background-color: var(--light-yellow); }

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary);
}

#features .features,
#conditions .features,
.conditions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s;
}

.feature:hover { transform: translateY(-5px); }
.feature-icon { margin-bottom: 20px; }
.feature h3 { margin-bottom: 15px; color: var(--primary); }

.section-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

/* Decision Section - Checklist Style */
.decision-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 30px;
    align-items: start;
}

.decision-feature {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.08);
    border-left: 6px solid var(--primary);
}

.decision-intro {
    background: rgba(0, 86, 179, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    font-size: 1.05rem;
    color: var(--primary);
}

.decision-stack {
    display: grid;
    gap: 16px;
}

.decision-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 16px;
    padding: 20px;
    align-items: flex-start;
    transition: transform 0.2s;
}

.decision-item:hover {
    transform: translateX(5px);
}

.decision-index {
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.glossary-item,
.how-to-step {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.glossary-index {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light-blue);
    color: var(--primary);
    font-weight: 700;
}

/* Control Section - Grid Style */
.control-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.control-highlight {
    background: var(--primary);
    color: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.2);
}

.control-highlight h3, .control-highlight .section-chip {
    color: white;
}

.control-highlight .section-chip {
    background: rgba(255,255,255,0.2);
}

.control-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}

.control-list li {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--secondary);
    transition: translateY 0.2s;
}

.control-list li:hover {
    transform: translateY(-5px);
}

.control-list strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Alternatives Section - Advice Style */
.alternatives-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.alternative-primary {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 2px dashed var(--accent);
    position: relative;
}

.alternative-primary::after {
    content: "💡";
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 2rem;
}

.alternatives-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.alternative-row {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    padding: 22px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alternative-step {
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 193, 7, 0.2); /* Semi-transparent accent color */
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}


.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.case-card {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-top: 4px solid var(--accent);
}

.case-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.glossary-list {
    display: grid;
    gap: 14px;
}

.glossary-item {
    padding: 20px 22px;
}

.glossary-term {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.glossary-term h3 {
    color: var(--primary);
}

.how-to-list {
    display: grid;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto 40px;
    counter-reset: step;
}

.how-to-step {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.how-to-step-number {
    counter-increment: step;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.how-to-step-body {
    min-width: 0;
}

.how-to-step h3 {
    color: var(--primary);
    margin-bottom: 8px;
}

.how-to-step p {
    color: var(--dark);
}

.calculator {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input[type="range"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}
.form-group input[type="range"] { padding: 0; }
.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray);
}

.result {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    text-align: center;
}
.result p { margin-bottom: 10px; }
.result .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.table-container { overflow-x: auto; margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}
th { background-color: var(--primary); color: white; }
td a { color: var(--primary); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
tr:nth-child(even) { background-color: var(--light-gray); }

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    counter-reset: step;
    margin-bottom: 40px;
}
.step {
    flex: 1 1 200px;
    margin: 15px;
    position: relative;
    padding-left: 60px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.step h3 { margin-bottom: 10px; color: var(--primary); }

.pros-cons {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}
.pros, .cons {
    flex: 1 1 300px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
}
.pros h3, .cons h3 { margin-bottom: 20px; text-align: center; }
.pros h3 { color: var(--success); }
.cons h3 { color: var(--danger); }
.pros ul, .cons ul { padding-left: 20px; }
.pros li, .cons li { margin-bottom: 10px; }
.pros li::marker { color: var(--success); content: "✓ "; }
.cons li::marker { color: var(--danger); content: "✗ "; }

.faq { max-width: 800px; margin: 0 auto; }
.faq-item {
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}
.faq-question {
    padding: 15px 20px;
    background-color: var(--light-gray);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-answer {
    padding: 15px 20px;
    border-top: 1px solid var(--light-gray);
}

.source-updated {
    text-align: center;
    margin-bottom: 18px;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.source-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 24px;
    border-top: 4px solid var(--secondary);
}

.source-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.1rem;
}

.source-card a {
    color: var(--primary);
    text-decoration: none;
}

.source-card a:hover {
    text-decoration: underline;
}

.cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 60px 0;
}
.cta-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.cta-text {
    flex: 1 1 500px;
    margin-right: 30px;
    margin-bottom: 30px;
}
.cta-form {
    flex: 1 1 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 30px;
    color: var(--dark);
}
.cta h2 { margin-bottom: 20px; font-size: 2rem; }
.cta p { max-width: 600px; margin-bottom: 30px; font-size: 1.1rem; }

.text-center { text-align: center; }
.hero-result, .footer-result {
    background-color: var(--light-gray);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}
.hero-payment, .footer-payment {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}
.form-note { font-size: 0.8rem; color: var(--gray); text-align: center; margin-top: 10px; }
#hero-loan-form span[id$="-display"],
#footer-loan-form span[id$="-display"] { font-weight: bold; color: var(--primary); }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }

.breadcrumbs {
    background: var(--light-gray);
    padding: 12px 0;
    font-size: 0.9rem;
}
.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumbs span { color: var(--gray); }

@media (max-width: 768px) {
    .header-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
    }
    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: var(--primary);
        border-radius: 2px;
        transition: 0.3s;
    }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    nav {
        width: 100%;
        display: none;
        order: 3;
    }
    nav.active { display: block; }
    nav ul {
        flex-direction: column;
        margin-top: 15px;
        width: 100%;
    }
    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--light-gray);
        padding-bottom: 10px;
    }

    .responsive-table thead { display: none; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }
    .responsive-table tr {
        margin-bottom: 20px;
        background-color: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--light-gray);
    }
    .responsive-table td {
        text-align: right;
        padding: 12px 15px;
        position: relative;
        border-bottom: 1px solid var(--light-gray);
    }
    .responsive-table td:last-child {
        border-bottom: none;
        text-align: center;
        background-color: var(--light-blue);
        padding: 15px;
    }
    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 700;
        color: var(--dark);
    }

    .hero h1 { font-size: 2rem; }
    #features .features,
    #conditions .features,
    .conditions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .steps { flex-direction: column; }
    .step { margin-bottom: 30px; }
    .decision-layout,
    .case-grid {
        grid-template-columns: 1fr;
    }
    .source-grid {
        grid-template-columns: 1fr;
    }
    .how-to-step {
        grid-template-columns: 1fr;
    }
    .decision-item,
    .alternative-row {
        flex-direction: row; /* Keep them horizontal unless very narrow */
    }
    .decision-index,
    .alternative-step,
    .glossary-index {
        margin-bottom: 6px;
    }
    .how-to-step-number {
        margin-bottom: 6px;
    }
    .hero-text { margin-right: 0; }
    .cta-text { margin-right: 0; }
    .cta-content { flex-direction: column; }
}

@media (max-width: 480px) {
    #features .features,
    #conditions .features,
    .conditions-grid {
        grid-template-columns: 1fr;
    }
    .hero-meta-note {
        font-size: 0.85rem;
    }

    .decision-item,
    .alternative-row {
        flex-direction: column;
    }
}
