/* ===== Blog Detail Page — Reading Experience ===== */

/* --- Article Hero --- */
.article-hero {
    padding: 120px 80px 32px !important;
    background: #F5F4F4;
}
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(5,26,124,.45);
    margin-bottom: 20px;
}
.article-breadcrumb a {
    color: rgba(5,26,124,.55);
    text-decoration: none;
    transition: color .2s;
}
.article-breadcrumb a:hover { color: #0325B6; }
.article-breadcrumb .sep { margin: 0 2px; }

.article-hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    color: rgba(5,26,124,.90);
    margin: 0 0 16px;
    max-width: 800px;
}
.article-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: rgba(5,26,124,.55);
    margin-bottom: 16px;
}
.article-hero-meta i {
    margin-right: 4px;
    font-size: 14px;
}
.article-hero-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.article-hero-tags .tag {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 12px;
    background: rgba(3,37,182,.08);
    color: rgba(5,26,124,.65);
}

/* --- Featured Image --- */
.article-cover {
    padding: 0 80px 0;
    background: #F5F4F4;
    margin-bottom: 32px;
}
.article-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
}

/* --- Main Layout: Content + TOC --- */
.article-layout {
    display: flex;
    gap: 48px;
    padding: 0 80px 64px;
    align-items: flex-start;
}

/* --- Article Content --- */
.article-content {
    flex: 1;
    min-width: 0;
    max-width: 780px;
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
}

/* Typography */
.article-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: rgba(5,26,124,.90);
    margin: 2em 0 0.8em;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(5,26,124,.06);
    line-height: 1.4;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: rgba(5,26,124,.85);
    margin: 1.5em 0 0.6em;
    line-height: 1.4;
}
.article-content p,
.article-content > div {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(0,9,51,.65);
    margin-bottom: 1.2em;
}
.article-content a {
    color: #0325B6;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.article-content ul,
.article-content ol {
    margin: 0.8em 0 1.2em 1.5em;
    line-height: 1.8;
    color: rgba(0,9,51,.65);
}
.article-content li { margin-bottom: 0.4em; }
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0 24px;
    display: block;
}
.article-content blockquote {
    border-left: 4px solid #0325B6;
    background: rgba(3,37,182,.03);
    padding: 16px 20px;
    margin: 1.2em 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: rgba(5,26,124,.65);
    line-height: 1.7;
}
.article-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 1.2em 0;
}
.article-content code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}
.article-content p code,
.article-content li code {
    background: rgba(3,37,182,.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: #0325B6;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 15px;
}
.article-content th,
.article-content td {
    padding: 10px 14px;
    border: 1px solid rgba(5,26,124,.1);
    text-align: left;
}
.article-content th {
    background: rgba(3,37,182,.04);
    font-weight: 600;
    color: rgba(5,26,124,.85);
}
.article-content hr {
    border: none;
    height: 1px;
    background: rgba(5,26,124,.08);
    margin: 2em 0;
}

/* --- Table of Contents (TOC) --- */
.article-toc {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.article-toc-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(5,26,124,.45);
    margin-bottom: 12px;
}
.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid rgba(5,26,124,.08);
}
.article-toc li {
    margin: 0;
}
.article-toc li a {
    display: block;
    padding: 6px 0 6px 16px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(5,26,124,.50);
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all .2s;
}
.article-toc li a:hover { color: #0325B6; }
.article-toc li a.active {
    color: #0325B6;
    border-left-color: #0325B6;
    font-weight: 500;
}
.article-toc li.toc-h3 a { padding-left: 28px; font-size: 12px; }

/* --- Related Articles --- */
.related-section {
    padding: 0 80px 64px;
}
.related-section-title {
    font-size: 24px;
    font-weight: 700;
    color: rgba(5,26,124,.90);
    margin-bottom: 24px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
/* Reuse blog-card from blog.css — add mini variant */
.related-grid .blog-card { font-size: 14px; }
.related-grid .blog-card-body { padding: 12px 16px 16px; }
.related-grid .blog-card-title { font-size: 14px; -webkit-line-clamp: 2; }
.related-grid .blog-card-excerpt { display: none; }
.related-grid .blog-card-tags { display: none; }
.related-grid .blog-card-meta { font-size: 11px; gap: 8px; }

/* --- Loading State --- */
.article-loading {
    text-align: center;
    padding: 120px 20px;
    font-size: 16px;
    color: rgba(5,26,124,.35);
}

/* ===== Responsive ===== */
@media (max-width: 1240px) {
    .article-toc { display: none; }
    .article-layout { gap: 0; }
    .article-content { max-width: 100%; }
}
@media (max-width: 1200px) {
    .article-hero,
    .article-cover,
    .article-layout,
    .related-section {
        padding-left: 40px;
        padding-right: 40px;
    }
}
@media (max-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-hero h1 { font-size: 28px; }
    .article-content { padding: 28px 24px; }
}
@media (max-width: 576px) {
    .article-hero,
    .article-cover,
    .article-layout,
    .related-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    .article-hero h1 { font-size: 24px; }
    .article-hero { padding-top: 140px !important; }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .article-content {
        padding: 20px 16px;
        border-radius: 12px;
    }
}
