/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #004e89;
    --accent-color: #f77f00;
    --success-color: #06d6a0;
    --danger-color: #ef476f;
    --text-dark: #1a1a2e;
    --text-light: #4a5568;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
}

.calculator-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.calculator-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.calculator-inputs {
    padding: 2.5rem;
    background: linear-gradient(to bottom, var(--bg-white), var(--bg-light));
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.calculate-button,
.reset-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.calculate-button {
    background: var(--primary-color);
    color: white;
}

.calculate-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.reset-button {
    background: var(--text-light);
    color: white;
}

.reset-button:hover {
    background: var(--text-dark);
}

/* Results Section */
.calculator-results {
    padding: 2.5rem;
    background: var(--bg-white);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-results h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

.result-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-left: 4px solid white;
}

.result-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.result-card.highlight .result-label {
    opacity: 1;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.85rem;
    opacity: 0.7;
}

.result-card.highlight .result-description {
    opacity: 1;
}

/* Chart Container */
.chart-container {
    margin: 2.5rem 0;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

/* Comparison Table */
.comparison-section {
    margin-top: 2.5rem;
}

.comparison-section h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--secondary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-button {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.action-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
}

.content-section.alt-bg {
    background: var(--bg-white);
}

.content-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.content-block {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.content-section.alt-bg .content-block {
    background: var(--bg-light);
}

.content-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-block p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.content-block ul {
    list-style: none;
    padding-left: 0;
}

.content-block li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.content-block li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Steps Container */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.step p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Formula Section */
.formula-section {
    margin-top: 3rem;
}

.formula-section h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.formula-box {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
    max-width: 700px;
    margin: 0 auto;
}

.formula-box p {
    margin-bottom: 1rem;
    text-align: center;
}

.formula-box strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.formula-explanation {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

.formula-box ul {
    list-style: none;
    padding-left: 1rem;
}

.formula-box li {
    padding: 0.25rem 0;
    color: var(--text-light);
}

/* FIRE Types Grid */
.fire-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.fire-type-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.fire-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.fire-type-card.highlight {
    border-top-color: var(--primary-color);
    background: linear-gradient(to bottom, rgba(255, 107, 53, 0.05), var(--bg-white));
}

.fire-type-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.fire-type-card p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* FAQ Section */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-light);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer p {
    padding: 1.5rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tip-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
}

.tip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.tip-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Mistakes Container */
.mistakes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.mistake-item {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
}

.mistake-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--danger-color);
}

.mistake-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.resource-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.resource-card ul {
    list-style: none;
}

.resource-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.resource-card li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .tips-grid,
    .mistakes-container,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    header,
    footer,
    .cta-button,
    .action-buttons,
    .mobile-menu-toggle {
        display: none;
    }

    .calculator-results {
        box-shadow: none;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none;
}
