/* ==================== ARTICLE PAGE STYLES ==================== */

/* Article Hero */
.article-hero {
    padding: 6rem 0 3rem;
    background: var(--color-primary-light);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-type {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.article-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-black);
    margin-bottom: 1.5rem;
}

.article-hero .lead {
    font-size: 1.25rem;
    color: var(--color-gray);
    line-height: 1.6;
    max-width: 700px;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.article-read-time svg {
    width: 18px;
    height: 18px;
}

/* Article Content */
.article-content {
    padding: 4rem 0;
    background: white;
}

.article-body {
    max-width: 750px;
    margin: 0 auto;
}

.article-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-black);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.article-body h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-black);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 0.75rem;
}

.article-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-gray);
}

.article-body blockquote p {
    font-size: 1.15rem;
    margin-bottom: 0;
}

/* Highlight Box */
.highlight-box {
    background: var(--color-primary-light);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
}

.highlight-box h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: var(--color-black);
    margin-bottom: 1rem;
}

.highlight-box ul {
    margin-bottom: 0;
}

.highlight-box li:last-child {
    margin-bottom: 0;
}

/* Roadmap / Steps */
.roadmap-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.roadmap-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.step-content p:last-child {
    margin-bottom: 0;
}

/* Key Takeaways */
.key-takeaways {
    background: var(--color-black);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    color: white;
}

.key-takeaways h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.key-takeaways ul {
    margin-bottom: 0;
}

.key-takeaways li {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.key-takeaways li:last-child {
    margin-bottom: 0;
}

/* Article CTA */
.article-cta {
    padding: 4rem 0;
    background: var(--color-primary-light);
}

.article-cta-box {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-cta-box h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.article-cta-box p {
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-primary);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* Related Articles */
.related-section {
    padding: 4rem 0;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.related-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--color-black);
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 2rem;
    padding-left: 2rem;
}

.sidebar-toc {
    background: var(--color-primary-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-toc h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

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

.sidebar-toc li {
    margin-bottom: 0.5rem;
}

.sidebar-toc li:last-child {
    margin-bottom: 0;
}

.sidebar-toc a {
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
}

.sidebar-toc a:hover {
    color: var(--color-primary);
}

.sidebar-toc a.active {
    color: var(--color-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    padding-left: 0.75rem;
}

.sidebar-stats {
    margin-bottom: 2rem;
}

.sidebar-stats h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--color-primary-light);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.stat-card:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

.sidebar-source {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
}

.sidebar-source p {
    font-size: 0.8rem;
    color: var(--color-gray);
    line-height: 1.5;
    margin: 0;
}

/* Responsive — tablet / below lg breakpoint */
@media (max-width: 991.98px) {
    /* Move sidebar above article body on mobile */
    .article-content .col-lg-4 {
        order: -1;
    }

    /* Hide TOC and source on mobile */
    .sidebar-toc {
        display: none;
    }

    .sidebar-source {
        display: none;
    }

    /* Reset sidebar positioning */
    .article-sidebar {
        position: static;
        padding-left: 0;
        margin-top: 0;
        margin-bottom: 2rem;
    }

    /* Compact 2-column stat grid on mobile */
    .sidebar-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .sidebar-stats h4 {
        grid-column: 1 / -1;
    }

    .stat-card {
        margin-bottom: 0;
    }

    /* Unfloat inline images on mobile */
    .highlight-box[style*="float"] {
        float: none !important;
        width: 100% !important;
        margin: 1.5rem 0 !important;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 4rem 0 2rem;
    }

    .article-hero h1 {
        font-size: 1.75rem;
    }

    .article-hero .lead {
        font-size: 1.1rem;
    }

    .article-content {
        padding: 3rem 0;
    }

    .article-body h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .article-body h3 {
        font-size: 1.2rem;
    }

    .article-body p,
    .article-body li {
        font-size: 1rem;
    }

    .roadmap-step {
        flex-direction: column;
        gap: 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .highlight-box,
    .key-takeaways {
        padding: 1.5rem;
    }

    .article-cta-box {
        padding: 2rem 1.5rem;
    }

    .article-cta-box h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    /* Single-column stats on small phones */
    .sidebar-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-hero {
        padding: 3rem 0 1.5rem;
    }

    .article-hero h1 {
        font-size: 1.5rem;
    }

    .article-content {
        padding: 2rem 0;
    }

    .article-cta {
        padding: 2rem 0;
    }
}
