/* Article Styles - Academia Fleming Blog */
/* Professional typography based on NYT/BBC standards */
/* Optimized for readability: 17-18px, 1.6 line-height, 680px max-width */

/* Article Container */
.article-container {
    background: white;
    padding-bottom: 80px;
}

/* Article Header */
.article-header {
    padding: 60px 0 40px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px; /* Not at the edge */
    padding-right: 40px;
}

.article-breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.article-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.article-breadcrumb span {
    margin: 0 8px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta-item svg {
    opacity: 0.7;
}

/* Featured Image */
.article-featured-image {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 60px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    /* Optimal typography for long-form reading */
    font-size: clamp(17px, 1.125rem, 18px);
    line-height: 1.7; /* Optimal for readability */
    color: #1f2937;
    padding-left: 40px; /* Generous padding - NOT at edge */
    padding-right: 40px;
}

.article-content > .container {
    max-width: 680px !important; /* Optimal line length: 45-75 characters */
    margin-left: auto;
    margin-right: auto;
}

.article-content h2 {
    font-size: clamp(1.75rem, 3vw, 2rem);
    margin-top: 56px;
    margin-bottom: 24px;
    color: #111827;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-size: clamp(1.375rem, 2.5vw, 1.5rem);
    margin-top: 40px;
    margin-bottom: 20px;
    color: #111827;
    font-weight: 700;
    line-height: 1.4;
}

.article-content h4 {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-top: 32px;
    margin-bottom: 16px;
    color: #111827;
    font-weight: 600;
    line-height: 1.4;
}

.article-content p {
    margin-bottom: 24px; /* More generous spacing */
    max-width: 100%; /* Let container handle width */
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Article Intro */
.article-intro {
    font-size: 20px;
    color: var(--text-secondary);
    padding: 32px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    margin-bottom: 40px;
}

/* Table of Contents */
.article-toc {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 48px;
}

.article-toc h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.article-toc ol {
    margin: 0;
    padding-left: 20px;
}

.article-toc li {
    margin-bottom: 12px;
}

.article-toc a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.article-toc a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Article Section */
.article-section {
    margin-bottom: 56px;
}

/* Highlight Boxes */
.article-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    margin: 32px 0;
}

.article-highlight h4 {
    color: white;
    margin-top: 0;
    margin-bottom: 16px;
}

.article-highlight ul {
    margin: 0;
    padding-left: 20px;
}

.article-highlight li {
    margin-bottom: 10px;
}

/* Note Box */
.article-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.article-note p {
    margin: 0;
    color: #92400e;
}

/* Warning Box */
.article-warning {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.article-warning p {
    margin: 0;
    color: #991b1b;
}

/* Success Box */
.article-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.article-success p {
    margin: 0;
    color: #065f46;
}

/* Timeline */
.article-timeline {
    position: relative;
    padding-left: 40px;
    margin: 32px 0;
}

.article-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-content h4 {
    margin: 0 0 8px 0;
}

.timeline-content p {
    margin: 0;
    color: var(--text-secondary);
}

/* Article CTA */
.article-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 48px 0;
    text-align: center;
}

.article-cta h4 {
    color: white;
    margin-top: 0;
    margin-bottom: 16px;
}

.article-cta p {
    margin-bottom: 20px;
}

.article-cta ul {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 24px;
}

.article-cta li {
    margin-bottom: 12px;
}

/* Share Buttons */
.article-share {
    margin: 56px 0;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
}

.article-share h4 {
    margin-top: 0;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-whatsapp {
    background: #25d366;
    color: white;
}

/* Related Articles */
.article-related {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--border-color);
}

.article-related h3 {
    margin-top: 0;
    margin-bottom: 32px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.related-card {
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.related-card h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.related-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .article-header {
        padding-left: 24px;
        padding-right: 24px;
    }

    .article-content {
        padding-left: 24px;
        padding-right: 24px;
        font-size: 16px;
    }

    .article-title {
        font-size: 1.75rem;
    }

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

    .article-content h3 {
        font-size: 1.25rem;
    }

    .article-featured-image {
        margin-bottom: 40px;
        border-radius: 0;
    }

    .article-toc {
        padding: 24px;
    }

    .article-highlight,
    .article-cta {
        padding: 24px;
    }

    .article-timeline {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -28px;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 40px 16px 20px;
    }

    .article-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-meta {
        gap: 16px;
    }

    .article-content h2 {
        font-size: 1.3rem;
        margin-top: 32px;
    }

    .article-intro {
        padding: 20px;
        font-size: 16px;
    }
}
