/* style/news.css */

/* General styles for the news page content */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #FFFFFF */
    background-color: #f5f5f5; /* Light grey background for the main content area */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* Hero Section */
.page-news__hero-section {
    background: linear-gradient(135deg, #017439, #005f2c); /* Darker green gradient */
    padding: 80px 20px;
    text-align: center;
    color: #ffffff; /* White text for dark background */
    /* Fixed header offset */
    padding-top: var(--header-offset, 120px);
}

.page-news__hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Bright yellow for emphasis */
}

.page-news__hero-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: #ffffff; /* White background for article cards */
}

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

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

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

.page-news__article-image-wrapper {
    width: 100%;
    height: 200px; /* Fixed height for consistent image display */
    overflow: hidden;
}

.page-news__article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image {
    transform: scale(1.05);
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #017439; /* Brand primary color for link titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #004d24; /* Slightly darker green on hover */
}

.page-news__article-date {
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 15px;
}

.page-news__article-summary {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #017439; /* Primary brand color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__read-more-btn:hover {
    background-color: #005f2c;
    transform: translateY(-2px);
}

.page-news__pagination {
    text-align: center;
    margin-top: 40px;
}

.page-news__pagination-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #017439;
    border-radius: 5px;
    color: #017439;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover,
.page-news__pagination-link--active {
    background-color: #017439;
    color: #ffffff;
}

/* CTA Section */
.page-news__cta-section {
    background: linear-gradient(90deg, #017439, #005f2c); /* Darker green gradient */
    padding: 80px 20px;
    text-align: center;
    color: #ffffff;
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #FFFF00; /* Bright yellow for emphasis */
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping for mobile */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
    max-width: 100%; /* Ensure button adapts to mobile */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: #C30808; /* Red for primary action (Register) */
    color: #FFFF00; /* Yellow text for contrast */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background: #a30606;
    border-color: #a30606;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-news__btn-secondary {
    background: #017439; /* Green for secondary action (Download) */
    color: #ffffff;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background: #005f2c;
    border-color: #005f2c;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #f5f5f5; /* Light grey background */
}

.page-news__faq-list {
    margin-top: 30px;
}

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    background: #fcfcfc; /* Slightly off-white for answer background */
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #fcfcfc;
    border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #333333;
}

.page-news__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-news__faq-question:active {
    background: #eeeeee;
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: #017439; /* Brand primary color for question titles */
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #333;
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        padding-bottom: 50px;
    }
    .page-news__hero-title {
        font-size: 2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__articles-grid {
        grid-template-columns: 1fr; /* Stack articles on mobile */
    }
    .page-news__article-card {
        margin-bottom: 20px;
    }
    .page-news__article-image-wrapper {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__read-more-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    /* CTA Section Mobile */
    .page-news__cta-section {
        padding: 50px 15px;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__cta-description {
        font-size: 0.9em;
        margin-bottom: 30px;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center;
        gap: 15px;
        padding: 0 15px; /* Add padding to container */
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important; /* Force full width for buttons */
        max-width: 300px !important; /* Limit max width for stacked buttons */
        padding: 12px 20px !important;
        font-size: 1em !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ Section Mobile */
    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Images responsiveness for mobile */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__articles-grid { /* Added .page-news__articles-grid for safety */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}