/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--secondary-color, #FFFFFF); /* Body background from shared */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.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--white {
    color: #FFFFFF;
}

/* --- Hero Banner Section --- */
.page-news__hero-banner {
    background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Primary to secondary gradient */
    padding: 60px 0;
    text-align: center;
}

.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-description {
    font-size: 18px;
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
}

.page-news__banner-image {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    display: inline-block; /* To allow margin auto and text align center */
}

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

/* --- CTA Button General --- */
.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: normal; /* Allow text wrap for mobile */
    word-wrap: break-word; /* Allow text wrap for mobile */
    box-sizing: border-box;
}

.page-news__btn-primary {
    background: #EA7C07; /* Login color for primary CTA */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

.page-news__btn-primary:hover {
    background: #d66c06;
    border-color: #d66c06;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.page-news__btn-secondary {
    background: #FFFFFF;
    color: #26A9E0; /* Primary color for secondary CTA text */
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background: #f0f0f0;
    color: #1e87c0;
    border-color: #1e87c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* --- Articles Section --- */
.page-news__articles-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.page-news__section-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    font-size: 17px;
    color: #555555;
}

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

.page-news__article-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 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-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
}

.page-news__article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-image img {
    transform: scale(1.05);
}

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

.page-news__article-title {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

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

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

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

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

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

/* --- Category Updates Section --- */
.page-news__category-updates {
    padding: 60px 0;
    background-color: #26A9E0; /* Primary color background */
    color: #ffffff;
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.page-news__category-item {
    background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for cards on dark bg */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.page-news__category-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.page-news__category-heading {
    font-size: 24px;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.page-news__category-item p {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 25px;
}

.page-news__category-link {
    display: inline-block;
    background: #EA7C07;
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-news__category-link:hover {
    background: #d66c06;
}

/* --- CTA Section (Bottom) --- */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #000000; /* Dark background */
    color: #ffffff;
    text-align: center;
}

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

.page-news__cta-title {
    font-size: 38px;
    color: #FFFFFF;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-news__cta-description {
    font-size: 19px;
    color: #f0f0f0;
    margin-bottom: 40px;
    line-height: 1.7;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on mobile */
}

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

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

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    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 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;
    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: 30px;
    height: 30px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: #EA7C07;
    transform: rotate(45deg); /* Rotate for minus sign */
}

.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 25px;
    opacity: 0;
    background: #fdfdfd;
    border-radius: 0 0 10px 10px;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain any content */
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid #eee;
}

.page-news__faq-answer p {
    font-size: 16px;
    color: #555555;
    margin: 0;
}

/* --- Conclusion Section --- */
.page-news__conclusion-section {
    padding: 60px 0;
    background-color: #ffffff;
    text-align: center;
}

.page-news__conclusion-section p {
    max-width: 900px;
    margin: 0 auto 40px auto;
    font-size: 17px;
    color: #555555;
    line-height: 1.7;
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }

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

    .page-news__main-title {
        font-size: 32px;
    }

    .page-news__intro-description {
        font-size: 16px;
    }

    .page-news__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-news__section-intro {
        font-size: 15px;
        margin-bottom: 40px;
    }

    .page-news__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-news__article-image {
        height: 200px; /* Smaller fixed height for mobile cards */
    }

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

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

    .page-news__category-grid {
        grid-template-columns: 1fr;
    }

    .page-news__cta-title {
        font-size: 30px;
    }

    .page-news__cta-description {
        font-size: 17px;
    }

    .page-news__cta-buttons,
    .page-news__final-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 25px;
        font-size: 16px;
    }

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

    .page-news__faq-question h3 {
        font-size: 16px;
    }

    .page-news__faq-toggle {
        font-size: 24px;
        width: 26px;
        height: 26px;
    }

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

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

    .page-news__faq-answer p {
        font-size: 15px;
    }

    /* Images within content areas */
    .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;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 28px;
    }
    .page-news__section-title {
        font-size: 24px;
    }
    .page-news__cta-title {
        font-size: 26px;
    }
    .page-news__article-card {
        margin-bottom: 20px;
    }
    .page-news__article-image {
        height: 180px;
    }
}