/* 帮助中心 · 列表页 / 分类页统一样式 */

:root {
    --hc-bg: #eef2f7;
    --hc-surface: #ffffff;
    --hc-border: #e2e8f0;
    --hc-text: #1e293b;
    --hc-muted: #64748b;
    --hc-accent: #2563eb;
    --hc-accent-hover: #1d4ed8;
    --hc-radius: 12px;
    --hc-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

body.hc-body {
    background: var(--hc-bg);
    -webkit-font-smoothing: antialiased;
}

.hc-page,
.wp-page {
    padding: 100px 20px 64px;
}

.hc-page .container,
.wp-page .container {
    max-width: 1100px;
}

/* ── 页头横幅 ── */
.hc-banner,
.wp-banner {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--hc-shadow);
}

.hc-banner h1,
.wp-banner h1 {
    font-size: clamp(1.5rem, 3.5vw, 1.75rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.hc-banner p,
.wp-banner p {
    margin: 0;
    color: var(--hc-muted);
    font-size: 15px;
    line-height: 1.7;
}

.hc-banner a,
.wp-banner a {
    color: var(--hc-accent);
    text-decoration: none;
    font-weight: 500;
}

.hc-banner a:hover,
.wp-banner a:hover {
    text-decoration: underline;
}

/* ── 双栏布局（首页） ── */
.hc-layout,
.wp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.hc-main,
.hc-sidebar,
.wp-main,
.wp-sidebar {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 24px;
    box-shadow: var(--hc-shadow);
}

/* ── 文章列表 ── */
.post-list {
    display: grid;
    gap: 0;
}

.hc-main .post-list,
.wp-main .post-list {
    gap: 0;
}

.post-list.standalone {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    padding: 8px 24px;
    box-shadow: var(--hc-shadow);
}

.post-item {
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

.post-item:last-child {
    border-bottom: 0;
    padding-bottom: 12px;
}

.post-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #047857;
    background: #ecfdf5;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.post-item h2 {
    font-size: 1.125rem;
    font-weight: 650;
    line-height: 1.45;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.post-item h2 a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.15s;
}

.post-item h2 a:hover {
    color: var(--hc-accent);
}

.post-meta {
    color: var(--hc-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.post-excerpt {
    color: var(--hc-text);
    font-size: 15px;
    line-height: 1.75;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--hc-accent);
    text-decoration: none;
    transition: color 0.15s, gap 0.15s;
}

.read-more:hover {
    color: var(--hc-accent-hover);
    gap: 8px;
}

.read-more::after {
    content: "→";
}

/* ── 侧边栏组件 ── */
.widget {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.widget:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget h3 {
    font-size: 15px;
    font-weight: 650;
    color: #0f172a;
    margin: 0 0 12px;
    letter-spacing: 0.01em;
}

.search-box {
    width: 100%;
    border: 1px solid var(--hc-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 6px;
}

.widget a {
    color: var(--hc-text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.15s;
}

.widget a:hover {
    color: var(--hc-accent);
}

/* ── 分页 ── */
.pagination {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    border: 1px solid var(--hc-border);
    border-radius: 8px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--hc-text);
    text-decoration: none;
    background: var(--hc-surface);
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pagination a:hover {
    border-color: #93c5fd;
    color: var(--hc-accent);
    background: #eff6ff;
}

.pagination .current {
    background: var(--hc-accent);
    border-color: var(--hc-accent);
    color: #fff;
    font-weight: 600;
}

/* ── 返回链接 ── */
.hc-back {
    margin-top: 20px;
    font-size: 14px;
}

.hc-back a {
    color: var(--hc-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.hc-back a:hover {
    color: var(--hc-accent);
}

/* ── 导航栏 ── */
body.hc-body .navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hc-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

body.hc-body .nav-links a:hover {
    color: var(--hc-accent);
}

/* ── 响应式 ── */
@media (max-width: 960px) {
    .hc-layout,
    .wp-layout {
        grid-template-columns: 1fr;
    }

    .hc-sidebar,
    .wp-sidebar {
        order: -1;
    }
}

@media (max-width: 640px) {
    .hc-banner,
    .wp-banner {
        padding: 20px;
    }

    .hc-main,
    .hc-sidebar,
    .wp-main,
    .wp-sidebar {
        padding: 18px;
    }
}
