/* style/news.css */

/* --- Root Variables & Base Styles --- */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --background-color: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Default text color for the page */
    background-color: var(--background-color); /* Default background color for the page content area */
    line-height: 1.6;
}

/* --- Section Padding --- */
.page-news__section-padding {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- Headings --- */
.page-news__main-title {
    font-size: clamp(2em, 5vw, 3.5em); /* Responsive font size */
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 20px;
    max-width: 900px;
    letter-spacing: -0.02em;
}

.page-news__section-title {
    font-size: clamp(1.8em, 4vw, 2.8em);
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.page-news__section-subtitle {
    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;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-main);
    padding: 10px 0 60px 0; /* Small top padding, larger bottom */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 500px; /* Limit height for hero image */
    z-index: 1;
}

.page-news__hero-content {
    position: relative; /* Changed from absolute to relative to be below the image */
    text-align: center;
    padding: 40px 20px;
    max-width: 900px;
    margin-top: -100px; /* Overlap slightly with the image for visual flow */
    background: rgba(8, 22, 15, 0.9); /* Background to ensure text readability */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 2;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

/* --- CTA Buttons --- */
.page-news__cta-button {
    display: inline-block;
    background: var(--button-gradient);
    color: var(--text-main);
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-news__cta-button--video {
    margin-top: 30px;
}

.page-news__cta-button--secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
    margin-left: 20px;
}

.page-news__cta-button--secondary:hover {
    background: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(34, 199, 104, 0.4);
    color: var(--background-color);
}


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

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

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

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

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

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

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

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

.page-news__news-card-title a:hover {
    color: var(--secondary-color);
}

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

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

.page-news__read-more-button {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-button:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

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

.page-news__view-all-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-main);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-news__view-all-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- Video Section --- */
.page-news__video-section {
    background-color: var(--deep-green);
    text-align: center;
}

.page-news__video-container {
    width: 100%;
    max-width: 960px; /* Standard video width */
    margin: 0 auto;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

/* The video element itself is inside the container */
.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure video content is visible */
    display: block;
}

.page-news__video-description {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 1.1em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Featured Articles Section --- */
.page-news__featured-articles {
    background-color: var(--background-color);
}

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

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

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

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

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

.page-news__article-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

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

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

.page-news__read-more-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

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

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

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

.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(--text-main);
    cursor: pointer;
    background-color: var(--card-bg);
    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 Chrome */
}

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

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

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: var(--text-secondary);
    line-height: 1.7;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-news__faq-item[open] .page-news__faq-answer {
    max-height: 500px; /* Sufficiently large for content */
    padding-top: 15px;
}

/* Fallback for div-based FAQ if JS is active */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 500px !important; /* Important for JS override */
    padding-top: 15px;
}

/* --- CTA Section (Bottom) --- */
.page-news__cta-section {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--primary-color); /* Using primary color for a strong CTA */
    color: var(--text-main);
}

.page-news__cta-section .page-news__section-title {
    color: var(--text-main);
}
.page-news__cta-section .page-news__section-title::after {
    background: var(--text-main); /* White line for contrast */
}

.page-news__cta-section .page-news__section-subtitle {
    color: var(--text-main);
    margin-bottom: 40px;
}

.page-news__cta-content .page-news__cta-button {
    margin: 0 10px;
}

/* --- Responsive Design --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
    .page-news__hero-content {
        margin-top: -80px;
        padding: 30px 20px;
    }
    .page-news__section-padding {
        padding: 40px 15px;
    }
    .page-news__news-card-image,
    .page-news__article-image {
        height: 200px;
    }
    .page-news__news-card-title,
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__faq-question {
        font-size: 1.05em;
        padding: 18px 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-content {
        margin-top: -60px;
        padding: 25px 15px;
        border-radius: 8px;
    }
    .page-news__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    .page-news__section-subtitle {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-news__section-padding {
        padding: 30px 15px;
    }

    /* Images 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__news-grid,
    .page-news__articles-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__news-card-image,
    .page-news__article-image {
        height: auto !important; /* Let height adjust naturally */
    }

    /* Video responsiveness */
    .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 {
        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;
    }
    .page-news__video-container {
        padding-bottom: 56.25% !important;
        height: 0 !important;
    }

    /* 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;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 15px; /* Add vertical spacing */
        padding: 12px 20px !important;
    }

    .page-news__cta-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .page-news__cta-button--secondary {
        margin-left: 0 !important;
    }

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

/* Smaller mobile devices */
@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__hero-content {
        margin-top: -40px;
    }
    .page-news__news-card-image,
    .page-news__article-image {
        height: 180px;
    }
    .page-news__news-card-title,
    .page-news__article-title {
        font-size: 1.1em;
    }
    .page-news__news-card-content,
    .page-news__article-content {
        padding: 15px;
    }
}

/* Contrast fixes based on body background-color: var(--background-color) which is #08160F (dark) */
.page-news {
  color: var(--text-main); /* #F2FFF6 - Light text on dark background */
}

.page-news__hero-content {
  background: rgba(8, 22, 15, 0.9); /* Dark background with opacity */
  color: var(--text-main);
}

.page-news__section-title,
.page-news__news-card-title a,
.page-news__article-title a {
  color: var(--text-main);
}

.page-news__section-subtitle,
.page-news__news-card-date,
.page-news__news-card-description,
.page-news__article-description,
.page-news__video-description,
.page-news__faq-answer p {
  color: var(--text-secondary); /* #A7D9B8 - Lighter text for secondary info */
}

.page-news__news-card,
.page-news__article-item,
.page-news__faq-item {
  background-color: var(--card-bg); /* #11271B - Dark card background */
  color: var(--text-main);
  border: 1px solid var(--border-color); /* #2E7A4E */
}

.page-news__faq-question {
  color: var(--text-main);
}

.page-news__cta-section {
  background-color: var(--primary-color); /* #11A84E - Darker green */
  color: var(--text-main);
}

.page-news__cta-section .page-news__section-title,
.page-news__cta-section .page-news__section-subtitle {
  color: var(--text-main);
}

.page-news__cta-section .page-news__section-title::after {
  background: var(--text-main);
}

.page-news__cta-button {
  background: var(--button-gradient); /* linear-gradient(180deg, #2AD16F 0%, #13994A 100%) */
  color: var(--text-main);
}

.page-news__cta-button--secondary {
  border-color: var(--secondary-color);
  color: var(--text-main); /* Keep text light on transparent background */
}
.page-news__cta-button--secondary:hover {
  background: var(--secondary-color);
  color: var(--background-color); /* Dark text on light green hover */
}