/* ===========================================================
   新闻资讯页面样式（resources/newpage/news.html）
   依赖 home.css 的 Design Tokens、page-hero、cta-band
   模板结构：
     - page-hero（标题 + 简介）
     - filter-bar（sticky 顶部 · 横向 tab 筛选 + 搜索框）
     - news-list-wrap
       - news-layout (1fr + 300px)
         - news-list（多条 news-card，含 1 条 feature 头条）
         - sidebar（hot-list + tag-cloud + side-cta）
       - pager
     - cta-band
   =========================================================== */

/* ============== 分类筛选 sticky bar ============== */
.filter-bar {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 76px;
    z-index: 10;
}
.filter-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    font-size: 13px;
    font-weight: 500;
    color: var(--c-ink-2);
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
}
.filter-tab:hover {
    color: var(--c-brand);
    border-color: var(--c-brand);
}
.filter-tab.is-active {
    background: var(--c-brand);
    color: #fff;
    border-color: var(--c-brand);
}
.filter-tab .count {
    font-size: 11px;
    opacity: .7;
    font-weight: 500;
}
.filter-search {
    position: relative;
}
.filter-search input {
    width: 240px;
    height: 36px;
    padding: 0 14px 0 36px;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    background: var(--c-surface-2);
    font-size: 13px;
    color: var(--c-ink);
    font-family: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.filter-search input:focus {
    outline: none;
    border-color: var(--c-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11,37,69,.08);
}
.filter-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--c-ink-3);
}

/* ============== 新闻列表主区 ============== */
.news-list-wrap {
    background: var(--c-bg);
    padding: 56px 0 80px;
}
.news-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ============== 新闻卡片 ============== */
.news-list {
    display: grid;
    gap: 20px;
}
.news-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    text-decoration: none;
    color: inherit;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-brand);
}
.news-card .cover {
    position: relative;
    background: linear-gradient(135deg, #0B2545 0%, #143A6B 100%);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.85);
    overflow: hidden;
}
.news-card .cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 24px 24px;
}
.news-card .cover svg.cover-icon {
    position: relative;
    width: 56px;
    height: 56px;
    opacity: .9;
}
.news-card .cover img.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.news-card .cover .date {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,.92);
    color: var(--c-brand);
    font-size: 12px;
    font-weight: 600;
    font-feature-settings: "tnum";
    z-index: 2;
}
.news-card .body {
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
}
.news-card .tag {
    font-size: 11px;
    color: var(--c-accent);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}
.news-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-ink);
    margin: 0 0 10px;
    line-height: 1.45;
    transition: color .18s ease;
}
.news-card:hover h3 { color: var(--c-brand); }
.news-card .excerpt {
    font-size: 13px;
    color: var(--c-ink-3);
    line-height: 1.75;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card .meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--c-ink-4);
    margin-top: auto;
    flex-wrap: wrap;
}
.news-card .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.news-card .meta-item svg {
    width: 12px;
    height: 12px;
}
.news-card .read-more {
    margin-left: auto;
    color: var(--c-brand);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .18s ease, gap .18s ease;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
}
.news-card:hover .read-more {
    color: var(--c-accent);
    gap: 8px;
}
.news-card .read-more svg {
    width: 12px;
    height: 12px;
}

/* ============== 特色头条（垂直布局）============== */
.news-card.feature {
    grid-template-columns: 1fr;
}
.news-card.feature .cover { min-height: 280px; }
.news-card.feature .cover svg.cover-icon { width: 80px; height: 80px; }
.news-card.feature .body { padding: 28px 32px 30px; }
.news-card.feature h3 { font-size: 22px; }
.news-card.feature .excerpt { font-size: 14px; }

/* 空状态 */
.news-empty {
    grid-column: 1 / -1;
    background: var(--c-surface);
    border: 1px dashed var(--c-line);
    border-radius: var(--r-lg);
    padding: 64px 24px;
    text-align: center;
    color: var(--c-ink-3);
    font-size: 14px;
}
.news-empty strong {
    display: block;
    color: var(--c-ink);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 700;
}

/* ============== 侧边栏 ============== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 152px;
}
.side-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    padding: 22px 22px 24px;
}
.side-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.side-card h4::before {
    content: '';
    width: 4px;
    height: 14px;
    background: var(--c-accent);
    border-radius: 2px;
}

/* 热门文章 TOP 5 */
.hot-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}
.hot-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.hot-list .num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--c-surface-2);
    color: var(--c-ink-3);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    font-feature-settings: "tnum";
}
.hot-list li:nth-child(1) .num { background: var(--c-accent); color: #fff; }
.hot-list li:nth-child(2) .num { background: rgba(242,92,42,.85); color: #fff; }
.hot-list li:nth-child(3) .num { background: rgba(242,92,42,.65); color: #fff; }
.hot-list .ttl {
    font-size: 13px;
    color: var(--c-ink);
    line-height: 1.55;
    font-weight: 500;
    transition: color .18s ease;
}
.hot-list li:hover .ttl { color: var(--c-accent); }
.hot-list .d {
    font-size: 11px;
    color: var(--c-ink-4);
    margin-top: 4px;
    font-feature-settings: "tnum";
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-cloud button,
.tag-cloud .tag-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-line);
    font-size: 12px;
    color: var(--c-ink-2);
    transition: all .18s ease;
    cursor: pointer;
}
.tag-cloud button:hover,
.tag-cloud .tag-pill:hover {
    color: var(--c-brand);
    border-color: var(--c-brand);
}

/* 侧边 CTA */
.side-cta {
    background: linear-gradient(135deg, #061A36 0%, #0B2545 100%);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
}
.side-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .6;
}
.side-cta h4 { color: #fff; }
.side-cta h4::before { background: var(--c-accent-2); }
.side-cta p {
    font-size: 13px;
    color: rgba(255,255,255,.75);
    margin: 0 0 16px;
    line-height: 1.7;
    position: relative;
}
.side-cta .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    background: var(--c-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: background .18s ease;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}
.side-cta .btn:hover { background: #DC4A1A; }
.side-cta .btn svg { width: 14px; height: 14px; }

/* ============== 分页（复用 products.css 的 .pager 样式 + 微调）============== */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}
.news-pager button,
.news-pager a,
.news-pager span {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-ink-2);
    font-size: 13px;
    font-feature-settings: "tnum";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
    text-decoration: none;
    cursor: pointer;
}
.news-pager a:hover:not(.disabled):not(.is-active) {
    color: var(--c-brand);
    border-color: var(--c-brand);
}
.news-pager button:hover:not(:disabled) {
    color: var(--c-brand);
    border-color: var(--c-brand);
}
.news-pager button:disabled,
.news-pager .disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
.news-pager a.is-active,
.news-pager button.is-active,
.news-pager .is-active {
    background: var(--c-brand);
    color: #fff;
    border-color: var(--c-brand);
}
.news-pager .ellipsis {
    color: var(--c-ink-4);
    padding: 0 4px;
    border: none;
    background: transparent;
}
.news-pager svg { width: 14px; height: 14px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .news-card, .filter-tab, .news-pager a, .news-pager button, .hot-list .ttl {
        transition: none !important;
    }
}

/* ============== 响应式 ============== */
@media (max-width: 1100px) {
    .news-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .filter-search input { width: 200px; }
}
@media (max-width: 760px) {
    .filter-bar { position: static; }
    .filter-bar-inner { padding: 14px 0; }
    .filter-search { display: none; }
    .news-list-wrap { padding: 36px 0 56px; }
    .news-card { grid-template-columns: 1fr; }
    .news-card .cover { min-height: 160px; }
    .news-card.feature .cover { min-height: 200px; }
    .news-card .body { padding: 20px; }
    .news-card.feature .body { padding: 22px; }
    .news-card h3 { font-size: 16px; }
    .news-card.feature h3 { font-size: 18px; }
    .news-pager { margin-top: 32px; }
}