/* =========================================
 * 首页技术支持区 - 新闻媒体模块样式
 * 应用于 .flex-support-wrap / .flex-news / .news-scroll
 *
 * 视觉规范（参考子菜单"媒体报道"页）：
 *   - 标题在上、日期在下、虚线分隔
 *   - 黑字白底
 *   - 头删+尾加滚动（JS 每 2s 向上滑一行，动画结束后删除首条 li 并追加新 li）
 *
 * v6 关键变更：
 *   - 改为"头删+尾加"轮播：每次 tick 删除首条 li 并追加新 li，永不复制数据
 *   - li 固定高度 84px，保证每行严格对齐
 *   - 容器高度 = 84 × 行数，桌面 5 行 / 移动 4 行
 *
 * v8 关键变更：
 *   - .flex-news 改为 height:auto + min-height:0，完全由 JS 强同步高度，
 *     不再依赖 CSS min-height 下限。JS 使用 ResizeObserver + window.resize(16ms)
 *     实现窗口 resize 时实时同步。
 * ========================================= */

:root {
    --news-step: 84px;
    --news-visible: 5;
    --news-height: 418px;
}

/* 静态展示模式：全部 20 条一次性渲染，禁用滚动动画 */
.static-mode .news-scroll,
.news-scroll.is-static {
    overflow: visible;
}

.flex-support-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.flex-support-wrap>h2 {
    width: 100%;
    flex: 0 0 100%;
}

.flex-support-wrap .flex-sensior,
.flex-support-wrap .flex-news {
    flex: 1 1 0;
    min-width: 280px;
    margin: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
}

.flex-news {
    background: #ffffff;
    padding: 0 24px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 999;
    isolation: isolate;
    /* 交给 JS 精确同步高度，不再设下限；保留 box-sizing 保证计算准确。 */
    height: auto;
    min-height: 0;
    box-sizing: border-box;
}

.flex-news h3 {
    font-size: 20px;
    margin: 0;
    color: #222;
    padding: 0 10px;
    font-weight: bold;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    background-color: #ffffff;
}


.news-title-bar {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
    z-index: 9999999;
    background-color: #ffffff;
    flex-shrink: 0;
}

.news-title-bar-line {
    width: 4px;
    height: 50%;
    background-color: #007bff;
    flex-shrink: 0;
}

.news-title-bar h3 {
    margin: 0;
}

/* 列表容器：填满标题下方剩余空间，overflow:hidden 裁剪超出的 li */
ul#news-list.news-scroll,
.news-scroll {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    flex: 1;
    /* 自动填满标题下方所有剩余空间 */
    min-height: 0;
    /* 允许 flex 子项收缩到 0 */
    overflow: hidden;
    background: #ffffff;
    will-change: transform;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* 单条新闻：固定 84px 高度，标题/日期垂直居中分布 */
ul#news-list.news-scroll li.news-item,
.news-scroll li.news-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    /* 约束在 ul 宽度内，防止溢出 */
    height: var(--news-step);
    padding: 12px 14px;
    border-bottom: 1px dashed #e5e5e5;
    background: #ffffff;
    color: #222;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    overflow: hidden;
}

/* 标题行：高优先级选择器 + !important，强制黑字覆盖全局 a 样式 */
ul#news-list.news-scroll li.news-item .news-title,
.news-scroll li.news-item .news-title {
    display: block;
    color: #222 !important;
    background: transparent !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}

ul#news-list.news-scroll li.news-item .news-title:link,
ul#news-list.news-scroll li.news-item .news-title:visited,
.news-scroll li.news-item .news-title:link,
.news-scroll li.news-item .news-title:visited {
    color: #222 !important;
    background: transparent !important;
}

ul#news-list.news-scroll li.news-item .news-title:hover,
.news-scroll li.news-item .news-title:hover {
    color: #007bff !important;
}

/* 日期：灰色小字，固定在标题下方 */
ul#news-list.news-scroll li.news-item .news-time,
.news-scroll li.news-item .news-time {
    display: block;
    color: #999 !important;
    font-size: 12px;
    font-family: Consolas, Monaco, monospace;
    line-height: 16px;
}

/* 模拟数据角标 */
ul#news-list.news-scroll li.news-item .news-mock,
.news-scroll li.news-item .news-mock {
    display: inline-block;
    background: #ff9f43;
    color: #fff !important;
    font-size: 12px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 3px;
    line-height: 18px;
    vertical-align: middle;
    font-weight: normal;
}

ul#news-list.news-scroll li.news-empty,
.news-scroll li.news-empty {
    text-align: center;
    color: #999;
    padding: 120px 0;
    border-bottom: none;
    font-size: 14px;
}

/* 响应式：移动端同样 flex 布局，ul 自动填满剩余空间 */
@media (max-width: 767px) {

    .flex-support-wrap .flex-sensior,
    .flex-support-wrap .flex-news {
        flex: 1 1 100%;
        margin: 6px 0;
    }

    .flex-news {
        padding: 0 16px 16px;
    }

    .flex-news h3 {
        font-size: 18px;
    }

    .news-title-bar {
        height: 30px;
    }
}