/* style/tai-xiu.css */

:root {
    --color-primary: #C61F1F;
    --color-secondary: #E53030;
    --color-text-main: #FFF1E8;
    --color-card-bg: #2A1212;
    --color-background: #140C0C;
    --color-border: #6A1E1E;
    --color-gold: #F3C54D;
    --color-deep-red: #7E0D0D;
    --btn-gradient: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
}

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

.page-tai-xiu h1, .page-tai-xiu h2, .page-tai-xiu h3 {
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 20px;
}

.page-tai-xiu h1 {
    font-size: clamp(2.2em, 5vw, 3.5em);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu h2 {
    font-size: clamp(1.8em, 4vw, 2.8em);
    font-weight: 600;
}

.page-tai-xiu h3 {
    font-size: clamp(1.4em, 3vw, 2em);
    font-weight: 500;
    color: var(--color-text-main);
}

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

.page-tai-xiu__section-title {
    margin-top: 40px;
    margin-bottom: 30px;
    color: var(--color-gold);
}

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

/* HERO Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 60px;
    background-color: var(--color-deep-red);
}

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

.page-tai-xiu__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    text-align: left;
    color: var(--color-text-main);
}

.page-tai-xiu__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 600px;
    color: var(--color-text-main);
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

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

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

.page-tai-xiu__btn-primary {
    background: var(--btn-gradient);
    color: #ffffff;
    border: 2px solid transparent;
}

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

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--color-gold);
    color: var(--color-background);
}

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

.page-tai-xiu__hero-side-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

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

.page-tai-xiu__features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.page-tai-xiu__feature-item {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 280px;
    text-align: center;
    padding: 25px;
    background-color: var(--color-card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.page-tai-xiu__icon-box-media {
    width: 240px;
    height: 240px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-gold);
}

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

.page-tai-xiu__feature-title {
    font-size: 1.5em;
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--color-gold);
}

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

/* How-to-play Section & Game Types Section */
.page-tai-xiu__dark-section {
    background-color: var(--color-deep-red);
    color: var(--color-text-main);
    padding: 60px 0;
}

.page-tai-xiu__how-to-play-section,
.page-tai-xiu__game-types-section {
    padding: 60px 0;
}

.page-tai-xiu__content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.page-tai-xiu__content-grid:nth-child(even) {
    flex-direction: row-reverse;
}

.page-tai-xiu__text-block {
    flex: 1 1 50%;
    min-width: 300px;
    color: var(--color-text-main);
}

.page-tai-xiu__text-block p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

.page-tai-xiu__text-block a {
    color: var(--color-gold);
    text-decoration: underline;
}

.page-tai-xiu__image-block {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-tai-xiu__image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.page-tai-xiu__sub-title {
    color: var(--color-gold);
    margin-top: 25px;
    margin-bottom: 10px;
    text-align: left;
}

.page-tai-xiu__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-tai-xiu__list-item {
    margin-bottom: 20px;
}

.page-tai-xiu__list-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

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

.page-tai-xiu__faq-list {
    max-width: 800px;
    margin: 40px auto 0 auto;
}

.page-tai-xiu__faq-item {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--color-text-main);
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--color-gold);
    list-style: none;
    outline: none;
}

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

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question .page-tai-xiu__faq-toggle {
    transform: rotate(45deg);
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--color-text-main);
}

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

.page-tai-xiu__faq-answer a {
    color: var(--color-gold);
    text-decoration: underline;
}

/* Call to Action Section */
.page-tai-xiu__call-to-action-section {
    padding: 80px 0;
    background-color: var(--color-deep-red);
    text-align: center;
}

/* General Image styles */
.page-tai-xiu img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-tai-xiu__hero-section {
        padding-top: 10px !important;
        padding-bottom: 40px !important;
    }

    .page-tai-xiu__hero-container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    .page-tai-xiu__hero-content {
        text-align: center;
        flex: 1 1 100%;
    }

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

    .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        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__hero-image {
        flex: 1 1 100%;
        width: 100%;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
    }

    .page-tai-xiu__section-title {
        font-size: clamp(1.5em, 6vw, 2em);
    }

    .page-tai-xiu__sub-title {
        font-size: clamp(1.2em, 5vw, 1.5em);
    }

    /* Module 1: Intro Section (Features Grid) */
    .page-tai-xiu__intro-section {
        padding: 40px 0;
    }

    .page-tai-xiu__features-grid {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }

    .page-tai-xiu__feature-item {
        flex: 1 1 100%;
        min-width: unset;
        padding: 20px;
    }

    .page-tai-xiu__icon-box-media {
        width: 180px;
        height: 180px;
        margin-bottom: 15px;
    }

    .page-tai-xiu__icon-box-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* How-to-play & Game Types Sections */
    .page-tai-xiu__dark-section,
    .page-tai-xiu__how-to-play-section,
    .page-tai-xiu__game-types-section {
        padding: 40px 0;
    }

    .page-tai-xiu__content-grid {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
    }

    .page-tai-xiu__text-block,
    .page-tai-xiu__image-block {
        flex: 1 1 100%;
        min-width: unset;
        width: 100%;
    }

    .page-tai-xiu__image-block img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tai-xiu__list {
        padding-left: 0;
    }

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

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

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

    .page-tai-xiu__faq-answer {
        padding: 0 20px 15px 20px;
    }

    /* Call to Action Section */
    .page-tai-xiu__call-to-action-section {
        padding: 60px 0;
    }

    /* General Image and Container Responsiveness */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-tai-xiu__container,
    .page-tai-xiu__card,
    .page-tai-xiu__section,
    .page-tai-xiu__features-grid,
    .page-tai-xiu__content-grid,
    .page-tai-xiu__faq-list,
    .page-tai-xiu__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }
    .page-tai-xiu__hero-content, .page-tai-xiu__text-block {
        padding-left: 0;
        padding-right: 0;
    }
    .page-tai-xiu__hero-image {
        padding: 0;
    }
}