/* Reset and Base Styles */
* {
    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: #333;
    background-color: #f5f7fa;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header h2 {
    font-size: 1.5em;
    font-weight: 400;
    opacity: 0.9;
}

.report-date {
    margin-top: 15px;
    font-size: 0.95em;
    opacity: 0.8;
}

/* Tab Navigation */
.tab-nav {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.tab-nav .container {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.tab-btn {
    flex: 1;
    max-width: 250px;
    background: white;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 18px 20px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: #f5f7fa;
    color: #2a5298;
}

.tab-btn.active {
    color: #1e3c72;
    border-bottom-color: #2a5298;
    background: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #2a5298;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content */
main {
    padding: 40px 0;
}

.section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section h2 {
    color: #1e3c72;
    font-size: 2em;
    margin-bottom: 20px;
    border-bottom: 3px solid #2a5298;
    padding-bottom: 10px;
}

.section-desc {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

/* Accordion Styles */
.accordion {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.accordion-header {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    padding: 18px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.accordion-header span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.accordion-header.active .accordion-icon {
    transform: rotate(-180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 25px;
}

.accordion-content.active {
    max-height: 10000px;
    padding: 25px;
    border-top: 2px solid #e8f0fe;
}

.accordion-content .section-desc {
    margin-top: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

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

.data-table thead {
    background: #2a5298;
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    background: #1e3c72;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

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

/* Summary Box */
.summary-box {
    background: #e8f0fe;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #2a5298;
}

.key-findings h3 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.key-findings ul {
    list-style: none;
}

.key-findings li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    font-size: 1.05em;
}

.key-findings li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2a5298;
    font-weight: bold;
    font-size: 1.2em;
}

/* Methodology Box */
.methodology-box {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.methodology-box h3 {
    color: #1e3c72;
    margin-top: 20px;
    margin-bottom: 10px;
}

.methodology-box ul {
    margin-left: 20px;
}

.methodology-box li {
    margin: 8px 0;
}

/* Post Cards */
.post-card {
    background: #f9f9f9;
    border-left: 4px solid #2a5298;
    padding: 20px;
    margin: 15px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-card:hover {
    background: #f0f4f8;
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.post-brand {
    font-weight: 600;
    color: #2a5298;
}

.post-date {
    color: #666;
    font-size: 0.9em;
}

.post-text {
    margin: 15px 0;
    line-height: 1.8;
}

.post-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.issue-tag {
    background: #fff3cd;
    color: #856404;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    border: 1px solid #ffc107;
}

.post-link {
    display: inline-block;
    margin-top: 10px;
    color: #2a5298;
    text-decoration: none;
    font-weight: 500;
}

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

/* Platform Sections (nested accordions in Evidence tab) */
.platform-section {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.platform-header {
    background: #f5f7fa;
    color: #1e3c72;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.platform-header:hover {
    background: #e8f0fe;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.platform-header.active .toggle-icon {
    transform: rotate(-180deg);
}

.platform-posts {
    padding: 20px;
    background: white;
}

.platform-posts.collapsed {
    display: none;
}

/* Download Box */
.download-box {
    background: #e8f0fe;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.download-info {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #2a5298;
    color: white;
}

.btn-primary:hover {
    background: #1e3c72;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Search and Filter */
.search-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#searchInput {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

#searchInput:focus {
    outline: none;
    border-color: #2a5298;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 10px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: white;
}

/* Progress Bar */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #2a5298;
    background: white;
    color: #2a5298;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    background: #2a5298;
    color: white;
}

.pagination button.active {
    background: #2a5298;
    color: white;
}

/* Footer */
footer {
    background: #1e3c72;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    header h2 {
        font-size: 1.2em;
    }

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

    .tab-nav .container {
        flex-direction: column;
        gap: 0;
    }

    .tab-btn {
        max-width: none;
        border-bottom: 1px solid #e0e0e0;
        border-left: 3px solid transparent;
    }

    .tab-btn.active {
        border-bottom: 1px solid #e0e0e0;
        border-left-color: #2a5298;
    }

    .tab-btn.active::after {
        display: none;
    }

    .section {
        padding: 20px;
    }

    .accordion-header {
        padding: 15px 20px;
        font-size: 1em;
    }

    .accordion-content.active {
        padding: 20px;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

    .stat-number {
        font-size: 2.5em;
    }
}

/* Print Styles */
@media print {
    .tab-nav,
    .download-box,
    .search-box,
    .pagination,
    footer {
        display: none;
    }

    .tab-content {
        display: block !important;
    }

    .accordion-content {
        max-height: none !important;
        display: block !important;
        padding: 20px !important;
    }

    .section {
        break-inside: avoid;
        box-shadow: none;
    }

    .platform-posts {
        display: block !important;
    }
}
