/* style/game-bai.css */

:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-section-light: #F5F7FA;
    --border-color: #E0E0E0;
}

.page-game-bai {
    font-family: Arial, sans-serif;
    color: var(--text-main-color);
    line-height: 1.6;
}

/* HERO Section */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding as shared.css handles body padding */
    padding-bottom: 60px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff; /* White text on dark gradient background */
}

.page-game-bai__hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px;
    gap: 30px;
}

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

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

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

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.page-game-bai__btn-primary {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

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

.page-game-bai__btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-game-bai__btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

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

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

/* General Section Styles */
.page-game-bai__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-game-bai__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.page-game-bai__section-description {
    font-size: 1.1em;
    color: var(--text-main-color);
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-game-bai__light-bg {
    background-color: var(--background-section-light);
    color: var(--text-main-color);
}

.page-game-bai__dark-bg {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
}

.page-game-bai__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.page-game-bai__game-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-game-bai__game-card-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__game-card-title a {
    color: var(--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: #555555;
    margin-bottom: 20px;
    padding: 0 15px;
}

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

/* Advantages Section */
.page-game-bai__advantages-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-game-bai__advantage-item {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

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

.page-game-bai__advantage-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%; /* Ensuring icons are circular if desired, but object-fit:contain */
}

.page-game-bai__advantage-title {
    font-size: 1.6em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.page-game-bai__advantage-description {
    font-size: 1em;
    color: #f0f0f0;
}

/* Guide Section */
.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: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.page-game-bai__step-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1;
}

.page-game-bai__step-title {
    font-size: 1.4em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-game-bai__step-description {
    font-size: 1em;
    color: var(--text-main-color);
}

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

.page-game-bai__promo-card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-game-bai__promo-card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
}

.page-game-bai__promo-card-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-game-bai__promo-card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.page-game-bai__promo-card-description {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
    padding: 0 15px;
}

.page-game-bai__view-all-promos {
    text-align: center;
    margin-top: 40px;
}

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

.page-game-bai__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-game-bai__faq-item[open] {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    background-color: #f9f9f9;
    border-bottom: 1px solid var(--border-color);
}

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

.page-game-bai__faq-qtext {
    flex-grow: 1;
    pointer-events: none; /* Prevent text selection from interfering with click */
}

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from interfering with click */
}

.page-game-bai__faq-item[open] .page-game-bai__faq-question {
    border-bottom: 1px solid transparent;
}

.page-game-bai__faq-answer {
    padding: 15px 20px;
    font-size: 1em;
    color: var(--text-main-color);
    background-color: var(--card-bg-color);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .page-game-bai__hero-title {
        font-size: clamp(2em, 5vw, 3em);
    }
    .page-game-bai__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* General Mobile Styles */
    .page-game-bai {
        font-size: 16px;
        line-height: 1.6;
    }

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

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

    .page-game-bai__section-description {
        font-size: 1em;
        margin-bottom: 25px;
    }

    /* HERO Section Mobile */
    .page-game-bai__hero-section {
        padding-top: 10px !important;
        padding-bottom: 30px;
    }

    .page-game-bai__hero-container {
        flex-direction: column-reverse; /* Image below content */
        text-align: center;
        gap: 20px;
    }

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

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

    .page-game-bai__hero-description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    .page-game-bai__cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .page-game-bai__btn-primary,
    .page-game-bai__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    /* Featured Games Section Mobile */
    .page-game-bai__game-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    /* Advantages Section Mobile */
    .page-game-bai__advantages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-game-bai__advantage-item {
        padding: 20px;
    }

    .page-game-bai__advantage-icon {
        width: 80px;
        height: 80px;
    }

    .page-game-bai__advantage-title {
        font-size: 1.4em;
    }

    /* Guide Section Mobile */
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-game-bai__step-item {
        padding: 20px;
    }

    /* Promotions Section Mobile */
    .page-game-bai__promo-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .page-game-bai__faq-toggle {
        font-size: 1.2em;
    }

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

    /* Universal Image Adaptation for mobile */
    .page-game-bai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__container,
    .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;
        overflow: hidden !important;
    }
}