/* style/game-bai.css */

/* General styles for the Game Bài page */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #ffffff; /* Assuming body background is light/white based on design */
}

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

.page-game-bai__section {
    padding: 60px 0;
    background-color: #ffffff;
}

.page-game-bai__section:nth-of-type(even) {
    background-color: #f8f8f8; /* Light grey for alternating sections */
}

.page-game-bai__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #26A9E0; /* Main brand color */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-game-bai__sub-title {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-game-bai__text-block {
    font-size: 17px;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: justify;
}

.page-game-bai__keyword {
    font-weight: bold;
    color: #26A9E0;
}

/* --- Hero Section --- */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: #26A9E0; /* Main brand color for the section background */
    display: flex;
    flex-direction: column; /* Stack image and content vertically */
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-bottom: 60px; /* Add some padding below content */
}

.page-game-bai__hero-image {
    width: 100%;
    max-height: 600px; /* Max height for the image */
    overflow: hidden;
}

.page-game-bai__hero-image img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    object-fit: cover; /* Cover the area, will be `contain` on mobile */
}

.page-game-bai__hero-content {
    max-width: 800px;
    padding: 40px 20px 0; /* Padding above content, 0 below */
    box-sizing: border-box;
    color: #ffffff; /* White text on blue background */
    background-color: #26A9E0; /* Match section background */
    width: 100%; /* Ensure content takes full width of its container */
}

.page-game-bai__main-title {
    font-size: clamp(32px, 4.5vw, 48px); /* Using clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-game-bai__description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ffffff;
}

.page-game-bai__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%; /* Ensure container takes full width for responsive padding */
    max-width: 100%; /* For mobile overflow */
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to prevent overflow */
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-game-bai__btn-primary {
    background: #EA7C07; /* Login color for primary action */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-game-bai__btn-primary:hover {
    background: #d46c06;
}

.page-game-bai__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-game-bai__btn-secondary:hover {
    background: #f0f0f0;
    color: #1e87c0;
    border-color: #1e87c0;
}

.page-game-bai__btn-play {
    background: #26A9E0;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
}

.page-game-bai__btn-play:hover {
    background: #1e87c0;
}

/* --- Popular Games Section --- */
.page-game-bai__popular-games-section {
    background-color: #f8f8f8;
}

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

.page-game-bai__game-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-game-bai__game-card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
}

.page-game-bai__game-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #26A9E0;
    margin-bottom: 10px;
    padding: 0 15px;
}
.page-game-bai__game-card-title a {
    color: #26A9E0;
    text-decoration: none;
}
.page-game-bai__game-card-title a:hover {
    text-decoration: underline;
}

.page-game-bai__game-card-description {
    font-size: 15px;
    color: #555555;
    margin-bottom: 20px;
    padding: 0 15px;
    flex-grow: 1;
}

/* --- Advantages Section --- */
.page-game-bai__advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-game-bai__advantage-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
}

.page-game-bai__advantage-icon {
    width: 200px; /* Min size */
    height: 150px; /* Min size */
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__advantage-title {
    font-size: 22px;
    font-weight: 700;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-game-bai__advantage-description {
    font-size: 16px;
    color: #555555;
}

/* --- Guide Section --- */
.page-game-bai__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-game-bai__guide-step {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
}

.page-game-bai__guide-step-title {
    font-size: 24px;
    font-weight: 700;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-game-bai__guide-step-description {
    font-size: 16px;
    color: #555555;
}

/* --- Tips Section --- */
.page-game-bai__tips-section .page-game-bai__container {
    max-width: 900px;
}

.page-game-bai__article-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Promotions Section --- */
.page-game-bai__promo-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-game-bai__promo-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
}

.page-game-bai__promo-title {
    font-size: 20px;
    font-weight: 700;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-game-bai__promo-description {
    font-size: 16px;
    color: #555555;
}

/* --- Footer CTA Section --- */
.page-game-bai__footer-cta {
    background-color: #26A9E0;
    color: #ffffff;
    text-align: center;
}

.page-game-bai__footer-cta .page-game-bai__section-title {
    color: #ffffff;
    margin-bottom: 20px;
}

.page-game-bai__footer-cta .page-game-bai__text-block {
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto 30px;
}

.page-game-bai__footer-cta .page-game-bai__cta-buttons {
    margin-top: 0;
}

.page-game-bai__footer-cta .page-game-bai__btn-secondary {
    background: #EA7C07; /* Use login color for secondary button in footer CTA */
    color: #ffffff;
    border-color: #EA7C07;
}

.page-game-bai__footer-cta .page-game-bai__btn-secondary:hover {
    background: #d46c06;
    border-color: #d46c06;
}

/* --- FAQ Section --- */
details.page-game-bai__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    background: #fff;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question::-webkit-details-marker {
    display: none;
}
details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
    background: #f5f5f5;
}
.page-game-bai__faq-qtext {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: #333333;
}
.page-game-bai__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 28px;
    text-align: center;
}
details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 20px 20px;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
    color: #555555;
}
.page-game-bai__faq-answer p {
    margin-bottom: 0;
    font-size: 16px;
}

/* --- Responsive Styles --- */

/* @media (max-width: 1024px) for general tablet/smaller desktop adjustments */
@media (max-width: 1024px) {
    .page-game-bai__container {
        padding: 0 15px;
    }

    .page-game-bai__section-title {
        font-size: 32px;
    }

    .page-game-bai__main-title {
        font-size: clamp(30px, 4vw, 42px);
    }

    .page-game-bai__description {
        font-size: 17px;
    }

    .page-game-bai__hero-image {
        max-height: 500px;
    }

    .page-game-bai__game-card-title {
        font-size: 20px;
    }

    .page-game-bai__advantage-title {
        font-size: 20px;
    }

    .page-game-bai__guide-step-title {
        font-size: 22px;
    }

    .page-game-bai__promo-title {
        font-size: 18px;
    }
}

/* @media (max-width: 768px) for mobile devices */
@media (max-width: 768px) {
    /* General adjustments */
    .page-game-bai__section {
        padding: 40px 0;
    }

    .page-game-bai__section-title {
        font-size: 28px;
        margin-bottom: 30px;
        padding: 0 15px; /* Ensure title also has padding */
    }

    .page-game-bai__text-block {
        font-size: 16px;
        padding: 0 15px; /* Ensure text blocks have padding */
    }

    /* HERO 主图区域 */
    .page-game-bai__hero-section {
        padding-top: 10px;
        padding-bottom: 40px;
    }

    .page-game-bai__hero-image {
        height: auto !important;
        max-height: 300px !important;
    }

    .page-game-bai__hero-image img {
        object-fit: contain !important; /* Contain the image, no cropping */
        aspect-ratio: unset !important; /* Remove fixed aspect ratio if any */
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    .page-game-bai__hero-content {
        padding: 20px 15px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-game-bai__main-title {
        font-size: clamp(28px, 8vw, 36px);
        margin-bottom: 15px;
        padding: 0 10px;
    }

    .page-game-bai__description {
        font-size: 15px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    /* 按钮与按钮容器 */
    .page-game-bai__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        padding: 0 15px !important; /* Ensure buttons container has padding */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai__btn-play,
    .page-game-bai a[class*="button"],
    .page-game-bai 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 !important;
        padding-right: 15px !important;
    }

    /* 产品展示图区域 */
    .page-game-bai__popular-games-section {
        overflow-x: hidden !important; /* Prevent horizontal scroll */
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    .page-game-bai__games-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for game cards */
        gap: 15px;
    }
    .page-game-bai__game-card {
        padding-bottom: 15px;
    }
    .page-game-bai__game-card-image {
        height: 150px; /* Smaller height for mobile cards */
    }
    .page-game-bai__game-card-title {
        font-size: 18px;
    }
    .page-game-bai__game-card-description {
        font-size: 14px;
    }
}