/* style/news.css */

/* Base Styles & Typography */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #FFFFFF; /* Default background for main content sections */
}

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

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

.page-news__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
}

/* Hero Section */
.page-news__hero-section {
    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); /* Ensures content is below fixed header */
    color: #ffffff; /* White text for primary color background */
    overflow: hidden;
}

.page-news__dark-bg {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

.page-news__dark-section {
    background-color: #26A9E0;
    color: #ffffff;
}

.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%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-news__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    color: #FFFFFF;
}

.page-news__intro-text {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background: #d46b06;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__article-card {
    background: #ffffff;
    border-radius: 12px;
    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 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-news__card-title {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

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

.page-news__card-title a:hover {
    color: #1a7eb3;
}

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

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

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

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

/* Featured Section */
.page-news__featured-section {
    padding: 80px 0;
    color: #ffffff;
}

.page-news__featured-section .page-news__section-title {
    color: #ffffff;
}

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

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

.page-news__featured-text {
    width: 50%;
    font-size: 17px;
    line-height: 1.7;
}

.page-news__featured-text p {
    margin-bottom: 15px;
    color: #f0f0f0;
}

.page-news__cta-button--secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #ffffff;
    box-shadow: none;
}

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

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

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

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

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

.page-news__faq-item.active .page-news__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: #d0d0d0;
    background-color: #f5f5f5;
}

.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: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Primary color for toggle icon */
    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: 32px;
    height: 32px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(180deg);
    color: #EA7C07; /* Accent color when active */
}

.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.3s ease;
    padding: 0 25px;
    opacity: 0;
    background-color: #f9f9f9;
    color: #555555;
    font-size: 16px;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure it expands sufficiently */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

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

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

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

.page-news__cta-section .page-news__section-title {
    color: #ffffff;
    font-size: 40px;
}

.page-news__cta-section .page-news__section-description {
    color: #f0f0f0;
    font-size: 20px;
    margin-bottom: 30px;
}

.page-news__cta-section .page-news__cta-button {
    background: #EA7C07; /* Login color */
    color: #ffffff;
    padding: 18px 50px;
    font-size: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__cta-section .page-news__cta-button:hover {
    background: #d46b06;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-news__intro-text {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-section .page-news__cta-button {
        padding: 15px 40px;
        font-size: 18px;
    }

    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-news__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__article-card img {
        
    }
    .page-news__card-title {
        font-size: 18px;
    }
    .page-news__card-excerpt {
        font-size: 15px;
    }

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

    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }

    /* Mobile image adaptation */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
    .page-news__hero-image,
    .page-news__featured-image,
    .page-news__article-card img {
        border-radius: 8px;
    }

    /* Ensure button containers also adapt */
    .page-news__hero-content,
    .page-news__cta-section .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 28px;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__cta-section .page-news__section-title {
        font-size: 28px;
    }
    .page-news__faq-question h3 {
        font-size: 15px;
    }
}