/* ==================== 新闻列表AJAX分页样式 ==================== */
/* 核心容器 */
.news-ajax-container {
    max-width: 1640px;
    margin: 0 auto;
    width: 95%;
}
.news-ajax-container a{
    text-decoration: none !important;
}

/* 4列网格布局（强制4列，不足显示占位） */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* 文章卡片基础样式 */
.news-card {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    min-height: 380px; /* 固定最小高度，防止拉伸 */
    transition: box-shadow 0.2s ease;
}

.news-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* 卡片图片容器 */
.news-card-img {
    width: 100%;
    aspect-ratio: 389/400;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 卡片内容区 */
.news-card-content {
    padding: 15px 20px;
}

/* 日期样式 */
.news-card-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

/* 标题样式 */
.news-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    margin-top: 0;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card:hover .news-card-title {
    color: #CD3333;
}

/* 摘要样式（3行截断） */
.news-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 查看详情按钮 */
.news-card-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #CD3333;
    color: #fff;
    text-decoration: none;
    border-radius: 2px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.news-card-btn:hover {
    background-color: #0f5a99;
}

/* 占位卡片样式（空白占位） */
.news-card-placeholder {
    border: 1px dashed #eee;
    background-color: #f9f9f9;
    min-height: 380px;
}

/* 分页控件样式 */
.news-pagination {
    text-align: center;
    margin: 20px 0 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.news-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #eee;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    margin: 0 5px;
    transition: all 0.2s ease;
}

/* 当前页高亮 */
.news-pag-btn.current {
    background-color: #CD3333;
    color: #fff;
    border-color: #CD3333;
}

/* 上一页/下一页按钮宽度自适应 */
.news-pag-btn.prev, 
.news-pag-btn.next {
    width: auto;
    padding: 0 15px;
}

/* 禁用状态 */
.news-pag-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 分页按钮hover效果 */
.news-pag-btn:hover:not(.disabled):not(.current) {
    border-color: #CD3333;
    color: #CD3333;
}

/* 加载状态 */
.news-ajax-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* 无数据提示 */
.news-empty {
    font-size: 18px;
}

/* ==================== 响应式适配 ==================== */
/* 平板（768-992px）：3列布局 */
@media (min-width: 769px) and (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .news-card, .news-card-placeholder {
        min-height: 350px;
    }
}

/* 移动端（≤768px）：2列布局 */
@media (max-width: 768px) {
    .news-ajax-container {
        width: 98%;
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .news-card, .news-card-placeholder {
        min-height: 320px;
    }
    .news-pag-btn {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* 小屏手机（≤576px）：1列布局 */
@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}
/* 全局去掉新闻列表内所有a标签的下划线 */
.news-card-title a ,.news-pagination a{
    text-decoration: none !important; /* 核心：去掉下划线 */
}

/* 确保hover状态也无下划线（兜底） */
.news-card-title a:hover {
    text-decoration: none !important;
}

/* 分页按钮a标签也去掉下划线（如果有） */
.news-card-btn {
    text-decoration: none !important;
}
.news-card-btn:hover {
    text-decoration: none !important;
}

/* 图片容器开启溢出隐藏（确保放大不超出容器） */
.news-card-img {
    overflow: hidden !important;
}

/* 图片默认状态（过渡动画） */
.news-card-img img {
    transition: transform 0.3s ease-in-out !important; /* 平滑过渡 */
}

/* 鼠标移到卡片上时图片放大 */
.news-card:hover .news-card-img img {
    transform: scale(1.08) !important; /* 放大1.08倍，可调整数值 */
}