/* style/game-bai.css */

/* Base styles for the page content */
.page-game-bai {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #1F2D3D; /* Text Main */
    background-color: #F4F7FB; /* Background */
}

.page-game-bai__content-area {
    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: #1F2D3D; /* Text Main */
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
}

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

.page-game-bai__text-block {
    font-size: 1.1em;
    color: #1F2D3D; /* Text Main */
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-game-bai__text-block--light {
    color: #f0f0f0;
}

/* 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: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-game-bai__btn-primary {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-game-bai__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
}

.page-game-bai__btn-secondary {
    background-color: #ffffff; /* Card BG */
    color: #2F6BFF; /* Primary color */
    border: 2px solid #2F6BFF; /* Primary color */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-bai__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #1e52cc;
    border-color: #1e52cc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-game-bai__btn-play {
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button gradient */
    color: #ffffff;
    font-size: 0.9em;
    padding: 8px 20px;
    border-radius: 5px;
}

.page-game-bai__btn-play:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

/* Hero Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 60px;
    background-color: #F4F7FB; /* Background */
    position: relative;
    overflow: hidden;
}

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

.page-game-bai__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
    color: #1F2D3D; /* Text Main */
}

.page-game-bai__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
    font-weight: 800;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 600px;
}

.page-game-bai__description {
    font-size: 1.2em;
    color: #333333;
    margin-bottom: 30px;
    max-width: 600px;
}

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

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

.page-game-bai__hero-side-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block;
}

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

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

.page-game-bai__feature-item {
    background-color: #FFFFFF; /* Card BG */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__icon-box-media {
    width: 200px; /* Fixed width for circular image */
    height: 200px; /* Fixed height for circular image */
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #D6E2FF; /* Border color as background for icons */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

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

.page-game-bai__feature-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #2F6BFF; /* Primary color */
    margin-bottom: 15px;
}

.page-game-bai__feature-description {
    font-size: 1em;
    color: #333333;
}

/* Popular Games Section */
.page-game-bai__popular-games-section {
    padding: 60px 0;
    background-color: #2F6BFF; /* Primary color as dark background */
    color: #ffffff;
}

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

.page-game-bai__game-card {
    background-color: #FFFFFF; /* Card BG */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    color: #1F2D3D; /* Text Main */
    transition: transform 0.3s ease;
}

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

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

.page-game-bai__game-card-title {
    font-size: 1.4em;
    font-weight: 700;
    padding: 20px 20px 10px;
    color: #2F6BFF; /* Primary color */
}

.page-game-bai__game-card-title a {
    color: #2F6BFF; /* Primary color */
    text-decoration: none;
}

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

.page-game-bai__game-card-description {
    font-size: 0.95em;
    color: #333333;
    padding: 0 20px 20px;
    flex-grow: 1;
}

.page-game-bai__btn-play {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
}


/* Guide Section */
.page-game-bai__guide-section {
    padding: 60px 0;
    background-color: #F4F7FB; /* Background */
    color: #1F2D3D;
}

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

.page-game-bai__step-item {
    background-color: #FFFFFF; /* Card BG */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__step-icon {
    width: 60px;
    height: 60px;
    background-color: #2F6BFF; /* Primary color */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
}

.page-game-bai__step-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1F2D3D; /* Text Main */
    margin-bottom: 15px;
}

.page-game-bai__step-description {
    font-size: 1em;
    color: #333333;
}

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

/* Advantages Section */
.page-game-bai__advantages-section {
    padding: 60px 0;
    background-color: #2F6BFF; /* Primary color as dark background */
    color: #ffffff;
}

.page-game-bai__advantage-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__advantage-list li {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: #f0f0f0;
}

.page-game-bai__list-icon {
    color: #A5C4FF; /* Glow color */
    font-size: 1.3em;
    margin-right: 10px;
    line-height: 1;
    font-weight: 900;
}

.page-game-bai__list-strong {
    color: #ffffff;
}

/* FAQ Section */
.page-game-bai__faq-section {
    padding: 60px 0;
    background-color: #F4F7FB; /* Background */
    color: #1F2D3D;
}

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

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

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: #1F2D3D; /* Text Main */
    cursor: pointer;
    background-color: #F9FBFF; /* Slightly lighter than card BG */
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

.page-game-bai__faq-item[open] > .page-game-bai__faq-question {
    background-color: #F0F5FF; /* A bit darker when open */
    color: #2F6BFF;
}

.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;
    font-weight: 600;
    line-height: 1;
    margin-left: 15px;
    color: #2F6BFF;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross */
}


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

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

/* Final CTA Section */
.page-game-bai__cta-section {
    padding: 60px 0;
    background-color: #2F6BFF; /* Primary color as dark background */
    color: #ffffff;
    text-align: center;
}

.page-game-bai__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__cta-buttons--center {
    justify-content: center;
    margin-top: 30px;
}

/* Global image responsiveness */
.page-game-bai img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-container {
        padding: 30px 16px;
        gap: 30px;
    }

    .page-game-bai__main-title {
        font-size: clamp(2.2em, 4.5vw, 3em);
    }

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

    .page-game-bai__text-block {
        font-size: 1em;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        padding: 12px 24px;
        font-size: 1em;
    }
}


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

    .page-game-bai__hero-container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    .page-game-bai__hero-content {
        text-align: center;
        order: 2; /* Content below image */
    }

    .page-game-bai__main-title {
        font-size: clamp(2em, 8vw, 2.5em); /* Adjust for smaller screens */
        margin-bottom: 15px;
        max-width: 100%;
    }

    .page-game-bai__description {
        font-size: 1.1em;
        margin-bottom: 25px;
        max-width: 100%;
    }

    .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__cta-buttons > * { /* Apply to direct children buttons */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-game-bai__hero-image {
        order: 1; /* Image above content */
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .page-game-bai__hero-side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Intro Section - Three-column circular images */
    .page-game-bai__intro-section,
    .page-game-bai__popular-games-section,
    .page-game-bai__guide-section,
    .page-game-bai__advantages-section,
    .page-game-bai__faq-section,
    .page-game-bai__cta-section {
        padding: 30px 0;
    }

    .page-game-bai__content-area {
        padding: 20px 15px; /* Ensure content area has padding */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-game-bai__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

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

    .page-game-bai__features-grid,
    .page-game-bai__game-grid,
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
        margin-top: 20px;
    }

    .page-game-bai__feature-item,
    .page-game-bai__game-card,
    .page-game-bai__step-item {
        padding: 20px;
    }

    .page-game-bai__icon-box-media {
        width: 150px; /* Smaller circle for mobile */
        height: 150px;
        margin-bottom: 15px;
    }

    .page-game-bai__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Maintain circularity */
    }

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

    .page-game-bai__game-card-title {
        font-size: 1.2em;
        padding: 15px 15px 8px;
    }

    .page-game-bai__game-card-description {
        padding: 0 15px 15px;
    }

    .page-game-bai__btn-play {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
    }

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

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

    .page-game-bai__step-description {
        font-size: 0.95em;
    }

    /* Advantages Section */
    .page-game-bai__advantage-list li {
        font-size: 1em;
        margin-bottom: 10px;
    }

    /* FAQ Section */
    .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: 0 20px 15px;
        font-size: 0.95em;
    }

    /* Universal image handling for content area */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    /* Specific override for circular images to maintain aspect ratio */
    .page-game-bai__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Universal button handling for content area */
    .page-game-bai__cta-button,
    .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; /* Add some padding if needed */
        padding-right: 15px; /* Add some padding if needed */
    }

    .page-game-bai__cta-buttons,
    .page-game-bai__button-group,
    .page-game-bai__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-game-bai__cta-buttons {
        flex-direction: column; /* Ensure vertical stack for multiple CTA buttons */
    }
    .page-game-bai__cta-buttons--center {
        padding: 0; /* Remove padding if center aligned and parent already has it */
    }
}