/* style/news.css */

/* Base styles for the news page content */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Inherit from body or shared, ensuring text contrast */
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    background-color: #017439; /* Brand primary color for hero background */
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3; /* Overlay for text readability */
}

.page-news__hero-section .page-news__container {
    position: relative;
    z-index: 1;
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFF00; /* Yellow for prominence */
}

.page-news__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #017439; /* Brand primary color */
}

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

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: #333333;
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for mobile responsiveness */
    max-width: 100%; /* Ensure button doesn't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center; /* Center text if it wraps */
}

.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: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #017439;
    border-color: #017439;
}

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

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

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

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

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

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

.page-news__card-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__card-title a {
    text-decoration: none;
    color: #017439; /* Brand primary color for links */
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: #005f2e; /* Darker shade on hover */
}

.page-news__card-date {
    font-size: 0.9em;
    color: #777777;
    margin-bottom: 15px;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: #C30808; /* Action color */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #a00606;
}

.page-news__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

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

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

.page-news__promo-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    border-radius: 12px;
    overflow: hidden;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-news__promo-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    display: block;
}

.page-news__promo-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for highlights */
}

.page-news__promo-text {
    font-size: 1em;
    color: #f0f0f0;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Game Guides Section */
.page-news__game-guides {
    padding: 80px 0;
    background-color: #ffffff;
    color: #333333;
}

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

.page-news__guide-card {
    background-color: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__guide-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-news__guide-title {
    font-size: 1.4em;
    margin: 20px 20px 10px 20px;
    font-weight: bold;
}

.page-news__guide-title a {
    text-decoration: none;
    color: #017439;
    transition: color 0.3s ease;
}

.page-news__guide-title a:hover {
    color: #005f2e;
}

.page-news__guide-excerpt {
    font-size: 1em;
    color: #555555;
    padding: 0 20px 20px 20px;
    flex-grow: 1;
}

/* Platform Updates Section */
.page-news__platform-updates {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
}

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

.page-news__update-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.page-news__update-item:hover {
    transform: translateY(-5px);
}

.page-news__update-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #FFFF00;
}

.page-news__update-text {
    font-size: 1em;
    color: #f0f0f0;
}

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

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

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

.page-news__faq-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #017439;
    background-color: #e6ffe6; /* Lighter shade of brand color for contrast */
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

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

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Ensure it expands sufficiently */
    padding: 20px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px;
}


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

.page-news__cta-final .page-news__section-description {
    margin-bottom: 50px;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__container {
        padding: 0 15px;
    }
}

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

    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
    }

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

    .page-news__intro-text {
        font-size: 1.1em;
    }

    .page-news__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__section-title {
        font-size: 1.8em;
    }

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

    .page-news__news-grid,
    .page-news__promo-grid,
    .page-news__guide-grid,
    .page-news__update-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-news__card-image,
    .page-news__promo-image,
    .page-news__guide-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Allow height to adjust */
        display: block !important;
    }

    /* All image containers must ensure no overflow */
    .page-news__news-card,
    .page-news__promo-card,
    .page-news__guide-card,
    .page-news__update-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        /* Rely on container padding for overall spacing */
    }

    .page-news__latest-news,
    .page-news__promotions,
    .page-news__game-guides,
    .page-news__platform-updates,
    .page-news__faq-section,
    .page-news__cta-final {
        padding: 50px 0; /* Vertical padding */
    }

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

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Ensure all content sections and containers are responsive */
    .page-news__hero-section .page-news__container,
    .page-news__latest-news .page-news__container,
    .page-news__promotions .page-news__container,
    .page-news__game-guides .page-news__container,
    .page-news__platform-updates .page-news__container,
    .page-news__faq-section .page-news__container,
    .page-news__cta-final .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__intro-text {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
}

/* Ensure images and videos are always responsive and don't overflow */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Content area images CSS dimensions lower bound */
/* This rule targets any img within .page-news to ensure it's not smaller than 200px */
.page-news img:not(.page-news__hero-image) { /* Exclude hero image from this min-size check as it's full width */
    min-width: 200px;
    min-height: 200px;
    object-fit: cover; /* Maintain aspect ratio and fill space */
}
/* Override specific smaller dimensions if they exist */
.page-news__card-image,
.page-news__promo-image,
.page-news__guide-image {
    min-width: 200px;
    min-height: 200px;
}

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