/* style/news.css */

/* Base Styles for .page-news */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Explicitly set for clarity, assuming shared uses default white */
}

/* Header Offset for fixed header */
.page-news {
    padding-top: var(--header-offset, 120px); /* Apply header offset to the main content area */
}

/* Section Styling */
.page-news__hero-section,
.page-news__latest-updates,
.page-news__platform-insights,
.page-news__strategy-guide,
.page-news__promotions,
.page-news__faq-section,
.page-news__cta-final {
    padding: 80px 0;
    text-align: center;
}

/* Container for content width */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.8em;
    color: #26A9E0; /* Brand color for titles */
    margin-bottom: 20px;
    font-weight: bold;
}

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

/* --- Hero Section --- */
.page-news__hero-section {
    background: linear-gradient(135deg, #26A9E0, #007bff); /* Gradient with brand color */
    color: #FFFFFF;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

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

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

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

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle overlay */
    display: block;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.page-news__btn-primary {
    background-color: #EA7C07; /* Login color for primary action */
    color: #FFFFFF;
    border-color: #EA7C07;
}

.page-news__btn-primary:hover {
    background-color: #d46a00;
    border-color: #d46a00;
    transform: translateY(-2px);
}

.page-news__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0; /* Brand color for secondary action */
    border-color: #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #e0f7fa;
    border-color: #26A9E0;
    transform: translateY(-2px);
}

.page-news__cta-center {
    margin-top: 50px;
}

/* --- Latest Updates Section --- */
.page-news__latest-updates {
    background-color: #f8f8f8; /* Light background for contrast */
}

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

.page-news__article-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.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: 220px;
    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: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #007bff;
}

.page-news__article-summary {
    font-size: 0.95em;
    color: #666666;
    margin-bottom: 20px;
    min-height: 90px; /* Ensure consistent card height */
}

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

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

/* --- Platform Insights Section --- */
.page-news__platform-insights {
    background-color: #26A9E0; /* Brand color background */
    color: #FFFFFF;
}

.page-news__platform-insights .page-news__section-title {
    color: #FFFFFF;
}

.page-news__platform-insights .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__feature-item {
    background-color: #FFFFFF;
    color: #333333;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__feature-title {
    font-size: 1.8em;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__feature-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-news__feature-text {
    font-size: 1em;
    color: #666666;
}

/* --- Strategy Guide Section --- */
.page-news__strategy-guide {
    background-color: #f8f8f8;
}

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

.page-news__guide-item {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__guide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-news__guide-title {
    font-size: 1.6em;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__guide-text {
    font-size: 1em;
    color: #666666;
    margin-bottom: 20px;
}

/* --- Promotions Section --- */
.page-news__promotions {
    background-color: #000000; /* Black background for strong contrast */
    color: #FFFFFF;
}

.page-news__promotions .page-news__section-title {
    color: #FFFFFF;
}

.page-news__promotions .page-news__section-description {
    color: #f0f0f0;
}

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

.page-news__faq-list {
    max-width: 800px;
    margin: 50px auto 0;
    text-align: left;
}

.page-news__faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: #f5f5f5;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #333333;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #e0e0e0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #26A9E0;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px; /* Initial padding 0 */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #666666;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px 25px; /* Apply padding when active */
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 15px; /* Adjust as needed for spacing */
}

/* --- Final CTA Section --- */
.page-news__cta-final {
    background-color: #26A9E0;
    color: #FFFFFF;
}

.page-news__cta-final .page-news__section-title {
    color: #FFFFFF;
}

.page-news__cta-final .page-news__section-description {
    color: #f0f0f0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__section-title {
        font-size: 2.2em;
    }
    .page-news__articles-grid,
    .page-news__feature-grid,
    .page-news__guide-items {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-news__hero-section,
    .page-news__latest-updates,
    .page-news__platform-insights,
    .page-news__strategy-guide,
    .page-news__promotions,
    .page-news__faq-section,
    .page-news__cta-final {
        padding: 60px 0;
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent buttons from touching edges */
    }
    .page-news__btn-primary,
.page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 15px 20px; /* Adjust padding for smaller screens */
    }

    .page-news__container {
        padding: 0 15px; /* Add padding for content inside containers */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-news__article-card,
    .page-news__feature-item,
    .page-news__guide-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px; /* Adjust card padding for mobile */
    }
    .page-news__article-summary {
        min-height: auto; /* Remove fixed height for mobile */
    }

    /* FAQ specific for mobile */
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__cta-buttons {
        flex-direction: column;
    }
}

/* Image color filter restriction (MUST BE ABSENT) */
/* No filter properties are used for images. */

/* Color Contrast Enforcement */
.page-news__dark-section {
    background-color: #26A9E0; /* Brand color */
    color: #FFFFFF; /* White text for contrast */
}
.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__hero-title {
    color: #FFFFFF;
}
.page-news__dark-section .page-news__section-description,
.page-news__dark-section .page-news__hero-description {
    color: #f0f0f0;
}

.page-news__light-bg {
    background-color: #f8f8f8; /* Light gray background */
    color: #333333; /* Dark text for contrast */
}
.page-news__light-bg .page-news__section-title {
    color: #26A9E0;
}
.page-news__light-bg .page-news__section-description {
    color: #555555;
}

/* Specific card/element contrast */
.page-news__card {
    background: #FFFFFF; /* White background for cards */
    color: #333333; /* Dark text */
    border: 1px solid #e0e0e0; /* Light border for definition */
}
.page-news__card .page-news__article-title a,
.page-news__card .page-news__feature-title,
.page-news__card .page-news__guide-title {
    color: #26A9E0; /* Brand color for card titles */
}
.page-news__card .page-news__article-summary,
.page-news__card .page-news__feature-text,
.page-news__card .page-news__guide-text {
    color: #666666;
}

/* Button contrast rules already applied above */
/* .page-news__btn-primary (background #EA7C07, color #FFFFFF) */
/* .page-news__btn-secondary (background #FFFFFF, color #26A9E0) */

/* Content area images minimum size enforcement for CSS */
/* All images within .page-news (except shared header/footer) must be >= 200px */
.page-news img:not(.shared-header img, .shared-footer img) {
    min-width: 200px;
    min-height: 200px;
}

/* Ensure the image's effective display size is not smaller than 200px */
@media (max-width: 768px) {
    .page-news__articles-grid img,
    .page-news__feature-grid img,
    .page-news__guide-items img {
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
}