/* style/news.css */

/* General page styles */
.page-news {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Dark text for light body background */
    line-height: 1.6;
    background-color: #f8f8f8; /* Light background for the main content area */
}

.page-news__section {
    padding: 60px 0;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

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

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

/* 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); /* Ensure space for fixed header */
    background: linear-gradient(135deg, #26A9E0, #4AD0F5); /* Gradient with brand color */
    color: #ffffff;
    overflow: hidden; /* Prevent content overflow */
}

.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-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
}

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

.page-news__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    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;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    background: #D46F00; /* Darker shade on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image {
    width: 80%; /* Adjust width for better layout */
    margin-top: 40px;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

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

/* Latest Articles Section */
.page-news__latest-articles {
    background-color: #f8f8f8;
    box-shadow: none;
}

.page-news__article-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.08);
    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-card img {
    width: 100%;
    height: 200px; /* 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: 22px;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #333333;
    flex-grow: 1;
}

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

.page-news__article-title a:hover {
    color: #1a7fb3;
}

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

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

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #26A9E0;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-btn:hover {
    background: #1a7fb3;
}

/* Featured Article Section */
.page-news__featured-article {
    background-color: #26A9E0; /* Darker background */
    color: #ffffff;
    padding: 80px 0;
    border-radius: 0; /* No border-radius for full width */
    box-shadow: none;
}

.page-news__dark-section .page-news__section-title,
.page-news__dark-section h3 {
    color: #ffffff;
}

.page-news__dark-section .page-news__section-description,
.page-news__dark-section p {
    color: #f0f0f0;
}

.page-news__featured-article img {
    width: 100%;
    height: auto;
    max-width: 1000px; /* Max width for content image */
    margin: 30px auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.page-news__featured-article h3 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__featured-article p {
    font-size: 17px;
    margin-bottom: 20px;
}

.page-news__cta-button--inline {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    display: table; /* To center the inline block */
}


/* FAQ Section */
.page-news__faq-section {
    background-color: #ffffff;
}

.page-news__faq-list {
    margin-top: 30px;
}

/* FAQ container style */
.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* FAQ default state - answer hidden */
.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 20px; /* Adjust padding for consistency */
    opacity: 0;
    background: #f9f9f9;
}

/* FAQ expanded state - \u26a0\ufe0f Use!important and sufficiently large max-height */
.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* \u26a0\ufe0f Use!important to ensure priority, value large enough to contain any content */
    padding: 20px !important; /* Adjust padding for consistency */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Question style */
.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;
}

/* Question title style */
.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 */
}

/* Toggle icon */
.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; /* Brand color when active */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


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

    .page-news__section {
        padding: 40px 0;
        margin-bottom: 15px;
    }

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

    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .page-news__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Hero Section Mobile */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .page-news__hero-description {
        font-size: 17px;
        margin-bottom: 25px;
    }

    .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-button--inline {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }

    .page-news__hero-image {
        width: 100%;
        margin-top: 30px;
    }

    .page-news__hero-image img {
        border-radius: 4px;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Article Grid Mobile */
    .page-news__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-card img {
        
    }

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

    .page-news__article-title {
        font-size: 18px;
    }

    .page-news__article-excerpt {
        font-size: 15px;
    }

    .page-news__read-more-btn {
        font-size: 14px;
        padding: 8px 15px;
    }

    /* Featured Article Mobile */
    .page-news__featured-article {
        padding: 50px 0;
    }

    .page-news__featured-article h3 {
        font-size: 24px;
        margin-top: 30px;
    }

    .page-news__featured-article p {
        font-size: 16px;
    }

    .page-news__featured-article img {
        margin: 20px auto;
        max-width: 100% !important;
        height: auto !important;
    }

    /* 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 button 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;
    }

    .page-news__cta-button,
    .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;
    }
    
    .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: 0;
        padding-right: 0;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    
    .page-news__cta-buttons {
        display: flex;
        flex-direction: column;
    }
}