/* style/news.css */

/* --- Base Styles & Variables --- */
:root {
    --color-primary: #11A84E; /* Main Green */
    --color-secondary: #22C768; /* Auxiliary Green */
    --color-text-main: #F2FFF6; /* Light Text */
    --color-text-secondary: #A7D9B8; /* Secondary Light Text */
    --color-background: #08160F; /* Deep Green Background */
    --color-card-bg: #11271B; /* Darker Green Card Background */
    --color-border: #2E7A4E; /* Green Border */
    --color-glow: #57E38D; /* Green Glow */
    --color-gold: #F2C14E; /* Gold */
    --color-divider: #1E3A2A; /* Dark Green Divider */
    --color-deep-green: #0A4B2C; /* Deeper Green */

    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--color-text-main); /* Default text color for the page, as body background is dark */
    background-color: var(--color-background); /* Ensures consistent background */
}

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

.page-news__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

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

.page-news__section-description a {
    color: var(--color-glow);
    text-decoration: none;
}

.page-news__section-description a:hover {
    text-decoration: underline;
}

/* --- 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 */
    background-color: var(--color-background);
}

.page-news__hero-image-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

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

.page-news__hero-content {
    background-color: var(--color-card-bg); /* Use card background for content block on dark body */
    color: var(--color-text-main);
    padding: 40px 20px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    margin-top: -80px; /* Overlap slightly with image for visual appeal */
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-news__hero-content .page-news__container {
    max-width: 900px;
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
    font-weight: 800;
    color: var(--color-gold);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.2em;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-description a {
    color: var(--color-glow);
    text-decoration: none;
}

.page-news__hero-description a:hover {
    text-decoration: underline;
}

/* --- CTA Buttons --- */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; /* Crucial for button width calculations */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button does not overflow */
}

.page-news__btn-primary {
    background: var(--button-gradient);
    color: var(--color-text-main); /* Light text on dark button */
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--color-glow); /* Green text on transparent/dark background */
    border: 2px solid var(--color-glow);
}

.page-news__btn-secondary:hover {
    background-color: var(--color-glow);
    color: var(--color-background); /* Dark text on green background */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Latest News Section --- */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main);
}

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

.page-news__news-card {
    background-color: var(--color-card-bg); /* Darker green card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have equal height */
}

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

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

.page-news__card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow content to grow to fill space */
}

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

.page-news__card-title a {
    color: var(--color-text-main); /* Light text for titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: var(--color-gold);
}

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

.page-news__card-excerpt {
    font-size: 1em;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to grow */
}

.page-news__card-excerpt a {
    color: var(--color-glow);
    text-decoration: none;
}

.page-news__card-excerpt a:hover {
    text-decoration: underline;
}

.page-news__card-link {
    display: inline-block;
    color: var(--color-glow);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    align-self: flex-start; /* Align link to the start */
}

.page-news__card-link:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

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

/* --- General Articles Section --- */
.page-news__general-articles-section {
    padding: 80px 0;
    background-color: var(--color-card-bg); /* Slightly lighter background for contrast */
    color: var(--color-text-main);
}

.page-news__article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.page-news__article-item {
    background-color: var(--color-background); /* Darker background for article items */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-thumbnail {
    width: 200px; /* Minimum 200px width */
    min-width: 200px; /* Ensure it doesn't shrink below 200px */
    height: 150px; /* Adjust height to maintain aspect ratio, or use object-fit */
    object-fit: cover;
    border-radius: 8px;
    margin-right: 25px;
    display: block;
}

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

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

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

.page-news__article-title a:hover {
    color: var(--color-gold);
}

.page-news__keyword {
    color: var(--color-glow); /* Highlight keywords */
}

.page-news__article-meta {
    font-size: 0.85em;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.page-news__article-excerpt a {
    color: var(--color-glow);
    text-decoration: none;
}

.page-news__article-excerpt a:hover {
    text-decoration: underline;
}


/* --- FAQ Section --- */
.page-news__faq-section {
    padding: 80px 0;
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main);
}

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

.page-news__faq-item {
    background-color: var(--color-card-bg); /* Card background for FAQ items */
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: var(--color-text-main);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--color-gold);
    cursor: pointer;
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* Remove default marker */
}

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

.page-news__faq-question::marker {
    display: none; /* Hide default marker for other browsers */
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: var(--color-glow);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-divider);
}

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

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

.page-news__faq-answer a {
    color: var(--color-glow);
    text-decoration: none;
}

.page-news__faq-answer a:hover {
    text-decoration: underline;
}

/* --- Bottom CTA Section --- */
.page-news__cta-bottom-section {
    padding: 80px 0;
    background-color: var(--color-deep-green); /* Use a deeper green for a strong CTA */
    text-align: center;
    color: var(--color-text-main);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

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

    .page-news__news-card {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .page-news__hero-content {
        margin-top: -50px;
        padding: 30px 15px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em) !important; /* Ensure H1 is not too large */
    }

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

    .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: 12px 20px;
    }

    .page-news__latest-news-section,
    .page-news__general-articles-section,
    .page-news__faq-section,
    .page-news__cta-bottom-section {
        padding: 40px 0;
    }

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

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

    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column layout */
        padding: 0 15px;
    }

    .page-news__news-card {
        max-width: 100%;
    }

    .page-news__card-image {
        height: 180px;
    }

    .page-news__article-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .page-news__article-thumbnail {
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important; /* Allow height to adjust */
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
      
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__general-articles-section,
    .page-news__faq-section,
    .page-news__cta-bottom-section,
    .page-news__hero-content,
    .page-news__news-grid,
    .page-news__article-list,
    .page-news__faq-list,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent content overflow */
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
    /* If a video section were present */
    .page-news__video-section {
        padding-top: 10px !important;
    }

    /* FAQ specific adjustments */
    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 15px 20px;
        font-size: 0.95em;
    }
}

/* Ensure no CSS filter on images */
.page-news img {
    filter: none !important;
}

/* Content area image size lower bound */
.page-news__content-area img,
.page-news__news-card img,
.page-news__article-item img {
    min-width: 200px;
    min- /* Adjust height to maintain aspect ratio, or use object-fit */
}

@media (max-width: 768px) {
    .page-news__content-area img,
    .page-news__news-card img,
    .page-news__article-item img {
        min-width: unset; /* Allow to shrink on mobile */
        min-height: unset;
    }
}