/* style/news.css */

/* Base styles for the page content, ensuring text contrast with dark body background */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: transparent; /* Body background handled by shared.css */
    padding-bottom: 60px; /* Space above footer */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    padding-top: 0; /* Assuming shared.css handles body padding-top for header offset */
}

.page-news__dark-bg {
    background-color: #017439; /* Brand primary color for hero background */
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333; /* Dark text for light background */
}

.page-news__dark-section {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 0;
}

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

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

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

.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn,
.page-news__contact-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for button responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

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

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

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1; /* Subtly blend background image */
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit from parent section */
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: inherit;
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 60px 0;
}

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

.page-news__article-card {
    background-color: #ffffff;
    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;
    display: flex;
    flex-direction: column;
    color: #333333; /* Dark text for light card background */
}

.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: 200px;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
    color: #017439; /* Brand color for titles */
}

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

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

.page-news__article-excerpt {
    font-size: 1em;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__article-date {
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 20px;
    display: block;
}

.page-news__read-more-btn {
    background-color: #017439;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    align-self: flex-start;
    font-size: 0.9em;
}

.page-news__read-more-btn:hover {
    background-color: #005f2e;
}

/* Deep Dive Section */
.page-news__deep-dive {
    padding: 80px 0;
}

.page-news__deep-dive-content {
    display: flex;
    gap: 40px;
    margin-top: 50px;
}

.page-news__text-block {
    flex: 2;
    font-size: 1.1em;
    color: #f0f0f0;
}

.page-news__text-block p {
    margin-bottom: 20px;
}

.page-news__sub-title {
    font-size: 2em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: bold;
}

.page-news__image-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-news__content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure it behaves as a block element */
}

.page-news__content-image--secondary {
    margin-top: 0; /* Adjust spacing for multiple images */
}

.page-news__image-caption {
    font-size: 0.9em;
    text-align: center;
    color: #cccccc;
}

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

/* Promotions & Events Section */
.page-news__promotions-events {
    padding: 60px 0;
}

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

.page-news__promotion-card {
    background-color: #ffffff;
    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;
    display: flex;
    flex-direction: column;
    color: #333333;
}

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

.page-news__promotion-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

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

.page-news__promotion-title {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    color: #017439;
}

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

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
}

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

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

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

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

.page-news__faq-question h3 {
    margin: 0;
    color: inherit;
}

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

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

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

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

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
    color: #555555;
}

.page-news__contact-btn {
    background-color: #017439;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9em;
    margin-top: 15px;
}

.page-news__contact-btn:hover {
    background-color: #005f2e;
}

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

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

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

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

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

    .page-news__deep-dive-content {
        flex-direction: column;
    }

    .page-news__text-block,
    .page-news__image-block {
        flex: none;
        width: 100%;
    }

    .page-news__article-card,
    .page-news__promotion-card {
        width: 90%; /* Adjust width for better spacing on tablets */
        margin-left: auto;
        margin-right: auto;
    }
}


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

    /* HERO 主图区域 */
    .page-news__hero-section {
        padding: 40px 0;
        padding-top: 0; /* Ensures no double padding if shared.css sets body padding */
    }

    .page-news__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

    /* 按钮与按钮容器 */
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news__read-more-btn,
    .page-news__contact-btn,
    .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__hero-cta,
    .page-news__cta-bottom,
    .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;
        flex-direction: column; /* For multiple buttons, stack them */
    }

    /* 其他内容模块 */
    .page-news__container {
        padding: 0 15px;
    }

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

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

    .page-news__latest-articles,
    .page-news__deep-dive,
    .page-news__promotions-events,
    .page-news__faq-section {
        padding: 40px 0;
    }

    .page-news__articles-grid,
    .page-news__promotions-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    
    .page-news__article-card,
    .page-news__promotion-card {
        margin: 0 auto; /* Center cards */
        width: 100%;
    }

    .page-news__article-image,
    .page-news__promotion-image {
        height: 180px; /* Adjust height for smaller screens */
    }

    /* 通用图片与容器 */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Enforce minimum size */
        min-height: 200px !important; /* Enforce minimum size */
    }

    .page-news__article-card img,
    .page-news__promotion-card img,
    .page-news__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__text-block {
        font-size: 1em;
    }

    .page-news__sub-title {
        font-size: 1.5em;
        margin-top: 25px;
    }

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

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

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