body {
    background-color: #fff;
}
.news-hero-section {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.news-hero-section .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.news-hero-section .hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-hero-section .hero-content {
    position: absolute;
    top: 10%;
    left: 20%; /* Position from the left */
    transform: translateY(-50%);
    color: white;
    z-index: 1;
}

.news-hero-section .hero-content h1 {
    font-size: 3.5rem; /* Equivalent to 56px */
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 英文状态下的新闻资讯页面样式调整 */
html[lang="en"] .news-hero-section .hero-content h1 {
    font-size: 3rem; /* 48px */
}

html[lang="en"] .tab-link {
    font-size: 1.1rem;
}

/* 俄文状态下的新闻资讯页面样式调整 */
html[lang="ru"] .news-hero-section .hero-content h1 {
    font-size: 2.5rem; /* 40px */
}

html[lang="ru"] .tab-link {
    font-size: 1rem;
}

.news-content-section {
    padding: 80px 0;
    background-image: url('../images/新闻资讯-切片/底图.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px 16px 0 0;
    
}

.news-content-section .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-tabs {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.tab-link.active {
    color: #0056b3;
    font-weight: bold;
}

.tab-link img {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.tab-link.active img {
    transform: rotate(90deg);
}

.divider-line {
    border-top: 1px solid #e0e0e0;
    margin-bottom: 40px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* 确保所有卡片高度一致 */
	cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-card .card-body {
    padding: 25px;
    position: relative;
    padding-bottom: 50px; /* Add space for the date at bottom */
    flex: 1; /* 让内容区域占满剩余空间 */
    display: flex;
    flex-direction: column;
}

.news-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #222;
}

.news-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0; /* Remove bottom margin since date is positioned absolutely */
    flex: 1; /* 让描述文本占用剩余空间 */
}

.news-card .date {
    font-size: 0.9rem;
    color: #999;
    position: absolute;
    bottom: 20px;
    right: 25px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    gap: 8px;
}

.page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    background-color: #f0f0f0;
    transition: background-color 0.3s, color 0.3s;
}

.page-link.active,
.page-link:hover {
    background-color: #0056b3;
    color: #fff;
}

.page-link.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

.no-content-message {
    text-align: center;
    color: #888;
    padding: 50px 0;
    font-size: 1.1rem;
}

.page-link.ellipsis {
    background-color: transparent;
    cursor: default;
}
.page-link.ellipsis:hover {
    color: #555;
}

/* ======== News Detail Page Styles ======== */
.news-detail-section {
    padding: 60px 0;
    background-color: #fff;
    background-image: url('../images/新闻资讯-切片/底图.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px 16px 0 0;
    /* 强制浏览器将此元素保持在内存中 */
    will-change: contents;
    /* 防止重绘 */
    backface-visibility: hidden;
    /* 创建独立的渲染上下文 */
    contain: layout style paint;
    /* 强制立即渲染背景 */
    content-visibility: visible;
    /* 防止延迟渲染 */
    background-attachment: scroll;
    /* 强制GPU合成 */
    transform: translateZ(0);
}

.news-detail-section .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.detail-header {
    margin-bottom: 30px;
}

.back-to-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 1.1rem;
    font-weight: 500;
}

.back-to-list-btn:hover {
    color: #0056b3;
}

.back-to-list-btn img {
    height: 16px;
    width: 16px;
    transform: scaleX(-1);
}

.detail-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #222;
    line-height: 1.3;
    text-align: center;
}

.detail-content .meta-info {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 30px;
    text-align: center;
}

.detail-content #detail-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 40px;
}

.detail-content #detail-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.detail-content #detail-body p {
    margin-bottom: 1.5em;
}

/* ======== Responsive Styles ======== */

/* For Laptops and Desktops */
@media (max-width: 1300px) {
    .news-content-section .container,
    .news-detail-section .container {
        max-width: 900px;
    }
}

/* For Tablets */
@media (max-width: 992px) {
    .news-content-section .container {
        max-width: 100%;
        padding: 0 40px;
    }

    .news-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .news-tabs {
        gap: 25px;
    }

    .tab-link {
        font-size: 1.1rem;
    }

    .news-hero-section .hero-content {
        left: 10%;
    }

    .news-hero-section .hero-content h1 {
        font-size: 3rem;
    }
}

/* For Mobile Devices */
@media (max-width: 768px) {
    .news-hero-section {
        height: 400px;
    }

    .news-hero-section .hero-content {
        left: 5%;
        text-align: left;
    }
     .news-hero-section .hero-content h1 {
        font-size: 2.5rem;
    }

    .news-content-section {
        padding: 40px 0;
    }
    
    .news-content-section .container {
        padding: 0 20px;
    }

    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-tabs {
        flex-wrap: wrap;
        gap: 20px;
    }

    .tab-link {
        font-size: 1rem;
    }

    .pagination {
        gap: 5px;
    }

    .page-link {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}