.container {
    max-width: 1500px;
    margin: 100px auto;
    padding: 20px;
}

/* 头部标题样式 */
.news_header {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.news_header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.news_header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 2px;
}

/* 导航栏样式 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-links a.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: #3498db;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* 搜索框样式 */
.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e6ed;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: #f8fafc;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 卡片布局样式 */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .date-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 标题截断样式 */
.card-content h3.clamped-title {
    font-size: 1.35rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.4em;
    /* 2行高度 */
}

/* 描述截断样式 */
.card-content p.clamped-description {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-height: 5.4em;
    /* 3行高度 */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    color: #2980b9;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    gap: 8px;
}

.pagination-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background: white;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-button:hover:not(:disabled) {
    background: #f5f7fa;
    border-color: #3498db;
    color: #3498db;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-box {
        width: 100%;
    }

    .news-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .news_header h1 {
        font-size: 2rem;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 6px 10px;
    }

    /* 移动端调整行数 */
    .card-content h3.clamped-title {
        -webkit-line-clamp: 2;
        min-height: 3.4em;
    }

    .card-content p.clamped-description {
        -webkit-line-clamp: 2;
        min-height: 3.6em;
    }

    .pagination {
        gap: 5px;
    }

    .pagination-button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}