/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: 'Arial', sans-serif;
    background-color: #08160F; /* Background color from custom palette */
    color: #F2FFF6; /* Main text color from custom palette */
    line-height: 1.6;
}

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

.page-news__section-title {
    font-size: clamp(28px, 4vw, 42px);
    color: #F2FFF6;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 18px;
    color: #A7D9B8; /* Secondary text color */
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    position: relative;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(0.7); /* Slightly darken image for text contrast */
}

.page-news__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: 900px;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-news__main-title {
    font-size: clamp(32px, 5vw, 56px);
    color: #F2FFF6;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__description {
    font-size: clamp(16px, 2vw, 20px);
    color: #A7D9B8;
    margin-bottom: 30px;
}

/* CTA Buttons */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button gradient */
    color: #ffffff;
    border: none;
    margin-right: 15px;
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: #11271B; /* Card BG as secondary button background */
    color: #57E38D; /* Glow color for secondary button text */
    border: 2px solid #2E7A4E; /* Border color */
}

.page-news__btn-secondary:hover {
    background: #0A4B2C; /* Deep Green on hover */
    color: #F2FFF6;
    transform: translateY(-2px);
}

/* News List Section */
.page-news__news-list-section {
    padding: 60px 0;
    background-color: #08160F;
}

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

.page-news__news-card {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

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

.page-news__card-title {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__card-title a {
    color: #F2FFF6; /* Main text color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #57E38D; /* Glow color on hover */
}

.page-news__card-date {
    font-size: 14px;
    color: #A7D9B8; /* Secondary text color */
    margin-bottom: 15px;
    display: block;
}

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

.page-news__read-more {
    display: inline-block;
    color: #57E38D; /* Glow color */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

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

/* About News Section */
.page-news__about-news-section {
    padding: 60px 0;
    background-color: #0A4B2C; /* Deep Green */
}

.page-news__benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.page-news__benefits-item {
    background-color: #11271B; /* Card BG */
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-news__benefits-title {
    font-size: 22px;
    color: #F2FFF6;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__benefits-item p {
    font-size: 16px;
    color: #A7D9B8;
}

.page-news__final-paragraph {
    font-size: 18px;
    color: #A7D9B8;
    text-align: center;
    margin-top: 40px;
    line-height: 1.8;
}

/* CTA Section */
.page-news__cta-section {
    background-color: #11271B; /* Card BG */
    padding: 80px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.page-news__cta-content {
    z-index: 2;
    position: relative;
    max-width: 900px;
}

.page-news__cta-title {
    font-size: clamp(28px, 4vw, 42px);
    color: #F2FFF6;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 18px;
    color: #A7D9B8;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__cta-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px;
    height: auto;
    opacity: 0.3;
    z-index: 1;
    object-fit: contain;
}

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

.page-news__faq-list {
    margin-top: 40px;
}

.page-news__faq-item {
    background-color: #11271B; /* Card BG */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #2E7A4E; /* Border color */
}

.page-news__faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #F2FFF6;
    background-color: #1E3A2A; /* Divider color for summary background */
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary:hover {
    background-color: #0A4B2C; /* Deep Green on hover */
}

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

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

.page-news__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
    color: #57E38D; /* Glow color */
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: '−';
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 16px;
    color: #A7D9B8; /* Secondary text color */
    border-top: 1px solid #2E7A4E; /* Border color */
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__hero-content {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding-bottom: 40px;
    }

    .page-news__hero-content {
        position: static;
        transform: none;
        padding: 20px;
        background: none; /* Remove overlay for better mobile readability if image is behind */
        margin-top: 20px;
        max-width: 100%;
    }

    .page-news__hero-image-wrapper {
        max-height: 400px;
    }

    .page-news__main-title {
        font-size: clamp(28px, 8vw, 42px);
    }

    .page-news__description {
        font-size: 16px;
    }

    .page-news__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-bottom: 15px;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__btn-primary {
        margin-right: 0;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-news__news-list-section,
    .page-news__about-news-section,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 40px 0;
    }

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

    .page-news__news-card {
        margin-bottom: 20px;
    }

    .page-news__cta-image {
        position: static;
        width: 100%;
        max-width: 300px;
        margin-top: 30px;
        opacity: 0.5;
    }

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

    /* Mobile image and video responsive adaptation */
    .page-news img,
    .page-news video,
    .page-news__video {
        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;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    
    .page-news__video-section {
        padding-top: 10px !important; /* body 已承担 --header-offset，此处禁止 var(--header-offset) */
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: clamp(24px, 10vw, 36px);
    }

    .page-news__description {
        font-size: 15px;
    }

    .page-news__cta-button {
        padding: 12px 20px;
        font-size: 16px;
    }

    .page-news__card-title {
        font-size: 20px;
    }

    .page-news__faq-item summary {
        font-size: 18px;
        padding: 15px 20px;
    }

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