/* ============================================================
   教程中心（/blog/）样式
   由 scripts/build_seo.py 生成页面引用；手工维护，改完记得跑 build_seo.py
   ============================================================ */

/* 站点 .header 是 position:fixed 且高 120px，正文需要让位 */
.blog-page main { padding-top: 120px; }
@media (max-width: 767px) {
    .blog-page main { padding-top: 88px; }
}

/* 注意：这个类挂在 .container 上，只能改纵向内边距。
   写成 padding: 36px 0 90px 会把 Bootstrap .container 的左右 12px 内边距抹掉，
   导致内部 .row 的 -12px 负边距把内容撑出视口（移动端出现 12px 横向滚动）。 */
.article-hero { padding-top: 36px; padding-bottom: 90px; }

.article-title {
    font-size: clamp(1.55rem, 1.6vw + 1rem, 2.3rem);
    line-height: 1.35;
    color: #1e293b;
}

.article-meta { color: #64748b; font-size: 0.95rem; }
.article-meta i { color: #2563EB; margin-right: 4px; }

.article-cover { width: 100%; height: auto; border-radius: 16px; }

.breadcrumb { --bs-breadcrumb-divider: '/'; font-size: 0.92rem; }
.breadcrumb-item a { color: #64748b; }
.breadcrumb-item.active { color: #94a3b8; }

/* ---------- 正文排版 ---------- */
.article-body {
    font-size: 17px;
    line-height: 1.95;
    color: #454e5a;
    word-break: break-word;
}
.article-body > p:first-of-type { font-size: 1.05rem; color: #334155; }
.article-body h2 {
    font-size: 1.45rem;
    margin: 2.4rem 0 1rem;
    padding-left: 14px;
    border-left: 4px solid #2563EB;
    line-height: 1.5;
}
.article-body h3 { font-size: 1.18rem; margin: 1.8rem 0 0.8rem; color: #1e293b; }
.article-body h4 { font-size: 1.05rem; margin: 1.4rem 0 0.6rem; color: #1e293b; }
.article-body p { margin-bottom: 1.05rem; }
.article-body ul,
.article-body ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body li::marker { color: #2563EB; }
.article-body a { color: #2563EB; text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.1rem 0; }
.article-body strong { color: #1e293b; }
.article-body blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.3rem;
    background: #f8fafc;
    border-left: 4px solid #2563EB;
    border-radius: 0 12px 12px 0;
    color: #475569;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code {
    background: #f1f5f9;
    color: #db2777;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.92em;
}
.article-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.2rem 0;
}
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.3rem 0;
    font-size: 0.95rem;
}
.article-body th,
.article-body td { border: 1px solid #e2e8f0; padding: 10px 12px; text-align: left; }
.article-body th { background: #f8fafc; color: #1e293b; font-weight: 600; }
.article-body tr:nth-child(even) td { background: #fcfdfe; }
.article-body hr { margin: 2rem 0; border-color: #e2e8f0; }

/* ---------- 标签 / 侧栏 / CTA ---------- */
.badge-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563EB;
    font-size: 0.86rem;
    text-decoration: none;
}

.cta-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 22px;
}
.side-box { background: #fff; border: 1px solid #eef2f7; border-radius: 16px; padding: 20px; }
.side-link { color: #334155; text-decoration: none; font-size: 0.95rem; line-height: 1.6; }
.side-link:hover { color: #2563EB; }

.article-faq .accordion-button { font-weight: 600; color: #1e293b; padding-left: 0; }
.article-faq .accordion-body { padding-left: 0; color: #454e5a; }

.article-nav-item {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
}
.article-nav-item:hover { border-color: #bfdbfe; color: #2563EB; }

/* ---------- 列表页 ---------- */
.post-card {
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 22px;
    transition: 0.25s ease-in-out;
    background: #fff;
}
.post-card:hover { border-color: #bfdbfe; box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08); transform: translateY(-2px); }
.post-card-link { text-decoration: none; display: block; height: 100%; }
.post-card-title { font-size: 1.08rem; line-height: 1.5; color: #1e293b; margin-bottom: 10px; }
.post-card-desc { font-size: 0.92rem; color: #64748b; line-height: 1.7; margin-bottom: 14px; }
.post-card-meta { font-size: 0.82rem; color: #94a3b8; display: flex; gap: 6px; flex-wrap: wrap; }

.page-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
}
.page-btn.active { background: #2563EB; border-color: #2563EB; color: #fff; }

.empty-box {
    padding: 40px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}
