/* ── BLOG SYSTEM STYLES ────────────────────────────────────────────────────── */
/* Extends the site's design system using existing CSS custom properties.     */
/* Does NOT modify or duplicate anything from index.css.                       */

/* ── BLOG LISTING PAGE ──────────────────────────────────────────────────── */
.blog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5% 4rem;
    box-sizing: border-box;
}

.blog-hero {
    margin-bottom: 3rem;
    text-align: center;
}

.blog-hero h1 {
    color: var(--text-primary);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.blog-hero p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

/* Article Cards Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(184, 93, 245, 0.4);
}

.blog-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.06);
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.blog-card-category {
    display: inline-block;
    background: rgba(184, 93, 245, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(184, 93, 245, 0.25);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    width: fit-content;
}

.blog-card-title {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.35;
    margin: 0;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-card-meta svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

/* Read More Arrow */
.blog-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-arrow {
    gap: 0.75rem;
}

.blog-card-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-arrow svg {
    transform: translateX(4px);
}


/* ── INDIVIDUAL ARTICLE PAGE ────────────────────────────────────────────── */
.article-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5% 4rem;
    box-sizing: border-box;
    overflow-x: hidden;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
}

/* Article Header — Vertical Stack Layout */
.article-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 2rem;
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(184, 93, 245, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(184, 93, 245, 0.25);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.article-category-badge:hover {
    background: rgba(184, 93, 245, 0.18);
    border-color: rgba(184, 93, 245, 0.45);
}

.article-header h1 {
    color: var(--text-primary);
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 100%;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.article-meta svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Featured Image */
.article-featured-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.article-content h2 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-subtle);
    line-height: 1.3;
}

.article-content h3 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: var(--accent-1);
    text-decoration: underline;
    text-decoration-color: rgba(184, 93, 245, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: var(--accent-1);
}

.article-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.article-content ul li::marker {
    color: var(--accent-1);
}

/* Comparison Table */
.article-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem -1rem;
    padding: 0 1rem;
    border-radius: 16px;
}

.article-table-wrapper>.article-table {
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.975rem;
    min-width: 480px;
}

.article-table thead {
    background: var(--accent-gradient);
}

.article-table thead th {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .article-table thead th {
        white-space: normal;
    }
}

.article-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.article-table tbody tr:last-child {
    border-bottom: none;
}

.article-table tbody tr:hover {
    background: rgba(184, 93, 245, 0.04);
}

.article-table td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.article-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .article-table td:first-child {
        white-space: normal;
    }
    .article-table td {
        word-break: break-word;
    }
}

.article-table td a {
    color: var(--accent-1);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.article-table td a:hover {
    text-decoration: underline;
}

/* Article FAQ */
.article-faq-section {
    margin-top: 3rem;
}

.article-faq-section h2 {
    border-bottom: none !important;
}

.article-faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.article-faq-item:hover {
    border-color: rgba(184, 93, 245, 0.3);
}

.article-faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    line-height: 1.5;
    gap: 0.75rem;
}

.article-faq-item summary::-webkit-details-marker {
    display: none;
}

.article-faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--accent-1);
    flex-shrink: 0;
    transition: transform 0.2s;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.1rem;
}

.article-faq-item[open] summary::after {
    content: '−';
}

.article-faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.975rem;
}

/* Horizontal Rule in Article */
.article-content hr {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 2.5rem 0;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────── */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .article-sidebar {
        position: sticky;
        top: 80px;
    }
}

.sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.5rem;
}

.sidebar-widget h3 {
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* Related Games Widget */
.sidebar-game-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-game-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: background 0.2s;
    text-decoration: none;
}

.sidebar-game-link:hover {
    background: rgba(184, 93, 245, 0.06);
}

.sidebar-game-link img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-game-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sidebar-game-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-game-cat {
    color: var(--accent-1);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Category Links Widget */
.sidebar-cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sidebar-cat-pill:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(184, 93, 245, 0.06);
}


/* ══════════════════════════════════════════════════════════════════════════ */
/* ── RESPONSIVE BREAKPOINTS ─────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════════════════ */

/* ── Large tablets / small laptops (< 1024px) ────────────────────────── */
@media (max-width: 1023px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* On tablet, make sidebar a 2-column grid for better use of space */
    .article-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ── Tablets (max-width: 768px) ──────────────────────────────────────── */
@media (max-width: 768px) {

    .blog-page,
    .article-page {
        padding: 1.25rem 4% 3rem;
    }

    .blog-hero {
        margin-bottom: 2rem;
    }

    .article-header h1 {
        font-size: clamp(1.35rem, 5.5vw, 2rem);
        line-height: 1.25;
        margin-bottom: 0.75rem;
    }

    .article-category-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 0.75rem;
    }

    .article-meta {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    .article-header {
        margin-bottom: 1.5rem;
    }

    .article-featured-image {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .article-table {
        font-size: 0.85rem;
        min-width: 420px;
    }

    .article-table thead th {
        padding: 0.7rem 0.75rem;
        font-size: 0.75rem;
    }

    .article-table td {
        padding: 0.65rem 0.75rem;
    }

    .article-faq-item summary {
        padding: 0.85rem 1rem;
    }

    .article-faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.925rem;
    }

    .blog-card-body {
        padding: 1.25rem;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    /* Sidebar stacks single-column on tablet */
    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-widget {
        padding: 1.25rem;
    }
}

/* ── Small mobile (max-width: 480px) ────────────────────────────────── */
@media (max-width: 480px) {

    .blog-page,
    .article-page {
        padding: 1rem 3.5% 2.5rem;
    }

    .blog-hero {
        margin-bottom: 1.5rem;
    }

    .blog-hero p {
        font-size: 0.9rem;
    }

    .article-header h1 {
        font-size: clamp(1.25rem, 6vw, 1.65rem);
        line-height: 1.3;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        font-size: 0.8rem;
    }

    .article-featured-image {
        border-radius: 10px;
        margin-left: -3.5%;
        margin-right: -3.5%;
        width: calc(100% + 7%);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .article-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .article-content h2 {
        margin-top: 2rem;
    }

    .article-table-wrapper {
        margin-left: -3.5%;
        margin-right: -3.5%;
        padding: 0;
        border-radius: 0;
    }

    .article-table {
        min-width: 0;
        width: 100%;
        font-size: 0.8rem;
    }

    .article-table thead th {
        padding: 0.6rem 0.6rem;
        font-size: 0.7rem;
    }

    .article-table td {
        padding: 0.55rem 0.6rem;
    }

    .article-faq-item summary {
        padding: 0.75rem 0.85rem;
        font-size: 0.9rem;
    }

    .article-faq-answer {
        padding: 0 0.85rem 0.85rem;
        font-size: 0.875rem;
    }

    .blog-card-body {
        padding: 1rem;
    }

    .blog-card-title {
        font-size: 1rem;
    }

    .blog-card-excerpt {
        font-size: 0.875rem;
    }

    .blog-card-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .sidebar-widget h3 {
        font-size: 1rem;
    }

    .sidebar-game-link img {
        width: 40px;
        height: 40px;
    }

    .sidebar-game-name {
        font-size: 0.85rem;
    }
}

/* ── TABLE OF CONTENTS ──────────────────────────────────────────────────── */
.article-toc {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.article-toc h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}
.article-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.article-toc li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}
.article-toc li::before {
    content: '→';
    color: var(--accent-1);
    margin-right: 0.5rem;
    font-weight: bold;
}
.article-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.article-toc a:hover {
    color: var(--accent-1);
}

/* ── AUTHOR BOX ──────────────────────────────────────────────────────────── */
.author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    margin-top: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}
.author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-1), #F52D3A);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.author-box-info {
    flex: 1;
    min-width: 0;
}
.author-box-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.author-box-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.author-box-name a:hover {
    color: var(--accent-1);
}
.author-box-role {
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.author-box-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.author-box-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.author-box-links a {
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: opacity 0.2s;
}
.author-box-links a:hover {
    opacity: 0.8;
}
.author-box-links svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
@media (max-width: 480px) {
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .author-box-links {
        justify-content: center;
    }
}

/* ── BLOG CARD BYLINE ───────────────────────────────────────────────────── */
.blog-card-author {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}
.blog-card-author svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}