/* 新闻列表页面样式 */
.news-list-section {
    margin-top: 80px;
    padding: 60px 0;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 15px;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #C03D2D;
}

.section-header p {
    color: #666;
    font-size: 16px;
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.news-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #999;
}

.news-source {
    font-weight: 500;
    color: #666;
}

.news-time {
    color: #999;
    white-space: nowrap;
}

.news-stats {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.news-stats .views {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background: #C03D2D;
    color: white;
    border-color: #C03D2D;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-number {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background: #C03D2D;
    color: white;
    border-color: #C03D2D;
}

.pagination-number.active {
    background: #C03D2D;
    color: white;
    border-color: #C03D2D;
}

.pagination-ellipsis {
    color: #999;
    padding: 0 5px;
}

/* 响应式设计 */
/* 链接样式 */
.news-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

.news-title-link:hover .news-title {
    color: #C03D2D;
}

.news-link:hover .news-image img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .news-list-section {
        margin-top: 60px;
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .news-list {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .news-item {
        margin: 0 15px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    /* 保持横向排列 */
    .news-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-size: 13px;
        color: #999;
        flex-wrap: wrap;
    }
    
    .news-source {
        flex-shrink: 0;
    }
    
    .news-time {
        flex-shrink: 0;
    }
    
    .news-stats {
        flex-shrink: 0;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .news-list-section {
        margin-top: 50px;
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .news-item {
        margin: 0 10px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* 小屏幕下仍保持横向排列 */
    .news-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 12px;
        flex-wrap: nowrap;
    }
    
    .news-source {
        font-size: 11px;
        flex-shrink: 0;
    }
    
    .news-time {
        font-size: 11px;
        flex-shrink: 0;
    }
    
    .news-stats .views {
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .pagination-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
}

/* 默认图片占位样式 */
/* 占位图片链接样式 */
.news-link .news-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.news-link:hover .news-image.placeholder {
    transform: none;
}

.news-link:hover .news-image.placeholder::before {
    opacity: 0.5;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* 确保占位文字在链接中正常显示 */
.news-link .news-image.placeholder .placeholder-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    z-index: 1;
    opacity: 0.8;
    margin-top: 40px;
    pointer-events: none;
}

/* 多样化占位样式 - 使用nth-child选择器 */
.news-item:nth-child(4n+1) .news-image.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-item:nth-child(4n+2) .news-image.placeholder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.news-item:nth-child(4n+3) .news-image.placeholder {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.news-item:nth-child(4n+4) .news-image.placeholder {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 额外的占位样式变化 */
.news-item:nth-child(8n+5) .news-image.placeholder {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.news-item:nth-child(8n+6) .news-image.placeholder {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.news-item:nth-child(8n+7) .news-image.placeholder {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.news-item:nth-child(8n+8) .news-image.placeholder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

/* 占位图片的图标样式变化 */
.news-item:nth-child(4n+1) .news-image.placeholder::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.3"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>') center/60px no-repeat;
}

.news-item:nth-child(4n+2) .news-image.placeholder::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.3"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') center/60px no-repeat;
}

.news-item:nth-child(4n+3) .news-image.placeholder::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.3"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') center/60px no-repeat;
}

.news-item:nth-child(4n+4) .news-image.placeholder::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" opacity="0.3"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') center/60px no-repeat;
}

/* 悬停效果 */
.news-item:hover .news-image.placeholder {
    transform: none;
}

.news-item:hover .news-image.placeholder::before {
    opacity: 0.5;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-image.placeholder::before {
        background-size: 50px;
    }
    
    .news-image.placeholder .placeholder-text {
        font-size: 13px;
        margin-top: 35px;
    }
}

@media (max-width: 480px) {
    .news-image.placeholder::before {
        background-size: 45px;
    }
    
    .news-image.placeholder .placeholder-text {
        font-size: 12px;
        margin-top: 30px;
    }
}