/* style/news.css */

/* General page styling */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Explicitly set for content area if body is not */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description,
.page-news__content-paragraph {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
    padding: 0 20px; /* Add padding for readability */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    color: #FFFFFF;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background-color: #017439; /* Brand color as background */
}

.page-news__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

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

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle overlay for text readability */
    filter: none !important; /* Ensure no filter is applied */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Custom color for important titles */
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-news__hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

.page-news__btn-primary:hover {
    background-color: #e02a2a;
    border-color: #e02a2a;
}

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

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005f2e;
    border-color: #005f2e;
}

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #017439;
    color: #FFFFFF;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__read-more-btn:hover {
    background-color: #005f2e;
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
}

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

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

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

.page-news__news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
    min-width: 200px;
    min-height: 200px;
    filter: none !important; /* Ensure no filter is applied */
}

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #005f2e;
}

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

/* Categories Section */
.page-news__categories-section {
    padding: 80px 0;
    text-align: center;
}

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

.page-news__category-card {
    display: block;
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: #333333;
    transition: transform 0.3s ease;
}

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

.page-news__category-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
    min-width: 200px;
    min-height: 200px;
    filter: none !important; /* Ensure no filter is applied */
}

.page-news__category-title {
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px;
    color: #017439;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
}

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

.page-news__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    list-style: none; /* For details/summary */
}

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: 1px solid #e0e0e0;
}

.page-news__faq-question:hover {
    background-color: #f0f0f0;
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-news__faq-answer {
    padding: 20px;
    font-size: 1em;
    color: #555555;
    background-color: #FFFFFF;
    border-top: none;
}

.page-news__faq-answer p {
    margin-bottom: 0;
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: #017439; /* Brand color */
    color: #FFFFFF;
}

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

.page-news__cta-title {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #FFFF00; /* Custom font color */
}

.page-news__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        flex-direction: column;
        min-height: auto;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-news__hero-content {
        padding: 40px 20px;
    }
    .page-news__hero-title {
        font-size: 2.5em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news__read-more-btn,
    .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;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__section-title {
        font-size: 1.8em;
    }

    .page-news__section-description,
    .page-news__content-paragraph {
        font-size: 1em;
        padding: 0 15px; /* Adjust padding for mobile */
    }

    .page-news__news-grid,
    .page-news__categories-grid {
        grid-template-columns: 1fr;
    }

    .page-news__news-image,
    .page-news__category-image {
        height: auto;
        min-height: 200px;
    }

    /* Mobile image adaptation */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no filter is applied */
    }
    
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__categories-section,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__news-card,
    .page-news__category-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important; /* Reset section padding for full width */
        padding-right: 0 !important; /* Reset section padding for full width */
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    .page-news__hero-content,
    .page-news__news-grid,
    .page-news__categories-grid,
    .page-news__faq-list,
    .page-news__cta-content {
        padding-left: 15px !important; /* Apply inner padding to content */
        padding-right: 15px !important; /* Apply inner padding to content */
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-news__faq-answer {
        padding: 15px;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }

    /* Ensure content area images are not smaller than 200px */
    .page-news__news-image,
    .page-news__category-image {
        min-width: 200px !important;
        min-height: 200px !important;
    }
}

/* Global image size check, just to be safe */
.page-news img:not(.shared-logo, .shared-social-icon) { /* Exclude shared icons */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
    filter: none !important; /* Ensure no filter is applied */
}