/* style/news.css */

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

/* Ensure body padding for fixed header (if shared doesn't provide it for body) */
.page-news.page-content {
    padding-top: var(--header-offset, 120px);
    box-sizing: border-box;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 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 {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height for hero */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 60px;
}

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

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    padding: 40px;
    border-radius: 10px;
    max-width: 800px;
}

.page-news__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff; /* Ensure white text on dark overlay */
}

.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: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
}

.page-news__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
    margin: 10px;
}

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

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

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #017439;
}

/* Latest Updates Section */
.page-news__latest-updates {
    padding: 60px 0;
    background-color: #f9f9f9;
}

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

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

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

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

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

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

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

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

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

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

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

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

.page-news__arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

/* Featured Article Section */
.page-news__featured-article {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color for dark section */
    color: #ffffff;
}

.page-news__dark-section .page-news__section-title {
    color: #ffffff; /* White title on dark background */
}

.page-news__article-detail {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.page-news__detail-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
    display: block;
}

.page-news__article-subtitle {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #FFFF00; /* Highlight important subtitles */
}

.page-news__detail-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #f0f0f0;
}

/* Promotions CTA Section */
.page-news__promotions-cta {
    padding: 80px 0;
    text-align: center;
    background-color: #f0f0f0;
}

.page-news__cta-description {
    font-size: 1.2em;
    color: #555555;
    margin-bottom: 40px;
    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 */
    gap: 20px;
}

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

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

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

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

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

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

.page-news__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    width: 25px;
    text-align: center;
    line-height: 1;
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .page-news.page-content {
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__hero-section {
        height: 450px;
        margin-bottom: 40px;
    }

    .page-news__hero-content {
        padding: 30px;
        max-width: 90%;
    }

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

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

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-news__container {
        padding: 0 15px; /* Add padding to containers for mobile */
    }

    /* Mobile image responsiveness */
    .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__article-card,
    .page-news__featured-article,
    .page-news__promotions-cta,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Button responsiveness */
    .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;
        margin: 10px 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }

    .page-news__article-card {
        flex-direction: column;
    }

    .page-news__article-image {
        height: 200px;
    }

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

    .page-news__article-subtitle {
        font-size: 1.5em;
    }

    .page-news__detail-text {
        font-size: 1em;
    }

    .page-news__faq-item summary {
        font-size: 1em;
        padding: 15px;
    }

    .page-news__faq-answer {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        height: 350px;
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
}