/* static/css/news_list.css */

/* 基础重置和全局样式 */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.news-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 新闻封面图片样式 */
.news-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* 新闻内容区域样式 */
.news-content {
    padding: 20px;
}

.news-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

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

.news-title a:hover {
    color: #3498db;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.news-excerpt {
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.read-more:hover {
    background-color: #2980b9;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    list-style: none;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    color: #3498db;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #f8f9fa;
}

.page-item.active .page-link {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr;
    }
    
    .news-header h1 {
        font-size: 2rem;
    }
}

/* 在CSS文件中 */
.responsive-center {
    display: block;
    max-width: 60%;  /* 限制最大宽度为容器的80% */
    width: auto;
    height: auto;
    margin: 20px auto;  /* 上下20px外边距，左右自动 */
}
