/* style/news.css */
/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: var(--secondary-color); /* #FFFFFF */
}

.page-news__section-padding {
    padding: 60px 20px;
}

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

.page-news__section-title {
    font-size: 32px;
    color: #26A9E0; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__section-title--light {
    color: #ffffff; /* White text for dark sections */
}

/* Hero Banner Section */
.page-news__hero-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Blend primary and secondary */
    overflow: hidden;
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 0 15px;
    box-sizing: border-box;
}

.page-news__main-title {
    font-size: 44px;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__intro-text {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for CTA */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* Ensure responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: #d46f06;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button--secondary {
    background: #26A9E0; /* Primary brand color for secondary CTA */
    margin-left: 15px;
}

.page-news__cta-button--secondary:hover {
    background: #1e87bb;
}

.page-news__cta-button--light {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-news__cta-button--light:hover {
    background: #f0f0f0;
    color: #1e87bb;
    border-color: #1e87bb;
}


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

.page-news__article-card {
    background: #ffffff;
    border-radius: 8px;
    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;
}

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

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

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

.page-news__article-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: #26A9E0; /* Primary color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1e87bb;
    text-decoration: underline;
}

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

.page-news__article-date {
    font-size: 13px;
    color: #888888;
    margin-bottom: 15px;
    display: block;
}

.page-news__read-more-link {
    display: inline-block;
    color: #EA7C07; /* Login color for read more */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #d46f06;
    text-decoration: underline;
}

/* Featured Article Section */
.page-news__dark-section {
    background: #26A9E0; /* Primary brand color background */
    color: #ffffff;
}

.page-news__featured-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-news__featured-image {
    width: 50%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.page-news__featured-text {
    width: 50%;
}

.page-news__featured-title {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.3;
    color: #ffffff;
}

.page-news__featured-excerpt {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure enough space for content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

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

.page-news__faq-question:active {
    background: #eeeeee;
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #333333;
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #26A9E0; /* Primary color when active */
    transform: rotate(45deg); /* Optional: rotate for 'x' effect */
}


/* CTA Section */
.page-news__cta-section {
    background: #f0f8ff; /* Light blue background */
    text-align: center;
}

.page-news__cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.page-news__cta-description {
    font-size: 18px;
    color: #555555;
    margin-bottom: 20px;
    max-width: 700px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 38px;
    }
    .page-news__featured-content {
        flex-direction: column;
    }
    .page-news__featured-image,
    .page-news__featured-text {
        width: 100%;
    }
    .page-news__featured-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-news__section-padding {
        padding: 40px 15px;
    }

    .page-news__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Banner Mobile */
    .page-news__hero-banner {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 30px;
    }
    .page-news__main-title {
        font-size: 30px;
    }
    .page-news__intro-text {
        font-size: 16px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 15px;
    }
    .page-news__cta-button--secondary {
        margin-left: 0;
    }
    .page-news__cta-container {
        flex-direction: column;
        gap: 10px;
    }


    /* Article Grid Mobile */
    .page-news__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-title {
        font-size: 18px;
    }
    .page-news__article-excerpt {
        font-size: 14px;
    }

    /* Featured Article Mobile */
    .page-news__featured-title {
        font-size: 24px;
    }
    .page-news__featured-excerpt {
        font-size: 15px;
    }

    /* FAQ Mobile */
    .page-news__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-news__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-news__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-news__faq-answer {
        padding: 0 15px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }

    /* Global image and container responsive rules */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-news__section, 
    .page-news__card, 
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}