/* style/news.css */

/* --- General Styles --- */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

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

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

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

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

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.3; /* Overlay to ensure text readability */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 40px 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability on image */
    border-radius: 10px;
    margin: 20px;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
}

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

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't push width */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login button color */
    color: #FFFFFF; /* Forced white for contrast on #C30808 */
    border: 2px solid #C30808;
    margin-right: 15px;
}

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

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

.page-news__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.page-news__hero-content .page-news__btn-primary {
    background-color: #C30808;
    color: #FFFFFF; /* Forced white for contrast */
    border-color: #C30808;
}

.page-news__hero-content .page-news__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

/* --- Latest Articles Section --- */
.page-news__latest-articles {
    padding: 60px 0;
    background-color: #f8f8f8;
}

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

.page-news__article-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, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439;
    font-weight: bold;
}

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

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

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

.page-news__read-more {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

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

/* --- Categories Section --- */
.page-news__categories {
    padding: 60px 0;
}

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

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

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

.page-news__category-image {
    width: 100%; /* Adjust as needed, but maintain aspect ratio */
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.page-news__category-title {
    font-size: 1.3em;
    color: #017439;
    font-weight: bold;
}

/* --- Featured Video Section --- */
.page-news__featured-video {
    padding: 60px 0;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 0 auto 30px;
    max-width: 900px; /* Max width for the video */
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.page-news__video-description {
    font-size: 1.1em;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 30px;
}

.page-news__video-cta {
    margin-top: 20px;
}

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

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

.page-news__faq-item {
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    color: #333333;
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker */
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

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

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

.page-news__faq-item[open] .page-news__faq-toggle {
    content: "−"; /* Change to minus when open */
}

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
}

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

.page-news__cta-title {
    font-size: 2.8em;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__cta-description {
    font-size: 1.2em;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 40px;
}

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

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

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 400px;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__cta-title {
        font-size: 2em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        margin-right: 0;
        width: 100%;
    }

    /* Mobile image responsive adaptation */
    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile video responsive adaptation */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Ensure video wrapper with padding-bottom technique also adapts */
    .page-news__video-wrapper {
        width: calc(100% - 30px) !important; /* Account for container padding */
        margin-left: 15px !important;
        margin-right: 15px !important;
    }

    /* Mobile button responsive adaptation */
    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .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; /* Add some internal padding for text */
        padding-right: 15px;
    }
    
    .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;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__faq-item summary {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-news__faq-answer {
        padding: 0 20px 15px;
    }
}