/* 新闻页面专用样式 */

/* Banner区域 */
.news-banner {
    margin-top: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-banner .banner-image {
    width: 1200px;
    height: 300px;
    margin: 0 auto;
}

/* 新闻区域导航标题 */
.news-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 0;
}

.section-title-link {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0;
}

.section-title-link:hover {
    color: var(--primary-color);
}

/* 新闻列表区域 */
.news-main {
    padding: 30px 0 60px 0;
    background-color: transparent;
    position: relative;
}

.news-main > * {
    position: relative;
    z-index: 1;
}

/* 前5个新闻项 - 特殊布局（左2个，中间1个大，右2个） */
.news-grid-featured {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: repeat(2, auto);
    gap: 30px;
    margin-bottom: 30px;
    align-items: stretch;
}

/* 左侧：第1、2个新闻项，垂直排列在左侧列 */
.news-grid-featured .news-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.news-grid-featured .news-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

/* 中间：第3个新闻项，占据中间列，占据2行高度 */
.news-grid-featured .news-item:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / 3;
}

/* 中间大图的标题和描述间距更紧凑 */
.news-grid-featured .news-item:nth-child(3) .news-content {
    padding: 10px 15px;
}

.news-grid-featured .news-item:nth-child(3) .news-title {
    margin: 0 0 5px 0;
}

/* 右侧：第4、5个新闻项，垂直排列在右侧列 */
.news-grid-featured .news-item:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
}

.news-grid-featured .news-item:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

/* 中间大新闻项的图片高度更大 */
.news-grid-featured .news-item:nth-child(3) .news-image {
    height: 426px;
}

/* 确保前5个新闻项的内容区域底部对齐 */
.news-grid-featured .news-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 前5个新闻项的内容区域更紧凑 */
.news-grid-featured .news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 10px;
}

.news-grid-featured .news-title {
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.news-grid-featured .news-date {
    margin-top: auto;
    margin-bottom: 0;
}

/* 左侧和右侧新闻项的图片高度 */
.news-grid-featured .news-item:nth-child(1) .news-image,
.news-grid-featured .news-item:nth-child(2) .news-image,
.news-grid-featured .news-item:nth-child(4) .news-image,
.news-grid-featured .news-item:nth-child(5) .news-image {
    height: 175px;
}

/* 后续新闻项 - 3行2列布局 */
.news-grid-regular {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.news-item {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #dd640d;
    display: flex;
    flex-direction: column;
}

.news-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    cursor: pointer;
    flex: 1;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(221, 100, 13, 0.3);
    border-color: #dd640d;
}

.news-link:hover {
    text-decoration: none;
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* 后续6个新闻项的图片高度更高 */
.news-grid-regular .news-image {
    height: 340px;
}

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

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

.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 后续6个新闻项的文字区域固定高度70px */
.news-grid-regular .news-content {
    height: 70px;
    padding: 7px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 后续6个新闻项的标题占一行 */
.news-grid-regular .news-title {
	font-size: 20px;
    margin: 0;
    line-height: 1.4;
    -webkit-line-clamp: 1;
    flex-shrink: 0;
	padding-bottom: 7px;
}

.news-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 后续6个新闻项的详情占一行 */
.news-grid-regular .news-date {
	font-size: 15px;
    line-height: 1.4;
    flex-shrink: 0;
}


/* 导航链接激活状态 */
.nav-link.active {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .news-banner .banner-image {
        width: 100%;
        max-width: 1200px;
    }

    .news-grid-featured {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 25px;
    }

    .news-grid-featured .news-item:nth-child(3) .news-image {
        height: 360px;
    }

    .news-grid-featured .news-item:nth-child(1) .news-image,
    .news-grid-featured .news-item:nth-child(2) .news-image,
    .news-grid-featured .news-item:nth-child(4) .news-image,
    .news-grid-featured .news-item:nth-child(5) .news-image {
        height: 175px;
    }

    .news-grid-regular {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .news-banner {
        margin-top: 0;
    }

    .news-banner .banner-image {
        width: 100%;
        max-width: 1200px;
        height: 200px;
    }

    .section-title-link {
        font-size: 20px;
    }

    .more-link {
        font-size: 14px;
    }

    .news-main {
        padding: 40px 0;
    }

    .news-grid-featured {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
        margin-bottom: 30px;
    }

    /* 移动端所有新闻项都恢复默认布局 */
    .news-grid-featured .news-item {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .news-grid-featured .news-item:nth-child(3) .news-image {
        height: 200px;
    }

    .news-grid-featured .news-item:nth-child(1) .news-image,
    .news-grid-featured .news-item:nth-child(3) .news-image,
    .news-grid-featured .news-item:nth-child(4) .news-image,
    .news-grid-featured .news-item:nth-child(5) .news-image {
        height: 180px;
    }

    /* 移动端重置前5个新闻项的内容区域样式 */
    .news-grid-featured .news-content {
        padding: 15px;
    }

    .news-grid-featured .news-title {
        margin: 0 0 10px 0;
    }

    .news-grid-regular {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .news-image {
        height: 200px;
    }

    .news-grid-regular .news-image {
        height: 220px;
    }

    .news-content {
        padding: 15px;
    }

    /* 移动端重置6个新闻项的内容区域固定高度 */
    .news-grid-regular .news-content {
        height: auto;
        padding: 15px;
    }

    .news-grid-regular .news-title {
        margin: 0 0 10px 0;
    }

    .news-title {
        font-size: 15px;
    }

    .news-date {
        font-size: 13px;
    }

    .pagination {
        margin-top: 30px;
        flex-wrap: wrap;
    }

    .pagination-btn,
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .news-banner .banner-image {
        width: 100%;
        max-width: 1200px;
        height: 150px;
    }

    .section-title-link {
        font-size: 20px;
    }

    .more-link {
        font-size: 14px;
    }

    .news-section-header {
        margin-bottom: 10px;
        padding-bottom: 12px;
    }

    .more-link {
        font-size: 14px;
    }

    .news-main {
        padding: 30px 0;
    }

    .news-grid {
        gap: 15px;
    }

    .news-image {
        height: 180px;
    }

    .news-grid-regular .news-image {
        height: 200px;
    }

    .pagination {
        gap: 5px;
    }

    .pagination-btn,
    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
}
