/* news.html */
.news {
    position: relative;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: auto;
}

.news-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.news-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* 左半部分 */
    height: 100%;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    padding: 20px;
    box-sizing: border-box;
}

.news-title {
    text-align: center;
    color: white; /* 根据图片调整文本颜色 */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* 添加文本阴影增强可读性 */
}

.news-title span {
    display: block;
    margin-bottom: 10px; 
}

.news-title span:first-child {
    font-size: clamp(2rem, 4vw, 4rem); /* 响应式字体 */
    font-weight: bold;
}

.news-title span:nth-child(2) {
    font-size: clamp(1rem, 2vw, 1.5rem); /* 响应式字体 */
}

/* 基础容器样式 */
.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

.news-container ul {
    list-style: none;
    padding: 0;
}

/* 新闻列表整体布局 */
.news-list {
    display: flex;
    align-items: flex-start; /* 垂直居顶，避免内容挤压 */
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
    margin-bottom: 20px;
    height: auto; /* 改为自动高度，适应内容 */
    transition: all 0.3s ease;
}

.news-list:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    background-color: #f5f8fa;
}

/* 时间部分样式 - 左侧居中 */
.news-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin-right: 20px;
}

.news-time div {
    font-size: 50px;
    font-weight: bold;
    color: #bbbaba;
    line-height: 1;
}

.news-time span {
    font-size: 20px;
    color: #818181;
    margin-top: 2px;
}

/* 图片样式 - 中间位置 */
.news-img {
    width: 220px;
    height: 170px;
    margin-right: 20px;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: #eee;
}

.news-img a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.news-img img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* 右侧内容样式 - 垂直排列 */
.news-list .content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 内容居顶 */
    height: auto;
    gap: 15px; /* 增加内容之间的间距 */
}

/* 标题、描述和按钮样式调整 */
.news-name {
    margin: 0; /* 移除默认边距 */
}

.news-name a {
    font-size: 20px;
    font-weight: bold;
    color: #000000;
    text-decoration: none;
    display: block; /* 让标题独占一行 */
}

.news-list p {
    margin: 0; /* 移除默认边距 */
    color: #666;
    line-height: 1.8;
    display: block; /* 让描述独占一行 */
}

/* 按钮样式调整 */
.news-view-details {
    display: block; /* 让按钮独占一行 */
    padding: 8px 15px;
    background-color: white;
    color: #007bff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: fit-content;
    border: 1px solid #007bff;
    margin-top: 5px; /* 增加按钮上边距 */
}

.news-list:hover .news-view-details {
    background-color: #5fa5f0;
    color: white;
    border: 1px solid transparent;
}

/* 添加动画关键帧 */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 初始时隐藏新闻列表项 */
.news-list {
    opacity: 0;
}

/* 添加动画类 */
.slide-up-animation {
    animation: slide-up 0.8s ease-out forwards;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-list {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .news-time, .news-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .news-time, .news-img {
        width: 100%;
        max-width: 100%;
    }
    
    .content-wrapper {
        width: 100%;
    }
}