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

/* General page styling */
.page-news {
    color: #f0f0f0; /* Light text for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    background-color: #017439; /* Primary brand color for hero background */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
    overflow: hidden; /* For image */
}

.page-news__hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

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

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background */
    z-index: 1;
}

.page-news__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.page-news__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Custom color for registration/login */
    color: #FFFF00; /* Custom font color for registration/login */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.page-news__btn-primary:hover {
    background-color: #a00606;
}

.page-news__btn-secondary {
    display: inline-block;
    background-color: #017439;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-sizing: border-box;
}

.page-news__btn-secondary:hover {
    background-color: #005a2d;
    border-color: #f0f0f0;
}

/* Section headings */
.page-news__section-heading {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: #ffffff; /* Light text for dark body background */
    padding-top: 40px;
}

/* Video Section */
.page-news__video-section {
    background-color: #1a1a1a;
    padding: 60px 20px;
    text-align: center;
}

.page-news__video-container {
    max-width: 960px;
    margin: 0 auto 30px auto;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Articles Grid */
.page-news__featured-articles {
    padding: 60px 20px;
    background-color: #0a0a0a; /* Same as body for consistency */
}

.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #f0f0f0;
}

.page-news__article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.page-news__article-card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ffffff;
}

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

.page-news__article-card-title a:hover {
    color: #FFFF00; /* Yellow for hover, good contrast */
}

.page-news__article-card-description {
    font-size: 0.95em;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__article-card-link {
    display: inline-block;
    color: #FFFF00;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__article-card-link:hover {
    color: #017439;
}

/* Latest News Section */
.page-news__latest-news {
    padding: 60px 20px;
    background-color: #1a1a1a;
}

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

.page-news__news-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__news-item-date {
    background-color: #017439;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    flex-shrink: 0;
    text-align: center;
}

.page-news__news-item-content {
    flex-grow: 1;
}

.page-news__news-item-title {
    font-size: 1.3em;
    margin-bottom: 5px;
}

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

.page-news__news-item-title a:hover {
    color: #FFFF00;
}

.page-news__news-item-summary {
    font-size: 0.9em;
    color: #cccccc;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 20px;
    background-color: #0a0a0a;
}

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFFF00;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Plus sign to X or minus sign */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #cccccc;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 20px;
}

/* CTA Section */
.page-news__cta-section {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
}

.page-news__cta-section-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-news__cta-section-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__section-heading {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific padding for sections to avoid content touching edges */
    .page-news__hero-section,
    .page-news__video-section,
    .page-news__featured-articles,
    .page-news__latest-news,
    .page-news__faq-section,
    .page-news__cta-section {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Fixed header offset for video section in mobile */
    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }

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

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

    .page-news__cta-group {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-news__article-card-image {
        height: 180px;
    }

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

    .page-news__news-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-news__news-item-date {
        width: 100%;
        margin-bottom: 10px;
        text-align: left;
    }

    .page-news__news-item-title {
        font-size: 1.1em;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper,
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Video responsiveness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__section-heading {
        font-size: 1.8em;
    }
    .page-news__article-card-title {
        font-size: 1.2em;
    }
}