/* =========================================================
   资讯动态模块样式：首页资讯列表 / 资讯列表页 / 资讯详情页
   风格与首页保持一致（卡片 + 圆角 + 浅阴影）
   ========================================================= */

/* ===== 子页面主体（避开固定导航） ===== */
.subpage {
    padding-top: 68px;
    min-height: 60vh;
}

/* ===== 资讯列表（首页 / 列表页通用） ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}
.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}
a.news-item:hover {
    border-color: rgba(43,122,158,0.08);
    box-shadow: var(--shadow-md);
}
.news-item .news-item-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

/* 列表页封面缩略图 */
.news-cover {
    flex-shrink: 0;
    width: 180px;
    height: 112px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
}
.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
a.news-item:hover .news-cover img {
    transform: scale(1.04);
}
.news-item .title {
    color: var(--text-dark);
    font-size: 1.2rem;
    line-height: 1.5;
}
a.news-item:hover .title {
    color: var(--primary);
}
.news-item .summary {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item .date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: 16px;
}

/* 列表页：默认撑满容器宽度 */
.news-list-page {
    max-width: 900px;
}

/* ===== 列表分页 ===== */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 36px;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    cursor: default;
}
.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.page-ellipsis {
    min-width: 32px;
    text-align: center;
    color: var(--text-muted);
    user-select: none;
}
.news-page-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 14px;
}

/* ===== 加载 / 空 / 错误态 ===== */
.news-state {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 24px;
}
.news-state i {
    font-size: 2.4rem;
    color: rgba(43,122,158,0.25);
    margin-bottom: 16px;
}
.news-state p {
    margin-bottom: 20px;
}
.news-skeleton-item {
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f2f5f7 25%, #e9eef1 37%, #f2f5f7 63%);
    background-size: 400% 100%;
    animation: newsShimmer 1.4s ease infinite;
}
@keyframes newsShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ===== 查看更多按钮 ===== */
.section-more {
    text-align: center;
    margin-top: 36px;
}

/* ===== 资讯详情 ===== */
.news-detail {
    max-width: 1000px;
    margin: 0 auto;
}
.news-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: center;
}
.news-detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 28px;
}
.news-detail-meta i {
    color: var(--primary);
    margin-right: 6px;
}
.news-content {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.9;
}
.news-content p {
    margin-bottom: 18px;
}
.news-content h2,
.news-content h3,
.news-content h4 {
    color: var(--text-dark);
    margin: 28px 0 12px;
}
.news-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 12px 0;
}
.news-content a {
    color: var(--primary);
    text-decoration: underline;
}
.news-content ul,
.news-content ol {
    margin: 0 0 18px 22px;
}
.news-content li {
    margin-bottom: 8px;
}
.news-content blockquote {
    border-left: 4px solid var(--primary-light);
    padding: 8px 16px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* 详情页返回按钮 */
.news-back {
    text-align: center;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    /* 移动端封面通栏置顶，避免文字区被挤压 */
    .news-cover {
        width: 100%;
        height: 160px;
        margin-bottom: 10px;
    }
    .news-item .date {
        margin-left: 0;
    }
    .news-detail-title {
        font-size: 1.5rem;
    }
}
