/* ===== 新闻列表页面CSS优化 ===== */

/* 使用全局CSS变量 */
:root {
    /* 字体系列 */
    --font-main: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-accent: "Montserrat", "Roboto", sans-serif;
    
    /* 颜色体系 */
    --color-title: #2C3E50;
    --color-text: #545E66;
    --color-helper: #8E9AAF;
    --color-brand: #1d52c8;
    --color-brand-light: #3ba3e8;
    --color-accent: #d1000e;
    --color-bg: #edf4fa;
    
    /* 字号规范 */
    --fs-h1: 36px;
    --fs-h2: 26px;
    --fs-h3: 20px;
    --fs-body: 16px;
    --fs-small: 14px;
    --fs-xs: 12px;
    
    /* 行高规范 */
    --lh-title: 1.3;
    --lh-body: 1.75;
    --lh-tight: 1.2;
    
    /* 间距规范 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ===== Banner图样式 ===== */
.news-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    margin-bottom: var(--spacing-lg);
    border-radius: 12px;
}

.news-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.news-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 var(--spacing-md);
    border-radius: 12px;
    /* 附件建议的文字阴影优化 */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.news-banner-title {
    font-size: var(--fs-h1);
    font-family: var(--font-accent);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
    line-height: var(--lh-title);
}

.news-banner-subtitle {
    font-size: 20px;
    font-family: var(--font-main);
    font-weight: 400;
    max-width: 800px;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== 内容区域 ===== */
.news-contentdd {
    background-color: white;
    border-radius: 12px;
    padding: var(--spacing-xl);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--spacing-lg);
}

/* ===== 标题区域 ===== */
.news-section-title {
    font-size: var(--fs-h2);
    font-family: var(--font-accent);
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid #f0f0f0;
    font-weight: 700;
    line-height: var(--lh-title);
    display: flex;
    align-items: center;
}

.news-section-title i {
    margin-right: var(--spacing-xs);
    font-size: 24px;
}

/* ===== 分类导航 ===== */
.news-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.category-btn {
    padding: 10px 25px;
    background-color: #f5f8ff;
    border: 1px solid rgba(29, 82, 200, 0.1);
    border-radius: 30px;
    font-size: var(--fs-body);
    font-family: var(--font-main);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none !important;
    display: inline-block;
}

.category-btn:hover {
    background-color: rgba(29, 82, 200, 0.1);
    color: var(--color-brand);
    border-color: var(--color-brand-light);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.category-btn.active {
    background-color: var(--color-brand);
    color: white;
    border-color: var(--color-brand);
    font-weight: 600;
    text-decoration: none !important;
}

/* ===== 新闻列表样式 ===== */
.news-list {
    margin-bottom: var(--spacing-xl);
}

.news-row {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.news-row:last-child {
    border-bottom: none;
}

.news-row:hover {
    background-color: rgba(29, 82, 200, 0.02);
    padding-left: var(--spacing-xs);
    padding-right: var(--spacing-xs);
}

.news-row:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--color-accent);
    border-radius: 0 3px 3px 0;
}

.newfs-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: var(--spacing-lg);
    transition: transform 0.3s ease;
}

.news-row:hover .newfs-image {
    transform: scale(1.03);
}

.news-details {
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.news-category {
    background-color: #e6f5ff;
    color:#3ba3e8;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-family: var(--font-main);
    font-weight: 600;
    text-decoration: none !important;
    display: inline-block;
}

.news-date {
    font-size: var(--fs-small);
    font-family: var(--font-main);
    color: var(--color-helper);
    display: flex;
    align-items: center;
}

.news-date i {
    margin-right: 5px;
}

.news-title {
    font-size: 22px;
    font-family: var(--font-accent);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-title);
    line-height: 1.4;
    transition: color 0.3s ease;
    text-decoration: none !important;
}

.news-row:hover .news-title {
    color: var(--color-accent);
    text-decoration: none !important;
}

.news-excerpt {
    font-size: var(--fs-body);
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: var(--lh-body);
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify; /* 附件建议：两端对齐 */
}

.news-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-brand);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: var(--fs-body);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.news-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.news-link:hover {
    color: var(--color-brand-light);
    text-decoration: none !important;
    transform: translateX(3px);
}

.news-link:hover i {
    transform: translateX(5px);
}

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pagination-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: var(--fs-body);
    font-family: var(--font-main);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    font-weight: 500;
}

.pagination-item:hover {
    background-color: rgba(29, 82, 200, 0.1);
    border-color: var(--color-brand);
    color: var(--color-brand);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.pagination-item.active {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: white;
    font-weight: 600;
    text-decoration: none !important;
}

.pagination-item.disabled {
    background-color: #f9f9f9;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-item.disabled:hover {
    background-color: #f9f9f9;
    border-color: rgba(0, 0, 0, 0.1);
    color: #ccc;
    transform: none;
}

/* ===== 链接样式统一设置 - 去除下划线 ===== */
/* 基础链接样式 */
a {
    color: var(--color-brand);
    text-decoration: none !important;
    transition: all 0.3s ease;
}

/* 悬停状态 */
a:hover,
a:focus,
a:active {
    color: var(--color-accent);
    text-decoration: none !important;
    opacity: 0.9;
}

/* 确保特定元素没有下划线 */
.category-btn,
.news-link,
.pagination-item,
.news-title,
.footer-link,
.more-link {
    text-decoration: none !important;
}

.category-btn:hover,
.news-link:hover,
.pagination-item:hover,
.footer-link:hover,
.more-link:hover {
    text-decoration: none !important;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1200px) {
    .newfs-image {
        width: 250px;
        height: 180px;
    }
    
    .news-banner-title {
        font-size: 32px;
    }
    
    .news-banner-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 992px) {
    .newfs-image {
        width: 200px;
        height: 150px;
        margin-right: var(--spacing-md);
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-excerpt {
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 768px) {
    :root {
        --fs-h1: 28px;
        --fs-h2: 22px;
        --fs-h3: 18px;
        --fs-body: 15px;
        --lh-body: 1.65;
    }
    
    .news-banner {
        height: 250px;
    }
    
    .news-banner-title {
        font-size: 28px;
    }
    
    .news-banner-subtitle {
        font-size: 16px;
    }
    
    .news-contentdd {
        padding: var(--spacing-md);
    }
    
    .news-section-title {
        font-size: 22px;
    }
    
    .news-row {
        flex-direction: column;
        padding: var(--spacing-lg) 0;
    }
    
    .newfs-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: var(--spacing-md);
    }
    
    .news-meta {
        margin-bottom: var(--spacing-xs);
    }
    
    .news-title {
        font-size: 18px;
        margin-bottom: var(--spacing-xs);
    }
    
    .news-excerpt {
        font-size: var(--fs-body);
        margin-bottom: var(--spacing-sm);
        -webkit-line-clamp: 2;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .news-banner {
        height: 200px;
    }
    
    .news-banner-title {
        font-size: 24px;
    }
    
    .news-banner-subtitle {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .news-categories {
        justify-content: center;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: var(--fs-small);
    }
    
    .news-title {
        font-size: 17px;
    }
    
    .news-excerpt {
        font-size: var(--fs-small);
    }
    
    .newfs-image {
        height: 180px;
    }
    
    .pagination-item {
        width: 40px;
        height: 40px;
        font-size: var(--fs-small);
    }
}

/* ===== 针对AI抓取的优化 ===== */
/* 图片Alt属性样式 */
.newfs-image[alt] {
    border: 1px solid rgba(0,0,0,0.05);
}

/* 分类标签结构化标记 */
.news-category[itemprop="articleSection"] {
    font-weight: 600;
}

/* 日期信息结构化标记 */
.news-date[itemprop="datePublished"] {
    font-weight: 500;
}

/* 确保对比度符合WCAG标准 */
.news-title,
.news-section-title {
    color: var(--color-title);
}

.news-excerpt {
    color: var(--color-text);
}

/* 焦点状态（无障碍访问） */
a:focus,
button:focus,
.category-btn:focus,
.pagination-item:focus {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
    text-decoration: none !important;
}

/* 去除焦点状态下的默认轮廓 */
a:focus:not(:focus-visible) {
    outline: none;
}

/* 新闻卡片结构化标记 */
.news-row[itemtype="http://schema.org/Article"] {
    position: relative;
}

/* 分页结构化标记 */
.pagination[role="navigation"] {
    aria-label: "新闻分页";
}