/* style/news.css */

/* --- Base Styles & Variables (Scoped to page-news) --- */
.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--text-main-color); /* Default text color for the page */
    background-color: var(--background-color); /* Inherits from body, but explicitly set for scope */
    line-height: 1.6;
}

/* Custom properties for colors (derived from custom palette) */
.page-news {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --card-bg-color: #11271B;
    --background-color: #08160F; /* Main page background */
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

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

.page-news__section-title {
    font-size: 2.5em; /* Adjusted for desktop, will be responsive */
    color: var(--gold-color); /* Gold for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

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

.page-news a {
    color: var(--gold-color); /* Links in content */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news a:hover {
    color: var(--glow-color);
    text-decoration: underline;
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding for first section, body handles header offset */
    overflow: hidden;
    box-sizing: border-box;
    background-color: var(--deep-green-color);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    min-width: 320px; /* Minimum reasonable width for hero on smallest devices */
    min-height: 180px; /* Minimum reasonable height for hero on smallest devices (16:9 aspect) */
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.page-news__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

/* CTA Button */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--button-gradient);
    color: var(--text-main-color);
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

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

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

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

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

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

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

.page-news__news-card-title {
    font-size: 1.4em;
    color: var(--text-main-color); /* Card titles */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: inherit;
    text-decoration: none;
}

.page-news__news-card-title a:hover {
    color: var(--gold-color);
    text-decoration: underline;
}

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

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

.page-news__news-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--gold-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-link:hover {
    color: var(--glow-color);
}

.page-news__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-news__news-card-link:hover .page-news__arrow {
    transform: translateX(5px);
}

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

/* --- Access Guide Section --- */
.page-news__access-guide-section {
    padding: 80px 0;
    background-color: var(--deep-green-color);
}

.page-news__guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.page-news__guide-item {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.page-news__guide-title {
    font-size: 1.6em;
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: bold;
}

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

.page-news__cta-button--small {
    padding: 10px 20px;
    font-size: 0.9em;
}

/* --- Benefits Section --- */
.page-news__benefits-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

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

.page-news__benefit-item {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid var(--border-color);
}

.page-news__benefit-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-news__benefit-title {
    font-size: 1.5em;
    color: var(--text-main-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__benefit-text {
    font-size: 1em;
    color: var(--text-secondary-color);
}

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

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

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

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

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

.page-news__faq-item summary:hover {
    background-color: rgba(var(--primary-color), 0.1);
}

.page-news__faq-qtext {
    flex-grow: 1;
    color: var(--gold-color);
}

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

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-secondary-color);
    line-height: 1.7;
    max-height: 0; /* For animated collapse if using JS */
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
    max-height: 500px; /* Arbitrary large value for expansion */
    padding-top: 10px;
}

/* --- Call to Action Section --- */
.page-news__call-to-action-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--background-color);
}

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

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

    .page-news__news-card-image {
        height: 180px;
    }
}

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

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

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

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

    .page-news__intro-text {
        font-size: 1em;
    }

    /* Mobile button responsiveness */
    .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;
      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;
    }

    .page-news__cta-buttons {
      display: flex;
      flex-direction: column;
    }

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

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

    .page-news__news-grid,
    .page-news__guide-content,
    .page-news__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__news-card-image {
        height: 150px;
    }

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

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

    .page-news__faq-qtext {
        font-size: 1em;
    }

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

    /* Mobile image responsiveness */
    .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__access-guide-section,
    .page-news__benefits-section,
    .page-news__faq-section,
    .page-news__call-to-action-section,
    .page-news__news-card,
    .page-news__guide-item,
    .page-news__benefit-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }

    .page-news__news-card-image,
    .page-news__benefit-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* Ensure content area images are not too small */
.page-news img:not(.page-news__hero-image) {
    min-width: 200px;
    min-height: 200px;
}

.page-news__news-card-image,
.page-news__benefit-image {
    min-width: 200px;
    min-height: 150px;
}

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