/* style/news.css */

/* Custom Colors */
:root {
    --vi88-green-main: #11A84E;
    --vi88-green-secondary: #22C768;
    --vi88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --vi88-card-bg: #11271B;
    --vi88-background: #08160F;
    --vi88-text-main: #F2FFF6;
    --vi88-text-secondary: #A7D9B8;
    --vi88-border: #2E7A4E;
    --vi88-glow: #57E38D;
    --vi88-gold: #F2C14E;
    --vi88-divider: #1E3A2A;
    --vi88-deep-green: #0A4B2C;
}

/* Base styles for the page-news scope */
.page-news {
    background-color: var(--vi88-background);
    color: var(--vi88-text-main); /* Default text color for the page, assuming dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    box-sizing: border-box;
    background-color: var(--vi88-deep-green);
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Max width for the image */
    margin-bottom: 30px; /* Space between image and text */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
    font-weight: 700;
    color: var(--vi88-text-main);
    margin-bottom: 20px;
    line-height: 1.2;
}

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

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

/* Section Titles and Descriptions */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--vi88-gold); /* Using gold for prominent titles */
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

.page-news__section-description {
    font-size: 1.1em;
    color: var(--vi88-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

/* Latest News Section */
.page-news__latest-news-section {
    background-color: var(--vi88-background);
    padding: 60px 0;
}

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

.page-news__news-card,
.page-news__article-card {
    background-color: var(--vi88-card-bg); /* Card background color */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--vi88-border);
}

.page-news__news-card:hover,
.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-news__card-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
}

.page-news__card-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-news__card-title a:hover {
    color: var(--vi88-green-secondary);
}

.page-news__card-meta {
    font-size: 0.9em;
    color: var(--vi88-text-secondary);
    margin-bottom: 15px;
}

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

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

.page-news__read-more-link:hover {
    color: var(--vi88-gold);
}

.page-news__view-all-button-container {
    text-align: center;
    margin-top: 50px;
}

/* Featured Articles Section */
.page-news__featured-articles-section {
    background-color: var(--vi88-deep-green); /* Darker background for contrast */
    padding: 60px 0;
}

/* CTA Banner */
.page-news__cta-banner {
    background: linear-gradient(90deg, var(--vi88-green-main) 0%, var(--vi88-green-secondary) 100%);
    padding: 80px 20px;
    text-align: center;
    color: #ffffff; /* White text on green background for contrast */
}

.page-news__cta-title {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-news__cta-description {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

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

/* Buttons */
.page-news__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-news__btn-primary {
    background: var(--vi88-button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-news__faq-section {
    background-color: var(--vi88-background);
    padding: 60px 0;
}

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

.page-news__faq-item {
    background-color: var(--vi88-card-bg); /* FAQ item background */
    border: 1px solid var(--vi88-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-news__faq-item[open] {
    background-color: var(--vi88-deep-green); /* Slightly darker when open */
    border-color: var(--vi88-green-main);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--vi88-text-main);
    cursor: pointer;
    background-color: transparent;
    position: relative;
    list-style: none; /* Remove default marker for <summary> */
    user-select: none;
}

.page-news__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--vi88-green-secondary);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
    color: var(--vi88-gold);
}

.page-news__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--vi88-text-secondary);
    line-height: 1.6;
}

/* Ensure text contrast for paragraphs and list items */
.page-news p,
.page-news li {
    color: var(--vi88-text-secondary); /* Default for general text */
}

/* Overwrite for specific elements that need higher contrast */
.page-news__hero-description,
.page-news__section-description,
.page-news__card-excerpt,
.page-news__cta-description,
.page-news__faq-answer p {
    color: var(--vi88-text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
    .page-news__section-title {
        font-size: 2em;
    }
}

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

    .page-news__hero-section {
        padding: 40px 15px;
        padding-top: 10px !important; /* body handles --header-offset, small top padding for section */
    }

    .page-news__hero-image-wrapper {
        margin-bottom: 20px;
    }

    .page-news__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em);
        margin-bottom: 15px;
    }

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

    .page-news__container {
        padding: 30px 15px;
    }

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

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

    .page-news__news-grid,
    .page-news__article-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }

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

    .page-news__card-title {
        font-size: 1.2em;
    }

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

    .page-news__cta-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-news__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    /* Force responsive image, video, and button styles */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__featured-articles-section,
    .page-news__cta-banner,
    .page-news__faq-section,
    .page-news__news-grid,
    .page-news__article-grid,
    .page-news__cta-buttons,
    .page-news__view-all-button-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }

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

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