/* 基础CSS变量定义 */
:root {
    --primary-dark: #0a0a14;
    --primary-light: #1a1a2e;
    --accent: #e63946;
    --accent-light: #ff6b6b;
    --accent-dark: #c1121f;
    --text-light: #f8f9fa;
    --text-gray: #adb5bd;
    --white: #ffffff;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 内容区域样式 */
.content {
    margin-top: 120px; /* 为固定导航栏留出空间 */
    margin-bottom: 60px;
    padding: 0 20px;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
}

/* 页面标题样式 */
.page-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* 新闻列表容器 */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

/* 单个新闻项样式 - 左边文字右边图 */
.news-item {
    background-color: var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: row;
    min-height: 280px; /* 使用最小高度而非固定高度 */
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

/* 新闻内容容器 - 左侧文字部分 */
.news-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: 280px; /* 确保内容容器有足够高度 */
}

/* 新闻日期 */
.news-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: block;
}

/* 新闻标签 */
.news-tag {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    align-self: flex-start;
}

/* 新闻标题 */
.news-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--accent-light);
}

/* 新闻摘要 */
.news-excerpt {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: calc(1.7em * 3);
    transition: all 0.3s ease;
}

/* 展开状态的摘要 */
.news-excerpt.expanded {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    max-height: none;
    overflow: visible;
    text-overflow: unset;
    margin-bottom: 20px;
}

/* 新闻图片容器 - 右侧图片部分 */
.news-image-container {
    width: 350px;
    position: relative;
    overflow: hidden;
}

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

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

/* 阅读更多按钮 */
.read-more {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding-right: 20px;
    margin-top: 10px;
    align-self: flex-start;
}

.read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--accent-light);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* 分页控件 */
.pagination {
    text-align: center;
    margin-top: 60px;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 10px;
}

.pagination li a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 4px;
    background-color: var(--primary-light);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination li a:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

.pagination li.active a {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content {
        margin-top: 100px;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .news-container {
        gap: 20px;
    }
    
    .news-item {
        flex-direction: column;
        height: auto;
    }
    
    .news-image-container {
        width: 100%;
        height: 200px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 1.3rem;
    }
}