/* style/news.css */
/* BEM Naming: .page-news__element-name */
/* Color Scheme: Main #017439, Auxiliary #FFFFFF */
/* Background: var(--background, #1a1a2e) - Dark, so text should be light */

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark background */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
    background-color: var(--background, #1a1a2e); /* Dark background */
    text-align: center;
    overflow: hidden;
}

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

.page-news__hero-title {
    font-size: 3.2em;
    color: #ffffff; /* White text for hero title */
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability */
}

.page-news__hero-description {
    font-size: 1.2em;
    color: #f0f0f0; /* Slightly off-white for description */
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1000px; /* Example max-width for content image */
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary,
.page-news__read-more-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* For mobile responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text break */
}

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

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Custom font color for primary action */
    border: 2px solid #C30808; /* Custom border color */
}

.page-news__btn-secondary:hover {
    background-color: #C30808;
    color: #ffffff;
}

.page-news__read-more-btn {
    background-color: #017439; /* Brand main color for read more */
    color: #FFFFFF;
    border: 2px solid #017439;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9em;
}

.page-news__read-more-btn:hover {
    background-color: #005f2e;
    border-color: #005f2e;
}

/* Section Styling */
.page-news__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.2;
}

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

.page-news__dark-section {
    background-color: var(--background, #1a1a2e); /* Dark background */
    color: #ffffff;
    padding: 60px 0;
}

.page-news__light-bg {
    background-color: #ffffff; /* White background */
    color: #333333; /* Dark text for light background */
    padding: 60px 0;
}

.page-news__light-bg .page-news__section-title {
    color: #017439; /* Brand main color for titles on light background */
}

.page-news__light-bg .page-news__section-intro {
    color: #555555;
}

/* Article/Card Grid */
.page-news__articles-grid,
.page-news__promotions-grid,
.page-news__game-grid,
.page-news__insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__article-card,
.page-news__promotion-card,
.page-news__game-card,
.page-news__insight-card {
    background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards on dark background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height in a row */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__light-bg .page-news__article-card,
.page-news__light-bg .page-news__promotion-card,
.page-news__light-bg .page-news__game-card,
.page-news__light-bg .page-news__insight-card {
    background: #ffffff; /* White background for cards on light background */
    color: #333333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-news__article-card:hover,
.page-news__promotion-card:hover,
.page-news__game-card:hover,
.page-news__insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-news__article-image-wrapper,
.page-news__promotion-image,
.page-news__game-image,
.page-news__insight-image {
    width: 100%;
    height: 220px; /* Fixed height for consistent image display */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-news__article-image,
.page-news__promotion-image,
.page-news__game-image,
.page-news__insight-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure images cover the area */
    display: block;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

.page-news__article-content,
.page-news__promotion-description,
.page-news__game-description,
.page-news__insight-description {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-news__article-title,
.page-news__promotion-title,
.page-news__game-title,
.page-news__insight-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__article-title a,
.page-news__promotion-title a,
.page-news__game-title a,
.page-news__insight-title a {
    color: #ffffff; /* White for titles on dark card */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__light-bg .page-news__article-title a,
.page-news__light-bg .page-news__promotion-title a,
.page-news__light-bg .page-news__game-title a,
.page-news__light-bg .page-news__insight-title a {
    color: #017439; /* Brand main color for titles on light card */
}

.page-news__article-title a:hover,
.page-news__promotion-title a:hover,
.page-news__game-title a:hover,
.page-news__insight-title a:hover {
    color: #00a04e; /* Lighter green on hover */
    text-decoration: underline;
}

.page-news__article-excerpt,
.page-news__promotion-description p,
.page-news__game-description p,
.page-news__insight-description p {
    font-size: 0.95em;
    margin-bottom: 20px;
    flex-grow: 1; /* Push button to bottom */
    color: #e0e0e0;
}

.page-news__light-bg .page-news__article-excerpt,
.page-news__light-bg .page-news__promotion-description p,
.page-news__light-bg .page-news__game-description p,
.page-news__light-bg .page-news__insight-description p {
    color: #555555;
}

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

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

.page-news__faq-item details > summary {
    list-style: none; /* Hide default marker */
}
.page-news__faq-item details > summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    background-color: #017439; /* Brand main color for question */
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

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

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

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
}

.page-news__faq-answer {
    padding: 20px 25px;
    font-size: 1em;
    color: #f0f0f0;
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for answer background */
}

.page-news__faq-answer p {
    margin: 0;
    color: #f0f0f0;
}

.page-news__faq-answer a {
    color: #a0f0a0; /* Lighter green for links in FAQ answer */
    text-decoration: underline;
}

.page-news__faq-answer a:hover {
    color: #60c060;
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
}

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

.page-news__cta-section .page-news__section-intro {
    color: #555555;
    margin-bottom: 40px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__articles-grid,
    .page-news__promotions-grid,
    .page-news__game-grid,
    .page-news__insights-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__cta-group {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

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

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Ensure minimum size even on mobile */
        min-height: 200px !important;
    }

    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-articles-section,
    .page-news__promotions-events-section,
    .page-news__game-updates-guides-section,
    .page-news__industry-insights-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    .page-news__article-image-wrapper,
    .page-news__promotion-image,
    .page-news__game-image,
    .page-news__insight-image {
        height: auto; /* Allow height to adjust */
        min-height: 200px;
    }

    .page-news__article-card,
    .page-news__promotion-card,
    .page-news__game-card,
    .page-news__insight-card {
        margin-bottom: 20px;
    }

    .page-news__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

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

/* Ensure no filter on images */
.page-news img {
    filter: none;
}

/* Ensure content area images maintain minimum size */
.page-news__latest-articles-section img,
.page-news__promotions-events-section img,
.page-news__game-updates-guides-section img,
.page-news__industry-insights-section img {
    min-width: 200px;
    min-height: 200px;
}