/* ====================================================================
   list_news.css — 新闻列表页（lists_news.htm）与标签页（lists_tags.htm）
   ====================================================================

   卡片与分页的公共基类在 components/card.css，必须早于本文件加载。
   本文件只保留两类内容：
     ① 本页独有组件（.news-item 族）；
     ② 与 list_common.css 存在真实数值漂移、尚未裁定的部分（逐条注明）。

   本次合并已删除本文件中【无宿主】的 .item-card / .item-card-img /
   .item-card-title 副本（约 48 行）：lists_news.htm 与 lists_tags.htm
   都不渲染 .item-card，那份定义从不生效，且与 list_common.css 的活版本
   数值不一致（aspect-ratio、padding、border-bottom 色、title 的 height
   对 min-height、底色），正是审计 E2 点名的"同名不同值"漂移源。
   活版本现在只有一份，在 components/card.css。
   ==================================================================== */

/* ---------- 卡片基类的本页侧 delta ---------- */
/* 静置阴影 0 2 10px 已删除：2026-09-22 裁定与列表页统一为 8px，
   单一来源在 components/card.css 基类组。本页 .news-item 因此从 10px 收到 8px。
   cursor / outline 只有本文件有（list_common 版无），保留；
   选择器去掉 .item-card —— 本页从不渲染它，那条是死的。 */
.level1-card, .news-item {
    cursor: pointer; /* 确保鼠标悬停时显示手型 */
    outline: none; /* 清除点击时的焦点外框 */
}

/* 【层叠拆分】原是一条组规则同时给 transform 与 box-shadow。
   因 .level1-card:hover 的 inset 阴影已抽到 components/card.css（先加载），
   若本条仍命中 level1，两条 !important 同权重时"后加载者胜"，
   level1 的悬停阴影会从 inset 粗边翻转成普通投影 —— 渲染改变。
   故此处把 transform 与 box-shadow 拆开。
   【2026-09-22 漂移已统一】level1 已完全退出本文件：其上浮（-4px）与
   阴影（inset 蓝环）均由 components/card.css 基类提供。
   本文件只保留本页独有的 .news-item，并同步采用家族语言。 */
.news-item:hover {
    /* 上浮 -5px → -4px：与 .entry-card / .level1-card / .item-card 一致 */
    transform: translateY(-4px);
    /* 原 0 10px 25px / alpha .15 的普通投影 → 全族统一的 inset 蓝环，
       与 .level1-card:hover 同值；蓝边框由 card.css 基类组提供。 */
    box-shadow: inset 0 0 0 1px #0d6efd, 0 10px 24px rgba(13, 110, 253, 0.25) !important;
}

/* ---------- 一级目录大卡片：本页侧 delta ---------- */
/* list_common 版无此 margin（其卡片由 .row.g-4 栅格控制间距）。 */
.level1-card {
    margin-bottom: 24px;
}

/* min-height 与 .level1-info 的 padding 两项漂移已于 2026-09-22 裁定统一，
   单一来源在 components/card.css 基类：min-height clamp(180px,20vw,220px)、
   padding clamp(16px,2.2vw,30px)。两项都取了本页原值，故本页渲染不变。 */

/* 【真设计差异，不是漂移】本页图片填满并裁切：height:100% + object-fit:cover；
   list_common 版是 height:auto（等比缩放、整图可见）。各有意图，未经裁定不得统一。 */
.level1-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* （.level1-info 的 padding 已上收至 card.css 基类，见上方说明） */

/* =========================================
   News - 列表样式（一行一个）
   =========================================
   本页独有组件。注意两种 markup：
   lists_news.htm:69 的 .news-item 是 <a>；lists_tags.htm:45 是 <article>
   且把 .news-img-box 直接放在 <a> 上 —— 同一条规则服务两种嵌套。 */
.news-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    text-decoration: none; /* 保持无下划线 */
    color: inherit; /* 保持文字颜色继承，不变成链接蓝色 */
    margin-bottom: 25px;
}

.news-img-box {
    width: clamp(140px, 14vw, 200px);
    height: clamp(140px, 14vw, 200px);
    flex-shrink: 0;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.news-item:hover .news-img-box img {
    transform: scale(1.05);
}

.news-info {
    padding: clamp(14px, 2vw, 30px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.news-item:hover .news-info h3 {
    color: #0d6efd;
}

/* 仅 lists_tags.htm:53 渲染（lists_news.htm 的条目无摘要节点）。 */
.news-desc {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* A2：模板已去掉硬编码的 "..."。notes 附加字段未填时整段无内容，
   但仍是一个 <p>，会吃掉一行行高 + 段落间距，把卡片撑出空隙。故折叠。 */
.news-desc:empty { display: none; }

/* ============================================================
   标签页主标题（lists_tags.htm 的 #tag-heading）
   ------------------------------------------------------------
   该标题原先是 <h3>，为补齐全页缺失的 H1 改成 <h1>。它没有
   Bootstrap 的 .hN 类可以钉字号，若不处理会直接吃 base.css 的
   h1 规则 clamp(1.8rem,2.5vw,2.8rem)/800，比原来的 h3 规则
   clamp(1.25rem,1.5vw,1.65rem)/600 大出近一倍，桌面端明显变化。
   base.css 中 h1 与 h3 仅差 font-size 与 font-weight 两个属性
   （line-height / margin 由 Bootstrap reboot 统一给出，与标签无关），
   所以只需复刻这两行。
   ID 选择器特异性 (1,0,0) 高于 base.css 的元素选择器 (0,0,1)，桌面端生效。
   【移动端已知变化】≤991.98px 时 base.css 的 h1{…!important} 会压过本规则，
   字号变大 —— 与 lists_common / lists_news 的 H1 提升是同一情况，
   本轮按决定暂不处理，待真机复核。
   ============================================================ */
#tag-heading {
    font-size: clamp(1.25rem, 1.5vw, 1.65rem);
    font-weight: 600;
}

/* ---------- 分页：本页侧 delta ----------
   .pagination-wrapper / .pagination / a:hover / .active 四条两版相同，
   已在 components/card.css。此处只留两版不同值的 a 与 span。
   注意：list_common.css 曾有 .pagination .disabled（8px 16px 版），
   因 lists_common.htm 无分页 markup 属死代码，已删除未搬到 card.css。 */
.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.2s;
}

@media (max-width: 768px) {
    .level1-card,
    .news-item {
        flex-direction: column;
    }

    .level1-img,
    .news-img-box {
        width: 100%;
        height: 200px;
    }

    .level1-info {
        width: 100%;
    }

    .news-info h3 {
        font-size: 1.05rem;
    }
}
