/* style/tai-xiu.css */
:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-color: #F5F7FA;
    --border-color: #E0E0E0;
}

.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color); /* Default text color for light body background */
    background-color: var(--background-color);
}

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, relying on body padding-top from shared.css */
    padding-bottom: 40px;
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #ffffff;
}

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

.page-tai-xiu__hero-content {
    flex: 1 1 500px;
    max-width: 600px;
    text-align: left;
    color: #ffffff;
}

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

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

.page-tai-xiu__hero-cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.page-tai-xiu__hero-image {
    flex: 1 1 450px;
    text-align: center;
}

.page-tai-xiu__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-tai-xiu__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.8em);
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

.page-tai-xiu__section-description {
    font-size: 1.1em;
    color: var(--text-main-color);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-tai-xiu__text-block {
    font-size: 1em;
    margin-bottom: 20px;
    color: var(--text-main-color);
}

.page-tai-xiu__image-content {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Intro Section */
.page-tai-xiu__intro-section {
    padding: 60px 16px;
    background-color: var(--background-color);
}

.page-tai-xiu__intro-container {
    max-width: 1170px;
    margin: 0 auto;
    text-align: center;
}

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

.page-tai-xiu__icon-box {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__icon-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-tai-xiu__icon-box-media {
    width: 240px;
    height: 240px;
    aspect-ratio: 1/1;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--secondary-color);
    box-shadow: 0 0 0 5px rgba(255, 90, 79, 0.3);
}

.page-tai-xiu__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.page-tai-xiu__icon-box-title {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-tai-xiu__icon-box-text {
    font-size: 1em;
    color: var(--text-main-color);
}

/* About Section */
.page-tai-xiu__about-section {
    padding: 60px 16px;
    background-color: var(--card-bg-color);
}

.page-tai-xiu__about-container {
    max-width: 1170px;
    margin: 0 auto;
}

/* How to Play Section */
.page-tai-xiu__how-to-play-section {
    padding: 60px 16px;
    background-color: var(--background-color);
}

.page-tai-xiu__how-to-play-container {
    max-width: 1170px;
    margin: 0 auto;
    text-align: center;
}

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

.page-tai-xiu__step-item {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.page-tai-xiu__step-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-tai-xiu__step-text {
    font-size: 1em;
    color: var(--text-main-color);
}

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

/* Benefits Section */
.page-tai-xiu__benefits-section {
    padding: 60px 16px;
    background-color: var(--card-bg-color);
}

.page-tai-xiu__benefits-container {
    max-width: 1170px;
    margin: 0 auto;
    text-align: center;
}

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

.page-tai-xiu__benefit-card {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    transition: background-color 0.3s ease;
}

.page-tai-xiu__benefit-card:hover {
    background-color: #f0f2f5;
}

.page-tai-xiu__card-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-tai-xiu__card-text {
    font-size: 1em;
    color: var(--text-main-color);
}

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding: 60px 16px;
    background-color: var(--background-color);
}

.page-tai-xiu__faq-container {
    max-width: 900px;
    margin: 0 auto;
}

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

.page-tai-xiu__faq-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-tai-xiu__faq-item[open] > .page-tai-xiu__faq-question {
    background-color: #f9f9f9;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--secondary-color);
    margin-left: 15px;
}

.page-tai-xiu__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1em;
    color: var(--text-main-color);
    border-top: 1px solid var(--border-color);
}

.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
}

/* CTA Bottom Section */
.page-tai-xiu__cta-bottom-section {
    padding: 60px 16px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    text-align: center;
    color: #ffffff;
}

.page-tai-xiu__cta-bottom-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-tai-xiu__cta-bottom-title {
    font-size: clamp(2em, 4vw, 3em);
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-tai-xiu__cta-bottom-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Buttons */
.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__btn-secondary {
    background-color: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

    .page-tai-xiu__hero-content {
        text-align: center;
        max-width: 100%;
    }

    .page-tai-xiu__hero-cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .page-tai-xiu {
        font-size: 16px;
        line-height: 1.6;
    }

    /* HERO Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }

    .page-tai-xiu__hero-container {
        padding: 30px 15px;
        gap: 30px;
    }

    .page-tai-xiu__hero-title {
        font-size: 2.2em; /* Smaller H1 for mobile */
        margin-bottom: 15px;
    }

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

    /* Buttons */
    .page-tai-xiu__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 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: 12px 20px;
        font-size: 1em;
    }

    .page-tai-xiu__cta-center .page-tai-xiu__btn-primary {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto;
        display: block;
    }

    .page-tai-xiu__cta-bottom-section .page-tai-xiu__btn-primary {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto;
        display: block;
    }

    /* Intro Section */
    .page-tai-xiu__intro-section {
        padding: 40px 15px;
    }

    .page-tai-xiu__section-title {
        font-size: 2em;
    }

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

    .page-tai-xiu__intro-grid {
        grid-template-columns: 1fr; /* Single column for icon boxes */
    }

    .page-tai-xiu__icon-box-media {
        width: 200px; /* Maintain square aspect ratio */
        height: 200px;
        border-width: 4px;
    }

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

    /* How to Play Section */
    .page-tai-xiu__how-to-play-section {
        padding: 40px 15px;
    }

    .page-tai-xiu__steps-grid {
        grid-template-columns: 1fr; /* Single column for steps */
    }

    /* Benefits Section */
    .page-tai-xiu__benefits-section {
        padding: 40px 15px;
    }

    .page-tai-xiu__benefits-grid {
        grid-template-columns: 1fr; /* Single column for benefit cards */
    }

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

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

    .page-tai-xiu__faq-toggle {
        font-size: 1.2em;
    }

    .page-tai-xiu__faq-answer {
        padding: 10px 20px 20px;
        font-size: 0.95em;
    }

    /* CTA Bottom Section */
    .page-tai-xiu__cta-bottom-section {
        padding: 40px 15px;
    }

    .page-tai-xiu__cta-bottom-title {
        font-size: 2em;
    }

    .page-tai-xiu__cta-bottom-text {
        font-size: 1em;
    }

    /* General Images and Containers */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tai-xiu__section, 
    .page-tai-xiu__card, 
    .page-tai-xiu__container,
    .page-tai-xiu__intro-container,
    .page-tai-xiu__about-container,
    .page-tai-xiu__how-to-play-container,
    .page-tai-xiu__benefits-container,
    .page-tai-xiu__faq-container,
    .page-tai-xiu__cta-bottom-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}