.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: #FFF1E8; /* Main text color for dark body background */
    line-height: 1.6;
}

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

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

.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, body handles main offset */
    padding-bottom: 60px;
    background: linear-gradient(180deg, #7E0D0D 0%, #140C0C 100%); /* Deep Red to Background color gradient */
}

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

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

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
    color: #FFB04A; /* Goldish for main title */
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.page-tai-xiu__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #FFF1E8;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary,
.page-tai-xiu__btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons don't overflow */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
}

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #140C0C; /* Dark text for bright button */
    border: none;
}

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

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

.page-tai-xiu__btn-secondary:hover {
    background: #FFB04A;
    color: #140C0C;
    transform: translateY(-2px);
}

.page-tai-xiu__btn-link {
    background: transparent;
    color: #F3C54D;
    border: 1px solid #F3C54D;
    padding: 8px 20px;
    font-size: 0.9em;
}

.page-tai-xiu__btn-link:hover {
    background: #F3C54D;
    color: #140C0C;
}

.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;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Dark section styles */
.page-tai-xiu__dark-section {
    background-color: #2A1212; /* Card BG color */
    color: #FFF1E8;
    padding: 60px 0;
}

/* Intro section */
.page-tai-xiu__intro-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.page-tai-xiu__intro-text {
    flex: 1 1 55%;
    min-width: 300px;
}

.page-tai-xiu__intro-image {
    flex: 1 1 35%;
    min-width: 200px;
    text-align: center;
}

.page-tai-xiu__icon-box-media {
    width: 300px; /* Fixed width for circular image */
    height: 300px; /* Fixed height for circular image */
    aspect-ratio: 1/1;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #6A1E1E; /* Border color */
    box-shadow: 0 0 0 8px rgba(255, 176, 74, 0.2); /* Goldish glow */
}

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

/* Rules section */
.page-tai-xiu__rules-section {
    padding: 60px 0;
}

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

.page-tai-xiu__rules-text {
    flex: 1 1 55%;
    min-width: 300px;
}

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

.page-tai-xiu__image-content {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__rules-text ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.page-tai-xiu__rules-text li {
    margin-bottom: 10px;
}

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

.page-tai-xiu__guide-item {
    background-color: #140C0C; /* Darker background for guide steps */
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #6A1E1E;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__guide-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%);
    color: #140C0C;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 15px;
}

.page-tai-xiu__guide-item-title {
    font-size: 1.3em;
    color: #F3C54D;
    margin-bottom: 10px;
}

.page-tai-xiu__guide-cta {
    text-align: center;
    margin-top: 50px;
}

/* Betting types section */
.page-tai-xiu__betting-types-section {
    padding: 60px 0;
}

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

.page-tai-xiu__card {
    background-color: #2A1212; /* Card BG color */
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #6A1E1E;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #FFF1E8;
}

.page-tai-xiu__betting-card-title {
    font-size: 1.4em;
    color: #F3C54D;
    margin-bottom: 15px;
}

.page-tai-xiu__betting-image {
    margin-top: 40px;
}

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

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

.page-tai-xiu__tip-item-title {
    font-size: 1.4em;
    color: #F3C54D;
    margin-bottom: 15px;
}

.page-tai-xiu__tips-image {
    margin-top: 40px;
}

/* Promo section */
.page-tai-xiu__promo-section {
    padding: 60px 0;
}

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

.page-tai-xiu__promo-card-title {
    font-size: 1.4em;
    color: #F3C54D;
    margin-bottom: 15px;
}

.page-tai-xiu__promo-card p {
    margin-bottom: 20px;
}

.page-tai-xiu__promo-image {
    margin-top: 40px;
}

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

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

.page-tai-xiu__faq-item {
    background-color: #140C0C; /* Darker background for FAQ items */
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #6A1E1E;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFB04A;
    cursor: pointer;
    background-color: #2A1212; /* Card BG color */
    border-bottom: 1px solid #6A1E1E;
    transition: background-color 0.3s ease;
    list-style: none; /* For details/summary */
}

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

.page-tai-xiu__faq-question:hover {
    background-color: #3a1a1a;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
    border-bottom: 1px solid #6A1E1E;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #F3C54D;
}

.page-tai-xiu__faq-answer {
    padding: 20px 25px;
    font-size: 1.05em;
    color: #FFF1E8;
}

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

/* Conclusion section */
.page-tai-xiu__conclusion-section {
    padding: 60px 0;
    text-align: center;
}

.page-tai-xiu__conclusion-section p {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__conclusion-cta {
    margin-top: 30px;
}

/* General image styling for content areas */
.page-tai-xiu img:not(.page-tai-xiu__icon-box-media img) {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-container {
        padding: 30px 16px;
        gap: 30px;
    }

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

    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    .page-tai-xiu__hero-content,
    .page-tai-xiu__hero-image,
    .page-tai-xiu__intro-text,
    .page-tai-xiu__intro-image,
    .page-tai-xiu__rules-text,
    .page-tai-xiu__rules-image {
        flex: 1 1 100%; /* Stack columns */
        text-align: center;
    }

    .page-tai-xiu__icon-box-media {
        width: 250px;
        height: 250px;
    }

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

@media (max-width: 768px) {
    /* HERO section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile, body handles main offset */
        padding-bottom: 40px;
    }

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

    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        text-align: center;
    }

    .page-tai-xiu__description {
        font-size: 1em;
        text-align: center;
        margin-bottom: 20px;
    }

    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
    }

    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 15px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-tai-xiu__hero-image {
        order: -1; /* Image above text on mobile */
    }

    .page-tai-xiu__hero-side-image {
        max-width: 100%;
        height: auto;
    }

    /* Module 1 three-column circular images */
    .page-tai-xiu__icon-box-media {
        width: 200px;
        height: 200px;
        border: 3px solid #6A1E1E;
        box-shadow: 0 0 0 6px rgba(255, 176, 74, 0.2);
    }

    /* General content area */
    .page-tai-xiu__content-area {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    /* Rules section grid */
    .page-tai-xiu__rules-grid {
        flex-direction: column;
        gap: 20px;
    }

    .page-tai-xiu__rules-image {
        order: -1; /* Image above text on mobile */
    }

    /* Guide section grid */
    .page-tai-xiu__guide-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Betting types section grid */
    .page-tai-xiu__betting-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Tips section grid */
    .page-tai-xiu__tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Promo section grid */
    .page-tai-xiu__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* FAQ section */
    .page-tai-xiu__faq-list {
        margin-top: 30px;
    }

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

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

    /* General images and containers for mobile */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__rules-text,
    .page-tai-xiu__intro-text {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__rules-text ul {
        padding-left: 15px;
    }
}