/* ── 前台新闻页公共样式 ─────────────────────────────── */
.news-page {
    min-height: calc(100vh - 76px);
    background: #f8fafc;
    padding: 56px 64px 72px;
}

.news-page-shell { max-width: 1120px; margin: 0 auto; }

.news-page-head { margin-bottom: 28px; }
.news-page-head h1 { margin: 0 0 8px; font-size: 40px; line-height: 50px; }
.news-page-head p  { margin: 0; color: var(--muted); font-size: 16px; }

/* ── 分类筛选 ─────────────────────────────── */
.news-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-tag {
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.filter-tag.active,
.filter-tag:hover {
    border-color: var(--teal);
    background: var(--teal-2);
    color: var(--teal);
}

/* ── 新闻列表卡片 ─────────────────────────────── */
.news-list-page { display: grid; gap: 14px; }

.news-list-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 24px;
    gap: 20px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
    transition: border-color .15s;
}

.news-list-card:hover { border-color: #99f6e4; }

.news-card-cover {
    height: 120px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.news-card-body { display: grid; gap: 8px; }

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.news-card-meta time { color: #94a3b8; font-size: 13px; }

.news-type {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
    background: #eff6ff;
    color: #1d4ed8;
}

.news-list-card h2 {
    margin: 0;
    font-size: 19px;
    line-height: 28px;
}

.news-list-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-list-card b { color: #94a3b8; font-size: 22px; font-weight: 400; }

.news-empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ── 详情页 ─────────────────────────────── */
.news-detail-page { padding: 56px 64px 72px; background: #f8fafc; }
.news-detail-shell { max-width: 860px; margin: 0 auto; }

.news-detail-back { margin-bottom: 20px; }
.news-detail-back a {
    color: var(--teal);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.news-article {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
}

.article-category { display: inline-block; margin-bottom: 14px; }
.article-title { margin: 0 0 12px; font-size: 38px; line-height: 1.3; }

.article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.article-cover {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

/* ── Editor.js 输出渲染 ─────────────────────────────── */
.editorjs-output h2 { font-size: 26px; margin: 32px 0 14px; }
.editorjs-output h3 { font-size: 21px; margin: 26px 0 12px; }
.editorjs-output h4 { font-size: 18px; margin: 22px 0 10px; }

.editorjs-output p {
    color: #334155;
    font-size: 17px;
    line-height: 31px;
    margin: 0 0 18px;
}

.editorjs-output img {
    max-width: 100%;
    border-radius: 6px;
    margin: 18px 0;
    display: block;
}

.editorjs-output ul,
.editorjs-output ol {
    padding-left: 24px;
    margin: 0 0 18px;
    color: #334155;
    font-size: 17px;
    line-height: 31px;
}

.editorjs-output blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--teal);
    background: var(--teal-2);
    border-radius: 0 6px 6px 0;
    color: #0f4c48;
    font-style: italic;
    font-size: 17px;
    line-height: 28px;
}

.editorjs-output hr {
    border: none;
    border-top: 2px solid var(--line);
    margin: 32px 0;
}

/* ── 相关资讯 ─────────────────────────────── */
.related-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.related-section h2 { margin: 0 0 16px; font-size: 22px; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.related-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fafc;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover { border-color: #99f6e4; }
.related-card h3 { margin: 8px 0 0; font-size: 15px; line-height: 22px; }

/* ── 分页 ─────────────────────────────── */
.web-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.web-pagination a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.web-pagination a.disabled { color: #cbd5e1; pointer-events: none; }
.web-pagination span { color: var(--muted); font-size: 14px; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1040px) {
    .news-page, .news-detail-page { padding: 42px 24px 58px; }
    .news-article { padding: 28px 24px; }
}

@media (max-width: 640px) {
    .news-list-card { grid-template-columns: 1fr; }
    .news-card-cover { height: 160px; }
    .article-title { font-size: 28px; }
    .related-grid { grid-template-columns: 1fr; }
}
