/* style/news.css */

/* Base styles for the page-news scope */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: var(--neon-dark-bg); /* Inherit from shared.css, likely dark */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff; /* Default for dark sections */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 70vh; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background-color: #017439; /* Fallback */
}

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

.page-news__hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Darken video for text readability */
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 1;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: #ffffff;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #f0f0f0;
}

.page-news__hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure responsiveness */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

.page-news__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: #333333;
}

.page-news__latest-news-section .page-news__section-title {
    color: #333333; /* Dark title for light section */
}

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

.page-news__news-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-news__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: #017439; /* Brand color for titles */
    line-height: 1.3;
}

.page-news__card-title:hover {
    text-decoration: underline;
}

.page-news__card-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
}

.page-news__read-more-link {
    color: #017439;
    font-weight: bold;
    text-decoration: none;
}

.page-news__read-more-link:hover {
    text-decoration: underline;
}

/* Analysis Section */
.page-news__analysis-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color - dark background */
    color: #ffffff;
}

.page-news__analysis-section .page-news__section-title {
    color: #ffffff;
}

.page-news__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-news__content-wrapper--reverse {
    flex-direction: row-reverse;
}

.page-news__analysis-image,
.page-news__guide-image {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: block; /* Ensure no extra space below image */
}

.page-news__analysis-text,
.page-news__guide-text {
    flex: 1;
    max-width: 50%;
    font-size: 1.1em;
    line-height: 1.7;
}

.page-news__analysis-text p,
.page-news__guide-text p {
    margin-bottom: 20px;
    color: #f0f0f0; /* Lighter text for dark background */
}

/* Guide Section */
.page-news__guide-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: #333333;
}

.page-news__guide-section .page-news__section-title {
    color: #333333;
}

.page-news__guide-text p {
    color: #555555;
}

/* Promotions Section */
.page-news__promotions-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color - dark background */
    color: #ffffff;
}

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

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

.page-news__promotions-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: block;
}

.page-news__promotions-text {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #ffffff; /* Light background */
    color: #333333;
}

.page-news__faq-section .page-news__section-title {
    color: #333333;
}

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

.page-news__faq-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 15px;
    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: 20px;
    cursor: pointer;
    background-color: #e9e9e9;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-heading {
    font-size: 1.2em;
    color: #333333;
    margin: 0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #ffffff;
    color: #555555;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px;
}

.page-news__faq-answer p {
    margin-bottom: 0; /* Remove default paragraph margin */
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Brand primary color - dark background */
    color: #ffffff;
    text-align: center;
}

.page-news__cta-section .page-news__section-title {
    color: #ffffff;
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 3em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__content-wrapper {
        flex-direction: column;
    }
    .page-news__analysis-image,
    .page-news__guide-image,
    .page-news__analysis-text,
    .page-news__guide-text {
        max-width: 100%;
    }
}

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

    .page-news__hero-section {
        height: 60vh;
        padding-top: var(--header-offset, 120px) !important; /* Ensure spacing on mobile */
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }

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

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

    .page-news__container {
        padding: 0 15px !important; /* Add padding for mobile content */
    }

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

    .page-news__card-image {
        height: 200px;
    }

    .page-news__analysis-section,
    .page-news__guide-section,
    .page-news__promotions-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 50px 0;
    }

    .page-news__content-wrapper,
    .page-news__content-wrapper--reverse {
        flex-direction: column;
        gap: 30px;
    }

    .page-news__analysis-image,
    .page-news__guide-image,
    .page-news__promotions-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    /* All images in content area must be responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    /* Ensure no content area images are too small */
    .page-news__news-card .page-news__card-image,
    .page-news__analysis-image,
    .page-news__guide-image,
    .page-news__promotions-image {
        min-width: 200px !important;
        min-height: 200px !important;
        /* Specific dimensions are set in HTML, this ensures minimums */
    }


    /* All video elements must be responsive */
    .page-news video,
    .page-news__hero-video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Video containers must be responsive */
    .page-news__hero-video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* All buttons must be responsive */
    .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;
    }

    /* Button containers must be responsive and allow wrapping */
    .page-news__hero-cta-group,
    .page-news__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
    }

    .page-news__faq-item {
        padding: 0 15px;
    }
}