/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #f0f0f0; /* Light text for dark body background */
    background-color: var(--bg-dark); /* Inherited from shared.css */
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700; /* Gold for titles */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* HERO Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    padding-top: 0; /* Assuming shared.css handles body padding-top: var(--header-offset) */
    margin-top: 0;
    overflow: hidden;
}

.page-news__hero-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 450px; /* Minimum height for hero */
}

.page-news__hero-image-item {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    min-height: 450px;
}

.page-news__hero-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    padding: 40px 20px;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.page-news__hero-title {
    font-size: 48px;
    color: #FFD700; /* Gold title */
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-news__hero-description {
    font-size: 18px;
    color: #f0f0f0; /* Light text */
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Featured Articles Section */
.page-news__featured-articles-section {
    padding: 60px 0;
    background-color: var(--bg-dark); /* Dark background */
}

.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-news__article-card {
    background: rgba(255, 255, 255, 0.08); /* Slightly visible card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__article-image-wrapper {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
    min-height: 200px; /* Ensure minimum size */
}

.page-news__article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

.page-news__article-card:hover .page-news__article-image {
    transform: scale(1.05);
}

.page-news__article-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-news__article-title {
    font-size: 22px;
    color: #FFD700; /* Gold title */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-excerpt {
    font-size: 15px;
    color: #cccccc; /* Lighter grey for excerpt */
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__read-more {
    display: inline-block;
    color: #8B0000; /* Dark red for read more */
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #FFD700; /* Gold on hover */
}

/* Latest Updates Section */
.page-news__latest-updates-section {
    padding: 60px 0;
    background-color: #0d0d0d; /* Slightly darker background for contrast */
}

.page-news__updates-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.page-news__update-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 5px solid #FFD700; /* Gold accent */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.page-news__update-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.page-news__update-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: #aaaaaa;
}

.page-news__update-category {
    background: #8B0000; /* Dark red tag */
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.page-news__update-title {
    font-size: 24px;
    color: #FFD700; /* Gold title */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__update-description {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 20px;
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #8B0000, #FFD700); /* Gradient background with brand colors */
    text-align: center;
    color: #ffffff;
}

.page-news__cta-content {
    max-width: 900px;
}

.page-news__cta-title {
    font-size: 40px;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-news__cta-description {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__button--primary {
    background-color: #FFD700; /* Gold button */
    color: #000000; /* Black text for contrast */
    border: 2px solid #FFD700;
}

.page-news__button--primary:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
}

.page-news__button--secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-news__button--secondary:hover {
    background-color: #ffffff;
    color: #8B0000; /* Dark red text on hover */
    transform: translateY(-3px);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--bg-dark); /* Dark background */
}

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

/* FAQ容器样式 */
.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05); /* Slightly visible card background */
}

/* FAQ默认状态 - 答案隐藏 */
.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px; /* Adjust padding for dark background */
    opacity: 0;
    color: #cccccc; /* Light text for answer */
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* 🚨 使用!important确保优先级, 值足够大以容纳任何内容 */
    padding: 20px 25px !important; /* Adjust padding for dark background */
    opacity: 1;
    background: rgba(255, 255, 255, 0.03); /* Slightly darker background for open answer */
    border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px; /* Adjust padding for dark background */
    background: rgba(255, 255, 255, 0.1); /* Slightly lighter background for question */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-news__faq-question:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.page-news__faq-question:active {
    background: rgba(255, 255, 255, 0.12);
}

/* 问题标题样式 */
.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #FFD700; /* Gold for FAQ question title */
}

/* 切换图标 */
.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700; /* Gold for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* 防止图标阻止点击事件 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #8B0000; /* Dark red when active */
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

/* General Image Responsive Styling */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure no CSS filters are used on images */
.page-news img {
    filter: none !important;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 40px;
    }

    .page-news__hero-description {
        font-size: 16px;
    }

    .page-news__section-title {
        font-size: 30px;
    }

    .page-news__article-title {
        font-size: 20px;
    }

    .page-news__update-title {
        font-size: 22px;
    }

    .page-news__cta-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    /* HERO Section Mobile */
    .page-news__hero-section {
        padding-top: 0 !important; /* Ensure no double padding from shared header */
    }
    .page-news__hero-container {
        min-height: 300px;
    }
    .page-news__hero-image-item {
        min-height: 300px;
    }
    .page-news__hero-overlay {
        padding: 30px 15px;
    }
    .page-news__hero-title {
        font-size: 32px;
    }
    .page-news__hero-description {
        font-size: 14px;
    }

    /* Featured Articles Section Mobile */
    .page-news__featured-articles-section {
        padding: 40px 0;
    }
    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__article-image-wrapper {
        height: 180px;
        min-height: 180px;
    }
    .page-news__article-image {
        min-width: 200px;
        min-height: 180px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-excerpt {
        font-size: 14px;
    }

    /* Latest Updates Section Mobile */
    .page-news__latest-updates-section {
        padding: 40px 0;
    }
    .page-news__update-item {
        padding: 20px;
    }
    .page-news__update-title {
        font-size: 20px;
    }
    .page-news__update-description {
        font-size: 15px;
    }

    /* Call to Action Section Mobile */
    .page-news__cta-section {
        padding: 50px 0;
    }
    .page-news__cta-title {
        font-size: 28px;
    }
    .page-news__cta-description {
        font-size: 16px;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .page-news__button {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ Section Mobile */
    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-list {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }
    .page-news__faq-answer p {
        font-size: 14px;
    }

    /* General Image Responsive Styling for Mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover; /* Ensure images fill space without distortion if needed */
    }

    /* Ensure content containers don't overflow */
    .page-news__container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .page-news__featured-articles-section .page-news__container,
    .page-news__latest-updates-section .page-news__container,
    .page-news__cta-section .page-news__container,
    .page-news__faq-section .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__articles-grid,
    .page-news__updates-list {
        gap: 15px;
    }
}