/* style/news.css */

/* Variables and base styles */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #ffffff;
    --background-dark: #1a1a1a; /* Assuming a dark background for body based on var(--black-color) */
    --button-login: #EA7C07; /* Custom color for login */
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for the page, assuming dark body background */
    background-color: var(--background-dark); /* Fallback/example, actual body background from shared.css */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    overflow: hidden;
    color: var(--text-light);
    background-color: var(--primary-color); /* Using primary color as hero background */
}

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Slightly dim the image to ensure text readability */
    filter: none; /* No color filters */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.page-news__main-title {
    font-size: clamp(2.5rem, 5vw, 3.2rem); /* Using clamp for responsive font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-news__hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

/* General Section Styling */
.page-news__container {
    width: 100%; /* Ensure desktop width is 100% with max-width */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color); /* Titles can use brand color on light background */
}

.page-news__section-intro {
    font-size: 1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-dark);
}

/* Latest Updates Section */
.page-news__latest-updates {
    background-color: var(--background-light);
    color: var(--text-dark);
    padding: 80px 0;
}

.page-news__latest-updates .page-news__section-title {
    color: var(--primary-color);
}

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

.page-news__article-card {
    background-color: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    filter: none; /* No color filters */
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

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

.page-news__article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-news__article-title a:hover {
    color: var(--primary-color);
}

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

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

.page-news__read-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-news__read-more-btn:hover {
    background-color: #1e87b7; /* Darker shade of primary */
}

.page-news__view-all-wrapper {
    text-align: center;
}

/* Featured Articles Section */
.page-news__featured-articles {
    background-color: var(--background-dark); /* Dark background */
    color: var(--text-light);
    padding: 80px 0;
}

.page-news__featured-articles .page-news__section-title {
    color: var(--primary-color); /* Title can use brand color on dark background too */
}

.page-news__featured-articles .page-news__section-intro {
    color: var(--text-light);
}

.page-news__article-card--featured {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white on dark background */
    color: var(--text-light);
}

.page-news__article-card--featured .page-news__article-title a {
    color: var(--text-light);
}

.page-news__article-card--featured .page-news__article-title a:hover {
    color: var(--primary-color);
}

.page-news__article-card--featured .page-news__article-meta {
    color: #bbb;
}

.page-news__article-card--featured .page-news__article-excerpt {
    color: var(--text-light);
}

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

.page-news__cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.page-news__cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.page-news__cta-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-dark);
}

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

.page-news__cta-image {
    position: absolute;
    bottom: -50px; /* Adjust as needed */
    right: -100px; /* Adjust as needed */
    width: 600px; /* Example size */
    height: auto;
    opacity: 0.1;
    z-index: 1;
    filter: none; /* No color filters */
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.page-news__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-news__btn-primary:hover {
    background-color: #1e87b7; /* Darker shade */
    border-color: #1e87b7;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.page-news__faq-section .page-news__section-title {
    color: var(--primary-color);
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white */
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #ccc;
    line-height: 1.6;
}

/* Details element specific CSS for FAQ */
.page-news__faq-item[open] .page-news__faq-question {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-item summary {
    list-style: none;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(2rem, 4.5vw, 2.8rem);
    }
    .page-news__section-title {
        font-size: 2rem;
    }
    .page-news__cta-title {
        font-size: 2rem;
    }
}

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

    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important;
    }

    .page-news__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .page-news__hero-description {
        font-size: 1rem;
    }

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

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

    .page-news__section-intro {
        margin-bottom: 30px;
    }

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

    .page-news__article-image {
        height: 180px;
    }

    .page-news__article-title {
        font-size: 1.2rem;
    }

    .page-news__cta-section {
        padding: 60px 15px;
    }

    .page-news__cta-title {
        font-size: 1.8rem;
    }

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

    /* Button responsiveness */
    .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;
    }

    /* Image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no filter is applied */
    }
    .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__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .page-news__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .page-news__cta-image {
        width: 400px;
        right: -50px;
        bottom: -30px;
    }
}

/* Ensure content area images are at least 200x200px (example for specific content images) */
.page-news__articles-grid img,
.page-news__article-image {
    min-width: 200px;
    min-height: 200px;
}
/* Ensure the image in the hero section is not affected by this min-size if it's smaller due to object-fit, but its display size should be large */
.page-news__hero-image {
    min-width: unset;
    min-height: unset;
}