/* style/game-bai.css */

/* --- General Styles --- */
.page-game-bai {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light body background */
    line-height: 1.6;
    background-color: #FFFFFF; /* Explicitly setting for clarity, though body is default white */
}

.page-game-bai__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-game-bai__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-bai__text-block {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #555555;
}

/* --- Buttons --- */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Required for responsiveness */
    box-sizing: border-box; /* Required for responsiveness */
    white-space: normal; /* Required for responsiveness */
    word-wrap: break-word; /* Required for responsiveness */
}

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

.page-game-bai__btn-primary:hover {
    background-color: #1e87b7;
    border-color: #1e87b7;
}

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

.page-game-bai__btn-secondary:hover {
    background-color: #e0f0f8;
    color: #1e87b7;
}

.page-game-bai__btn-small {
    padding: 8px 18px;
    font-size: 0.9em;
}

.page-game-bai__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Ensure buttons wrap on small screens */
    width: 100%; /* Required for responsiveness */
    max-width: 100%; /* Required for responsiveness */
    box-sizing: border-box; /* Required for responsiveness */
    overflow: hidden; /* Required for responsiveness */
}

.page-game-bai__cta-center {
    text-align: center;
    margin-top: 40px;
}

/* --- Image Defaults --- */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* --- Hero Section --- */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 60px;
    background-color: #f8fcff; /* Light background for hero */
    display: flex;
    flex-direction: column; /* Image on top, content below */
    align-items: center;
    text-align: center;
}

.page-game-bai__hero-content-wrapper {
    max-width: 800px;
    padding: 20px 16px;
}

.page-game-bai__main-title {
    font-size: 3.2em; /* Use em for relative sizing */
    font-weight: 800;
    color: #1a2a4b;
    margin-bottom: 15px;
    line-height: 1.1;
    max-width: 100%;
}

.page-game-bai__lead-text {
    font-size: 1.3em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__hero-image-wrapper {
    width: 100%;
    max-width: 800px; /* Max width for hero image */
    margin-bottom: 30px;
    padding: 0 16px;
    box-sizing: border-box;
}

.page-game-bai__hero-image {
    width: 100%;
    height: auto;
    object-fit: contain; /* Ensure image fits without cropping */
}

/* --- Intro Section --- */
.page-game-bai__intro-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-game-bai__content-image {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Games Section (Tabs) --- */
.page-game-bai__games-section {
    padding: 60px 0;
    background-color: #f0f8ff;
}

.page-game-bai__tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.page-game-bai__tab-button {
    background-color: #e0e0e0;
    color: #333333;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.page-game-bai__tab-button:hover,
.page-game-bai__tab-button.is-active {
    background-color: #26A9E0;
    color: #FFFFFF;
}

.page-game-bai__game-panel {
    display: none;
    padding: 30px 0;
}

.page-game-bai__game-panel.is-active {
    display: block;
}

.page-game-bai__panel-title {
    font-size: 2em;
    color: #1a2a4b;
    text-align: center;
    margin-bottom: 25px;
}

.page-game-bai__panel-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.page-game-bai__panel-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.page-game-bai__panel-text p {
    margin-bottom: 20px;
    font-size: 1.05em;
    color: #555555;
}

.page-game-bai__panel-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.page-game-bai__game-image {
    width: 100%;
    height: auto;
    max-height: 400px; /* Constrain image height */
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Guide Section --- */
.page-game-bai__guide-section {
    padding: 60px 0;
    background-color: #26A9E0; /* Brand color dark background */
    color: #FFFFFF; /* White text for dark background */
}

.page-game-bai__guide-section .page-game-bai__section-title,
.page-game-bai__guide-section .page-game-bai__text-block {
    color: #FFFFFF; /* Ensure titles and text are white */
}

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

.page-game-bai__step-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-game-bai__step-icon {
    width: 60px;
    height: 60px;
    background-color: #FFFFFF;
    color: #26A9E0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    font-weight: 700;
    margin: 0 auto 20px;
}

.page-game-bai__step-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.page-game-bai__step-item p {
    color: #f0f0f0;
}

/* --- Strategy Section --- */
.page-game-bai__strategy-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

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

.page-game-bai__strategy-card {
    background-color: #f8fcff;
    border: 1px solid #e0f0f8;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-game-bai__strategy-card .page-game-bai__card-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-game-bai__strategy-card p {
    color: #555555;
}

.page-game-bai__strategy-image {
    margin-top: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Promo Section --- */
.page-game-bai__promo-section {
    padding: 60px 0;
    background-color: #f0f8ff;
}

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

.page-game-bai__promo-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-game-bai__promo-card .page-game-bai__card-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #1a2a4b;
    margin-bottom: 15px;
}

.page-game-bai__promo-card p {
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- FAQ Section --- */
.page-game-bai__faq-section {
    padding: 60px 0;
    background-color: #1a2a4b; /* Dark background */
    color: #FFFFFF; /* White text */
}

.page-game-bai__faq-section .page-game-bai__section-title {
    color: #FFFFFF;
}

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

.page-game-bai__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    list-style: none; /* For details/summary */
}

.page-game-bai__faq-question::-webkit-details-marker {
    display: none;
}

.page-game-bai__faq-question::marker {
    display: none;
}

.page-game-bai__faq-qtext {
    flex-grow: 1;
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-game-bai__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1.05em;
    color: #f0f0f0;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-game-bai__container {
        padding: 20px 15px; /* Adjust padding for mobile */
    }

    .page-game-bai__section-title {
        font-size: 1.8em; /* Smaller titles on mobile */
        margin-bottom: 15px;
    }

    .page-game-bai__text-block {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* 6. Buttons and Button Containers */
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .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;
        padding-right: 15px;
    }

    .page-game-bai__cta-group,
    .page-game-bai__cta-center {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 1. HERO Section (Title & Intro) */
    .page-game-bai__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px;
        flex-direction: column;
    }

    .page-game-bai__hero-content-wrapper {
        padding: 15px;
    }

    .page-game-bai__main-title {
        font-size: 2em; /* Smaller H1 for mobile */
        margin-bottom: 10px;
    }

    .page-game-bai__lead-text {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .page-game-bai__hero-image-wrapper {
        margin-top: 20px;
        margin-bottom: 0;
        padding: 0 15px;
    }

    /* 5. General Images and Containers */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-game-bai__intro-section,
    .page-game-bai__games-section,
    .page-game-bai__guide-section,
    .page-game-bai__strategy-section,
    .page-game-bai__promo-section,
    .page-game-bai__faq-section {
        padding: 30px 0; /* Adjust section padding */
    }

    /* 3. Seven Tab Game Area (Game Tabs) */
    .page-game-bai__tab-nav {
        flex-direction: column; /* Stack tab buttons vertically */
        gap: 10px;
        margin-bottom: 30px;
    }

    .page-game-bai__tab-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 1em;
    }

    .page-game-bai__panel-grid {
        flex-direction: column; /* Stack text and image vertically */
        gap: 20px;
    }

    .page-game-bai__panel-text,
    .page-game-bai__panel-image {
        min-width: unset;
        width: 100%;
        text-align: center;
    }

    .page-game-bai__panel-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    /* 4. Tutorial Long Article / Promotion / Trust / FAQ / Blog / Intro Layout */
    .page-game-bai__steps-grid,
    .page-game-bai__strategy-grid,
    .page-game-bai__promo-grid {
        grid-template-columns: 1fr; /* Single column layout for grids */
        gap: 20px;
    }

    .page-game-bai__step-item,
    .page-game-bai__strategy-card,
    .page-game-bai__promo-card {
        padding: 20px;
    }

    .page-game-bai__step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .page-game-bai__step-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .page-game-bai__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .page-game-bai__faq-answer {
        padding: 10px 20px 15px;
        font-size: 1em;
    }
}