/* style/news.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-color: #C30808;
    --login-color: #C30808;
    --background-color: #FFFFFF;
    --register-login-font-color: #FFFF00;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark);
    background-color: var(--background-color);
    padding-top: var(--header-offset, 120px); /* Ensures content starts below fixed header */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    background-color: var(--primary-color); /* Dark background */
    color: var(--text-color-light);
    text-align: center;
    overflow: hidden;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color-light);
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__cta-buttons--center {
    justify-content: center;
}

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

.page-news__btn-primary {
    background-color: var(--register-color);
    color: var(--register-login-font-color);
    border: 2px solid var(--register-color);
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--text-color-light);
    border: 2px solid var(--text-color-light);
}

.page-news__btn-secondary:hover {
    background-color: var(--text-color-light);
    color: var(--primary-color);
}

/* Section General */
.page-news__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

/* Latest News Section */
.page-news__latest-news {
    padding: 60px 0;
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

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

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

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

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

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

.page-news__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

.page-news__card-title a:hover {
    color: #005a2d; /* Slightly darker green on hover */
}

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

.page-news__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    align-self: flex-start;
}

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

/* Categories Section */
.page-news__categories {
    padding: 60px 0;
    background-color: #f5f5f5; /* Medium light background */
    color: var(--text-color-dark);
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
}

.page-news__category-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-news__category-image {
    width: 100%;
    max-width: 150px; /* Adjust as needed for visual balance */
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
}

.page-news__category-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Featured Video Section */
.page-news__featured-video {
    padding: 60px 0;
    background-color: var(--primary-color); /* Dark background */
    color: var(--text-color-light);
    text-align: center;
}

.page-news__featured-video .page-news__section-title {
    color: var(--text-color-light);
}

.page-news__featured-video .page-news__section-description {
    color: var(--text-color-light);
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--background-color);
    color: var(--text-color-dark);
}

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

.page-news__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-question {
    background-color: #f0f0f0;
    border-bottom: 1px solid transparent;
}

.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: var(--primary-color);
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: var(--text-color-dark);
}

/* For details tag, hide default marker */
.page-news__faq-item details > summary {
    list-style: none;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section {
        padding: 60px 0;
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }

    .page-news__hero-description {
        font-size: 1em;
    }

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

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

    .page-news__section-description {
        font-size: 0.95em;
    }

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

    .page-news__news-card {
        margin-bottom: 20px;
    }

    .page-news__news-image {
        height: auto;
    }

    .page-news__card-title {
        font-size: 1.3em;
    }

    .page-news__category-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        padding: 0 15px;
    }

    .page-news__video-wrapper {
        margin: 20px auto;
        padding: 0 15px;
        padding-bottom: 56.25%; /* Maintain aspect ratio */
    }

    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__faq-list {
        padding: 0 15px;
    }

    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

    /* Ensure all images are 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__video-section,
    .page-news__video-container,
    .page-news__video-wrapper,
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure spacing for hero on mobile */
    }
}

/* Global image rules for content area - ensure no small images */
.page-news img {
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

/* Specific overrides for card images to meet minimum size, if not already covered */
.page-news__news-image,
.page-news__category-image {
    min-width: 200px;
    min-height: 150px; /* Adjusted for aspect ratio, but still >= 200px wide */
    object-fit: cover;
}

/* Ensure no filter is applied to images */
.page-news img {
    filter: none; /* Explicitly disable any potential filter inheritance */
}