/* 🟢 The Canvas (Page Background) */
.blog-scroll-wrapper {
    background-color: var(--bg-canvas);
    padding: 30px 20px 40px 20px;
    /*min-height: 100vh;*/
}

/* 🟢 Main Layout Grid */
.blog-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.blog-main-card {
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #e1e4e8;
}

.blog-header { margin-bottom: 20px; }

.blog-header h1 {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #111;
    margin-bottom: 10px;
}

.article-hero-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    margin-bottom: 30px;
}

.hero-flag {
    width: 40px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hero-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pitch-blue);
    letter-spacing: 1px;
}

.blog-meta {
    color: #888;
    font-size: 0.8rem;
    padding-bottom: 15px;
}

.blog-content {
    font-size: 1.02rem;
    line-height: 1.6;
    color: #333;
}

.blog-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #111;
}

.blog-content a {
    color: var(--pitch-blue);
    text-decoration-color: rgba(0, 119, 204, 0.3);
}

.inset-timeline.pull-right {
    float: right;
    width: 260px;
    margin: 5px 0 20px 30px;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-top: 3px solid #1a1a1a;
    padding: 15px 20px;
    border-radius: 4px;
}

.inset-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #555;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.vertical-timeline {
    border-left: 2px solid #e1e4e8;
    padding-left: 18px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
}

.timeline-item::before {
    content: '';
    position: absolute;
    box-sizing: content-box;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid #f8f9fa;
    z-index: 1;
}

.timeline-item.win::before { background: #2ecc71; }
.timeline-item.draw::before { background: #f1c40f; }
.timeline-item.loss::before { background: #e74c3c; }

.t-flag {
    width: 18px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

blockquote {
    margin: 25px 0;
    padding: 15px 25px;
    background: #fcfcfc;
    border-left: 4px solid var(--pitch-blue);
    font-style: italic;
    font-size: 1.15rem;
    color: #555;
}

.table-wrapper {
    width: 100%;
    margin: 35px 0;
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.blog-content th {
    background: #f8fafc;
    color: #64748b;
    padding: 14px 20px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #e2e8f0;
}

.blog-content td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    vertical-align: middle;
    text-align: center;
}

.blog-content th:nth-child(2),
.blog-content td:nth-child(2) {
    text-align: left;
}

.table-flag {
    width: 20px;
    vertical-align: middle;
    margin-right: 8px;
    margin-top: -2px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.blog-content tbody tr:nth-child(even) { background-color: #fafafa; }
.blog-content tbody tr { transition: background-color 0.15s ease; }

@media (hover: hover) {
    .blog-content tbody tr:hover { background-color: #f1f5f9; }
    .blog-content tbody tr:hover td:nth-child(2) { color: var(--pitch-blue); }
    .blog-content tbody tr:hover td:first-child { box-shadow: none; }
}

.blog-content tr:last-child td { border-bottom: none; }

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    align-self: start;
    height: max-content;
}

.sidebar-module {
    background: #ffffff;
    border: 1px solid #eef0f2;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
    display: block;
}

@media (hover: hover) {
    .sidebar-module:hover {
        transform: translateY(-5px);
        border-color: var(--pitch-blue);
        box-shadow: 0 12px 24px rgba(0, 119, 204, 0.1);
    }
    .sidebar-module:hover a { color: #005580 !important; }
}


.sidebar-module h4 {
    margin-top: 0;
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-module a {
    color: var(--brand-slate) !important;
    font-weight: 700;
    transition: color 0.2s ease;
}

/* Add to main CSS */
.quadrant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}


.blog-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.blog-card-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}

.blog-card h4 {
    margin: 0;
    font-size: 1.05rem;
    color: #111;
    line-height: 1.4;
    transition: color 0.15s ease;
}

@media (hover: hover) {
    .blog-card:hover { background-color: #ffffff; }
    .blog-card:hover h4 {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
        color: #111;
    }
}

@media screen and (max-width: 900px) {
    .blog-container { grid-template-columns: 1fr; }
    .blog-main-card { padding: 30px 20px; }
    .blog-sidebar { display: none; }
    .inset-timeline.pull-right {
        float: none;
        width: 100%;
        margin: 20px 0;
    }
}

@media screen and (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
    }

    .blog-scroll-wrapper { padding: 15px 10px; }

    .blog-main-card {
        padding: 25px 20px;
        min-width: 0;
    }

    .blog-header h1 {
        font-size: 1.6rem;
        word-wrap: break-word;
    }

    .blog-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blog-sidebar {
        display: flex !important;
        position: static;
        margin-top: 10px;
    }

    .inset-timeline.pull-right {
        float: none;
        width: 100%;
        margin: 25px 0;
        box-sizing: border-box;
    }

    .table-wrapper {
        border-radius: 8px;
        margin: 25px 0;
        max-width: 100%;
    }

    .blog-grid { grid-template-columns: 1fr; }

    .blog-content table { min-width: 100% !important; }

    .blog-content th {
        padding: 8px 4px !important;
        font-size: 0.65rem !important; /* Shorter font for long headers */
        line-height: 1.1;             /* Tighter lines for wrapped text */
        white-space: normal !important; /* ⚡ Allows "BOOKIE IMPLIED %" to wrap to 2 lines */
        vertical-align: bottom;
    }

    .blog-content td {
        padding: 8px 4px !important;
        font-size: 0.8rem !important;
    }

    .table-flag {
        width: 14px !important;
        margin-right: 4px !important;
    }

    /* Add INSIDE your existing @media screen and (max-width: 768px) { ... } */
    .quadrant-grid {
        grid-template-columns: 1fr 1fr; /* Forces 2x2 grid */
        gap: 12px; /* Shrinks the gap so it fits */
    }
}

/* 🟢 Universal Blog Grid Base */
.blog-grid {
    display: grid;
    margin-bottom: 40px;
}

.blog-card-excerpt {
    margin: 10px 0 0 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* =========================================
   🟢 SMART SELECTORS: FOOTER VS MAIN INDEX
   ========================================= */

/* 1. Footer-Specific Styling */
.footysim-site-footer .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* ⚡ auto-fit makes them stretch */
    gap: 15px;
}

.footysim-site-footer .blog-card-date {
    font-size: 0.8rem;
    color: #888;       /* ⚡ Gray dates */
    margin-bottom: 8px;
    font-weight: 500;
}

/* 2. Main Blog Index Styling */
.dashboard-container .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* ⚡ auto-fill keeps them uniform */
    gap: 20px;
}

.dashboard-container .blog-card-date {
    font-size: 11px;
    color: #ff5e2f;    /* ⚡ Orange dates */
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* 🟢 Responsive Math Formula Wrapper */
.math-formula-container {
    text-align: center;
    margin: 35px 0;
    padding: 10px 5px;
    font-size: 1.4rem; /* Nice and large for desktop */
    color: #111;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Adjust scale for mobile screens */
@media screen and (max-width: 600px) {
    .math-formula-container {
        font-size: 1.05rem; /* Scales down to prevent overflow */
        margin: 25px 0;
    }
}

/* Ensure the generated MathML looks consistent */
.math-formula-container math {
    font-family: "Latin Modern Math", "STIX Next Math", serif;
}

/* 🟢 Minimal fix for tabular data alignment */
.tabular-stat {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    text-align: right;
}



