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

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* Breadcrumb */
.breadcrumb {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.breadcrumb-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary);
}

.breadcrumb-sep {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
}

/* Article Full */
.article-full {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Article Header */
.article-header {
    margin-bottom: 32px;
}

.article-header-inner {
    max-width: 100%;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-category-badge {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform var(--transition);
}

.article-category-badge:hover {
    transform: translateY(-2px);
}

.article-full h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text);
}

.article-lead {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-details .author-name {
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition);
}

.author-details .author-name:hover {
    color: var(--secondary);
}

.author-details .author-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Share Buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.share-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.share-twitter {
    background: #1da1f2;
}

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

.share-linkedin {
    background: #0a66c2;
}

.share-copy {
    background: var(--text-muted);
}

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

/* Article Image */
.article-image-container {
    margin: 32px 0;
}

.article-full .article-image {
    height: 400px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.article-full .article-icon {
    color: var(--text-muted);
    opacity: 0.4;
}

.image-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* Article Body */
.article-body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 40px;
}

.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2em 0 1em;
    color: var(--text);
}

.article-body h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5em 0 0.75em;
    color: var(--text);
}

.article-body blockquote {
    border-left: 4px solid var(--secondary);
    padding-left: 24px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-light);
}

.article-body ul,
.article-body ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.article-body li {
    margin-bottom: 0.5em;
}

.article-body a {
    color: var(--secondary);
    text-decoration: underline;
}

.article-body a:hover {
    text-decoration: none;
}

/* Article Tags */
.article-tags {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    padding: 6px 14px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text);
    transition: all var(--transition);
}

.tag-link:hover {
    background: var(--secondary);
    color: white;
}

/* Article Stats */
.article-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.article-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Author Bio */
.author-bio {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-bio-content h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.author-bio-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.author-bio-title {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: gap var(--transition);
}

.author-link:hover {
    gap: 10px;
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.nav-prev.disabled {
    visibility: hidden;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-next .nav-label {
    justify-content: flex-end;
}

.nav-title {
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

/* Related Articles */
.related-articles {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
}

.related-articles h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

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

.related-card {
    background: var(--bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.related-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-icon {
    color: var(--text-muted);
    opacity: 0.5;
}

.related-content {
    padding: 16px;
}

.related-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-content h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 12px;
}

.related-content h3 a {
    transition: color var(--transition);
}

.related-content h3 a:hover {
    color: var(--secondary);
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 80px 24px;
}

.error-icon {
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 24px;
}

.error-page h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ================================ */
/* DARK MODE FIXES                  */
/* ================================ */
html.dark-mode .breadcrumb {
    background: #111827;
    border-bottom-color: #1e293b;
}

html.dark-mode .article-full {
    background: transparent;
}

html.dark-mode .article-full h1,
html.dark-mode .article-body h2,
html.dark-mode .article-body h3 {
    color: #f1f5f9;
}

html.dark-mode .article-lead {
    color: #d1d5db;
    border-bottom-color: #374151;
}

html.dark-mode .article-body {
    color: #e2e8f0;
}

html.dark-mode .article-body blockquote {
    color: #94a3b8;
}

html.dark-mode .article-share {
    border-color: #374151;
}

html.dark-mode .article-tags {
    border-color: #374151;
}

html.dark-mode .tag-link {
    background: #374151;
    color: #d1d5db;
}

html.dark-mode .tag-link:hover {
    background: var(--secondary);
    color: white;
}

html.dark-mode .article-stats {
    background: #1f2937;
}

html.dark-mode .author-bio {
    background: #1f2937;
    border-color: #374151;
}

html.dark-mode .author-bio-name {
    color: #f1f5f9;
}

html.dark-mode .author-bio-title {
    color: #94a3b8;
}

html.dark-mode .nav-prev,
html.dark-mode .nav-next {
    background: #1f2937;
    border-color: #374151;
}

html.dark-mode .nav-prev:hover,
html.dark-mode .nav-next:hover {
    border-color: var(--secondary);
}

html.dark-mode .nav-title {
    color: #f1f5f9;
}

html.dark-mode .related-articles {
    border-top-color: #374151;
}

html.dark-mode .related-card {
    background: #1f2937;
}

html.dark-mode .related-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

html.dark-mode .share-copy {
    background: #64748b;
}

/* Responsive */
@media (max-width: 900px) {
    .article-full h1 {
        font-size: 2rem;
    }

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

    .article-full .article-image {
        height: 300px;
    }

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

    .article-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
    }

    .nav-next .nav-label {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .article-full h1 {
        font-size: 1.6rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-stats {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar-large {
        margin: 0 auto;
    }
}
