/* style/news.css */

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

.page-news {
    font-family: Arial, sans-serif;
    color: var(--color-text-main); /* Default text color for the page, based on dark body background */
    background-color: var(--color-bg); /* Ensure main content background matches global body if needed */
}

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

.page-news__hero-image {
    width: 100%;
    height: auto;
    max-width: 1920px; /* Max width for the image */
    display: block;
    margin-bottom: 30px; /* Space between image and text */
    border-radius: 8px;
    object-fit: cover;
    min-height: 200px; /* Minimum size for content images */
}

.page-news__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1;
    position: relative;
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size for H1 */
    color: var(--color-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-news__description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for button responsiveness */
    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: var(--btn-gradient);
    color: var(--color-text-main);
    border: none;
    box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background: transparent; /* Default for light backgrounds */
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

/* Specific adjustment for dark sections where secondary button might appear */
.page-news__hero-section .page-news__btn-secondary,
.page-news__cta-section .page-news__btn-secondary {
    background: var(--color-text-main); /* White background */
    color: var(--color-primary); /* Primary green text */
    border: 2px solid var(--color-primary);
}
.page-news__hero-section .page-news__btn-secondary:hover,
.page-news__cta-section .page-news__btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-main);
}

/* Latest Updates Section */
.page-news__latest-updates {
    background-color: var(--color-bg); /* Dark background for the section */
    padding: 80px 0;
    color: var(--color-text-main); /* Light text for dark background */
}

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

.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--color-text-main);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

.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); /* 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(--color-text-main); /* Light text for card */
}

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

.page-news__card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    min-height: 200px; /* Minimum size for content images */
}

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

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

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

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

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

.page-news__card-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__card-link {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push link to bottom */
}

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

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

/* CTA Section */
.page-news__cta-section {
    background-color: var(--color-deep-green); /* Consistent dark background */
    padding: 80px 20px;
    text-align: center;
    color: var(--color-text-main);
}

.page-news__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: var(--color-bg); /* Dark background */
    padding: 80px 0;
    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); /* FAQ item background */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-text-main);
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* For details/summary */
}

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

.page-news__faq-question:hover {
    background-color: rgba(var(--color-primary), 0.1); /* This rgba will not work with hex, should be fixed if used */
    background-color: #11A84E33; /* Use a specific rgba value for hover */
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px;
    }
    .page-news__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-news__description {
        font-size: 1rem;
    }
    .page-news__latest-updates,
    .page-news__cta-section,
    .page-news__faq-section {
        padding: 60px 0;
    }
    .page-news__container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 30px 15px;
        padding-top: 10px !important; /* body handles --header-offset, this is small visual padding */
    }
    .page-news__hero-image {
        margin-bottom: 20px;
    }
    .page-news__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .page-news__description {
        font-size: 0.95rem;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px; /* Add padding for buttons on mobile */
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__news-grid {
        grid-template-columns: 1fr;
        padding: 0 15px; /* Add padding for grid on mobile */
    }
    .page-news__card-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 200px; /* Maintain minimum height */
    }
    .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__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__video-section { /* If there was a video section */
        padding-top: 10px !important;
    }
    .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,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__faq-question {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 0 20px 15px 20px;
    }
}