/* style/news.css */
/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #F2FFF6); /* Default text color for dark background */
    background-color: var(--background, #08160F); /* Page background */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    background-color: var(--deep-green, #0A4B2C); /* A darker green for the hero section background */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-news__hero-content-wrapper {
    text-align: center;
    width: 100%;
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
    color: var(--text-main, #F2FFF6);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__description {
    font-size: 1.1em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.2em;
    color: var(--text-main, #F2FFF6);
    text-align: center;
    margin-bottom: 40px;
    padding-top: 60px;
    font-weight: 700;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
    padding: 60px 0;
    background-color: var(--background, #08160F);
}

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

.page-news__article-card {
    background-color: var(--card-bg, #11271B);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    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 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-news__article-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

.page-news__article-title a {
    color: var(--text-main, #F2FFF6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: var(--glow, #57E38D);
}

.page-news__article-meta {
    font-size: 0.9em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-link {
    display: inline-block;
    color: var(--glow, #57E38D);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    text-decoration: underline;
}

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

.page-news__view-all-button {
    background: var(--gold, #F2C14E); /* Different color for view all button */
    color: #11271B; /* Dark text for gold button */
}

.page-news__view-all-button:hover {
    background: var(--gold, #F2C14E); /* Keep gold on hover */
    opacity: 0.9;
}

/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: var(--deep-green, #0A4B2C);
}

.page-news__categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.page-news__category-item {
    background-color: var(--divider, #1E3A2A);
    color: var(--text-main, #F2FFF6);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--border, #2E7A4E);
}

.page-news__category-item:hover {
    background-color: var(--glow, #57E38D);
    color: var(--card-bg, #11271B);
}

/* About QH888 Section */
.page-news__about-qh888-section {
    padding: 60px 0;
    background-color: var(--background, #08160F);
}

.page-news__about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-news__about-content p {
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-news__learn-more-button {
    background: var(--main-color, #11A84E);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--deep-green, #0A4B2C);
}

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

.page-news__faq-item {
    background-color: var(--card-bg, #11271B);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-main, #F2FFF6);
    background-color: var(--card-bg, #11271B);
    border-bottom: 1px solid var(--divider, #1E3A2A);
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--glow, #57E38D);
}

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

.page-news__faq-answer {
    padding: 20px;
    color: var(--text-secondary, #A7D9B8);
    font-size: 1em;
    border-top: 1px solid var(--divider, #1E3A2A); /* Border for clarity */
}

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


/* Final CTA Section */
.page-news__final-cta-section {
    padding: 60px 0;
    background-color: var(--background, #08160F);
}

.page-news__cta-card {
    background-color: var(--card-bg, #11271B);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column; /* Default for mobile, will change to row for desktop */
    align-items: center;
    padding: 30px;
    text-align: center;
}

.page-news__cta-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Ensure no extra space below */
}

.page-news__cta-content {
    flex-grow: 1;
}

.page-news__cta-title {
    font-size: 2em;
    color: var(--text-main, #F2FFF6);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.1em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
}

.page-news__cta-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-secondary {
    background: transparent;
    color: var(--glow, #57E38D);
    border: 2px solid var(--glow, #57E38D);
}

.page-news__btn-secondary:hover {
    background: var(--glow, #57E38D);
    color: var(--card-bg, #11271B);
}

/* Responsive Styles */
@media (min-width: 769px) {
    .page-news__hero-section {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 80px 20px;
        padding-top: 10px; /* Still small top padding */
    }

    .page-news__hero-image-wrapper {
        width: 45%;
        margin-right: 5%;
        margin-bottom: 0;
    }

    .page-news__hero-content-wrapper {
        width: 50%;
        text-align: left;
    }

    .page-news__main-title {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }

    .page-news__description {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }

    .page-news__cta-button {
        display: inline-flex; /* For better alignment with text */
        align-items: center;
        justify-content: center;
    }

    .page-news__cta-card {
        flex-direction: row;
        text-align: left;
        padding: 40px;
    }

    .page-news__cta-image {
        width: 30%;
        margin-right: 30px;
        margin-bottom: 0;
        max-width: none;
    }

    .page-news__cta-buttons-wrapper {
        flex-direction: row;
        margin: 0;
    }
}

/* Mobile responsive specific overrides (MUST include !important) */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Images */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__hero-image-wrapper,
    .page-news__article-card,
    .page-news__cta-card,
    .page-news__categories-section,
    .page-news__about-qh888-section,
    .page-news__faq-section,
    .page-news__final-cta-section,
    .page-news__latest-articles-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Videos - if any, applying generic video responsive styles */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        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 already handles --header-offset */
    }
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Buttons */
    .page-news__cta-button,
    .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; /* Adjust padding for full width buttons */
        padding-right: 15px;
    }
    .page-news__cta-buttons-wrapper,
    .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-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        overflow: hidden !important;
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px !important;
    }

    .page-news__main-title {
        font-size: 2em; /* Smaller on mobile */
    }

    .page-news__section-title {
        font-size: 1.8em;
        padding-top: 40px;
    }

    .page-news__article-image {
        height: auto !important; /* Allow height to adjust */
    }

    .page-news__cta-card {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .page-news__cta-image {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
    }
}