/* style/news.css */

/* Base Styles */
.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 15px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

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

.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    cursor: pointer;
    max-width: 100%; /* For responsive buttons */
    box-sizing: border-box; /* For responsive buttons */
    white-space: normal; /* For responsive buttons */
    word-wrap: break-word; /* For responsive buttons */
}

.page-news__btn-primary {
    background-color: #C30808; /* Login/Register color */
    color: #FFFF00; /* Login/Register 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 #017439;
}

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

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding: var(--header-offset, 120px) 0 80px; /* Use padding-top:0 if shared handles body padding */
    background-color: #1a1a1a; /* Explicitly set to match body for safety */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* Prevent image overflow */
}

.page-news__hero-section .page-news__container {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-news__hero-content {
    flex: 1;
    min-width: 300px;
    color: #ffffff;
    text-align: left;
}

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

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

.page-news__hero-cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-news__hero-image-wrapper {
    flex: 1;
    min-width: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: #2a2a2a; /* Slightly lighter dark background */
    color: #ffffff;
}

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

.page-news__article-card {
    background-color: #333333; /* Darker card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__article-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.3;
}

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

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-news__read-more-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

.page-news__read-more-link:hover {
    color: #02a04e;
}

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

/* Game Updates Section */
.page-news__game-updates-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Match body background */
    color: #ffffff;
}

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

.page-news__game-card {
    background-color: #333333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__game-image {
    width: 100%;
    height: 200px; /* Fixed height for game images */
    object-fit: cover;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-news__game-title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 10px 5px;
    line-height: 1.3;
}

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

.page-news__game-title a:hover {
    color: #017439;
}

.page-news__game-description {
    font-size: 0.9em;
    color: #cccccc;
    padding: 0 15px 15px;
    flex-grow: 1;
}

/* About 8xbet Section */
.page-news__about-8xbet-section {
    padding: 80px 0;
    background-color: #017439; /* Brand color as background */
    color: #ffffff;
}

.page-news__about-8xbet-section .page-news__section-title {
    color: #ffffff;
}

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

.page-news__image-box {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-news__about-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-news__text-box {
    flex: 2;
    min-width: 300px;
}

.page-news__text-box p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #2a2a2a; /* Slightly lighter dark background */
    color: #ffffff;
}

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

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

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

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

.page-news__faq-question h3 {
    margin: 0;
    color: inherit;
    font-size: 1em; /* Reset h3 font size within question */
}

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

.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;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #444444; /* Lighter background for answer */
    color: #cccccc;
}

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

.page-news__faq-answer p {
    margin: 0;
    padding: 0;
    color: inherit;
}

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

.page-news__cta-content {
    max-width: 800px;
}

.page-news__cta-title {
    font-size: 2.8em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
}

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

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* General image and container responsiveness */
.page-news img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Ensure images fill their space without distortion */
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__hero-section .page-news__container {
        flex-direction: column;
        text-align: center;
    }
    .page-news__hero-content {
        text-align: center;
    }
    .page-news__hero-image-wrapper {
        min-width: unset;
        width: 100%;
    }
    .page-news__hero-cta-buttons {
        justify-content: center;
    }
    .page-news__content-wrapper {
        flex-direction: column;
    }
    .page-news__image-box {
        min-width: unset;
        width: 100%;
    }
    .page-news__text-box {
        min-width: unset;
        width: 100%;
    }
    .page-news__articles-grid,
    .page-news__games-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px);
        padding-bottom: 40px;
    }
    .page-news__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-news__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-news__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }
    .page-news__hero-cta-buttons .page-news__btn-primary,
    .page-news__hero-cta-buttons .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 产品展示图区域 (Game Updates Section) */
    .page-news__game-updates-section {
        padding: 40px 0;
    }
    .page-news__games-grid {
        grid-template-columns: 1fr; /* Single column layout for games */
        gap: 20px;
        padding: 0 15px; /* Add padding to prevent overflow */
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .page-news__game-card {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .page-news__game-image {
        height: 180px; /* Adjust height for mobile */
    }

    /* 通用图片与容器 */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure min size is met */
        min-height: 200px !important; /* Ensure min size is met */
    }
    .page-news__container,
    .page-news__section,
    .page-news__card,
    .page-news__box {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 按钮与按钮容器 */
    .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;
    }
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* Stack buttons vertically */
    }

    /* 其他内容模块 */
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-news__section-description {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    .page-news__latest-news-section,
    .page-news__about-8xbet-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding: 40px 0;
    }
}