/* style/game-bai.css */

/* General styles for .page-game-bai scope */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #1F2D3D; /* Default text color for light backgrounds */
    background-color: #F4F7FB; /* Default background for the page content area */
}

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

.page-game-bai__section-title {
    font-size: 2.5em;
    color: #1F2D3D;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

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

/* Button styles */
.page-game-bai__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

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

.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    background: #ffffff;
    color: #2F6BFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    border: 2px solid #2F6BFF;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-game-bai__btn-secondary:hover {
    background: #2F6BFF;
    color: #ffffff;
}

.page-game-bai__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    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: #F4F7FB; /* Light background for hero section */
}

.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;
    color: #1F2D3D;
    text-align: left;
}

.page-game-bai__hero-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
    color: #1F2D3D;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-game-bai__hero-description {
    font-size: 1.2em;
    color: #1F2D3D;
    margin-bottom: 30px;
}

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

.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; /* Ensure it behaves as a block element for max-width */
}

/* Intro Section (Module 1) */
.page-game-bai__intro-section {
    background-color: #ffffff;
    padding: 60px 0;
}

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

.page-game-bai__feature-item {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #D6E2FF;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__icon-box-media {
    width: 200px; /* Fixed width */
    height: 200px; /* Fixed height to ensure square/circle */
    margin: 0 auto 20px;
    border-radius: 50%; /* Make it circular */
    overflow: hidden;
    border: 5px solid #A5C4FF; /* Glow color border */
    box-shadow: 0 0 15px rgba(165, 196, 255, 0.6); /* Soft glow effect */
}

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

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

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

/* Games Showcase Section */
.page-game-bai__games-showcase-section {
    background-color: #F4F7FB;
    padding: 60px 0;
}

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

.page-game-bai__game-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
    border: 1px solid #D6E2FF;
    display: flex;
    flex-direction: column;
}

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

.page-game-bai__game-card-title {
    font-size: 1.4em;
    color: #2F6BFF;
    margin: 20px 15px 10px;
    font-weight: bold;
}

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

.page-game-bai__game-card-title a:hover {
    color: #1F2D3D;
}

.page-game-bai__game-card-description {
    font-size: 0.95em;
    color: #1F2D3D;
    padding: 0 15px 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-game-bai__game-card-btn {
    margin: 0 15px 20px;
    width: calc(100% - 30px); /* Adjust button width within card padding */
}

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

.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-item {
    background: #FFFFFF;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #D6E2FF;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.page-game-bai__guide-step-image {
    width: 100%;
    height: auto;
    max-height: 250px; /* Limit height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-game-bai__guide-step-title {
    font-size: 1.4em;
    color: #2F6BFF;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-game-bai__guide-step-text {
    font-size: 1em;
    color: #1F2D3D;
    flex-grow: 1;
}

.page-game-bai__guide-cta {
    margin-top: 60px;
}

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

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

.page-game-bai__promo-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
    border: 1px solid #D6E2FF;
    display: flex;
    flex-direction: column;
}

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

.page-game-bai__promo-card-title {
    font-size: 1.4em;
    color: #2F6BFF;
    margin: 20px 15px 10px;
    font-weight: bold;
}

.page-game-bai__promo-card-text {
    font-size: 0.95em;
    color: #1F2D3D;
    padding: 0 15px 20px;
    flex-grow: 1;
}

.page-game-bai__promo-card-btn {
    margin: 0 15px 20px;
    width: calc(100% - 30px);
}

/* Trust Section */
.page-game-bai__trust-section {
    background-color: #ffffff;
    padding: 60px 0;
}

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

.page-game-bai__trust-item {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #D6E2FF;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-game-bai__trust-icon {
    width: 120px; /* Fixed size for trust icons */
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
}

.page-game-bai__trust-item-title {
    font-size: 1.5em;
    color: #2F6BFF;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-game-bai__trust-item-text {
    font-size: 1em;
    color: #1F2D3D;
}

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

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

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

.page-game-bai__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    color: #1F2D3D;
    cursor: pointer;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
    list-style: none; /* Hide default details marker */
}

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

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

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

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

.page-game-bai__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #1F2D3D;
    line-height: 1.6;
    max-height: 0; /* Initial state for smooth transition */
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-answer {
    max-height: 2000px; /* Large enough for content, adjust if needed */
}

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

.page-game-bai__cta-final-section .page-game-bai__container {
    background: #2F6BFF; /* Dark background from brand color */
    color: #ffffff;
    border-radius: 12px;
    padding: 60px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-game-bai__cta-final-section .page-game-bai__section-title,
.page-game-bai__cta-final-section .page-game-bai__section-description {
    color: #ffffff;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-game-bai__hero-container {
        flex-direction: column;
        text-align: center;
    }

    .page-game-bai__hero-content {
        text-align: center;
    }
}

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

    .page-game-bai__container {
        padding: 20px 15px;
    }

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

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

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

    .page-game-bai__hero-title {
        font-size: clamp(2em, 8vw, 2.5em);
    }

    .page-game-bai__hero-description {
        font-size: 1em;
    }

    .page-game-bai__hero-cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 15px;
    }

    .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;
        padding-right: 15px;
    }

    /* Module 1: Intro Section (features) */
    .page-game-bai__intro-section {
        padding: 40px 0;
    }
    .page-game-bai__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__icon-box-media {
        width: 150px;
        height: 150px;
        border: 3px solid #A5C4FF;
        box-shadow: 0 0 10px rgba(165, 196, 255, 0.6);
    }
    .page-game-bai__icon-box-media img {
        max-width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Games Showcase Section */
    .page-game-bai__games-showcase-section {
        padding: 40px 0;
    }
    .page-game-bai__game-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__game-card-image {
        height: 180px;
    }

    /* Guide Section */
    .page-game-bai__guide-section {
        padding: 40px 0;
    }
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__guide-step-image {
        max-height: 200px;
    }
    .page-game-bai__guide-cta {
        margin-top: 40px;
    }

    /* Promo Section */
    .page-game-bai__promo-section {
        padding: 40px 0;
    }
    .page-game-bai__promo-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__promo-card-image {
        height: 180px;
    }

    /* Trust Section */
    .page-game-bai__trust-section {
        padding: 40px 0;
    }
    .page-game-bai__trust-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-game-bai__trust-icon {
        width: 100px;
        height: 100px;
    }

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

    /* Final CTA Section */
    .page-game-bai__cta-final-section {
        padding: 50px 0;
    }
    .page-game-bai__cta-final-section .page-game-bai__container {
        padding: 40px 20px;
    }

    /* Universal image responsiveness for content images */
    .page-game-bai img:not(.page-game-bai__icon-box-media img) {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-game-bai__section,
    .page-game-bai__card,
    .page-game-bai__container,
    .page-game-bai__game-card,
    .page-game-bai__promo-card,
    .page-game-bai__guide-step-item,
    .page-game-bai__trust-item,
    .page-game-bai__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}