/* 45F.org - Section 45F Child Care Tax Credit Calculator
   Main Stylesheet
   ================================================== */

/* CSS Variables */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2e7d32;
    --accent-color: #ff9800;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --info-color: #2196f3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a87 100%);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a87 100%);
    color: var(--white);
    padding: 3rem 2rem 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.badge {
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Calculator Section */
.calculator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: -3rem;
}

.calculator-card, .results-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
}

.card-header h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.calculate-btn {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.calculate-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
}

/* Results */
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-light);
}

.result-value {
    font-weight: 600;
    color: var(--text-dark);
}

.result-highlight {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #43a047 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

.result-highlight .big-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.result-highlight .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.credit-rate-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Info Cards */
.info-section {
    margin-top: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Key Facts Section */
.facts-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.facts-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.fact-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.fact-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.fact-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Share Section */
.share-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.share-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn.copy {
    background: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.share-btn.linkedin {
    background: #0077b5;
    color: var(--white);
}

.share-btn.facebook {
    background: #0056b3; /* Darker for better contrast */
    color: var(--white);
}

.share-btn.twitter {
    background: #007bb5; /* Darker for better contrast */
    color: var(--white);
}

/* Qualified Expenses Section */
.expenses-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.expenses-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.expense-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.expense-icon {
    color: var(--secondary-color);
    font-size: 1.25rem;
}

.expense-item p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    color: var(--text-light);
    margin-top: 0.75rem;
    display: none;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a87 100%);
    color: var(--white);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-top: 3rem;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn.primary {
    background: var(--secondary-color);
    color: var(--white);
}

.cta-btn.secondary {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

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

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

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

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.disclaimer {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    border-radius: 6px;
    padding: 0.75rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    font-weight: normal;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Did You Know Box */
.did-you-know {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid var(--accent-color);
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
}

.did-you-know h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.did-you-know p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .expenses-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .result-highlight .big-number {
        font-size: 2rem;
    }

    .facts-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* Contact Form Section */
.contact-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.contact-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.contact-section > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

/* HubSpot Form Styling Overrides */
.contact-form-container .hs-form {
    font-family: inherit !important;
}

.contact-form-container .hs-form-field {
    margin-bottom: 1.25rem;
}

.contact-form-container .hs-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form-container .hs-input {
    width: 100% !important;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form-container .hs-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form-container select.hs-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.contact-form-container textarea.hs-input {
    min-height: 120px;
    resize: vertical;
}

.contact-form-container .hs-submit {
    margin-top: 1.5rem;
}

.contact-form-container .hs-button {
    background: var(--secondary-color) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    width: 100%;
}

.contact-form-container .hs-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4) !important;
}

.contact-form-container .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.contact-form-container .hs-error-msg {
    color: #d32f2f;
    font-size: 0.875rem;
}

.contact-form-container .submitted-message {
    background: #e8f5e9;
    color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}


/* Enhanced FAQ Readability */
.faq-question {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--secondary-color);
}

.faq-answer {
    background-color: #fafafa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

/* Trust Bar Styling */
.trust-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Calculator Optimization */
@media (max-width: 768px) {
    .calculate-btn {
        position: sticky;
        bottom: 10px;
        z-index: 100;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
}


/* ROI & Business Impact Section */
.roi-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 12px;
}

.roi-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.roi-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.roi-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.roi-stat {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.roi-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.roi-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Comparison Table Section */
.comparison-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.comparison-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.comparison-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.comparison-table th:first-child {
    border-radius: 8px 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 8px 0 0;
}

.comparison-table tbody tr:hover {
    background: #f5f7fa;
}

.comparison-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.comparison-table tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* Expenses intro styling */
.expenses-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}


/* Legal Pages Styling */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.legal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.legal-content h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.legal-content .last-updated {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-content h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.legal-content h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-color);
}

.legal-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-content a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.legal-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 1.5rem;
    }
    
    .legal-content h1 {
        font-size: 1.8rem;
    }
    
    .legal-content h2 {
        font-size: 1.2rem;
    }
}


/* Scenarios Section */
.scenarios-section {
    padding: 3rem 2rem;
    background: var(--light-bg);
}

.scenarios-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.scenario-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.scenario-card.highlighted {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #f0fff4 0%, #fff 100%);
}

.scenario-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.scenario-card p {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.scenario-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scenario-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-color);
}

.scenario-card ul li:last-child {
    border-bottom: none;
}

/* FMV Warning */
.fmv-warning {
    display: none;
    color: #d32f2f !important;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Expense Category Styling */
#expenseCategory {
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .scenarios-section {
        padding: 2rem 1rem;
    }
}


/* States Hub Page Styles */
.state-hub-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.state-hub-hero h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.state-hub-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.states-hub-page {
    padding-bottom: 3rem;
}

/* Stacking Explainer */
.stacking-explainer {
    padding: 3rem 2rem;
    background: var(--white);
}

.stacking-explainer h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stacking-explainer > .container > p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: var(--text-color);
}

.stack-example {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.stack-item {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    text-align: center;
    min-width: 150px;
}

.stack-item.federal {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: var(--white);
}

.stack-item.state {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2e7d32 100%);
    color: var(--white);
}

.stack-item.total {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: var(--white);
}

.stack-item .percentage {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.stack-item .label {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.stack-plus, .stack-equals {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
}

/* State Selector Section */
.state-selector-section {
    padding: 3rem 2rem;
    background: var(--light-bg);
}

.state-selector-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.state-selector-section > .container > p {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: var(--white);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.state-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.state-card.has-credit {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #f0fff4 0%, #fff 100%);
}

.state-card.has-incentive {
    border-color: #1565c0;
    background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}

.state-abbr {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.state-name {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    text-align: center;
}

.state-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.state-badge.credit {
    background: var(--secondary-color);
    color: var(--white);
}

.state-badge.incentive {
    background: #1565c0;
    color: var(--white);
}

.state-badge.none {
    background: #9e9e9e;
    color: var(--white);
}

/* States CTA */
.states-cta {
    padding: 4rem 2rem;
    background: var(--primary-color);
    text-align: center;
}

.states-cta h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.states-cta p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.cta-btn.primary {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-btn.primary:hover {
    background: #2e7d32;
    transform: translateY(-2px);
}

/* State Credit Display in Results */
.state-credit {
    color: var(--secondary-color) !important;
    font-weight: 700;
}

.combined-label {
    display: block;
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Navigation active state */
nav a.active {
    color: var(--secondary-color);
    font-weight: 700;
}

@media (max-width: 768px) {
    .state-hub-hero h1 {
        font-size: 1.8rem;
    }
    
    .stack-example {
        flex-direction: column;
    }
    
    .stack-plus, .stack-equals {
        transform: rotate(90deg);
    }
    
    .state-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}


/* State Page Styles */
.state-page {
    padding-bottom: 0;
}

.state-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    padding: 3rem 2rem 4rem;
    color: var(--white);
    text-align: center;
}

.state-hero.california-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d47a1 50%, #1565c0 100%);
}

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    text-align: center;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.state-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.state-hero .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

/* Stacking Math Section */
.stacking-math-section {
    padding: 3rem 2rem;
    background: var(--white);
}

.stacking-math-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-color);
}

.stack-cards {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.stack-card {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.stack-card.federal {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: var(--white);
}

.stack-card.state {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: var(--white);
}

.stack-percentage {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stack-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.stack-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.stack-plus-sign {
    display: flex;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
}

.strategy-note {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    max-width: 800px;
    margin: 0 auto;
}

.strategy-note h4 {
    color: #e65100;
    margin-bottom: 0.5rem;
}

.strategy-note p {
    color: var(--text-color);
    margin: 0;
}

/* Example Section */
.state-example-section {
    padding: 3rem 2rem;
    background: var(--light-bg);
}

.state-example-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.example-table-wrapper {
    overflow-x: auto;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.example-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.example-table th,
.example-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.example-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.example-table .total-row {
    background: #e8f5e9;
}

.example-table .total-row td {
    border-bottom: none;
}

.california-advantage {
    background: #e8f5e9;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    max-width: 800px;
    margin: 0 auto;
}

.california-advantage h4 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

/* Compliance Section */
.compliance-section {
    padding: 3rem 2rem;
    background: var(--white);
}

.compliance-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.compliance-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.compliance-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.compliance-card p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.resource-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.resource-link:hover {
    text-decoration: underline;
}

/* Landscape Section */
.landscape-section {
    padding: 3rem 2rem;
    background: var(--light-bg);
}

.landscape-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.landscape-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
}

.landscape-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.landscape-content h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
}

.market-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}

.market-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.market-list li::before {
    content: "📍";
    position: absolute;
    left: 0;
}

/* State FAQ */
.state-faq-section {
    padding: 3rem 2rem;
    background: var(--white);
}

.state-faq-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.state-faq-section .faq-item {
    max-width: 800px;
    margin: 0 auto 1rem;
}

/* State CTA */
.state-cta-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    text-align: center;
}

.state-cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.state-cta-section p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.state-cta-section .cta-btn.primary {
    background: var(--secondary-color);
    color: var(--white) !important;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.state-cta-section .cta-btn.primary:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.cta-btn.secondary {
    display: inline-block;
    background: transparent;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--white);
    transition: all 0.3s ease;
}

.cta-btn.secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .state-hero h1 {
        font-size: 1.8rem;
    }
    
    .stack-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .stack-plus-sign {
        transform: rotate(90deg);
    }
    
    .stack-card {
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}



/* Enhanced State Cards with Callouts - States Hub Page */
.states-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
}

.states-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.states-hero .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.states-grid-section {
    padding: 3rem 2rem;
    background: var(--light-bg);
}

.states-grid-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.states-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    margin-top: 20px;
}

.states-list .state-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 160px;
}

.states-list .state-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.states-list .state-card.has-credit {
    border-left: 4px solid var(--secondary-color);
}

.states-list .state-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.states-list .state-card .state-abbr {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 45px;
}

.states-list .state-card .state-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.states-list .state-badge {
    position: static;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    width: fit-content;
}

.states-list .state-badge.credit {
    background: #c6f6d5;
    color: #22543d;
}

.states-list .state-badge.incentive {
    background: #bee3f8;
    color: #2a4365;
}

.states-list .state-badge.pending {
    background: #fefcbf;
    color: #744210;
}

.states-list .state-badge.none {
    background: #e2e8f0;
    color: #4a5568;
}

.state-callout {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.stacking-explainer {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stack-visual {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.stack-bar {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.stack-bar.federal {
    background: var(--primary-color);
    color: white;
}

.stack-bar.state {
    background: var(--secondary-color);
    color: white;
}

.stack-bar.total {
    background: #1a365d;
    color: white;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .states-list {
        grid-template-columns: 1fr;
    }
    
    .stacking-explainer {
        padding: 20px;
    }
    
    .states-hero h1 {
        font-size: 1.8rem;
    }
}


/* Enhanced Visible Breadcrumb Navigation */
.container > .breadcrumb {
    background: var(--white);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 1200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.container > .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.container > .breadcrumb li {
    display: flex;
    align-items: center;
    color: #374151;
}

.container > .breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 10px;
    color: #9ca3af;
    font-weight: 500;
}

.container > .breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.container > .breadcrumb a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.container > .breadcrumb li[aria-current="page"] {
    color: #1f2937;
    font-weight: 600;
}


/* State Search and Filter */
.state-search-container {
    max-width: 800px;
    margin: 0 auto 30px;
}

.state-search {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: var(--white);
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 15px;
}

.state-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background: var(--white);
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

@media (max-width: 600px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}


/* Intermediary Platforms Section */
.intermediary-section {
    padding: 3rem 2rem;
    background: #f0f9ff;
}

.intermediary-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.intermediary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 2rem auto;
}

.intermediary-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.intermediary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.intermediary-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.intermediary-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.intermediary-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.intermediary-note {
    background: #fff;
    border-left: 4px solid #2196f3;
    padding: 1.25rem 1.5rem;
    border-radius: 0 8px 8px 0;
    max-width: 900px;
    margin: 0 auto;
    font-size: 0.95rem;
    color: var(--text-dark);
}

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


/* Heading hierarchy fix - style h3 in specific sections like h4 */
.did-you-know h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.scenario-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}


/* ================================================== 
   PageSpeed Optimizations - CLS & Performance Fixes
   ================================================== */

/* Fix CLS: Reserve space for calculator section */
.calculator-section {
    min-height: 600px; /* Prevent layout shift while calculator loads */
}

/* Fix CLS: Reserve space for hero section */
.hero {
    min-height: 280px; /* Prevent hero content from shifting */
}

.state-hero, .states-hero {
    min-height: 200px; /* Prevent state page hero shifts */
}

/* Fix CLS: Reserve space for results card */
.results-card {
    min-height: 400px; /* Prevent results area from collapsing */
}

/* Font display optimization - prevent FOIT/FOUT layout shifts */
@font-face {
    font-display: swap;
}

/* Ensure system fonts load immediately */
body {
    font-display: swap;
}

/* Mobile CLS fixes */
@media (max-width: 768px) {
    .calculator-section {
        min-height: 900px; /* Taller on mobile due to stacked layout */
    }
    
    .hero {
        min-height: 320px;
    }
    
    .results-card {
        min-height: 350px;
    }
}

/* Footer semantic styling - replace h4 with div for accessibility */
.footer-section .footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    margin-bottom: 1rem;
}

/* Tap target optimization for mobile */
@media (max-width: 768px) {
    nav a,
    .cta-button,
    .cta-btn,
    .share-btn,
    footer a {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
    }
}


/* Improved Scenario Card Spacing */
.scenario-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.scenario-card ul li {
    padding: 0.75rem 0;
    line-height: 1.5;
}

.scenario-card h3 {
    margin-bottom: 1rem;
}

/* Better ROI Section Spacing */
.roi-section h2 {
    margin-bottom: 1rem;
}

.roi-intro {
    margin-bottom: 2.5rem;
}

.roi-item {
    padding: 2rem;
}

.roi-item p {
    line-height: 1.6;
}
