/* style/game-bai.css */
/* Base styles for the page-game-bai */
.page-game-bai {
    font-family: 'Arial', sans-serif;
    color: #FFF1E8; /* Main text color */
    background-color: #140C0C; /* Overall page background */
    line-height: 1.6;
    padding-top: 10px; /* Small top padding for main content as shared.css handles body padding-top */
}

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

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

.page-game-bai__section-description {
    font-size: 1.1em;
    color: #FFF1E8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-game-bai__btn-primary {
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #FFF1E8;
    box-shadow: 0 4px 15px rgba(255, 176, 74, 0.4);
}

.page-game-bai__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.page-game-bai__btn-secondary {
    background: #C61F1F; /* Deep Red from brand color */
    color: #FFF1E8;
    border: 2px solid #F3C54D; /* Gold border */
    box-shadow: 0 4px 15px rgba(198, 31, 31, 0.4);
}

.page-game-bai__btn-secondary:hover {
    background: #E53030; /* Lighter red on hover */
    transform: translateY(-2px);
}

.page-game-bai__btn-play {
    background: linear-gradient(180deg, #F3C54D 0%, #D86A14 100%); /* Gold gradient for play buttons */
    color: #140C0C; /* Dark text for gold button */
    padding: 8px 20px;
    font-size: 1em;
    border-radius: 5px;
}

.page-game-bai__btn-play:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* HERO Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 60px;
    background-color: #140C0C;
}

.page-game-bai__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 16px;
    box-sizing: border-box;
}

.page-game-bai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #FFF1E8;
}

.page-game-bai__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
    font-weight: 800;
    color: #F3C54D; /* Gold for main title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-game-bai__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 600px;
}

.page-game-bai__cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

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

.page-game-bai__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
}

/* Features Section */
.page-game-bai__features-section {
    padding: 60px 0;
    background-color: #140C0C;
}

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

.page-game-bai__feature-item {
    background-color: #2A1212; /* Card BG */
    border: 1px solid #6A1E1E; /* Border color */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.page-game-bai__feature-icon {
    width: 240px; /* Adjusted to be large enough for 200x200px image */
    height: 240px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(180deg, #F3C54D 0%, #D86A14 100%); /* Gold background for icon area */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(243, 197, 77, 0.5);
}

.page-game-bai__feature-icon img {
    width: 200px; /* Minimum 200x200px */
    height: 200px;
    object-fit: contain; /* Ensure image fits well */
    border-radius: 50%; /* Keep it round if image is square */
    display: block;
}

.page-game-bai__feature-title {
    font-size: 1.5em;
    color: #F3C54D;
    margin-bottom: 15px;
}

.page-game-bai__feature-text {
    font-size: 1em;
    color: #FFF1E8;
}

/* Game Types Section */
.page-game-bai__game-types-section {
    padding: 60px 0;
    background-color: #140C0C;
}

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

.page-game-bai__tab-button {
    background-color: #2A1212; /* Card BG */
    color: #FFF1E8;
    padding: 10px 25px;
    border: 1px solid #6A1E1E;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.page-game-bai__tab-button:hover,
.page-game-bai__tab-button.is-active {
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #140C0C;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255, 176, 74, 0.3);
}

.page-game-bai__tab-content {
    position: relative;
}

.page-game-bai__game-panel {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-game-bai__game-card {
    background-color: #2A1212; /* Card BG */
    border: 1px solid #6A1E1E; /* Border color */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding-bottom: 20px;
}

.page-game-bai__game-card img {
    max-width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #6A1E1E;
    margin-bottom: 15px;
}

.page-game-bai__card-title {
    font-size: 1.4em;
    color: #F3C54D;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__card-text {
    font-size: 0.95em;
    color: #FFF1E8;
    margin-bottom: 20px;
    padding: 0 15px;
}

/* Guide Section */
.page-game-bai__guide-section {
    padding: 60px 0;
    background-color: #140C0C;
}

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

.page-game-bai__guide-step {
    background-color: #2A1212; /* Card BG */
    border: 1px solid #6A1E1E; /* Border color */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-game-bai__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #140C0C;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(255, 176, 74, 0.5);
}

.page-game-bai__step-title {
    font-size: 1.4em;
    color: #F3C54D;
    margin-bottom: 10px;
}

.page-game-bai__step-text {
    font-size: 1em;
    color: #FFF1E8;
}

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

/* FAQ Section */
.page-game-bai__faq-section {
    padding: 60px 0;
    background-color: #140C0C;
}

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

.page-game-bai__faq-item {
    background-color: #2A1212; /* Card BG */
    border: 1px solid #6A1E1E; /* Border color */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: #F3C54D;
    cursor: pointer;
    background-color: #2A1212;
    user-select: none;
    list-style: none; /* For details/summary */
}

.page-game-bai__faq-item[open] > .page-game-bai__faq-question {
    background-color: #1a0f0f; /* Slightly darker when open */
    border-bottom: 1px solid #6A1E1E;
}

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

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    font-weight: 400;
    color: #FFB04A;
    margin-left: 15px;
}

.page-game-bai__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1em;
    color: #FFF1E8;
}

.page-game-bai__faq-answer p {
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 16px;
    }
    .page-game-bai__hero-content {
        order: 2;
        flex: none;
    }
    .page-game-bai__hero-image {
        order: 1;
        margin-bottom: 30px;
        flex: none;
    }
    .page-game-bai__main-title,
    .page-game-bai__intro-text {
        text-align: center;
    }
    .page-game-bai__cta-buttons {
        justify-content: center;
    }
    .page-game-bai__features-grid,
    .page-game-bai__game-panel,
    .page-game-bai__guide-steps {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    /* General Content Area, Images, and Containers */
    .page-game-bai__container,
    .page-game-bai__features-section,
    .page-game-bai__game-types-section,
    .page-game-bai__guide-section,
    .page-game-bai__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* HERO Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important; /* Small top padding */
        padding-bottom: 40px;
    }
    .page-game-bai__hero-container {
        padding: 20px 15px;
        gap: 20px;
    }
    .page-game-bai__main-title {
        font-size: clamp(2em, 8vw, 2.8em) !important;
        margin-bottom: 15px;
    }
    .page-game-bai__intro-text {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-game-bai__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Add padding to container */
    }
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Module 1 (Features) - icon-box styling for robustness */
    .page-game-bai__icon-box-media {
        width: 220px; /* Container for 200x200 image */
        height: 220px;
        margin: 0 auto 16px;
    }
    .page-game-bai__feature-icon {
        width: 220px;
        height: 220px;
    }
    .page-game-bai__feature-icon img {
        width: 200px !important; /* Maintain minimum 200x200px */
        height: 200px !important;
        object-fit: contain !important;
    }

    /* Game Tabs Section */
    .page-game-bai__tab-nav {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
        padding: 0 15px; /* Add padding to container */
    }
    .page-game-bai__tab-button {
        width: 100%;
        max-width: 100%;
        font-size: 1em;
        padding: 10px 15px;
    }
    .page-game-bai__game-panel {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__game-card {
        padding-bottom: 15px;
    }
    .page-game-bai__btn-play {
        max-width: calc(100% - 30px); /* Account for card padding */
        width: auto;
        margin: 0 15px;
    }

    /* Guide Section */
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__guide-step {
        padding: 25px;
    }
    .page-game-bai__step-number {
        width: 45px;
        height: 45px;
        font-size: 1.6em;
    }

    /* FAQ Section */
    .page-game-bai__faq-list {
        margin-top: 30px;
        padding: 0 15px; /* Add padding to container */
    }
    .page-game-bai__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-game-bai__faq-toggle {
        font-size: 1.3em;
    }
    .page-game-bai__faq-answer {
        padding: 10px 20px 20px;
        font-size: 0.95em;
    }
}