/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #0a342e 0%, #0d4539 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
nav {
    background-color: #0a342e;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background-color: #a98369;
}

/* Main content */
main {
    padding: 2rem 0;
}

/* Add space for the first section after navigation */
#overview {
    margin-top: 2rem;
}

.section {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section h2 {
    color: #0a342e;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #a98369;
    padding-bottom: 0.5rem;
}

/* Overview section */
.intro-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: justify;
}

/* Comparison grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.comparison-grid .better-alternative {
    grid-column: 1 / -1;
}

.comparison-card {
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid;
}

.current-act {
    background-color: #e8f5e8;
    border-left-color: #27ae60;
}

.proposed-reform {
    background-color: #fff3cd;
    border-left-color: #f39c12;
}

.better-alternative {
    background-color: #f5f0eb;
    border-left-color: #a98369;
}

.comparison-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.comparison-card ul {
    list-style: none;
}

.comparison-card li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.comparison-card li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #a98369;
    font-weight: bold;
}

.comparison-card strong {
    color: #0a342e;
}

/* Concerns section */
.concerns-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.concern-item {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 5px solid #e53e3e;
}

.concern-item h3 {
    color: #c53030;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.concern-item p {
    margin-bottom: 0.8rem;
}

.concern-item strong {
    color: #2d3748;
}

/* Alternatives section */
.alternatives-content {
    margin-top: 2rem;
}

.alternative-item {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid #38a169;
}

.alternative-item h3 {
    color: #2f855a;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Content sections with cards */
.content-cards {
    margin-top: 2rem;
}

.section-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f5f0eb;
    border-left: 4px solid #a98369;
    border-radius: 5px;
    font-weight: 500;
}

.content-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid #a98369;
}

.content-card h3 {
    color: #0a342e;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.content-card p {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.content-card ul {
    margin: 1rem 0 1rem 1.5rem;
    list-style-type: disc;
}

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

.content-card strong {
    color: #0a342e;
}

.summary-card {
    background: linear-gradient(135deg, #0a342e 0%, #0d4539 100%);
    color: white;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    border: none;
}

.summary-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    text-align: center;
}

.summary-card p {
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 1rem;
}

.summary-card strong {
    color: #a98369;
    font-weight: 600;
}

/* Charts section */
.chart-container {
    margin-top: 2rem;
}

.chart-item {
    margin-bottom: 3rem;
    background-color: #fafafa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.chart-item h3 {
    color: #0a342e;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-item canvas {
    max-height: 400px;
    margin: 1rem 0;
}

.chart-description {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-style: italic;
    margin-top: 1rem;
}

/* Footer */
footer {
    background-color: #0a342e;
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 0;
}

footer p {
    margin-bottom: 0.5rem;
}

footer em {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    nav {
        padding: 0.5rem 0;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    nav li {
        margin: 0.25rem;
    }

    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 1.5rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

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

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

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

    .section {
        padding: 1rem;
    }

    .comparison-card, .concern-item, .alternative-item {
        padding: 1rem;
    }
}

/* Variable charts responsive layout */
.variable-charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.variable-chart-item {
    position: relative;
}

.variable-chart-item h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: #0a342e;
    font-size: 1.1rem;
}

.variable-chart-item canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Responsive adjustments for variable charts */
@media (max-width: 768px) {
    .variable-charts-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .variable-chart-item canvas {
        height: 250px !important;
    }
}

@media (max-width: 480px) {
    .variable-chart-item canvas {
        height: 200px !important;
    }

    .variable-chart-item h4 {
        font-size: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll padding to account for sticky nav */
html {
    scroll-padding-top: 80px; /* Adjust based on nav height */
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-highlight {
    background-color: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Info boxes */
.info-box {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 3px solid;
    font-size: 0.9rem;
}

.info-box h4 {
    margin: 0 0 0.5rem 0;
    color: #0a342e;
    font-size: 0.95rem;
    font-weight: 600;
}

.info-box ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
    line-height: 1.5;
}

.info-box li {
    margin-bottom: 0.25rem;
}

.info-box p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.info-box.blue {
    background-color: #f5f0eb;
    border-left-color: #a98369;
}

.info-box.yellow {
    background-color: #fff9e6;
    border-left-color: #f39c12;
}

/* Responsive info boxes */
@media (max-width: 768px) {
    .info-box {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    .info-box h4 {
        font-size: 0.9rem;
    }
}

/* Tooltip styles */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 0.25rem;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #a98369;
    color: white;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    vertical-align: middle;
}

.tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #0a342e;
    color: white;
    text-align: left;
    border-radius: 6px;
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: normal;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #0a342e transparent transparent transparent;
}

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

@media (max-width: 768px) {
    .tooltip-text {
        width: 220px;
        margin-left: -110px;
        font-size: 0.8rem;
    }

    #accrualSummary {
        grid-template-columns: 1fr !important;
    }
}