/* 资讯页面样式 */
body {
    background-color: #120C00;  /* 深色背景 */
}

.news-banner {
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/bg2.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;  /* 添加定位 */
}
.gradient-text {
    background: linear-gradient(to bottom, #B88E5C, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 64px;
}

/* 添加阴影效果 */
.news-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;  /* 增加阴影高度 */
    background: linear-gradient(to top, rgba(18, 12, 0, 1), transparent);
    pointer-events: none;
}

.news-banner h1 {
    color: #fff;
    font-size: 64px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;  /* 确保标题在阴影上层 */
    z-index: 1;
}

.news-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background: linear-gradient(rgba(18, 12, 0, 0.9), rgba(18, 12, 0, 0.9)), 
                url('../img/newsbg.jpg');  /* 添加背景图片 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;  /* 固定背景 */
    position: relative;
    min-height: calc(100vh - 300px - 42vh);  /* 减去banner和footer的高度 */
}

/* 添加遮罩层 */
.news-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(18, 12, 0, 0.8) 0%,
        rgba(18, 12, 0, 0.6) 50%,
        rgba(18, 12, 0, 0.8) 100%
    );
    pointer-events: none;
}

/* 确保内容在遮罩层上方 */
.news-list, .pagination {
    position: relative;
    z-index: 1;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    display: flex;
    gap: 30px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    padding: 20px;
    position: relative;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image {
    width: 200px;  /* 调整图片尺寸 */
    height: 150px;
    flex-shrink: 0;
    border-radius: 4px;  /* 添加圆角 */
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    padding: 0;  /* 移除多余的内边距 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;  /* 调整内容布局 */
    padding-right: 80px;
}

.news-content h2 {
    color: #333333;  /* 改为深色 */
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}

.news-content p {
    color: #666666;  /* 改为灰色 */
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* 限制3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-date {
    color: #B88E5C;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.news-date .day {
    font-size: 27px;
    font-weight: bold;
    line-height: 1;
}

.news-date .year-month {
    font-size: 14px;
    color: #666666;
}

.news-date::after {
    display: none;
}

.read-more {
    display: inline-block;
    padding: 2px 10px;  /* 减小内边距 */
    background-color: transparent;
    border: 1px solid #B88E5C;
    color: #B88E5C;
    text-decoration: none;
    font-size: 12px;
    border-radius: 25px;
    transition: all 0.3s;
    cursor: pointer;
    margin-right: auto;  /* 让按钮靠左 */
}

.read-more:hover {
    background-color: #B88E5C;
    color: #fff;
    opacity: 1;
}

/* 分页器样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 40px;
}

/* 上一页/下一页按钮 */
.pagination .prev,
.pagination .next {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(184, 142, 92, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B88E5C;
    background-color: transparent;
    cursor: pointer;
}

/* 数字页码 */
.pagination a, 
.pagination span {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1px solid rgba(184, 142, 92, 0.3);
    color: #B88E5C;
    text-decoration: none;
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.3s;
}

/* 当前页码 */
.pagination a.active {
    background-color: #B88E5C;
    color: #fff;
    border-color: #B88E5C;
}

/* 跳转区域 */
.pagination .jump-area {
    display: flex;
    align-items: center;
    margin-left: 15px;
    color: #B88E5C;
    font-size: 14px;
}

.pagination .jump-input {
    width: 50px;
    height: 32px;
    margin: 0 8px;
    border: 1px solid rgba(184, 142, 92, 0.3);
    border-radius: 4px;
    text-align: center;
    color: #B88E5C;
    background-color: transparent;
}

.pagination .jump-btn {
    padding: 0 15px;
    height: 32px;
    background-color: #B88E5C;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
}

/* 悬停效果 */
.pagination a:hover:not(.active),
.pagination .prev:hover,
.pagination .next:hover {
    border-color: #B88E5C;
    color: #B88E5C;
}

.pagination .jump-btn:hover {
    opacity: 0.9;
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .news-container {
        margin: 30px auto;
    }

    .news-item {
        gap: 20px;
    }

    .news-image {
        width: 250px;
        height: 180px;
    }

    .news-content h2 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .news-banner {
        height: 300px;
    }

    .news-banner h1 {
        font-size: 36px;
    }

    .news-item {
        flex-direction: row;  /* 保持横向布局 */
        padding: 15px;
    }

    .news-image {
        width: 120px;
        height: 90px;
    }

    .news-content h2 {
        font-size: 16px;
    }

    .news-content p {
        font-size: 12px;
        -webkit-line-clamp: 2;  /* 移动端显示2行 */
    }

    .news-meta {
        right: 15px;
        top: 50%;  /* 保持垂直居中 */
        transform: translateY(-50%);
    }

    .news-date .day {
        font-size: 24px;
    }

    .news-date .year-month {
        font-size: 12px;
    }

    .news-content {
        padding-right: 60px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination a, 
    .pagination span,
    .pagination .prev,
    .pagination .next {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .pagination .jump-area {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        margin-left: 0;
    }

    .pagination .jump-input {
        height: 28px;
        width: 40px;
    }

    .pagination .jump-btn {
        height: 28px;
        padding: 0 12px;
    }

    .read-more {
        padding: 3px 10px;
        font-size: 11px;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .news-banner h1 {
        font-size: 28px;
    }

    .news-content h2 {
        font-size: 18px;
    }

    .news-content p {
        font-size: 14px;
    }

    .pagination {
        gap: 4px;
    }

    .pagination a:not(.active):nth-child(n+5):nth-child(-n+7) {
        display: none;  /* 隐藏中间的页码 */
    }
}

/* 添加悬停效果 */
.news-item:hover .news-content h2,
.news-item:hover .news-content p {
    color: #B88E5C;
    transition: color 0.3s;
}

/* 确保原始状态有过渡效果 */
.news-content h2,
.news-content p {
    transition: color 0.3s;
}

/* 已有的悬停效果保持不变 */
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 确保查看详情按钮的悬停效果不变 */
.read-more:hover {
    background-color: #B88E5C;
    color: #fff;
    opacity: 1;
}

/* 新闻链接样式 */
.news-link {
    display: flex;
    gap: 30px;
    text-decoration: none;
    width: 100%;
    color: inherit;
}

/* 确保链接不影响原有样式 */
.news-item {
    padding: 0;
}

.news-link {
    padding: 20px;
}

/* 悬停效果 */
.news-item:hover .news-link {
    text-decoration: none;
}

/* 确保其他样式保持不变 */
.news-content h2,
.news-content p,
.news-date,
.read-more {
    pointer-events: none;  /* 防止子元素影响点击事件 */
}

/* 修改移动端的新闻项布局 */
@media screen and (max-width: 768px) {
    .news-item {
        padding: 10px;
        background: #ffffff;
    }

    .news-link {
        flex-direction: column;
        padding: 0;
        gap: 10px;
    }

    .news-image {
        width: 100%;
        height: 180px;
        margin: 0;
    }

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
    }

    .news-content {
        width: 100%;
        padding: 0;
    }

    .news-content h2 {
        font-size: 16px;
        margin: 0;
        padding: 0 5px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4;
    }

    /* 隐藏描述文字 */
    .news-content p {
        display: none;
    }

    /* 调整日期和查看详情的布局 */
    .news-meta {
        position: static;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 5px;
        margin-top: 5px;
    }

    .news-date {
        flex-direction: row;
        gap: 5px;
        align-items: center;
    }

    .news-date .day {
        font-size: 18px;
    }

    .news-date .year-month {
        font-size: 14px;
    }

    .read-more {
        position: static;
        padding: 2px 10px;
        font-size: 12px;
        color: #B88E5C;
        border: 1px solid #B88E5C;
        border-radius: 15px;
        display: inline-block;
    }
}

/* 调整新闻列表在移动端的间距 */
@media screen and (max-width: 768px) {
    .news-list {
        gap: 15px;
    }
}

/* 优化分页器在移动端的显示 */
@media screen and (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .pagination a,
    .pagination span {
        padding: 5px 10px;
    }

    .jump-area {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }

    .jump-input {
        width: 50px;
    }
} 