/* style/news.css */

/* Variables and Base Styles */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #f8f9fa; /* A slightly off-white for sections */
    --background-dark: #26A9E0; /* Primary color as dark background */
    --border-color: #e0e0e0;
    --button-login-color: #EA7C07; /* From custom colors */
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    background-color: var(--secondary-color); /* Default page background */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    background-color: var(--background-light);
    overflow: hidden;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    margin-bottom: 30px;
}

.page-news__hero-image,
.page-news__cta-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-news__hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.page-news__main-title {
    font-size: clamp(2em, 3.5vw, 3.2em);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.page-news__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-dark);
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background-color: var(--button-login-color);
    color: var(--text-light);
    border: 2px solid var(--button-login-color);
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__btn-secondary--white {
    color: var(--text-light);
    border-color: var(--text-light);
}

.page-news__btn-secondary--white:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-news__section-title--white {
    color: var(--text-light);
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--text-dark);
}

.page-news__section-description--white {
    color: var(--text-light);
}

/* News Archive Section */
.page-news__news-archive {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.page-news__news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-news__news-card {
    background-color: var(--secondary-color);
    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;
    height: 100%;
}

.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: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-news__card-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    display: block;
}

.page-news__card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    margin-top: auto;
}

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

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

/* Featured Articles Section (Dark Background) */
.page-news__featured-articles {
    padding: 60px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-news__featured-articles .page-news__news-card {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__featured-articles .page-news__card-date {
    color: #ccc;
}

.page-news__featured-articles .page-news__card-title {
    color: var(--text-light);
}

.page-news__featured-articles .page-news__card-excerpt {
    color: #e0e0e0;
}

.page-news__featured-articles .page-news__read-more {
    color: var(--secondary-color);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

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

.page-news__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    background-color: #f0f8ff;
    transition: background-color 0.3s ease;
    list-style: none;
}

.page-news__faq-question::-webkit-details-marker {
    display: none;
}

.page-news__faq-item[open] .page-news__faq-question {
    background-color: #e6f2ff;
}

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

.page-news__faq-answer {
    padding: 15px 25px 20px 25px;
    font-size: 1em;
    color: #555;
    border-top: 1px solid var(--border-color);
}

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

/* Final CTA Section */
.page-news__cta-section {
    position: relative;
    padding: 80px 0;
    background-color: var(--background-dark);
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
}

.page-news__cta-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.2;
}

.page-news__cta-section .page-news__container {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(2em, 4vw, 2.8em);
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-banner-image {
        height: auto;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section {
        padding: 40px 0;
        padding-top: 10px !important; /* body already handles --header-offset */
    }

    .page-news__hero-image-wrapper {
        max-height: 400px;
    }

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

    .page-news__main-title {
        font-size: clamp(1.8em, 6vw, 2.5em);
    }

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

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 15px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
        padding: 0 15px;
    }

    .page-news__news-archive,
    .page-news__featured-articles,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }

    .page-news__news-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

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

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

    .page-news__faq-list {
        padding: 0 15px;
    }

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

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

    /* 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__hero-section,
    .page-news__news-archive,
    .page-news__featured-articles,
    .page-news__faq-section,
    .page-news__cta-section,
    .page-news__hero-image-wrapper,
    .page-news__news-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }
    
    /* Video responsiveness (if any, though not in this specific draft, including for completeness) */
    .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;
    }
    .page-news__video-section {
        padding-top: 10px !important;
    }
}