/* style/news.css */

/* --- General Styles for .page-news --- */
.page-news {
    font-family: Arial, sans-serif;
    color: var(--text-main, #F2FFF6); /* Default text color for the page, light as body is dark */
    background-color: var(--background, #08160F); /* Explicitly set for content area if needed, but body handles global */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: var(--text-main, #F2FFF6);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-news__section-description {
    font-size: 1.1em;
    color: var(--text-secondary, #A7D9B8);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't overflow on mobile */
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff; /* White text for contrast */
    border: none;
}

.page-news__btn-primary:hover {
    background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-news__btn-secondary {
    background: transparent;
    color: var(--text-main, #F2FFF6);
    border: 2px solid var(--border, #2E7A4E);
}

.page-news__btn-secondary:hover {
    background: var(--border, #2E7A4E);
    color: #ffffff;
}

.page-news__btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: var(--background, #08160F);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Ensure minimum size */
}

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

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3em); /* Responsive H1 font size */
    color: var(--text-main, #F2FFF6);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.page-news__description {
    font-size: 1.15em;
    color: var(--text-secondary, #A7D9B8);
    margin-bottom: 30px;
    line-height: 1.7;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: var(--background, #08160F); /* Dark background */
    color: var(--text-main, #F2FFF6); /* Light text */
}

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

.page-news__article-card {
    background-color: var(--card-bg, #11271B); /* Dark card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-main, #F2FFF6); /* Light text for card content */
    border: 1px solid var(--border, #2E7A4E);
}

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

.page-news__article-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Ensure minimum size */
}

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

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text-main, #F2FFF6); /* Light text */
}

.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); /* Highlight on hover */
}

.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);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--glow, #57E38D);
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    text-decoration: underline;
    color: var(--gold, #F2C14E);
}

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

/* --- FAQ Section --- */
.page-news__faq-section {
    padding: 80px 0;
    background-color: var(--deep-green, #0A4B2C); /* Custom deep green background */
    color: var(--text-main, #F2FFF6); /* Light text */
}

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

.page-news__faq-item {
    background-color: var(--card-bg, #11271B); /* Dark card background */
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border, #2E7A4E);
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-main, #F2FFF6);
    cursor: pointer;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-news__faq-item[open] .page-news__faq-question {
    background-color: var(--deep-green, #0A4B2C); /* Slightly darker when open */
    border-bottom: 1px solid var(--divider, #1E3A2A);
}

.page-news__faq-question:hover {
    background-color: var(--deep-green, #0A4B2C);
}

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

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

/* --- CTA Section --- */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--deep-green, #0A4B2C); /* Custom deep green background */
    color: var(--text-main, #F2FFF6); /* Light text */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__hero-content {
        padding: 0 15px;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

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

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

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

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .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;
        padding-right: 15px;
    }
    .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;
      flex-wrap: wrap !important;
      gap: 10px;
      overflow: hidden !important;
    }

    .page-news__latest-articles,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 60px 0;
    }

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

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

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

    .page-news__article-image {
        height: 200px; /* Adjust height for mobile */
    }

    .page-news__article-title {
        font-size: 1.2em;
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 18px 20px;
    }

    /* Mobile image responsiveness */
    .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__faq-item,
    .page-news__cta-section,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }
}

@media (max-width: 480px) {
    .page-news__section-title {
        font-size: 1.6em;
    }
    .page-news__main-title {
        font-size: clamp(1.6em, 8vw, 2em);
    }
    .page-news__description {
        font-size: 0.9em;
    }
    .page-news__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-news__faq-toggle {
        font-size: 1.2em;
    }
}

/* Ensure images in content area are not too small */
.page-news__article-image {
    min-width: 200px;
    min-height: 200px;
}
.page-news__hero-image {
    min-width: 200px;
    min-height: 200px;
}
/* Any other image in content area */
.page-news__content-area img {
    min-width: 200px;
    min-height: 200px;
}