/* ===== BASE ===== */
body {
    padding: 0;
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== NAV ===== */
nav {
    background-color: #1d428a;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 16px 22px;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255,255,255,0.12);
    border-bottom: 3px solid #c8102e;
    color: #fff;
}

/* ===== PAGE WRAPPER ===== */
.page-content {
    padding: 40px 50px 60px;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #1d428a;
    font-size: 48px;
    margin-bottom: 10px;
}

header p {
    color: #c8102e;
    font-size: 26px;
    margin-top: 0;
    font-weight: bold;
}

/* ===== INTRO / INFO BOX ===== */
.info-box {
    background-color: #1d428a;
    color: white;
    border-radius: 15px;
    text-align: center;
    padding: 30px 40px;
    margin-bottom: 40px;
}

.info-box h2 {
    color: white;
    margin-top: 0;
    font-size: 26px;
}

.info-box p {
    color: #dce8ff;
    font-size: 16px;
    line-height: 1.7;
    max-width: 900px;
    margin: 10px auto 0;
}

/* ===== SECTION HEADINGS ===== */
section h2 {
    text-align: center;
    color: #1d428a;
    font-size: 34px;
    margin-bottom: 30px;
}

/* ===== TABLE ===== */
table {
    margin: 20px auto;
    background-color: #f0f0f0;
    padding: 10px;
    border-collapse: collapse;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

thead {
    background-color: #1d428a;
    color: white;
}

th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    font-size: 13px;
}

.core-column-header {
    background-color: #c8102e;
}

td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 13px;
}

tbody tr:nth-child(odd) td {
    background-color: white;
}

tbody tr:nth-child(even) td {
    background-color: #e8e8e8;
}

.core-column {
    background-color: #ffe6e6;
    font-weight: bold;
    color: #c8102e;
}

.player-name {
    color: #1d428a;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.player-name:hover {
    color: #c8102e;
}

table a {
    color: #1d428a;
    text-decoration: none;
    font-weight: bold;
}

table a:hover {
    color: #c8102e;
    text-decoration: underline;
}

figure {
    margin: 0;
}

figcaption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 10px;
    font-size: 14px;
}

/* ===== ANALYSIS SECTION ===== */
.analysis-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    padding: 25px;
    background-color: #f8f8f8;
    border-radius: 15px;
    border-left: 5px solid #c8102e;
}

.data-highlight {
    flex: 1;
    min-width: 280px;
}

.data-highlight h3 {
    color: #c8102e;
    text-align: center;
    margin-bottom: 15px;
}

.data-highlight table {
    width: 100%;
    margin: 0;
    padding: 10px;
    background-color: white;
}

.analysis-text {
    flex: 1;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    line-height: 1.7;
    color: #333;
}

/* ===== MESSAGE BOX ===== */
#message-box-section {
    margin: 40px 0;
}

#output-message-box {
    background-color: #f8f8f8;
    border: 3px solid #1d428a;
    border-radius: 15px;
    padding: 25px 30px;
    min-height: 90px;
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

#output-message-box p {
    margin: 8px 0;
}

/* ===== WALKTHROUGH ===== */
.walkthrough {
    margin-bottom: 40px;
    padding: 25px 30px;
    background-color: #f8f8f8;
    border-radius: 15px;
    border-left: 5px solid #c8102e;
}

.walkthrough h3 {
    color: #c8102e;
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
}

.walkthrough p {
    line-height: 1.8;
    color: #333;
    margin-bottom: 12px;
    font-size: 16px;
}

.walkthrough-paragraph {
    background-color: white;
    padding: 18px 22px;
    border-radius: 10px;
    margin: 12px 0;
}

.highlight-trigger {
    color: #1d428a;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
    text-decoration: underline dotted;
}

.highlight-trigger:hover {
    background-color: #ffe6e6;
    color: #c8102e;
}

/* ===== GLOSSARY ===== */
.glossary-section {
    padding: 30px;
    background-color: #f0f0f0;
    border-radius: 15px;
    margin-bottom: 40px;
}

.glossary-section h2 {
    text-align: center;
    color: #1d428a;
    font-size: 34px;
    margin-bottom: 25px;
}

dl {
    line-height: 1.8;
}

dt {
    font-weight: bold;
    color: #c8102e;
    font-size: 17px;
    margin-top: 20px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: color 0.3s ease;
}

dt:hover {
    color: #1d428a;
}

dd {
    margin-left: 20px;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.6;
    display: none;
}

/* ===== HOMEPAGE CARDS ===== */
.cards-grid {
    display: flex;
    gap: 25px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 220px;
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 4px solid #1d428a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card h3 {
    color: #1d428a;
    margin-top: 0;
    font-size: 18px;
}

.card p {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.card a {
    display: inline-block;
    margin-top: 10px;
    color: #c8102e;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
}

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

.card .stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #c8102e;
    margin: 8px 0;
}

/* ===== KEY FINDINGS BOX ===== */
.key-findings {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.key-findings h3 {
    color: #1d428a;
    font-size: 22px;
    margin-top: 0;
    border-bottom: 2px solid #c8102e;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

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

.key-findings ul li {
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid #eee;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    position: relative;
}

.key-findings ul li:last-child {
    border-bottom: none;
}

.key-findings ul li::before {
    content: "▶";
    color: #c8102e;
    font-size: 12px;
    position: absolute;
    left: 0;
    top: 12px;
}

/* ===== RESOURCES PAGE ===== */
.resource-group {
    background-color: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 5px solid #1d428a;
}

.resource-group h3 {
    color: #1d428a;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.resource-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-group ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: #333;
}

.resource-group ul li:last-child {
    border-bottom: none;
}

.resource-group ul li a {
    color: #1d428a;
    font-weight: bold;
    text-decoration: none;
}

.resource-group ul li a:hover {
    color: #c8102e;
    text-decoration: underline;
}

.resource-group ul li .desc {
    display: block;
    color: #666;
    font-size: 13px;
    margin-top: 3px;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 25px 30px;
    background-color: #1d428a;
    color: white;
    margin-top: 50px;
}

footer p {
    margin: 4px 0;
    font-size: 14px;
    color: #dce8ff;
}

footer a {
    color: #c8102e;
    text-decoration: none;
}

/* ===== HOVER HELPERS (jQuery) ===== */
.row-highlight td {
    background-color: #fff3cd !important;
}

.cell-spotlight {
    background-color: #ffcccc !important;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(200,16,46,0.4);
}

.highlight-active {
    background-color: #ffe6e6;
    border: 2px solid #c8102e;
    padding: 5px;
    border-radius: 5px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
