:root {
    --main-color: #11A84E;
    --secondary-color: #22C768;
    --bg-color-page: #08160F; /* Background */
    --bg-color-card: #11271B; /* Card BG */
    --text-main: #F2FFF6; /* Text Main */
    --text-secondary: #A7D9B8; /* Text Secondary */
    --border-color: #2E7A4E; /* Border */
    --glow-color: #57E38D; /* Glow */
    --gold: #F2C14E; /* Gold */
    --divider-color: #1E3A2A; /* Divider */
    --deep-green: #0A4B2C; /* Deep Green */
}

/* --- Base Styles --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Default text color for the page, from custom palette */
    background-color: var(--bg-color-page); /* Default background color for the page, from custom palette */
}

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

.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--gold); /* Using gold for main titles for emphasis */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Main image first, then content */
    align-items: center;
    justify-content: center;
    padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
    background-color: var(--bg-color-page);
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 700px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 40px; /* Space between image and content */
}

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

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.page-news__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Using clamp for H1 */
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

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

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button gradient */
    color: var(--text-main); /* White text on dark green button */
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--main-color); /* Main color text on transparent button */
    border: 2px solid var(--border-color); /* Border color */
}

.page-news__btn-secondary:hover {
    background-color: rgba(46, 122, 78, 0.2); /* Slight background on hover */
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: var(--bg-color-card); /* Card background for this section */
}

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

.page-news__article-card {
    background-color: var(--bg-color-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--divider-color);
    display: flex;
    flex-direction: column;
}

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

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

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

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

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

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

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

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

.page-news__read-more {
    display: inline-block;
    color: var(--main-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: var(--gold);
}

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

/* --- Featured News Section --- */
.page-news__featured-news {
    padding: 60px 0;
    background-color: var(--bg-color-page);
}

.page-news__articles-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

.page-news__list-item {
    display: flex;
    background-color: var(--bg-color-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--divider-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-news__list-image {
    width: 250px; /* Fixed width for list image */
    height: 180px; /* Fixed height for list image */
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.page-news__list-content {
    padding: 20px;
    flex-grow: 1;
}

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

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

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

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

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

.page-news__cta-section .page-news__section-title {
    color: var(--gold);
}

.page-news__cta-section .page-news__section-description {
    color: var(--text-secondary);
}

/* --- FAQ Section --- */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--bg-color-card);
}

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

.page-news__faq-item {
    background-color: var(--card-bg); /* Use card background for FAQ items */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-main);
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-item summary:hover {
    background-color: rgba(46, 122, 78, 0.1); /* Slight hover effect */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.page-news__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--gold);
}

.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-section {
        padding-bottom: 40px;
    }
    .page-news__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-news__description {
        font-size: 1.1em;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .page-news__list-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .page-news__list-image {
        width: 100%;
        height: 200px;
    }
    .page-news__list-content {
        padding: 15px;
    }
    .page-news__list-title {
        font-size: 1.1em;
    }
}

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

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

    .page-news__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
        padding-bottom: 30px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

    .page-news__description {
        font-size: 1em;
    }

    /* Buttons */
    .page-news__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .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-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-image,
    .page-news__list-image {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .page-news__article-image {
        height: 180px; /* Adjust height for mobile cards */
    }

    .page-news__list-image {
        height: auto; /* Allow auto height for list images on mobile */
    }

    /* Sections and Cards */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__latest-articles,
    .page-news__featured-news,
    .page-news__cta-section,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-news__hero-content {
        padding: 0 15px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Single column for articles */
    }

    .page-news__article-card {
        margin-bottom: 20px;
    }
    
    .page-news__list-item {
        flex-direction: column;
    }

    .page-news__list-image {
        width: 100%;
        height: auto;
    }

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

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

/* Ensure content area images are at least 200x200px or larger */
.page-news__content-area img,
.page-news__latest-articles img,
.page-news__featured-news img {
    min-width: 200px;
    min-height: 200px;
    /* On desktop, specific article and list images have fixed dimensions */
    /* On mobile, max-width: 100%; height: auto; will override this for responsive scaling */
}

/* --- Contrast Fixes (if needed, based on dynamic analysis) --- */
/* If body background is very dark, ensure text is light. Already handled by custom palette. */
/* If any specific element has a low contrast, apply a fix like below: */
/* .page-news__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
} */