/* =========================================================
   新闻列表页专属样式 (news.css)
   ========================================================= */

/* --- 头部搜索栏 --- */
.header-search-wrap {
    display: flex; align-items: center; width: 100%; padding: 0 10px; background: var(--bg-card);
}
.search-input-box {
    flex: 1; display: flex; align-items: center; background: var(--bg-page);
    border-radius: 18px; padding: 6px 12px; margin: 0 10px; position: relative;
}
.search-input-box i.fa-magnifying-glass { color: #999; font-size: 14px; }
.search-input-box input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; margin-left: 6px; color: var(--text-main);
}
.clear-input-btn { display: none; color: #ccc; font-size: 14px; padding: 4px; cursor: pointer; transition: color 0.2s; }
.clear-input-btn:hover { color: #999; }
.search-btn { font-size: 14px; color: var(--primary); font-weight: 600; cursor: pointer; padding: 4px 8px; flex-shrink: 0; }
.cancel-btn { font-size: 14px; color: var(--text-main); cursor: pointer; flex-shrink: 0; padding: 4px; }

/* --- 筛选区吸顶 --- */
.filter-sticky {
    position: sticky; top: 56px; background: var(--bg-page); z-index: 90;
    padding: 10px 0 12px; border-bottom: 1px solid var(--border-light);
    margin: 0 -16px; padding-left: 16px; padding-right: 16px;
}
.sub-cats-wrap { position: relative; }
.sub-cats-scroll { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; padding-right: 30px; }
.sub-cats-scroll::-webkit-scrollbar { display: none; }
.sub-cat-item { background: #fff; border: 1px solid var(--border-light); padding: 6px 14px; border-radius: 20px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; text-decoration: none; }
.sub-cat-item.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); font-weight: 600; }
.scroll-mask { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: linear-gradient(to right, rgba(251,248,245,0) 0%, rgba(251,248,245,1) 90%); pointer-events: none; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; color: #999; font-size: 12px; }

/* --- Banner Swiper --- */
.banner-swiper {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: var(--bg-soft);
}
.banner-swiper .swiper-slide { width: 100%; height: 100%; }
.banner-swiper .swiper-pagination-bullet { background: #fff; opacity: 0.6; }
.banner-swiper .swiper-pagination-bullet-active { background: var(--primary); opacity: 1; }
@media (min-width: 600px) {
    .banner-swiper { border-radius: var(--radius-card); margin-top: 16px; overflow: hidden; }
}

/* --- 新闻列表与卡片 --- */
.list-container { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 14px;
    box-shadow: var(--shadow-card);
    display: flex;
    text-decoration: none;
    color: inherit;
}
/* 置顶专属卡片背景 */
.news-card.is-top { /*background: #FFFBF0;*/ }

.news-img {
    width: 120px;
    height: auto;
    min-height: 85px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    flex-shrink: 0;
    overflow: hidden;
    margin-right: 12px;
    position: relative;
}
.news-img img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }

.news-img-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #F7F7F7; color: #CCC; position: absolute; inset: 0;
}
.news-img-placeholder i { font-size: 24px; }

.news-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }

.article-tags { margin-bottom: 4px; display: flex; gap: 4px; }
.article-tags .tag-top { background: var(--primary); color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 2px; }
.article-tags .tag-cate { background: var(--primary-light); color: var(--primary); font-size: 10px; padding: 1px 4px; border-radius: 2px; }

.news-title {
    font-size: 15px; font-weight: 700; color: var(--text-main); line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;
}

.news-desc {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px;
}

.news-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }