/* style/game-bai.css */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #FFFFFF; /* Default background for page content */
}

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

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

.page-game-bai__section-description,
.page-game-bai__cta-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: #FFFFFF;
}

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

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

.page-game-bai__hero-title {
    font-size: clamp(2em, 4vw, 3.5em);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #017439;
}

.page-game-bai__hero-description {
    font-size: 1.15em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #555555;
    text-align: left;
}

.page-game-bai__hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

.page-game-bai__hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* General Buttons */
.page-game-bai__btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
}

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

.page-game-bai__btn-primary:hover {
    background-color: #005f2e;
    border-color: #005f2e;
}

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

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

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

/* Custom colors for Register/Login buttons */
.page-game-bai__btn-register,
.page-game-bai__btn-login {
    background-color: #C30808; /* Custom background */
    color: #FFFF00;    /* Custom font color */
    border: 2px solid #C30808;
}

.page-game-bai__btn-register:hover,
.page-game-bai__btn-login:hover {
    background-color: #a30606;
    border-color: #a30606;
}

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

.page-game-bai__light-bg {
    background-color: #FFFFFF;
    color: #333333;
}

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

.page-game-bai__feature-item {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__icon-box-media {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #017439;
}

.page-game-bai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-game-bai__feature-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #017439;
}

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

/* Game List Section */
.page-game-bai__game-list-section {
    padding: 60px 0;
}

.page-game-bai__dark-bg {
    background-color: #017439;
    color: #FFFFFF;
}

.page-game-bai__dark-bg .page-game-bai__section-title {
    color: #FFFFFF;
}

.page-game-bai__dark-bg .page-game-bai__section-description {
    color: #f0f0f0;
}

.page-game-bai__game-tabs {
    margin-top: 40px;
}

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

.page-game-bai__tab-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

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

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

.page-game-bai__game-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: 20px;
}

.page-game-bai__game-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-game-bai__game-card .page-game-bai__card-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 20px 15px 10px;
    color: #017439;
}

.page-game-bai__game-card .page-game-bai__card-text {
    font-size: 0.95em;
    color: #555555;
    padding: 0 15px 20px;
}

.page-game-bai__all-games-cta {
    text-align: center;
    margin-top: 50px;
}

/* Guide Section */
.page-game-bai__guide-section {
    padding: 60px 0;
}

.page-game-bai__guide-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.page-game-bai__guide-text {
    flex: 1 1 50%;
    min-width: 300px;
}

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

.page-game-bai__guide-list {
    list-style: decimal;
    padding-left: 25px;
    margin-bottom: 30px;
    font-size: 1.05em;
    color: #555555;
}

.page-game-bai__guide-list li {
    margin-bottom: 10px;
}

.page-game-bai__guide-list strong {
    color: #017439;
}

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

.page-game-bai__guide-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

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

.page-game-bai__cta-title {
    color: #FFFFFF;
    font-size: 3em;
    margin-bottom: 20px;
}

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

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

/* FAQ Section */
.page-game-bai__faq-section {
    padding: 60px 0;
}

.page-game-bai__faq-list {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: #017439;
    cursor: pointer;
    list-style: none;
    outline: none;
    transition: background-color 0.3s ease;
}

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

.page-game-bai__faq-question:hover {
    background-color: #e6f7ed;
}

.page-game-bai__faq-item[open] > .page-game-bai__faq-question {
    background-color: #e6f7ed;
}

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

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

.page-game-bai__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
    line-height: 1.6;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-title {
        font-size: 3em;
    }
    .page-game-bai__hero-container {
        flex-direction: column;
        text-align: center;
    }
    .page-game-bai__hero-content {
        order: 2; /* Content below image on smaller screens */
    }
    .page-game-bai__hero-image {
        order: 1;
    }
    .page-game-bai__hero-description {
        text-align: center;
    }
    .page-game-bai__hero-cta-buttons {
        justify-content: center;
    }
    .page-game-bai__guide-content {
        flex-direction: column;
    }
    .page-game-bai__guide-text {
        order: 2;
    }
    .page-game-bai__guide-image {
        order: 1;
    }
}

@media (max-width: 768px) {
    /* General */
    .page-game-bai__container,
    .page-game-bai__hero-container,
    .page-game-bai__features-grid,
    .page-game-bai__game-panel,
    .page-game-bai__guide-content,
    .page-game-bai__cta-buttons,
    .page-game-bai__faq-list {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Section Padding */
    .page-game-bai__hero-section,
    .page-game-bai__intro-section,
    .page-game-bai__game-list-section,
    .page-game-bai__guide-section,
    .page-game-bai__cta-section,
    .page-game-bai__faq-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* Hero Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important; /* Adhere to 10px top padding */
    }
    .page-game-bai__hero-title {
        font-size: 2.2em;
    }
    .page-game-bai__hero-description {
        font-size: 1em;
    }
    .page-game-bai__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Module 1 (Intro) - Circular Images */
    .page-game-bai__icon-box-media {
        width: 160px;
        height: 160px;
        border: 3px solid #017439;
    }

    /* Game Tabs */
    .page-game-bai__tab-nav {
        flex-direction: column;
        gap: 10px;
    }
    .page-game-bai__tab-button {
        width: 100%;
        font-size: 1em;
        padding: 10px 15px;
    }
    .page-game-bai__game-card img {
        height: 200px; /* Adjust card image height for mobile */
    }

    /* Guide Section */
    .page-game-bai__guide-text p,
    .page-game-bai__guide-list li {
        font-size: 0.95em;
    }

    /* CTA Section */
    .page-game-bai__cta-title {
        font-size: 2em;
    }
    .page-game-bai__cta-description {
        font-size: 1em;
    }
    .page-game-bai__cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* FAQ Section */
    .page-game-bai__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-game-bai__faq-answer {
        font-size: 0.95em;
        padding: 0 20px 15px;
    }

    /* Universal Image & Button Responsiveness */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-game-bai__btn,
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary,
    .page-game-bai__btn-register,
    .page-game-bai__btn-login,
    .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__hero-cta-buttons,
    .page-game-bai__cta-buttons {
        flex-direction: column !important;
        flex-wrap: nowrap !important; /* Ensure buttons stack */
        gap: 10px !important;
    }
}