/* Global Styles */
body {
    font-family: Arial, sans-serif;
    /* Requirement: Arial font */
    margin: 0;
    padding: 0;
    background-color: #e8cfcf;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Ribbon */
.top-ribbon {
    background-color: #404043;
    /* Dark Blue Ribbon */
    color: white;
    padding: 25px 30px;
    /* Increased padding by 10px from original 15px */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.ribbon-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-title {
    font-size: 30px;
    /* Requirement: Bigger Bold Arial Font Size of 24 */
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.sub-title {
    font-size: 14px;
    /* Requirement: smaller arial font size of 18 in italics */
    font-style: italic;
    font-weight: bold;
    /* Changed to bold */
    color: #e8f71d;
    /* Changed to Dark Orange */
    margin: 5px 0 0 0;
    opacity: 1;
    /* Removed opacity to ensure color pops */
}

.stats-section {
    display: flex;
    flex-direction: column;
    flex-direction: row;
    gap: 10px;
    /* Reduced gap */
    text-align: center;
    background-color: rgba(220, 215, 215, 0.386);
    /* Added white background */
    padding: 10px 20px;
    /* Added padding */
    border-radius: 8px;
    /* Added rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Added shadow for box effect */
    margin-left: 20px;
}

.stat-item {
    font-size: 18px;
    font-weight: bold;
    color: #f9f7f7;
    /* Changed to Dark Orange */
}

.stat-item span {
    font-size: 12px;
    font-weight: normal;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Layout */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 200px;
    /* Decreased width */
    background-color: #404043;
    /* Matching top ribbon color */
    /* Same as top ribbon */
    overflow-y: auto;
    border-right: 1px solid #002244;
    flex-shrink: 0;
}

.nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-link {
    padding: 12px 20px;
    /* Decreased vertical padding by 3px */
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
    font-weight: normal;
    /* Unbold */
    font-size: 14px;
    /* Decreased by 2 (assuming 16px default) */
    color: white;
    /* Same as top ribbon text */
}

.tab-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tab-link.active {
    background-color: #fff;
    color: #011328;
    /* Inverted for active state */
    border-left: 5px solid #FF8C00;
    /* Orange accent */
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: white;
}

h2 {
    color: #002D62;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Components */
.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.highlight-text {
    font-size: 18px;
    color: #333;
    line-height: 1.5;
}

.alert-box {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.alert-box.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-box.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Diagram */
.diagram-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.diagram-box {
    background: #f8f9fa;
    border: 2px solid #002D62;
    padding: 15px 30px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: #002D62;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.diagram-box.secondary {
    border-color: #6c757d;
    color: #6c757d;
    font-size: 0.9em;
    padding: 15px 30px;
}

.diagram-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 10px solid #002D62;
}

/* Icons Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
}

.icon-box {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s;
}

.icon-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Tables */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.styled-table thead tr {
    background-color: #002D62;
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dddddd;
    vertical-align: top;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid #002D62;
}

/* Cohorts */
.cohort-cards {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.cohort-cards .card {
    flex: 1;
    text-align: center;
    border-top: 4px solid #002D62;
}

.badge {
    background: #002D62;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

/* Charts */
.chart-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    flex: 1;
    min-width: 300px;
    height: 300px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Timeline */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #ddd;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid #002D62;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd)::after {
    right: -14px;
}

.timeline-item:nth-child(even)::after {
    left: -14px;
}

.timeline-content {
    padding: 20px;
    background-color: #eeeeee;
    /* Light Grey */
    border-radius: 6px;
    box-shadow: none;
    /* Removed shadow */
}

.duration {
    display: block;
    margin-top: 10px;
    color: #002D62;
    font-weight: bold;
    font-size: 0.9em;
}

/* Challenges */
.challenges-grid {
    display: flex;
    gap: 30px;
}

.challenge-col,
.mitigation-col {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.challenge-col h3 {
    color: #d9534f;
}

.mitigation-col h3 {
    color: #5cb85c;
}

/* Download Links */
.download-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.download-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.download-card:hover {
    border-color: #002D62;
    transform: translateY(-5px);
}

/* Title Card specific style */
.title-card {
    background-color: #eeeeee !important;
    /* Light Grey, forced to override .card white */
    box-shadow: none !important;
    /* Removed shadow */
}

/* Study Population Table Styles */
#population .styled-table th {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    /* Vertical line for header */
}

#population .styled-table th:last-child {
    border-right: none;
}

#population .styled-table td {
    border-right: 1px solid #ddd;
    /* Vertical line for cells */
}

#population .styled-table td:last-child {
    border-right: none;
}

/* Outcomes Table Styles */
#outcomes .styled-table th {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

#outcomes .styled-table th:last-child {
    border-right: none;
}

#outcomes .styled-table td {
    border-right: 1px solid #ddd;
}

#outcomes .styled-table td:last-child {
    border-right: none;
}