/* style/game-bai.css */
/* Base styles for the page content */
.page-game-bai {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #FFFFFF; /* Explicitly set for clarity, matches default body */
}

/* Container for consistent padding and max-width */
.page-game-bai__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
}

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

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

/* Highlight text within paragraphs */
.page-game-bai .highlight-text {
    color: #017439;
    font-weight: bold;
}

/* --- HERO Section --- */
.page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding as per non-homepage rule */
    padding-bottom: 60px;
    background: linear-gradient(to right, #e0ffe0, #ffffff); /* Subtle gradient for visual appeal */
}

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

.page-game-bai__hero-content {
    flex: 1 1 45%; /* Takes about 45% width, flexible */
    min-width: 300px; /* Minimum width before wrapping */
    color: #333333;
}

.page-game-bai__hero-title {
    font-size: 2.8em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
    max-width: 600px;
}

.page-game-bai__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 550px;
}

.page-game-bai__hero-image {
    flex: 1 1 45%; /* Takes about 45% width, flexible */
    min-width: 300px; /* Minimum width before wrapping */
    text-align: center;
}

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

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

/* --- Buttons (Primary & Secondary) --- */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

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

.page-game-bai__btn-primary:hover {
    background-color: #a00606;
    color: #ffff00;
}

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

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

/* Small button variant for game cards */
.page-game-bai__btn-small {
    padding: 10px 20px;
    font-size: 0.95em;
    border-radius: 6px;
}

/* --- Intro Section (3 columns with square images) --- */
.page-game-bai__intro-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: #f8fcf8; /* Light background for contrast */
}

.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: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.page-game-bai__icon-box-media {
    width: 240px; /* Fixed width */
    height: 240px; /* Fixed height to make it square */
    margin: 0 auto 25px;
    border-radius: 50%; /* Make it circular */
    overflow: hidden;
    border: 4px solid #017439;
    box-shadow: 0 0 0 8px rgba(1, 116, 57, 0.2);
}

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

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

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

/* --- Game Types Section (Dark Background) --- */
.page-game-bai__game-types-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* Light text for contrast */
}

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

.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-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.page-game-bai__game-card-content {
    padding: 20px;
    color: #333333; /* Dark text on white card background */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-game-bai__game-card-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-game-bai__game-card-text {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 20px;
}

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

.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-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.page-game-bai__guide-step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
    background-color: #e0ffe0;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

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

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

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

.page-game-bai__guide-cta img {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


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

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

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

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

.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: #017439;
    cursor: pointer;
    list-style: none; /* Hide default marker */
    position: relative;
    user-select: none;
}

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

.page-game-bai__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
    transform: rotate(45deg); /* Change '+' to 'x' or similar visual */
}

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

/* --- Final CTA Section (Dark Background) --- */
.page-game-bai__cta-final-section {
    padding-top: 60px;
    padding-bottom: 60px;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* Light text for contrast */
    text-align: center;
}

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

.page-game-bai__cta-final-section .page-game-bai__cta-buttons {
    justify-content: center; /* Center buttons */
    margin-top: 40px;
}

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

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-game-bai__container {
        padding: 20px 15px; /* Adjust padding for mobile */
    }

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

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

    /* HERO Section */
    .page-game-bai__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px;
    }
    .page-game-bai__hero-container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 30px;
    }
    .page-game-bai__hero-content,
    .page-game-bai__hero-image {
        flex: 1 1 100%;
        min-width: unset;
    }
    .page-game-bai__hero-title {
        font-size: 2em;
        text-align: center;
        max-width: 100%;
    }
    .page-game-bai__hero-description {
        font-size: 1em;
        text-align: center;
        max-width: 100%;
    }
    .page-game-bai__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Buttons */
    .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;
    }
    .page-game-bai__hero-cta-buttons,
    .page-game-bai__cta-final-section .page-game-bai__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    /* Intro Section (3 columns) */
    .page-game-bai__features-grid {
        grid-template-columns: 1fr;
    }
    .page-game-bai__icon-box-media {
        width: 200px;
        height: 200px;
        border-width: 3px;
        box-shadow: 0 0 0 6px rgba(1, 116, 57, 0.15);
    }

    /* Game Types Section (Cards) */
    .page-game-bai__game-cards-grid {
        grid-template-columns: 1fr;
    }
    .page-game-bai__game-card img {
        
    }

    /* Guide Section */
    .page-game-bai__guide-steps {
        grid-template-columns: 1fr;
    }
    .page-game-bai__guide-step-item {
        padding: 25px;
    }
    .page-game-bai__guide-step-number {
        font-size: 2em;
        width: 50px;
        height: 50px;
        line-height: 50px;
    }
    .page-game-bai__guide-cta img {
        max-width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }

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

    /* General image rules 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 {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }
}