/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffd700;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.calculator-inputs {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calculator-inputs h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1rem;
}

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e1e5e9;
    outline: none;
    margin: 0.5rem 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-value {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

/* Preset Scenarios */
.preset-scenarios {
    margin: 1.5rem 0;
}

.preset-scenarios h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.preset-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Calculate Button */
.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.calculator-results {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calculator-results h3 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
}

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

.result-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #667eea;
}

.result-icon {
    font-size: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

/* Chart Container */
.chart-container {
    margin: 2rem 0;
    height: 300px;
    background: white;
    border-radius: 10px;
    padding: 1rem;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.action-btn.primary {
    background: #28a745;
    color: white;
    border: none;
}

.action-btn.primary:hover {
    background: #218838;
}

.action-btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.action-btn.secondary:hover {
    background: #667eea;
    color: white;
}

/* Progress Table */
.progress-table {
    margin-top: 2rem;
}

.progress-table h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #667eea;
    color: white;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    font-size: 0.9rem;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Education Section */
.education-section {
    padding: 4rem 0;
    background: white;
}

.education-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.education-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.education-card p {
    color: #666;
    line-height: 1.6;
}

/* Advanced Strategies Section */
.strategies-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.strategies-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

.strategies-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.strategy-block {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.strategy-block h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.strategy-block p {
    color: #666;
    line-height: 1.6;
}

/* Allocation Section */
.allocation-section {
    padding: 4rem 0;
    background: white;
}

.allocation-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

.allocation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.allocation-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.allocation-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.allocation-chart {
    margin: 1.5rem 0;
}

.allocation-bar {
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    background: #e1e5e9;
}

.allocation-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.allocation-segment.stocks {
    background: #28a745;
}

.allocation-segment.bonds {
    background: #ffc107;
    color: #333;
}

.allocation-segment.cash {
    background: #6c757d;
}

.allocation-card p {
    color: #666;
    line-height: 1.6;
}

/* Ready Section */
.ready-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.ready-section h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 600;
}

.ready-section p {
    margin-bottom: 3rem;
    font-size: 1.25rem;
    opacity: 0.9;
}

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

.step-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.step-card p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.step-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.step-link:hover {
    opacity: 0.8;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

.faq-categories h3 {
    color: #333;
    margin: 2.5rem 0 1.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.faq-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question span {
    flex: 1;
    margin-right: 1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #667eea;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
    padding: 0 2rem 2rem 2rem;
}

.faq-answer p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
    font-size: 1rem;
}

.faq-answer ul {
    margin: 1rem 0 1rem 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 1rem;
}

.faq-answer strong {
    color: #333;
    font-weight: 600;
}

.faq-answer em {
    color: #667eea;
    font-weight: 500;
}

/* FAQ Specific Styles */
.fire-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.fire-type {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.fire-type h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.accuracy-factors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem 0;
}

.factor {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.factor h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.investment-strategy h4 {
    color: #333;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.investment-strategy ol,
.investment-strategy ul {
    margin-left: 1.5rem;
}

.access-strategies {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1rem 0;
}

.strategy {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.strategy h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.debt-strategy h4 {
    color: #333;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.healthcare-strategy h4 {
    color: #333;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.risk-analysis {
    margin: 1rem 0;
}

.risk-category {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.risk-category h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.risk-item {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #dc3545;
}

.mitigation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e8f5e8;
    border-radius: 4px;
    font-size: 0.95rem;
}

.motivation-strategies h4 {
    color: #333;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

/* Footer Styles */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #ffd700;
    color: #2c3e50;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 1;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(102, 126, 234, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .results-actions {
        flex-direction: column;
    }

    .accuracy-factors {
        grid-template-columns: 1fr;
    }

    .fire-types {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 1.5rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .chart-container {
        height: 250px;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .faq-answer {
        padding: 0 1.5rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav,
    .footer,
    .results-actions {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .calculator-results {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .chart-container {
        break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .education-card,
    .calculator-inputs,
    .calculator-results {
        border: 2px solid #333;
    }
}

/* Focus States for Accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.calculator-results {
    animation: fadeIn 0.5s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }