/* ============================================================
   资讯中心 · 统一主题样式（news-theme.css）
   ------------------------------------------------------------
   2026-10-19 新建：资讯模块重构（导航页/列表页/详情页/侧栏共用）
   设计语言：杂志风 + 卡片流，白底 + 深灰文字 + 品牌色 #423dff 点缀
   对接页面：news/index.php、news/list.php、news/detail.php、news/sidebar.php
   ============================================================ */

/* ---------- 页面容器 ---------- */
.news-hub {
    padding: var(--space-4-5) 0;
}

/* ---------- 面包屑 ---------- */
.news-crumb {
    font-size: 12px;
    color: #a0a6b0;
    margin-bottom: var(--space-4-5);
    line-height: 1.8;
}
.news-crumb a { color: #a0a6b0; text-decoration: none; }
.news-crumb a:hover { color: #423dff; }
.news-crumb .sep { margin: 0 6px; color: #c2c7d0; }

/* ---------- 标题区（杂志式） ---------- */
.news-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-5);
    margin-bottom: 20px;
}
.news-hero__eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: #423dff;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.news-hero__title {
    font-size: 26px;
    font-weight: 600;
    color: #14161a;
    line-height: 1.2;
    margin: 0;
}
.news-hero__desc {
    font-size: 13px;
    color: #8a909c;
    margin-top: 8px;
}
.news-hero__search {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 10px;
    padding: 0 6px 0 14px;
    height: 42px;
    box-sizing: border-box;
    transition: border-color .18s ease;
}
.news-hero__search:focus-within { border-color: #423dff; }
.news-hero__search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: #14161a;
    height: 100%;
    min-width: 0;
}
.news-hero__search input::placeholder { color: #a0a6b0; }
.news-hero__search button {
    flex: none;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #423dff;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

/* ---------- 分类 Tab 条 ---------- */
.news-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: 24px;
}
.news-tabs a {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e3e6ec;
    font-size: 13px;
    color: #4a4f59;
    text-decoration: none;
    transition: all .18s ease;
}
.news-tabs a:hover { border-color: #423dff; color: #423dff; }
.news-tabs a.is-active {
    background: #14161a;
    border-color: #14161a;
    color: #fff;
}

/* ---------- 主体两栏（内容 + 侧栏） ---------- */
.news-layout {
    display: flex;
    gap: var(--space-4-5);
    align-items: flex-start;
}
.news-main { flex: 1; min-width: 0; }

/* ---------- 焦点区 ---------- */
.news-focus {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.news-focus__main {
    flex: 1.5;
    min-width: 0;
    display: block;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}
.news-focus__main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 22, 26, .08);
}
.news-focus__cover {
    height: 200px;
    background: linear-gradient(135deg, #2d2866 0%, #14161a 100%);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}
.news-focus__cover::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -36px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(66, 61, 255, .22);
    pointer-events: none;
}
.news-focus__cover .news-tag { margin-bottom: 8px; }
.news-focus__headline {
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.news-focus__meta {
    padding: 12px 16px;
    font-size: 12px;
    color: #8a909c;
    display: flex;
    gap: var(--space-3-5);
    flex-wrap: wrap;
}
.news-focus__side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.news-focus__item {
    display: block;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 10px;
    padding: 13px 15px;
    text-decoration: none;
    transition: border-color .18s ease;
}
.news-focus__item:hover { border-color: #423dff; }
.news-focus__item .t {
    font-size: 13px;
    color: #14161a;
    line-height: 1.55;
}
.news-focus__item .d {
    font-size: 11px;
    color: #a0a6b0;
    margin-top: 6px;
}

/* ---------- 分类区块 ---------- */
.news-block { margin-bottom: 34px; }
.news-block:last-child { margin-bottom: 0; }
.news-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}
.news-block__title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 17px;
    font-weight: 600;
    color: #14161a;
    text-decoration: none;
}
.news-block__title::before {
    content: "";
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: #423dff;
}
.news-block__count {
    font-size: 11px;
    color: #a0a6b0;
    background: #f0f1f4;
    border-radius: 999px;
    padding: 2px 9px;
    font-weight: 400;
}
.news-block__more {
    font-size: 12px;
    color: #8a909c;
    text-decoration: none;
}
.news-block__more:hover { color: #423dff; }

/* ---------- 卡片网格 ---------- */
.news-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3-5);
}
.news-card {
    display: block;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 22, 26, .08);
}
.news-card__thumb {
    height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    letter-spacing: 1px;
}
.news-card__thumb--a { background: #d9d6fb; color: #423dff; }
.news-card__thumb--b { background: #cdeee1; color: #0f6e56; }
.news-card__thumb--c { background: #fbecc9; color: #854f0b; }
.news-card__thumb--d { background: #f9d7d7; color: #a32d2d; }
.news-card__body { padding: 12px 14px 14px; }
.news-card__title {
    font-size: 13px;
    color: #14161a;
    line-height: 1.55;
    margin: 8px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card__meta {
    font-size: 11px;
    color: #a0a6b0;
    margin-top: 8px;
    display: flex;
    gap: var(--space-3);
}

/* ---------- 品类标签 ---------- */
.news-tag {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    padding: 4px 9px;
    border-radius: 4px;
    background: #eeedfe;
    color: #423dff;
}
.news-tag--b { background: #e1f5ee; color: #0f6e56; }
.news-tag--c { background: #faeeda; color: #854f0b; }
.news-tag--d { background: #fcebeb; color: #a32d2d; }

/* ---------- 列表页：图文列表 ---------- */
.news-list { display: flex; flex-direction: column; gap: var(--space-3-5); }
.news-item {
    display: flex;
    gap: var(--space-4-5);
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    transition: box-shadow .18s ease, transform .18s ease;
}
.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(20, 22, 26, .08);
}
.news-item__thumb {
    flex: 0 0 180px;
    height: 120px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    letter-spacing: 1px;
}
.news-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-item__title {
    font-size: 16px;
    font-weight: 600;
    color: #14161a;
    line-height: 1.5;
    margin: 0;
}
.news-item:hover .news-item__title { color: #423dff; }
.news-item__desc {
    font-size: 13px;
    color: #8a909c;
    line-height: 1.75;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item__meta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 12px;
    color: #a0a6b0;
    display: flex;
    gap: var(--space-3-5);
    flex-wrap: wrap;
}

/* ---------- 分页（统一风格） ---------- */
.news-pager {
    margin-top: 24px;
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}
.news-pager a,
.news-pager span {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    line-height: 32px;
    padding: 0 10px;
    box-sizing: border-box;
    text-align: center;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #e3e6ec;
    background: #fff;
    color: #4a4f59;
    text-decoration: none;
}
.news-pager a:hover { border-color: #423dff; color: #423dff; }
.news-pager .is-current {
    background: #423dff;
    border-color: #423dff;
    color: #fff;
}

/* ---------- 详情页 ---------- */
.news-article {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: var(--space-6) var(--space-6) var(--space-6);
}
.news-article__head {
    padding-bottom: var(--space-4-5);
    border-bottom: 1px solid #f0f1f4;
    margin-bottom: var(--space-5);
}
.news-article__title {
    font-size: 26px;
    font-weight: 600;
    color: #14161a;
    line-height: 1.45;
    margin: var(--space-3) 0 0;
}
.news-article__meta {
    margin-top: 14px;
    font-size: 13px;
    color: #8a909c;
    display: flex;
    gap: var(--space-4-5);
    flex-wrap: wrap;
}
.news-article__body {
    font-size: 16px;
    color: #2c3038;
    line-height: 1.95;
}
.news-article__body p { margin: 0 0 var(--space-4); }
.news-article__body ul,
.news-article__body ol {
    margin: 0 0 var(--space-4);
    list-style: none;
    padding-left: 28px;
}
.news-article__body ol { counter-reset: news-item; }
.news-article__body li {
    margin-bottom: var(--space-2);
    line-height: 1.9;
    position: relative;
}
.news-article__body ol > li { counter-increment: news-item; }
.news-article__body ol > li::before {
    content: counter(news-item) ".";
    position: absolute;
    left: -24px;
    top: 0;
    color: #4233ff;
    font-weight: 600;
}
.news-article__body ul > li::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4233ff;
}
.news-article__body h2 {
    font-size: 20px;
    font-weight: 600;
    color: #14161a;
    margin: var(--space-6) 0 var(--space-3);
    padding-left: 12px;
    border-left: 3px solid #423dff;
    line-height: 1.4;
}
.news-article__body h3 {
    font-size: 17px;
    font-weight: 600;
    color: #14161a;
    margin: var(--space-5) 0 var(--space-3);
}
.news-article__body img { max-width: 100%; height: auto; border-radius: 8px; }
.news-article__body a {
    color: #423dff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.news-article__body a:hover { color: #2f28d6; }
.news-article__body blockquote {
    margin: var(--space-4-5) 0;
    padding: var(--space-3-5) var(--space-4);
    background: #f6f8fa;
    border-left: 3px solid #423dff;
    border-radius: 0 8px 8px 0;
    color: #4a4f59;
    font-size: 15px;
}
/* ---------- 正文表格：轻框体系（全局规则，不加表级类名） ---------- */
.news-article__body .tbl-wrap {
    width: 100%;
    margin: 22px 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.news-article__body .tbl-wrap table {
    width: auto;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 14px;
    line-height: 1.65;
    font-variant-numeric: tabular-nums;
}
/* 表内存在长文本列（c-l：该列最长值 >12 字）时铺满容器：多余宽度只落到该列，
   多张表右边缘对齐；纯短值表保持收缩，避免每格两侧大片空白。
   仅桌面生效——移动端铺满会把 4 列硬压进 358px。 */
@media (min-width: 769px) {
    .news-article__body .tbl-wrap:has(thead th.c-l) table {
        width: 100%;
    }
}
.news-article__body th,
.news-article__body td {
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #e5e8ef;
    word-break: normal;
    overflow-wrap: break-word;
    line-break: strict;
}
.news-article__body thead th {
    padding: 10px 12px;
    font-weight: 600;
    color: #14161a;
    white-space: nowrap;
    background: #f6f8fa;
    border-bottom-color: #dde2ea;
}
.news-article__body tbody tr:nth-child(2n) td { background: #fafbfc; }
.news-article__body .tbl-wrap.is-tall tbody tr:nth-child(2n) td { background: #f4f6f9; }
.news-article__body .c-s { white-space: nowrap; text-align: center; }
.news-article__body .c-c { white-space: nowrap; text-align: center; }
.news-article__body .c-n {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .news-article__body .tbl-wrap table { font-size: 13px; line-height: 1.6; }
    .news-article__body th,
    .news-article__body td { padding: 8px 9px; }
    .news-article__body thead th { padding: 9px 9px; }
    .news-article__body .c-s,
    .news-article__body .c-c { white-space: normal; }
}
.news-article__foot {
    margin-top: var(--space-6);
    padding-top: var(--space-4-5);
    border-top: 1px solid #f0f1f4;
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    font-size: 13px;
    color: #8a909c;
}
.news-article__foot a { color: #4a4f59; text-decoration: none; }
.news-article__foot a:hover { color: #423dff; }

/* 相关文章 */
.news-related { margin-top: var(--space-6); }
.news-related__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 17px;
    font-weight: 600;
    color: #14161a;
    margin-bottom: 16px;
}
.news-related__head::before {
    content: "";
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: #423dff;
}

/* ---------- 侧栏 ---------- */
.news-sidebar {
    flex: 0 0 300px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4-5);
}
.news-panel {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: 16px;
}
.news-panel__head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    font-weight: 600;
    color: #14161a;
    margin-bottom: 12px;
}
.news-panel__more {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: #423dff;
    text-decoration: none;
}
.news-panel__more:hover { color: #2f28d6; }
.news-panel__head::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: #14161a;
}
.news-hot { display: flex; flex-direction: column; }
.news-hot__item {
    display: flex;
    gap: var(--space-2);
    padding: 7px 9px;
    margin: 0 -9px;
    border-radius: 8px;
    text-decoration: none;
    align-items: flex-start;
}
.news-hot__item:hover { background: #f6f8fa; }
.news-hot__no {
    flex: none;
    min-width: 19px;
    height: 19px;
    padding: 0 3px;
    border-radius: 5px;
    font-size: 10.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b6bcc8;
}
/* TOP3 高亮由 PHP 输出 is-top（$i < 3），不用 :nth-child——
   避免 DOM 位置耦合：将来在 .news-hot 内新增任何兄弟元素都不会错位 */
.news-hot__item.is-top .news-hot__no { background: #eef0ff; color: #423dff; }
.news-hot__title {
    font-size: 13px;
    color: #4a4f59;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-hot__item:hover .news-hot__title { color: #423dff; }
.news-cats { display: flex; flex-direction: column; }
.news-cats__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 9px;
    margin: 0 -9px;
    border-radius: 8px;
    font-size: 13px;
    color: #4a4f59;
    text-decoration: none;
}
.news-cats__item::before {
    content: "";
    flex: none;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d5d9e2;
}
.news-cats__item:hover { background: #f6f8fa; color: #423dff; }
.news-cats__item.is-active { background: #eef0ff; color: #423dff; font-weight: 600; }
.news-cats__item.is-active::before { background: #423dff; }
.news-cats__count {
    margin-left: auto;
    font-size: 11px;
    color: #a0a6b0;
    white-space: nowrap;
}
.news-cats__item:hover .news-cats__count,
.news-cats__item.is-active .news-cats__count { color: #423dff; }

/* ---------- 详情页侧栏吸顶（对齐帮助中心文章页） ----------
   top = 内页吸顶 header 122 + news-hub 上边距 20 = 142（零首次跳动，与 help 的 142 同式）；
   侧栏约 420px，矮视口时内部滚动。 */
@media (min-width: 993px) {
    .news-hub--detail .news-sidebar {
        position: sticky;
        top: 142px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(15, 23, 42, .14) transparent;
    }
}

/* ---------- 空态 ---------- */
.news-empty {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: var(--space-7) var(--space-4-5);
    text-align: center;
    color: #a0a6b0;
    font-size: 14px;
}

/* ---------- 响应式（窄屏降级） ---------- */
@media (max-width: 992px) {
    .news-hero { flex-direction: column; align-items: flex-start; }
    .news-hero__search { flex: 0 0 auto; width: 100%; }
    .news-focus { flex-direction: column; }
    .news-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-layout { flex-direction: column; }
    .news-sidebar { flex: 0 0 auto; width: 100%; }
    .news-item__thumb { flex: 0 0 140px; height: 100px; }
}
@media (max-width: 760px) {
    .news-cards { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .news-item__thumb { flex: 0 0 auto; width: 100%; height: 140px; }
    /* 移动端卡片收紧到 16px（此前与桌面同值 20/20/24，token 化后成为空规则） */
    .news-article { padding: var(--space-4); }
    .news-article__title { font-size: 21px; }
}
