/* style/news.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --background-light: #f9f9f9;
    --background-dark: #26A9E0; /* Using primary color for dark sections */
    --border-color: #e0e0e0;
    --button-login: #EA7C07; /* Specific color for login */
}

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

/* Header offset - applied to the first main content section */
.page-news__hero-section {
    padding-top: var(--header-offset, 120px); /* Desktop default */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color) 50%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
    color: var(--text-light);
}

.page-news__hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

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

.page-news__hero-content {
    max-width: 800px;
}

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

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-login); /* Use specific login color for CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__cta-button:hover {
    background: #e06c00; /* Darken #EA7C07 by 10% */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General section styling */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

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

.page-news__section-intro {
    text-align: center;
    font-size: 1.1em;
    max-width: 900px;
    margin: -30px auto 50px auto;
    line-height: 1.7;
    color: var(--text-dark);
}

.page-news__section-intro--light {
    color: rgba(255, 255, 255, 0.9);
}

/* Featured Articles Section */
.page-news__featured-articles {
    padding: 80px 0;
    background-color: var(--background-light); /* Light background for this section */
}

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

.page-news__article-card {
    background: var(--secondary-color);
    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;
    color: var(--text-dark);
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px 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__article-content {
    padding: 25px;
}

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1e87b3; /* Darken #26A9E0 by 10% */
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1em;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.page-news__read-more-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more-link:hover {
    color: #1e87b3; /* Darken #26A9E0 by 10% */
}

.page-news__read-more-link--light {
    color: var(--text-light);
}

.page-news__read-more-link--light:hover {
    color: #5bbde7; /* Lighten #26A9E0 by 20% */
}

/* Latest Articles Section */
.page-news__latest-articles {
    padding: 80px 0;
    background-color: var(--background-dark); /* Dark background for this section */
    color: var(--text-light);
}

.page-news__articles-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page-news__list-item {
    display: flex;
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items on dark background */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-light);
}

.page-news__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__list-image {
    width: 200px; /* Fixed width for list image */
    height: 133px; /* Aspect ratio 3:2 */
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.page-news__list-content {
    padding: 20px;
    flex-grow: 1;
}

.page-news__list-title {
    font-size: 1.3em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.page-news__list-title a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__list-title a:hover {
    color: var(--primary-color); /* Hover to primary color */
}

.page-news__list-meta {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.page-news__list-excerpt {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-news__pagination-link--active,
.page-news__pagination-link:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

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

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

.page-news__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
}

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

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

.page-news__btn-primary:hover {
    background: #e06c00; /* Darken #EA7C07 by 10% */
}

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

.page-news__btn-secondary:hover {
    background: #1e87b3; /* Darken #26A9E0 by 10% */
}

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

.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.1);
}

.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;
    background: rgba(255, 255, 255, 0.08); /* Slightly visible background on dark */
    color: var(--text-light);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Ensure enough height */
    padding: 20px 15px !important;
    opacity: 1;
    background: rgba(255, 255, 255, 0.15); /* More visible when active */
    border-radius: 0 0 5px 5px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    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: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.page-news__faq-question:active {
    background: rgba(255, 255, 255, 0.2);
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-light);
}

.page-news__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: var(--text-light);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: var(--primary-color); /* Highlight toggle when active */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Final CTA Section */
.page-news__final-cta {
    padding: 60px 0;
    text-align: center;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.page-news__final-cta-container {
    max-width: 800px;
}

.page-news__final-cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2.2em;
    }
    .page-news__articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-news__list-item {
        flex-direction: column;
    }
    .page-news__list-image {
        width: 100%;
        height: 200px;
    }
    .page-news__list-content {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
    }
    .page-news__hero-image {
        margin-bottom: 20px;
    }
    .page-news__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__container {
        padding: 30px 15px;
    }
    .page-news__articles-grid {
        gap: 20px;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-content {
        padding: 20px;
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__list-image {
        height: 150px;
    }
    .page-news__list-title {
        font-size: 1.2em;
    }
    .page-news__list-excerpt {
        font-size: 0.9em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 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;
        padding-left: 15px;
        padding-right: 15px;
    }
    .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: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    /* Images responsive handling */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block; /* Ensure block level for max-width to work */
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__articles-grid,
    .page-news__articles-list,
    .page-news__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Content area images must be >= 200px. No specific smaller images here. */
    .page-news__article-image,
    .page-news__list-image {
        width: 100% !important; /* Ensure they scale to 100% */
        height: auto !important;
        min-height: 200px; /* Enforce min height for content images */
        object-fit: cover;
    }
    .page-news__faq-question {
        padding: 15px;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
    }
    .page-news__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px !important;
    }
}

/* Ensure no filter on images */
.page-news img {
    filter: none !important;
}