/* style/news.css */

/* Base styles for the page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: var(--background-color, #FFFFFF); /* Default to white if var not set */
}

/* Color contrast fixes based on background */
.page-news__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-news__dark-bg {
    background-color: #26A9E0; /* Brand primary color */
    color: #FFFFFF;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is below header */
    box-sizing: border-box;
}

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

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

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

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

.page-news__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #26A9E0; /* Brand primary color for titles */
}

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

/* Article Grid */
.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__article-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    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 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
    width: 100%;
    height: 250px; /* 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.4em;
    margin-bottom: 15px;
    color: #26A9E0; /* Brand primary color */
}

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

.page-news__article-title a:hover {
    color: #1a7fb7; /* Slightly darker primary color on hover */
}

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

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

.page-news__read-more:hover {
    color: #1a7fb7;
}

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

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

/* Video Section */
.page-news__video-section {
    padding: 80px 20px;
    text-align: center;
}

.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 20px rgba(0, 0, 0, 0.3);
    cursor: pointer; /* Indicates clickability */
}

.page-news__video-wrapper .page-news__video,
.page-news__video-wrapper .page-news__video-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block; /* Ensure video takes full space */
}

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

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: #333333;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question h3 {
    margin: 0;
    color: #333333;
    font-size: 1.2em; /* Ensure h3 inside question doesn't override */
}

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

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
    color: #26A9E0;
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    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 to show content */
    padding: 15px 25px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    font-size: 1em;
}

/* Call to Action Section */
.page-news__cta-section {
    padding: 80px 20px;
    text-align: center;
}

.page-news__cta-container {
    max-width: 800px;
}

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

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #F0F0F0;
}

/* Button Styles */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    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;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-news__btn-primary {
    background-color: #26A9E0; /* Brand primary color */
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

.page-news__btn-primary:hover {
    background-color: #1a7fb7; /* Darker shade on hover */
    border-color: #1a7fb7;
}

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

.page-news__btn-secondary:hover {
    background-color: #f0f8ff; /* Light background on hover */
    color: #1a7fb7;
    border-color: #1a7fb7;
}

.page-news__btn-large {
    padding: 18px 35px;
    font-size: 1.3em;
}

/* 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 {
        height: 70vh; /* Adjust hero height for mobile */
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

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

    .page-news__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-news__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .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;
    }

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

    .page-news__article-image {
        height: 200px; /* Adjust article image height */
    }

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

    .page-news__video-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 15px; /* Adjust padding for mobile */
    }

    .page-news__video-wrapper {
        margin: 20px auto;
    }

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

    .page-news__faq-answer {
        padding: 0 20px;
    }
    
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px 20px;
    }

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

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

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

    /* Video responsiveness */
    .page-news video,
    .page-news__video {
        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__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-left: 0 !important;
        padding-right: 0 !important;
    }
}