/* Year-Over-Year Growth Calculator Styles */

:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-color: #1e1e1e;
    --muted-color: #6c757d;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    padding: 80px 20px 60px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-icon {
    margin-top: 30px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Tool Section */
.tool-section {
    padding: 60px 20px;
}

.tool-card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.period-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.period-selector label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.period-select {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.period-select:hover {
    border-color: var(--primary-color);
}

.period-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.tool-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a02424;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 46, 46, 0.3);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #a8c95d;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Years Container */
.years-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.year-card {
    background: var(--background-color);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.year-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.year-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.remove-year-btn {
    background-color: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.remove-year-btn:hover {
    background-color: #c82333;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric-group {
    display: flex;
    flex-direction: column;
}

.metric-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.metric-group input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.metric-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.add-custom-metric {
    margin-top: 15px;
}

.add-custom-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-custom-btn:hover {
    background-color: rgba(198, 46, 46, 0.05);
}

/* Results Section */
.results-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid var(--border-color);
}

.results-section.hidden {
    display: none;
}

.results-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: linear-gradient(135deg, var(--primary-color), #a02424);
    color: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Chart Container */
.chart-container {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

#growthChart {
    max-width: 100%;
    height: 400px;
}

/* Metrics Table */
.metrics-table {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.metrics-table h3 {
    margin-bottom: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--background-color);
    font-weight: 600;
    color: var(--text-color);
}

.comparison-table tr:hover {
    background-color: rgba(198, 46, 46, 0.02);
}

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.growth-positive {
    color: var(--success-color);
}

.growth-negative {
    color: var(--danger-color);
}

.growth-neutral {
    color: var(--muted-color);
}

.trend-arrow {
    font-size: 1.2rem;
}

/* Projection Section */
.projection-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.projection-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.projection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.projection-item {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.projection-item h4 {
    font-size: 0.9rem;
    color: var(--muted-color);
    margin-bottom: 5px;
}

.projection-item p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Features Section */
.features-section {
    padding: 60px 20px;
    background: var(--white);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--muted-color);
    line-height: 1.6;
}

/* How to Use Section */
.how-to-section {
    padding: 60px 20px;
    background: var(--background-color);
}

.how-to-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
}

.steps-container {
    display: grid;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.step-content p {
    color: var(--muted-color);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #000000 100%);
    padding: 80px 20px;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-primary-cta:hover {
    background-color: #a02424;
    transform: scale(1.05);
}

.btn-secondary-cta {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn-secondary-cta:hover {
    background-color: var(--white);
    color: var(--secondary-color);
}

/* FAQ Section */
.faq-section {
    padding: 60px 20px;
    background: var(--white);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 20px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: var(--background-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--background-color);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 20px;
    color: var(--muted-color);
    line-height: 1.8;
    margin: 0;
}

/* Content Section */
.content-section {
    padding: 60px 20px;
    background: var(--background-color);
}

.content-section article {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.content-section p {
    margin-bottom: 20px;
    color: var(--muted-color);
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .tool-card {
        padding: 25px;
    }

    .period-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .period-select {
        width: 100%;
    }

    .tool-controls {
        flex-direction: column;
    }

    .tool-controls .btn {
        width: 100%;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-cta,
    .btn-secondary-cta {
        width: 100%;
        max-width: 300px;
    }

    #growthChart {
        height: 300px;
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .tool-card {
        padding: 20px;
    }

    .metric-value {
        font-size: 2rem;
    }

    .features-section h2,
    .how-to-section h2,
    .faq-section h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}