/* ==========================================================================
   v2-article.css — Article/post layout with sticky ToC sidebar
   Prefix: v2a- (v2 article)
   ========================================================================== */


/* ---------- Page reset ---------- */

body.v2-article #right-sidebar { display: none; }
body.v2-article #primary { width: 100%; float: none; }


/* ---------- Layout ---------- */


.v2a-layout {
    display: grid;
    grid-template-columns: 830px 1fr;
    gap: 32px;
    align-items: start;
}


/* ---------- Article ---------- */

.v2a-article {
    max-width: 830px;
    min-width: 0;
}

.v2a-hero-img {
    border-radius: var(--v2-radius, 8px) var(--v2-radius, 8px) 0 0;
    overflow: hidden;
    background: #e8ecee;
}

.v2a-hero-img img {
    width: 100%;
    height: auto;
    display: block;
}

.v2a-article-inner {
    background: #fff;
    border-radius: 0 0 var(--v2-radius, 8px) var(--v2-radius, 8px);
    padding: 32px 40px 40px;
}

.v2a-hero-img + .v2a-article-inner {
    border-radius: 0 0 var(--v2-radius, 8px) var(--v2-radius, 8px);
}

.v2a-article:not(:has(.v2a-hero-img)) .v2a-article-inner {
    border-radius: var(--v2-radius, 8px);
}


/* ---------- Header / Meta ---------- */

.v2a-header {
    margin-bottom: 28px;
}

.v2a-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.v2a-author-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.v2a-author-name {
    display: block;
    font-weight: 600;
    font-size: .9em;
    color: var(--v2-text, #343434);
    text-decoration: none;
}

.v2a-author-name:hover { text-decoration: underline; }
.v2a-author-name:visited { color: var(--v2-text, #343434); }

.v2a-date {
    display: block;
    font-size: .82em;
    color: var(--v2-text-muted, #666);
    margin-top: 1px;
}

.v2a-title {
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--v2-text, #343434);
    margin: 0;
}


/* ---------- Content typography ---------- */

.v2a-content {
    font-size: .95em;
    line-height: 1.75;
    color: var(--v2-text, #343434);
}

.v2a-content h2 {
    font-size: 1.4em;
    font-weight: 700;
    color: #12475f;
    margin: 36px 0 14px;
    padding-top: 8px;
}

.v2a-content h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--v2-text, #343434);
    margin: 28px 0 10px;
}

.v2a-content p {
    margin: 0 0 16px;
}

.v2a-content ul,
.v2a-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.v2a-content li {
    margin-bottom: 6px;
}

.v2a-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--v2-radius, 8px);
    margin: 8px 0;
}

.v2a-content a {
    color: #12475f;
    text-decoration: underline;
}

.v2a-content a:hover {
    color: var(--v2-teal, #1a5c5c);
}

.v2a-content blockquote {
    border-left: 4px solid var(--v2-green, #5bae02);
    margin: 20px 0;
    padding: 12px 0 12px 20px;
    color: var(--v2-text-muted, #666);
    font-style: italic;
}


/* ---------- ToC sidebar ---------- */

.v2a-toc-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
}

.v2a-toc {
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    overflow: hidden;
}

.v2a-toc-header {
    background: #12475f;
    color: #fff;
    font-size: .82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 10px 16px;
}

.v2a-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2a-toc-list li {
    border-bottom: 1px solid #f0f0f0;
}

.v2a-toc-list li:last-child {
    border-bottom: none;
}

.v2a-toc-list li {
    padding: 0;
}

.v2a-toc-list a {
    display: block;
    padding: 10px 16px;
    font-size: .82em;
    line-height: 1.4;
    color: var(--v2-text-muted, #666);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background .1s, color .1s, border-color .1s;
}

.v2a-toc-list a:visited {
    color: var(--v2-text-muted, #666);
}

.v2a-toc-list a:hover {
    background: #f5f8fa;
    color: #12475f;
}

.v2a-toc-list a.v2a-toc-active {
    color: #12475f;
    font-weight: 600;
    border-left-color: #12475f;
    background: #edf3f6;
}


/* ---------- Mobile ToC ---------- */

.v2a-toc-float {
    display: none;
}

.v2a-toc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
}

@media (max-width: 1100px) {
    .v2a-layout {
        grid-template-columns: 1fr;
    }

    .v2a-toc-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform .25s ease;
        overflow-y: auto;
    }

    .v2a-toc-sidebar.v2a-toc-open {
        transform: translateX(0);
    }

    .v2a-toc {
        border-radius: 0;
        min-height: 100vh;
    }

    .v2a-toc-float {
        display: flex;
        align-items: center;
        gap: 6px;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 998;
        background: #12475f;
        color: #fff;
        border: none;
        border-radius: 24px;
        padding: 10px 18px;
        font-size: .88em;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,.2);
        transition: background .15s;
    }

    .v2a-toc-float:hover {
        background: #0c3449;
    }

    .v2a-toc-float svg {
        flex-shrink: 0;
    }
}

@media (max-width: 600px) {
    .v2a-article-inner {
        padding: 20px 16px 28px;
    }

    .v2a-title {
        font-size: 1.4em;
    }

    .v2a-content h2 {
        font-size: 1.2em;
    }
}


/* ---------- Related content (article pages) ---------- */

.v2a-page .v2t-related-articles + .v2t-related-articles {
    margin-top: 32px;
}

.v2a-test-card {
    background: #f5f8fa;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.v2a-related-tests {
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    padding: 28px 32px 32px;
    margin-top: 32px;
}

.v2a-related-title {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 20px;
}

.v2a-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.v2a-related-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    overflow: hidden;
    text-decoration: none;
    color: var(--v2-text, #343434);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .15s, box-shadow .15s;
}

.v2a-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.v2a-related-card:visited,
.v2a-related-card:focus,
.v2a-related-card:hover {
    color: var(--v2-text, #343434);
    text-decoration: none;
}

.v2a-related-card-img {
    overflow: hidden;
}

.v2a-related-card-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    display: block;
}

.v2a-related-card-body {
    padding: 12px 14px 6px;
}

.v2a-related-card-body h3 {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.3;
}

.v2a-related-card-count {
    display: block;
    font-size: .8em;
    color: var(--v2-text-muted, #666);
    margin-top: 2px;
}

.v2a-related-card-products {
    padding: 8px 14px 14px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2a-related-prod {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2a-related-prod-img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2a-related-prod-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.v2a-related-prod-info {
    display: flex;
    flex-direction: column;
}

.v2a-related-prod-name {
    font-size: .8em;
    line-height: 1.3;
}

.v2a-related-prod-badge {
    display: block;
    font-style: normal;
    font-size: .7em;
    color: var(--v2-green, #5bae02);
    white-space: nowrap;
}

.v2a-related-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .v2a-related-grid,
    .v2a-related-grid--4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .v2a-related-tests {
        padding: 20px 16px 24px;
    }
    .v2a-related-grid {
        grid-template-columns: 1fr;
    }
}


/* ---------- Related articles (season-article cards) ---------- */

.v2a-related-tests .fp-season-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.v2a-related-tests .fp-season-article-card {
    display: flex;
    flex-direction: column;
    background: #f7f9fa;
    border-radius: var(--v2-radius, 8px);
    overflow: hidden;
    text-decoration: none;
    color: var(--v2-text, #343434);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .12s, box-shadow .12s;
}

.v2a-related-tests .fp-season-article-card:hover,
.v2a-related-tests .fp-season-article-card:visited {
    color: var(--v2-text, #343434);
    text-decoration: none;
}

.v2a-related-tests .fp-season-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.v2a-related-tests .fp-season-article-img { overflow: hidden; }

.v2a-related-tests .fp-season-article-img img {
    width: 100%;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    display: block;
}

.v2a-related-tests .fp-season-article-body {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2a-related-tests .fp-season-article-title {
    display: block;
    margin: 0;
    font-weight: 700;
    font-size: .88em;
    line-height: 1.3;
}

.v2a-related-tests .fp-season-article-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .78em;
    line-height: 1.45;
    color: var(--v2-text-muted, #666);
}

@media (max-width: 900px) {
    .v2a-related-tests .fp-season-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .v2a-related-tests .fp-season-articles-grid {
        grid-template-columns: 1fr;
    }
}


/* ---------- Sidebar widgets (shared article + test) ---------- */

.v2a-sidebar-winner {
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    overflow: hidden;
    margin-bottom: 12px;
}

.v2a-sidebar-winner-header {
    background: var(--v2-green, #5bae02);
    color: #fff;
    font-size: .82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 8px 16px;
}

.v2a-sidebar-winner-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    color: var(--v2-text, #343434);
    transition: background .1s;
}

.v2a-sidebar-winner-body:visited { color: var(--v2-text, #343434); }
.v2a-sidebar-winner-body:hover { background: #f9fafb; text-decoration: none; }

.v2a-sidebar-winner-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.v2a-sidebar-winner-name {
    font-weight: 700;
    font-size: .9em;
    text-align: center;
    line-height: 1.3;
}

.v2a-sidebar-winner-badge {
    font-size: .78em;
    font-weight: 600;
    color: var(--v2-green, #5bae02);
    margin-top: 4px;
}

.v2a-sidebar-winner-price {
    font-size: .82em;
    color: var(--v2-text-muted, #666);
    margin-top: 4px;
}

.v2a-sidebar-info {
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    padding: 16px;
    margin-top: 12px;
}

.v2a-sidebar-info-header {
    font-size: .82em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #12475f;
    margin-bottom: 8px;
}

.v2a-sidebar-info p {
    font-size: .82em;
    line-height: 1.5;
    color: var(--v2-text-muted, #666);
    margin: 0 0 10px;
}

.v2a-sidebar-info-link {
    font-size: .82em;
    font-weight: 600;
    color: #12475f;
    text-decoration: none;
}

.v2a-sidebar-info-link:hover {
    text-decoration: underline;
}

.v2a-sidebar-info-link:visited {
    color: #12475f;
}
