
/* ================= Blog 栏目（博客/ 文章列表/ 文章正文） ================= */

/* --- 目录页头部 --- */
.blog-hero {
    background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    padding: 64px 0 48px;
}
.blog-hero .inner { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.blog-hero h1 {
    font-size: clamp(28px, 4vw, 40px); font-weight: 800;
    letter-spacing: -0.02em; margin-bottom: 14px;
}
.blog-hero p {
    font-size: 17px; color: var(--text-2); max-width: 640px; line-height: 1.7;
}

/* --- 意图分类筛选条 --- */
.blog-filters {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px;
}
.blog-filters a {
    display: inline-block; padding: 7px 16px; border-radius: var(--radius-full);
    font-size: 14px; font-weight: 500; color: var(--text-2);
    background: var(--card); border: 1px solid var(--border);
    transition: all .2s;
}
.blog-filters a:hover, .blog-filters a.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}

/* --- 文章列表 --- */
.post-list { display: flex; flex-direction: column; gap: 20px; }

.post-item {
    display: grid; grid-template-columns: 116px 1fr; gap: 24px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: box-shadow .3s, border-color .3s, transform .3s;
}
.post-item:hover {
    box-shadow: var(--shadow-md); border-color: var(--primary-light);
    transform: translateY(-2px);
}
.post-date {
    font-size: 13px; color: var(--text-3);
    padding-top: 4px; line-height: 1.5;
}
.post-date strong {
    display: block; font-size: 20px; font-weight: 700;
    color: var(--primary); letter-spacing: -0.01em;
}
.post-item h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; line-height: 1.45; }
.post-item h3 a { color: var(--text); }
.post-item h3 a:hover { color: var(--primary); }
.post-item p { font-size: 14.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 12px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --- 文章正文 --- */
.post-wrap { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 48px; align-items: start; }

.post-body {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 44px 48px;
    max-width: 100%; min-width: 0;
}
.post-body h1 { font-size: clamp(25px, 3.4vw, 34px); font-weight: 800; line-height: 1.35; margin-bottom: 16px; letter-spacing: -0.02em; }
.post-body .post-lede { font-size: 17px; color: var(--text-2); line-height: 1.8; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-body h2 { font-size: 22px; font-weight: 700; margin: 40px 0 16px; padding-left: 13px; border-left: 3px solid var(--primary); line-height: 1.4; }
.post-body h3 { font-size: 17.5px; font-weight: 700; margin: 28px 0 12px; }
.post-body p { font-size: 16px; line-height: 1.9; color: var(--text); margin-bottom: 16px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 26px; }
.post-body li { font-size: 16px; line-height: 1.85; margin-bottom: 8px; }
.post-body strong { font-weight: 700; color: var(--text); }
.post-body blockquote {
    margin: 24px 0; padding: 16px 22px;
    background: var(--primary-soft); border-left: 3px solid var(--primary-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 15.5px; line-height: 1.8; color: var(--text-2);
}
.post-body blockquote p { margin-bottom: 8px; font-size: 15.5px; }
.post-body blockquote p:last-child { margin-bottom: 0; }

/* 表格 */
.post-table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.post-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.post-table th, .post-table td { padding: 12px 14px; text-align: left; border: 1px solid var(--border); line-height: 1.65; }
.post-table th { background: var(--primary-soft); font-weight: 700; white-space: nowrap; }
.post-table td { color: var(--text-2); }

/* 代码块 */
.post-body pre {
    background: #0F172A; color: #E2E8F0; padding: 18px 20px;
    border-radius: var(--radius-md); overflow-x: auto;
    font-size: 13.5px; line-height: 1.7; margin: 20px 0;
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
}
.post-body code {
    background: var(--primary-soft); color: var(--primary);
    padding: 2px 6px; border-radius: 4px; font-size: 0.92em;
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
}
.post-body pre code { background: none; color: inherit; padding: 0; }

/* 提示框（注意事项） */
.post-note {
    background: #FFFBEB; border: 1px solid #FDE68A;
    border-radius: var(--radius-md); padding: 16px 20px; margin: 24px 0;
    font-size: 15px; line-height: 1.8;
}
.post-note strong { color: #B45309; }
.post-note p { font-size: 15px; margin-bottom: 8px; }
.post-note p:last-child { margin-bottom: 0; }

/* FAQ */
.post-faq { margin: 32px 0; }
.post-faq h2 { margin-top: 0; }
.post-faq .faq-list { display: flex; flex-direction: column; gap: 12px; }
.post-faq .faq-list details {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 4px 18px; background: var(--primary-soft);
}
.post-faq .faq-list summary {
    cursor: pointer; font-weight: 600; font-size: 15.5px;
    padding: 12px 0; color: var(--text); list-style: none;
}
.post-faq .faq-list summary::-webkit-details-marker { display: none; }
.post-faq .faq-list summary::before { content: "Q "; color: var(--primary); font-weight: 800; }
.post-faq .faq-list details p { margin: 0 0 14px; font-size: 15px; color: var(--text-2); }

/* 文末 CTA */
.post-cta {
    margin-top: 40px; padding: 30px 32px;
    background: var(--primary-soft); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-align: center;
}
.post-cta h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.post-cta p { font-size: 15px; color: var(--text-2); margin-bottom: 20px; }
.post-cta .qr-mini-box { display: inline-block; text-align: center; }
.post-cta .qr-mini-box img { width: 132px; height: 132px; border-radius: var(--radius-md); background: #fff; padding: 6px; border: 1px solid var(--border); }
.post-cta .qr-mini-box p { font-size: 13.5px; margin: 10px 0 0; color: var(--text-3); }

/* 文章元信息 */
.post-meta-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-bottom: 28px; font-size: 13.5px; color: var(--text-3);
}
.post-meta-bar .tag { font-size: 12px; }

/* --- 侧边栏 --- */
.post-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }
.post-side .card { padding: 22px; }
.post-side h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.post-side ul { list-style: none; padding: 0; }
.post-side li { font-size: 14px; margin-bottom: 10px; line-height: 1.6; }
.post-side li:last-child { margin-bottom: 0; }
.post-side a { color: var(--text-2); }
.post-side a:hover { color: var(--primary); }
.post-side .toc { border-left: 2px solid var(--border); padding-left: 14px; }
.post-side .toc a { display: block; font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.post-side .cta-side { text-align: center; }
.post-side .cta-side img { width: 108px; height: 108px; border-radius: var(--radius-md); background: #fff; padding: 5px; border: 1px solid var(--border); }
.post-side .cta-side p { font-size: 13px; color: var(--text-3); margin: 8px 0 14px; }
/* 侧栏链接默认色会盖掉 .btn-primary 的白字，这里显式恢复 */
.post-side .cta-side a.btn { color: #fff; }

/* --- 上下篇导航 --- */
.post-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-top: 28px;
}
.post-nav a {
    display: block; padding: 16px 20px; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    transition: border-color .2s;
}
.post-nav a:hover { border-color: var(--primary-light); }
.post-nav .dir { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.post-nav .ttl { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.5; }
.post-nav .next { text-align: right; }

/* --- 响应式 --- */
@media (max-width: 900px) {
    .post-wrap { grid-template-columns: 1fr; gap: 28px; }
    .post-side { position: static; }
    .post-body { padding: 32px 24px; }
    .post-item { grid-template-columns: 1fr; gap: 12px; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav .next { text-align: left; }
}

/* 通用修正：侧栏/正文里的链接会继承文字色，需恢复按钮白字 */
.post-body .post-cta a.btn,
.blog-hero a.btn { color: #fff; }
