:root {
    --background-color: #08160F;
    --card-bg-color: #11271B;
    --text-main-color: #F2FFF6;
    --text-secondary-color: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green-color: #0A4B2C;
}

/* style/news.css */
/* Base styles for the news page */
.page-news {
    background-color: var(--background-color);
    color: var(--text-main-color);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above content */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding as body handles --header-offset */
    text-align: center;
    box-sizing: border-box;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Constrain image width on larger screens */
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-news__hero-content {
    max-width: 900px;
    margin: 0 auto;
}

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

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

/* CTA Buttons in Hero */
.page-news__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    text-align: center;
}

.page-news__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: var(--text-main-color);
    border: 2px solid transparent;
}

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

.page-news__btn-secondary {
    background: var(--background-color); /* Dark background */
    color: var(--text-main-color);
    border: 2px solid var(--border-color);
}

.page-news__btn-secondary:hover {
    background: var(--deep-green-color);
    color: var(--glow-color);
}

/* Section Titles */
.page-news__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    font-weight: 700;
    color: var(--text-main-color);
    text-align: center;
    margin: 60px 0 40px;
}

/* Featured News Section */
.page-news__featured-news-section,
.page-news__latest-news-section,
.page-news__faq-section,
.page-news__cta-bottom-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.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-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__card-content {
    padding: 20px;
}

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

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

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

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

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

.page-news__card-link {
    color: var(--glow-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Latest News Section */
.page-news__news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

.page-news__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

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

.page-news__list-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

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

.page-news__list-meta {
    font-size: 0.85em;
    color: var(--text-secondary-color);
    margin-bottom: 10px;
}

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

.page-news__list-link {
    color: var(--glow-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

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

/* FAQ Section */
.page-news__faq-list {
    margin-top: 30px;
}

.page-news__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--divider-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-main-color);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

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

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 25px;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 500px; /* Sufficiently large to show content */
    padding: 15px 25px 25px;
}

.page-news__faq-answer p {
    color: var(--text-secondary-color);
    font-size: 1em;
    margin: 0;
}

/* Bottom CTA Section */
.page-news__cta-bottom-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--deep-green-color);
    border-radius: 12px;
    padding: 50px;
    margin-top: 60px;
    gap: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.page-news__cta-content {
    flex: 1;
    text-align: left;
}

.page-news__cta-bottom-section .page-news__section-title {
    text-align: left;
    margin-top: 0;
    margin-bottom: 20px;
}

.page-news__cta-bottom-section .page-news__description {
    text-align: left;
    margin-bottom: 30px;
}

.page-news__cta-image-wrapper {
    flex-shrink: 0;
    width: 40%; /* Adjust as needed */
    max-width: 500px; /* Limit image size */
}

.page-news__cta-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__news-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__list-image {
        width: 200px;
        height: 150px;
    }
    .page-news__cta-bottom-section {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }
    .page-news__cta-content {
        text-align: center;
    }
    .page-news__cta-bottom-section .page-news__section-title,
    .page-news__cta-bottom-section .page-news__description {
        text-align: center;
    }
    .page-news__cta-image-wrapper {
        width: 80%;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body 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: 10px;
        width: 100%;
        padding: 0 15px; /* Add padding to container */
        box-sizing: border-box;
    }

    .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;
    }
    
    .page-news__section-title {
        font-size: clamp(1.6em, 6vw, 2.2em);
        margin: 40px 0 30px;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .page-news__list-item {
        flex-direction: column;
        /* padding: 0 15px; */ /* Removed to avoid double padding with section */
    }
    .page-news__list-image {
        width: 100%;
        height: 200px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .page-news__list-content {
        padding: 15px;
    }
    .page-news__list-title {
        font-size: 1.1em;
    }
    .page-news__list-text {
        font-size: 0.9em;
    }

    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px 20px;
    }

    .page-news__cta-bottom-section {
        padding: 30px 15px;
    }
    .page-news__cta-bottom-section .page-news__section-title {
        font-size: clamp(1.6em, 6vw, 2.2em);
    }
    .page-news__cta-image-wrapper {
        width: 100%;
    }

    /* Mobile image responsive */
    .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__featured-news-section,
    .page-news__latest-news-section,
    .page-news__faq-section,
    .page-news__cta-bottom-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent content overflow */
    }
    .page-news__hero-image-wrapper,
    .page-news__cta-image-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
}