/* style/news.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* General styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Default body background is white */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    background-color: #005f2e; /* Slightly darker green */
    color: #ffffff;
}

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

.page-news__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Hero Section */
.page-news__hero-section {
    background-color: #f0f0f0;
    padding: 100px 0;
    text-align: center;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
}

.page-news__hero-title {
    font-size: 3em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__hero-description {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: #ffffff;
}

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

.page-news__news-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-news__news-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
}

.page-news__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #005f2e;
}

.page-news__card-text {
    font-size: 1em;
    color: #666666;
    margin-bottom: 20px;
}

.page-news__read-more {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #005f2e;
    text-decoration: underline;
}

/* Featured Articles Section */
.page-news__featured-articles-section {
    padding: 80px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* White text for dark background */
}

.page-news__featured-articles-section .page-news__section-title,
.page-news__featured-articles-section .page-news__section-description {
    color: #ffffff;
}

.page-news__articles-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack on small screens */
    gap: 40px;
}

.page-news__article-item {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.page-news__article-image {
    width: 100%;
    height: 350px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 30px;
    flex-grow: 1;
}

.page-news__article-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__article-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #f0f0f0;
}

.page-news__article-text {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 25px;
}

.page-news__featured-articles-section .page-news__read-more {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.page-news__featured-articles-section .page-news__read-more:hover {
    color: #f0f0f0;
    border-color: #f0f0f0;
}

/* Video Section */
.page-news__video-section {
    padding: 80px 0;
    background-color: #ffffff;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 30px auto;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 9; /* Maintain 16:9 aspect ratio */
}

.page-news__video {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

.page-news__video-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.page-news__video-cta {
    margin-top: 30px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.page-news__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #f0f0f0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #555555;
    border-top: 1px solid #eee;
}

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: none;
}
.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−"; /* Change + to - when open */
}


/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description {
    color: #ffffff;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Responsive Design */
@media (min-width: 769px) {
    .page-news__articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-news__article-item {
        flex-direction: row; /* Horizontal layout for desktop */
    }
    .page-news__article-image {
        width: 40%; /* Image takes 40% width */
        height: auto;
    }
    .page-news__article-content {
        width: 60%; /* Content takes 60% width */
    }
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 80px 20px;
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__hero-title {
        font-size: 2em;
    }

    .page-news__hero-description {
        font-size: 1em;
    }

    .page-news__hero-cta-buttons,
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__latest-news-section,
    .page-news__featured-articles-section,
    .page-news__video-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

    .page-news__container {
        padding: 0 15px; /* Smaller padding for mobile */
    }

    .page-news__section-title {
        font-size: 1.8em;
    }

    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr;
    }

    .page-news__news-image {
        height: 200px;
    }

    .page-news__card-content {
        padding: 20px;
    }

    .page-news__card-title {
        font-size: 1.3em;
    }

    .page-news__article-item {
        flex-direction: column; /* Stack for mobile */
    }

    .page-news__article-image {
        width: 100%;
        height: 250px;
    }

    .page-news__article-content {
        width: 100%;
        padding: 20px;
    }

    .page-news__article-title {
        font-size: 1.5em;
    }

    /* Video responsiveness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* All images responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 15px 20px;
    }
}