/* 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 page background */
}

/* Color Contrast Enforcement */
.page-game-bai__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

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

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

/* HERO Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px;
    background-color: #017439; /* Use main brand color for hero 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: 0 16px;
    box-sizing: border-box;
}

.page-game-bai__hero-image {
    flex: 1 1 50%;
    text-align: center;
}

.page-game-bai__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.page-game-bai__hero-content {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-game-bai__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Use clamp for H1 */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.page-game-bai__hero-description {
    font-size: 1.15rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

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

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

.page-game-bai__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-game-bai__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #FFFF00;
}

.page-game-bai__btn-secondary:hover {
    background-color: #FFFF00;
    color: #C30808;
}

.page-game-bai__btn-text-link {
    color: #017439;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-game-bai__btn-text-link:hover {
    color: #005a2e;
    text-decoration: underline;
}

/* Section Titles & Descriptions */
.page-game-bai__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #333333;
}

.page-game-bai__section-title--light {
    color: #ffffff;
}

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

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

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

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

.page-game-bai__feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.page-game-bai__feature-item {
    flex: 1 1 300px;
    max-width: 350px;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.page-game-bai__dark-bg .page-game-bai__feature-item {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-game-bai__icon-box-media {
    width: 200px; /* Ensure it stays square */
    height: 200px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #FFFF00; /* Accent border */
}

.page-game-bai__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Ensure image is also round */
    display: block;
}

.page-game-bai__feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-game-bai__feature-text {
    font-size: 1rem;
    color: #f0f0f0;
}

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

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

.page-game-bai__game-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-game-bai__game-card:hover {
    transform: translateY(-5px);
}

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

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

.page-game-bai__game-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-game-bai__game-card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-game-bai__game-card-title a:hover {
    color: #005a2e;
    text-decoration: underline;
}

.page-game-bai__game-card-text {
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

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

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

.page-game-bai__guide-step {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.page-game-bai__guide-step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #FFFF00; /* Yellow accent */
    color: #017439; /* Dark green text */
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-game-bai__guide-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-game-bai__guide-step-text {
    font-size: 1rem;
    color: #f0f0f0;
}

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

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

.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: #f8f8f8;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.page-game-bai__promo-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #017439;
}

.page-game-bai__promo-text {
    font-size: 1rem;
    color: #555555;
    margin-bottom: 25px;
    flex-grow: 1;
}

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

.page-game-bai__faq-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    align-items: flex-start;
}

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

.page-game-bai__faq-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

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

.page-game-bai__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.15rem;
    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);
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker for <summary> */
}

.page-game-bai__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for WebKit browsers */
}

.page-game-bai__faq-item[open] .page-game-bai__faq-question {
    background-color: rgba(255, 255, 255, 0.1);
}

.page-game-bai__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg);
}

.page-game-bai__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1rem;
    color: #f0f0f0;
    line-height: 1.6;
}

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

.page-game-bai__faq-answer a {
    color: #FFFF00; /* Yellow for links in dark background */
    text-decoration: underline;
}

.page-game-bai__faq-answer a:hover {
    color: #ffcc00;
}

/* Universal Image Responsive */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    .page-game-bai__section-title {
        font-size: 2rem;
    }

    .page-game-bai__container {
        padding: 30px 16px;
    }

    .page-game-bai__hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .page-game-bai__hero-content {
        flex: 1 1 100%;
        text-align: center;
    }

    .page-game-bai__hero-image {
        flex: 1 1 100%;
    }

    .page-game-bai__hero-cta-buttons {
        justify-content: center;
    }
}


@media (max-width: 768px) {
    /* HERO Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
    }

    .page-game-bai__hero-container {
        padding: 0 15px !important;
        gap: 30px !important;
    }

    .page-game-bai__hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        margin-bottom: 15px !important;
    }

    .page-game-bai__hero-description {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }

    .page-game-bai__hero-cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Buttons */
    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        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;
    }

    /* Section Titles & Descriptions */
    .page-game-bai__section-title {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .page-game-bai__section-description {
        font-size: 0.95rem !important;
        margin-bottom: 30px !important;
        padding: 0 10px;
    }

    .page-game-bai__container {
        padding: 30px 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Features Section - Module 1 Three-column round images */
    .page-game-bai__features-section {
        padding: 40px 0 !important;
    }

    .page-game-bai__feature-grid {
        gap: 25px !important;
        margin-top: 30px !important;
    }

    .page-game-bai__feature-item {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        padding: 25px !important;
    }

    .page-game-bai__icon-box-media {
        width: 150px !important; /* Ensure it stays square */
        height: 150px !important;
        margin-bottom: 15px !important;
        border-width: 3px !important;
    }

    .page-game-bai__feature-title {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
    }

    .page-game-bai__feature-text {
        font-size: 0.9rem !important;
    }

    /* Games List Section */
    .page-game-bai__games-list-section {
        padding: 40px 0 !important;
    }

    .page-game-bai__game-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        margin-top: 30px !important;
    }

    .page-game-bai__game-card-image {
        height: 180px !important; /* Adjust height for mobile */
    }

    .page-game-bai__game-card-title {
        font-size: 1.2rem !important;
    }

    .page-game-bai__game-card-text {
        font-size: 0.9rem !important;
    }

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

    .page-game-bai__guide-steps {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        margin-top: 30px !important;
    }

    .page-game-bai__guide-step {
        padding: 25px !important;
    }

    .page-game-bai__guide-step-number {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.6rem !important;
        margin-bottom: 15px !important;
    }

    .page-game-bai__guide-step-title {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
    }

    .page-game-bai__guide-step-text {
        font-size: 0.9rem !important;
    }

    .page-game-bai__cta-center {
        margin-top: 40px !important;
    }

    /* Promo Section */
    .page-game-bai__promo-section {
        padding: 40px 0 !important;
    }

    .page-game-bai__promo-grid {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        margin-top: 30px !important;
    }

    .page-game-bai__promo-card {
        padding: 25px !important;
    }

    .page-game-bai__promo-title {
        font-size: 1.3rem !important;
    }

    .page-game-bai__promo-text {
        font-size: 0.9rem !important;
    }

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

    .page-game-bai__faq-content-wrapper {
        flex-direction: column !important;
        gap: 30px !important;
        margin-top: 30px !important;
    }

    .page-game-bai__faq-image,
    .page-game-bai__faq-list {
        flex: 1 1 100% !important;
        min-width: unset !important;
    }

    .page-game-bai__faq-question {
        font-size: 1rem !important;
        padding: 15px 20px !important;
    }

    .page-game-bai__faq-answer {
        font-size: 0.95rem !important;
        padding: 12px 20px 15px !important;
    }

    /* Universal Image Responsive */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* All containers should have correct padding for mobile */
    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__container,
    .page-game-bai__hero-container,
    .page-game-bai__cta-buttons {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px !important;
      padding-right: 15px !important;
    }
}