/* style/news.css */

/* Base styles for the news page, considering dark body background */
.page-news {
    color: #ffffff; /* Light text for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #0a0a0a; /* Ensure consistency with body background */
}

/* General Section and Container Styles */
.page-news__section {
    padding: 60px 0;
}

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

.page-news__section-title {
    font-size: clamp(1.8rem, 2.5vw, 2.8rem);
    font-weight: 700;
    color: #26A9E0; /* Brand color for section titles */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 1.1rem;
    color: #f0f0f0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-news__text-center {
    text-align: center;
}

/* Colors based on background brightness */
.page-news__dark-bg {
    background-color: #0a0a0a; /* Dark background */
    color: #ffffff; /* Light text */
}

.page-news__light-bg {
    background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
    color: #ffffff; /* Light text */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as body handles --header-offset */
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

.page-news__hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-news__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #26A9E0; /* Brand color for main title */
    margin-bottom: 15px;
    line-height: 1.1;
}

.page-news__description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* CTA Buttons */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

.page-news__btn-primary:hover {
    background-color: #1e87c0;
    border-color: #1e87c0;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #EA7C07; /* "登录" color */
    border: 2px solid #EA7C07;
}

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

.page-news__btn-large {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* News Highlights Section */
.page-news__news-highlights {
    background-color: #0a0a0a;
}

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

.page-news__news-card {
    background-color: #1a1a1a; /* Card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
}

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

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

.page-news__card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-title a {
    color: #26A9E0; /* Link color for titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-news__card-meta {
    font-size: 0.9rem;
    color: #999999;
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1rem;
    color: #cccccc;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__card-link {
    display: inline-block;
    color: #26A9E0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__card-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

.page-news__view-all {
    text-align: center;
    margin-top: 50px;
}

/* Platform Insights Section */
.page-news__platform-insights {
    background-color: #1a1a1a; /* Darker background for contrast */
}

.page-news__insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__insight-item {
    background-color: #0a0a0a; /* Dark background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.page-news__insight-title {
    font-size: 1.5rem;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-news__insight-item p {
    color: #cccccc;
    font-size: 1rem;
}

/* CTA Promo Section */
.page-news__cta-promo {
    background-color: #26A9E0; /* Brand color background */
    color: #ffffff;
}

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

.page-news__cta-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__cta-content {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-news__cta-image-wrapper {
    flex: 1;
    min-width: 300px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.page-news__cta-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

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

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: #1a1a1a; /* Card background */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #26A9E0;
    cursor: pointer;
    background-color: #1a1a1a;
    border-bottom: 1px solid #0a0a0a; /* Separator */
    list-style: none; /* For details/summary */
}

.page-news__faq-question::-webkit-details-marker {
    display: none;
}

.page-news__faq-question:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-news__faq-question:hover .page-news__faq-toggle {
    color: #ffffff;
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    margin-left: 15px;
    color: #26A9E0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or similar */
    color: #ffffff;
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1rem;
    color: #cccccc;
    background-color: #0a0a0a; /* Answer background */
}

.page-news__faq-answer p {
    margin-bottom: 0;
}

/* Final CTA Section */
.page-news__final-cta {
    background-color: #0a0a0a;
    padding-bottom: 80px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .page-news__hero-content {
        padding: 0 20px;
    }
    .page-news__cta-flex {
        flex-direction: column;
        text-align: center;
    }
    .page-news__cta-content {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-news__section {
        padding: 40px 0;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section-title {
        font-size: 2rem;
    }
    .page-news__description {
        font-size: 1.1rem;
    }
    .page-news__main-title {
        font-size: 2.5rem;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-image-wrapper,
    .page-news__cta-image-wrapper,
    .page-news__news-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__news-card {
        margin-bottom: 20px;
    }
    .page-news__card-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    /* Buttons responsiveness */
    .page-news__cta-buttons {
        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-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    /* FAQ adjustments */
    .page-news__faq-question {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 15px 20px;
    }

    /* Ensure content area does not overflow */
    .page-news__section,
    .page-news__container,
    .page-news__news-grid,
    .page-news__insights-grid,
    .page-news__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    .page-news__hero-section {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-promo .page-news__cta-content {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 2rem;
    }
    .page-news__section-title {
        font-size: 1.8rem;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        font-size: 1rem;
        padding: 12px 20px;
    }
}