/* style/tai-xiu.css */

/* Base styles for the page-tai-xiu */
.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.page-tai-xiu__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-tai-xiu__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-tai-xiu__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-tai-xiu strong {
    color: #017439;
}

/* Button styles */
.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-width: 100%; /* Default for all buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-tai-xiu__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

.page-tai-xiu__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-tai-xiu__btn-secondary {
    background-color: #FFFFFF;
    color: #017439;
    border: 2px solid #017439;
}

.page-tai-xiu__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #005f2c;
    border-color: #005f2c;
}

.page-tai-xiu__cta-center {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding, body handles header offset */
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limit height for aesthetic */
    margin-bottom: 20px; /* Space between image and content */
}

.page-tai-xiu__hero-content {
    max-width: 900px;
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
    color: #017439;
    margin-bottom: 15px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-tai-xiu__intro-description {
    font-size: 1.3em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 500px; /* Limit width of button group */
    margin: 0 auto;
}

/* Dark Section styles */
.page-tai-xiu__dark-section {
    background-color: #017439;
    color: #ffffff;
    padding: 60px 0;
}

.page-tai-xiu__dark-section .page-tai-xiu__section-title {
    color: #ffffff;
}

.page-tai-xiu__dark-section .page-tai-xiu__text-block {
    color: #f0f0f0;
}

.page-tai-xiu__dark-section strong {
    color: #FFFF00;
}

/* About Section */
.page-tai-xiu__about-section {
    padding: 60px 0;
}

.page-tai-xiu__image-content {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

/* Why Play Section */
.page-tai-xiu__why-play-section {
    padding: 60px 0;
}

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

.page-tai-xiu__feature-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 350px; /* Ensure cards have some height */
}

.page-tai-xiu__feature-card:hover {
    transform: translateY(-5px);
}

.page-tai-xiu__feature-card .page-tai-xiu__card-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-tai-xiu__feature-card .page-tai-xiu__card-description {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-tai-xiu__feature-card .page-tai-xiu__card-image {
    width: 100%;
    max-width: 250px; /* Smaller image within card */
    height: auto;
    border-radius: 5px;
    object-fit: cover;
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

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

.page-tai-xiu__guide-list {
    list-style: none;
    padding: 0;
    counter-reset: guide-step;
}

.page-tai-xiu__guide-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 70px;
}

.page-tai-xiu__guide-item::before {
    counter-increment: guide-step;
    content: "Bước " counter(guide-step);
    position: absolute;
    left: 25px;
    top: 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFFF00; /* Highlight step number */
}

.page-tai-xiu__guide-item .page-tai-xiu__guide-step-title {
    font-size: 1.4em;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-tai-xiu__guide-item p {
    color: #f0f0f0;
}

/* Tips Section */
.page-tai-xiu__tips-section {
    padding: 60px 0;
}

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

.page-tai-xiu__tip-card {
    background-color: #ffffff;
    border-left: 5px solid #017439;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 25px;
    transition: transform 0.3s ease;
}

.page-tai-xiu__tip-card:hover {
    transform: translateY(-5px);
}

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

.page-tai-xiu__tip-card .page-tai-xiu__card-description {
    font-size: 1em;
    color: #555555;
}

/* Other Games Section */
.page-tai-xiu__other-games-section {
    padding: 60px 0;
}

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

.page-tai-xiu__game-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-tai-xiu__game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__game-card .page-tai-xiu__card-image {
    width: 100%;
    height: 180px; /* Fixed height for consistency */
    object-fit: cover;
    min-width: 200px; /* Ensure minimum size */
    min-height: 180px; /* Ensure minimum size */
}

.page-tai-xiu__game-card .page-tai-xiu__card-title {
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 10px;
    color: #FFFF00;
}

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

.page-tai-xiu__faq-list {
    margin-top: 40px;
}

.page-tai-xiu__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    background-color: #f9f9f9;
    user-select: none;
    list-style: none; /* For <details> summary */
}

.page-tai-xiu__faq-question::-webkit-details-marker {
    display: none;
}

.page-tai-xiu__faq-question::marker {
    display: none;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #017439;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' or '-' */
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px;
    font-size: 1.1em;
    color: #555555;
    line-height: 1.6;
}

/* General image styling to ensure minimum size and responsiveness */
.page-tai-xiu img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Ensure images cover their area without distortion */
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__container {
        padding: 15px;
    }

    .page-tai-xiu__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .page-tai-xiu__hero-image {
        max-height: 400px;
    }

    .page-tai-xiu__intro-description {
        font-size: 1.2em;
    }

    .page-tai-xiu__feature-grid,
    .page-tai-xiu__tips-grid,
    .page-tai-xiu__game-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .page-tai-xiu__feature-card {
        min-height: 320px;
    }

    .page-tai-xiu__guide-item {
        padding-left: 60px;
    }

    .page-tai-xiu__guide-item::before {
        left: 20px;
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Small top padding, body handles header offset */
    }

    .page-tai-xiu__hero-image {
        max-height: 300px !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tai-xiu__hero-content {
        padding: 0 15px 30px;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(2em, 8vw, 2.8em) !important; /* Smaller on mobile */
        margin-bottom: 10px;
    }

    .page-tai-xiu__intro-description {
        font-size: 1em !important;
        margin-bottom: 20px;
    }

    /* 深色导语区 (About Section in dark theme) */
    .page-tai-xiu__about-section.page-tai-xiu__dark-section,
    .page-tai-xiu__guide-section.page-tai-xiu__dark-section,
    .page-tai-xiu__other-games-section.page-tai-xiu__dark-section {
        padding: 40px 0 !important;
    }

    .page-tai-xiu__section-title {
        font-size: 1.8em !important;
        margin-bottom: 25px !important;
        padding: 0 15px;
    }

    .page-tai-xiu__text-block {
        font-size: 0.95em !important;
        padding: 0 15px;
    }

    /* 博客网格 (Feature Grid / Tips Grid / Game Grid) - All use similar grid patterns */
    .page-tai-xiu__feature-grid,
    .page-tai-xiu__tips-grid,
    .page-tai-xiu__game-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 25px !important;
        padding: 0 15px;
    }

    .page-tai-xiu__feature-card,
    .page-tai-xiu__tip-card,
    .page-tai-xiu__game-card {
        padding: 20px !important;
        min-height: auto !important;
    }

    .page-tai-xiu__feature-card .page-tai-xiu__card-title,
    .page-tai-xiu__tip-card .page-tai-xiu__card-title,
    .page-tai-xiu__game-card .page-tai-xiu__card-title {
        font-size: 1.3em !important;
    }

    .page-tai-xiu__feature-card .page-tai-xiu__card-description,
    .page-tai-xiu__tip-card .page-tai-xiu__card-description {
        font-size: 0.9em !important;
    }

    .page-tai-xiu__game-card .page-tai-xiu__card-image {
        height: 150px !important;
        min-height: 150px !important;
    }

    /* 通用图片与容器 */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-tai-xiu__container,
    .page-tai-xiu__hero-section,
    .page-tai-xiu__about-section,
    .page-tai-xiu__why-play-section,
    .page-tai-xiu__guide-section,
    .page-tai-xiu__tips-section,
    .page-tai-xiu__other-games-section,
    .page-tai-xiu__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 按钮与按钮容器 */
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary,
    .page-tai-xiu a[class*="button"],
    .page-tai-xiu 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 padding for text */
        padding-right: 15px; /* Add padding for text */
    }
    
    .page-tai-xiu__cta-buttons,
    .page-tai-xiu__button-group,
    .page-tai-xiu__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important; /* Space between stacked buttons */
    }

    /* FAQ 与其他模块 */
    .page-tai-xiu__faq-item {
        margin-bottom: 10px !important;
    }

    .page-tai-xiu__faq-question {
        padding: 15px 20px !important;
        font-size: 1.1em !important;
    }

    .page-tai-xiu__faq-answer {
        padding: 0 20px 15px !important;
        font-size: 1em !important;
    }

    .page-tai-xiu__guide-item {
        padding-left: 50px !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .page-tai-xiu__guide-item::before {
        left: 15px !important;
        top: 20px !important;
        font-size: 1em !important;
    }

    .page-tai-xiu__guide-item .page-tai-xiu__guide-step-title {
        font-size: 1.2em !important;
    }
}

@media (max-width: 549px) {
    .page-tai-xiu__feature-grid,
    .page-tai-xiu__tips-grid,
    .page-tai-xiu__game-grid {
        grid-template-columns: 1fr !important;
    }
}