.news-header {
    position: relative;
    background-image: url('../img/mika-baumeister-_Y5jvYypnZA-unsplash.jpg');
    background-size: cover;
    background-position: center;
    height: 40vh;
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.news-header .container {
    position: relative;
    z-index: 1;
    color: white;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    /* 设置垂直排列 */
    align-items: center;
}

.news-header p {
    margin-top: 10px;
    /* 添加段落间距 */
    font-size: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.news-header h1 {
    font-size: 6rem;
    margin: auto;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    max-width: 1200px;
    word-break: break-word;
}

.news-container {
    max-width: 900px;
    margin: auto;
    padding: 40px 20px;
}

h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
}

.search-box {
    text-align: center;
    margin-bottom: 20px;
}

input[type="text"] {
    padding: 8px 12px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
    padding: 15px;
    transition: all 0.2s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.news-item img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    background-color: #f0f0f0;
}

.news-item img.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item img:not(.lazy-load) {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.news-content {
    flex: 1;
}

.news-content h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.news-content .date {
    color: #999;
    font-size: 14px;
    margin: 6px 0;
}

.news-content .summary {
    color: #666;
    font-size: 15px;
}

.pagination {
    text-align: center;
    margin-top: 30px;
    width: 100%;
    /* 添加这一行 */
}

.pagination button {
    margin: 0 5px;
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.pagination button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}