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

/* General Styles */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Body background from shared */
}

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

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

.page-news__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button doesn't overflow */
}

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

.page-news__btn-primary:hover {
    background-color: #1a8cc2; /* Slightly darker */
    border-color: #1a8cc2;
}

.page-news__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0; /* Brand primary color */
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #e0f4ff; /* Light hover */
    color: #1a8cc2;
    border-color: #1a8cc2;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    /* Assuming shared.css handles body padding-top, so this section doesn't need it */
    /* If not, add padding-top: var(--header-offset, 120px); here */
}

.page-news__main-title {
    font-size: 3.2em;
    color: #26A9E0; /* Brand color */
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.page-news__intro-text {
    font-size: 1.3em;
    color: #555555;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: #f8f8f8; /* Light background for contrast */
}

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

.page-news__article-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    filter: none; /* Ensure no CSS filter is applied */
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0; /* Brand color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

.page-news__article-excerpt {
    font-size: 1em;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: #EA7C07; /* Accent color for links */
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #c76706;
}

.page-news__arrow {
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

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

/* Video Section */
.page-news__video-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color as background */
    color: #FFFFFF; /* White text for contrast */
    text-align: center;
}

.page-news__video-section .page-news__section-title,
.page-news__video-section .page-news__section-description {
    color: #FFFFFF;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 40px auto 0;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.page-news__video-wrapper .page-news__video-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

/* Categories Section */
.page-news__categories {
    padding: 80px 0;
    background-color: #FFFFFF;
}

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

.page-news__category-card {
    background-color: #f0f8ff; /* Light blue background */
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-news__category-icon {
    width: 150px; /* Larger icons as per requirement */
    height: 112px; /* Maintain aspect ratio for 400x300 */
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
    display: block; /* Ensure it behaves as a block element for sizing */
    filter: none; /* Ensure no CSS filter is applied */
}

.page-news__category-title {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.page-news__category-title a {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__category-title a:hover {
    color: #1a8cc2;
}

.page-news__category-description {
    font-size: 0.95em;
    color: #666666;
    flex-grow: 1;
}

/* CTA Section */
.page-news__cta-section,
.page-news__final-cta {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color */
    color: #FFFFFF;
    text-align: center;
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-description,
.page-news__final-cta .page-news__section-title,
.page-news__final-cta .page-news__section-description {
    color: #FFFFFF;
}

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

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

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

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

.page-news__faq-question:hover {
    background-color: #eef7ff; /* Light hover */
}

.page-news__faq-question h3 {
    margin: 0;
    font-size: 1em; /* Inherit font size from parent */
    color: inherit;
}

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

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

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

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

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

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

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__video-section,
    .page-news__categories,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__final-cta {
        padding: 40px 0;
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-news__intro-text {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
    }

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

    /* Ensure all content containers are responsive and prevent overflow */
    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__video-section,
    .page-news__categories,
    .page-news__cta-section,
    .page-news__faq-section,
    .page-news__final-cta,
    .page-news__article-card,
    .page-news__category-card,
    .page-news__faq-item,
    .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;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

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

    .page-news__article-grid,
    .page-news__category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-image {
        height: 200px; /* Adjust height for mobile */
    }

    .page-news__category-icon {
        width: 100px;
        height: 75px;
    }
    
    /* Buttons mobile adaptation */
    .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__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

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

    .page-news__faq-answer {
        padding: 0 20px;
    }

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px 20px;
    }
}