/* General styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #f8f8f8; /* Light background for the page */
}

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

.page-news__flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-news__text-center {
    text-align: center;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    margin-bottom: 40px;
    background-color: #017439; /* Brand primary color for hero background */
    color: #FFFFFF;
    overflow: hidden;
}

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

.page-news__hero-content {
    padding: 40px 20px;
    text-align: center;
    background-color: #017439; /* Ensure text background is dark for white text */
}

.page-news__main-title {
    font-size: 3.2em; /* Use em for relative sizing, responsive media queries will adjust */
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #FFFFFF;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    margin: 10px;
    box-sizing: border-box; /* Important for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #d81a1a;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background-color: #017439; /* Brand primary color */
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background-color: #005a2d;
    transform: translateY(-2px);
}

.page-news__read-more-link {
    display: inline-block;
    margin-top: 15px;
    color: #017439;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #005a2d;
    text-decoration: underline;
}

/* Latest News Section */
.page-news__latest-news-section {
    background-color: #017439; /* Dark background for this section */
    padding: 60px 0;
    color: #FFFFFF;
}

.page-news__latest-news-section .page-news__section-title {
    color: #FFFFFF; /* White title on dark background */
}

.page-news__latest-news-section .page-news__section-description {
    color: #f0f0f0; /* Light grey description on dark background */
}

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

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

.page-news__news-card:hover {
    transform: translateY(-5px);
}

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

.page-news__card-content {
    padding: 20px;
    color: #333333; /* Dark text for white card background */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__news-date {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 10px;
    display: block;
}

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

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

.page-news__card-title a:hover {
    color: #005a2d;
    text-decoration: underline;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* About News Section */
.page-news__about-news-section {
    padding: 60px 0;
    background-color: #f8f8f8; /* Light background */
}

.page-news__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.page-news__text-block {
    flex: 2;
}

.page-news__text-block p {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333333;
}

.page-news__image-block {
    flex: 1;
    min-width: 300px; /* Ensure image block has a minimum width */
}

.page-news__content-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: #017439; /* Dark background for FAQ section */
    color: #FFFFFF;
}

.page-news__faq-section .page-news__section-title {
    color: #FFFFFF;
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

details.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border on dark background */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
    color: #FFFFFF;
}
details.page-news__faq-item summary.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
    display: none;
}
details.page-news__faq-item summary.page-news__faq-question:hover {
    background: rgba(255, 255, 255, 0.2); /* Lighter hover effect */
}
.page-news__faq-qtext {
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #FFFFFF;
}
.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
    padding: 0 20px 20px;
    background: rgba(0, 0, 0, 0.2); /* Darker background for answer */
    border-radius: 0 0 5px 5px;
    color: #f0f0f0;
}
.page-news__faq-answer p {
    margin-bottom: 10px;
    color: #f0f0f0;
}
.page-news__faq-answer p:last-child {
    margin-bottom: 0;
}

/* Download CTA Section */
.page-news__download-cta {
    padding: 60px 0;
    background-color: #FFFFFF; /* Light background */
    text-align: center;
    border-top: 1px solid #eee;
}

.page-news__cta-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #017439;
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #555555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Responsive styles */
@media (max-width: 1023px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2.2em;
    }
    .page-news__cta-title {
        font-size: 2.2em;
    }
    .page-news__news-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__content-wrapper {
        flex-direction: column;
    }
    .page-news__text-block,
    .page-news__image-block {
        flex: none;
        width: 100%;
    }
    .page-news__image-block {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        margin-bottom: 30px;
    }
    .page-news__hero-content {
        padding: 30px 15px;
    }
    .page-news__main-title {
        font-size: 2em; /* Adjusted for mobile */
        margin-bottom: 10px;
    }
    .page-news__description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        margin: 8px;
        max-width: 100% !important; /* Mobile button adaptation */
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 10px;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-news__news-image {
        height: 180px; /* Smaller height for mobile news images */
    }
    .page-news__card-title {
        font-size: 1.2em;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }
    .page-news__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    details.page-news__faq-item summary.page-news__faq-question { padding: 15px; }
    .page-news__faq-qtext { font-size: 15px; }
    details.page-news__faq-item .page-news__faq-answer { padding: 0 15px 15px; }
}

/* Color contrast rules - as per instructions */
.page-news__dark-section {
  background: #017439; /* Brand primary color */
  color: #ffffff; /* Forced white text */
}

.page-news__dark-section .page-news__section-title {
    color: #ffffff;
}
.page-news__dark-section .page-news__section-description {
    color: #f0f0f0;
}

.page-news__light-bg {
  background: #ffffff;
  color: #333333;
}

/* Ensure general text in light background areas is dark */
.page-news p,
.page-news li {
  color: #333333;
}

/* Card background and text */
.page-news__news-card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e0e0e0;
}

/* Buttons already have specific colors with good contrast */
.page-news__btn-primary {
  background: #C30808;
  color: #FFFF00; /* Yellow text on red background */
  border: 2px solid #C30808;
}

.page-news__btn-secondary {
  background: #017439;
  color: #ffffff;
  border: 2px solid #017439;
}

/* FAQ specific styles already ensure contrast */