/* 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 background */
    background-color: #ffffff; /* Assuming body background is light for content areas */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-offset, 120px); /* Ensure space below fixed header */
    background-color: #26A9E0; /* Brand primary color for dark section */
    color: #ffffff; /* White text for dark background */
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-news__hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative; /* Bring content above image for better contrast */
}

.page-news__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

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

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
}

/* General Container */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.2em;
    color: #26A9E0; /* Brand primary color */
    text-align: center;
    margin-bottom: 15px;
    padding-top: 40px;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
    background-color: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
    margin: 10px;
}

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

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

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

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

.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: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    color: #333333; /* Dark text for light card */
}

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

.page-news__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block; /* Ensure no extra space below image */
}

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

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0;
    text-decoration: none;
}

.page-news__article-title a:hover {
    text-decoration: underline;
}

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

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

.page-news__read-more {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.page-news__read-more:hover {
    text-decoration: underline;
}

/* All Articles Section */
.page-news__all-articles {
    padding: 60px 0;
    background-color: #ffffff; /* White background */
}

.page-news__article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page-news__list-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.page-news__list-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__list-title {
    font-size: 1.3em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.page-news__list-title a {
    color: #26A9E0;
    text-decoration: none;
}

.page-news__list-title a:hover {
    text-decoration: underline;
}

.page-news__list-meta {
    font-size: 0.85em;
    color: #888888;
    margin-bottom: 10px;
}

.page-news__list-excerpt {
    font-size: 0.95em;
    color: #666666;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.page-news__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    text-decoration: none;
    color: #26A9E0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link:hover:not(.page-news__pagination-link--disabled):not(.page-news__pagination-link--active) {
    background-color: #e0f2f7;
}

.page-news__pagination-link--active {
    background-color: #26A9E0;
    color: #ffffff;
    border-color: #26A9E0;
    pointer-events: none; /* Disable click for active page */
}

.page-news__pagination-link--disabled {
    color: #cccccc;
    pointer-events: none;
    background-color: #f5f5f5;
}

/* CTA Section */
.page-news__cta-section {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

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

.page-news__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: #ffffff;
}

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

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

.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
    border-top: 1px solid #e0e0e0;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-heading {
    font-size: 1.1em;
    color: #26A9E0;
    margin: 0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #26A9E0;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 15px 20px 20px 20px;
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 1.6em;
        padding-top: 30px;
    }
    .page-news__section-description {
        font-size: 0.95em;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-news__cta-title {
        font-size: 1.8em;
    }
    .page-news__cta-description {
        font-size: 1em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin: 0; /* Remove horizontal margin for full width */
    }

    /* General image responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure containers with images/content don't overflow */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-articles,
    .page-news__all-articles,
    .page-news__cta-section,
    .page-news__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Specific image sizes for cards */
    .page-news__article-image {
        height: 180px; /* Adjust height for mobile */
    }

    .page-news__faq-question, .page-news__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.5em;
    }
    .page-news__section-title {
        font-size: 1.4em;
    }
    .page-news__cta-title {
        font-size: 1.5em;
    }
}