/* style/news.css */
/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Inherit from body for contrast handling */
}

/* Color Contrast Handling based on section background */
.page-news__dark-bg {
    background-color: #26A9E0; /* Brand primary color for dark sections */
    color: #ffffff; /* Light text for dark background */
}

.page-news__light-bg {
    background-color: #ffffff; /* White background for light sections */
    color: #333333; /* Dark text for light background */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* filter: brightness(0.5); - Removed as per strict filter rule */
}

.page-news__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6); /* Increased opacity for better text readability */
    border-radius: 8px;
}

.page-news__main-title {
    font-size: clamp(2rem, 5vw, 3rem); /* H1 font size with clamp */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-news__description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* General Container */
.page-news__container {
    width: 100%; /* Ensure width:100% is present for desktop */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit from parent section */
}

.page-news__section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
    color: inherit; /* Inherit from parent section */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button Styles */
.page-news__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
    background-color: #EA7C07; /* Login color */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

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

.page-news__btn-secondary {
    background-color: #26A9E0; /* Primary brand color */
    color: #ffffff;
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #1e87bb;
    border-color: #1e87bb;
}

/* Latest News Section */
.page-news__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-news__news-card {
    background-color: #f8f8f8; /* Light background for cards in light section */
    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;
    color: #333333; /* Dark text for card content */
}

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

.page-news__card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.page-news__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #26A9E0; /* Brand color for titles */
    line-height: 1.4;
}

.page-news__card-meta {
    font-size: 0.9rem;
    color: #777777;
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1rem;
    color: #555555;
}

.page-news__view-all-button-wrapper {
    text-align: center;
    margin-top: 20px;
}

/* Featured Article Section */
.page-news__featured-article-section {
    padding: 60px 20px;
}

.page-news__featured-image {
    width: 100%;
    max-width: 1000px;
    height: auto;
    display: block;
    margin: 0 auto 40px auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-news__article-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #f0f0f0; /* Light text for dark section */
}

.page-news__article-content p {
    margin-bottom: 20px;
}

.page-news__article-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #ffffff; /* Light text for dark section */
}

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

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

.page-news__faq-item {
    background-color: #f8f8f8; /* Light background for FAQ items */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    color: #333333; /* Dark text for FAQ content */
}

.page-news__faq-item summary {
    list-style: none; /* Hide default marker for details */
    padding: 20px;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #eaf6fc; /* Lighter brand color for summary */
    color: #26A9E0; /* Brand color for question text */
}

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

.page-news__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    color: #26A9E0;
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to form an X or minus */
}

.page-news__faq-answer {
    padding: 0 20px 20px 20px;
    font-size: 1rem;
    line-height: 1.7;
    color: #555555;
}

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    .page-news__section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* Ensure small top padding */
    }

    .page-news__hero-content {
        padding: 15px;
    }

    .page-news__main-title {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
    }

    .page-news__description {
        font-size: 1rem;
    }

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

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

    .page-news__section-subtitle {
        font-size: 1rem;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__card-image {
        height: 180px;
    }

    .page-news__card-title {
        font-size: 1.1rem;
    }

    .page-news__card-excerpt {
        font-size: 0.95rem;
    }

    .page-news__featured-image {
        margin-bottom: 30px;
    }

    .page-news__article-content {
        font-size: 1rem;
    }

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

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

    .page-news__faq-answer {
        font-size: 0.95rem;
        padding: 0 15px 15px 15px;
    }

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

    .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;
        padding-right: 15px;
    }

    /* Images responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Containers for images, videos, buttons */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__featured-article-section,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__news-card,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-news__hero-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-news__hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-news__news-grid {
        padding-left: 0;
        padding-right: 0;
    }
}