.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light body background */
    background-color: #F5F7FA; /* General background for the page */
}

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 40px;
    background: linear-gradient(180deg, #F5F7FA 0%, #FFFFFF 100%); /* Light gradient background */
}

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

.page-tai-xiu__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    color: #333333;
}

.page-tai-xiu__hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    color: #E53935; /* Brand primary color for H1 */
    margin-bottom: 20px;
}

.page-tai-xiu__hero-description {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #333333;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure button doesn't exceed container width */
}

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

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

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

.page-tai-xiu__btn-secondary:hover {
    background: #E53935;
    color: #ffffff;
}

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

.page-tai-xiu__side-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block; /* Ensure it behaves as a block element */
    margin: 0 auto;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

/* General Section Styling */
.page-tai-xiu__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 40px 16px;
    box-sizing: border-box;
    overflow: hidden; /* Prevent content overflow */
}

.page-tai-xiu__section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    color: #E53935;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.3;
}

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

.page-tai-xiu__text-block {
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #333333;
}

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

.page-tai-xiu__text-block a {
    color: #FF5A4F;
    text-decoration: underline;
}

.page-tai-xiu__text-block a:hover {
    color: #E53935;
}

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

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

.page-tai-xiu__feature-item {
    text-align: center;
    padding: 25px;
    background-color: #F5F7FA;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

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

.page-tai-xiu__icon-box-media {
    width: 240px; /* Fixed width for circular image */
    height: 240px; /* Fixed height for circular image */
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #E53935;
    box-shadow: 0 0 0 5px rgba(229, 57, 53, 0.2);
    min-width: 200px; /* Enforce minimum size for feature images */
    min-height: 200px; /* Enforce minimum size for feature images */
}

.page-tai-xiu__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image fills the circle without distortion */
    display: block;
    border-radius: 50%; /* Ensure image itself is circular */
}

.page-tai-xiu__feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #E53935;
    margin-bottom: 10px;
}

.page-tai-xiu__feature-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
}

/* Content Area - Rules Section */
.page-tai-xiu__content-area {
    padding: 60px 0;
    background-color: #E53935; /* Dark background for this section */
}

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

.page-tai-xiu__rule-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-tai-xiu__rule-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #FF5A4F;
    margin-bottom: 10px;
}

.page-tai-xiu__rule-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f0f0f0;
}

.page-tai-xiu__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

/* Guide Section - Tips */
.page-tai-xiu__guide-section {
    padding: 60px 0;
    background-color: #F5F7FA;
}

.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-item {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__tip-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #E53935;
    margin-bottom: 10px;
}

.page-tai-xiu__tip-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
}

/* Promo Section - Advantages */
.page-tai-xiu__promo-section {
    padding: 60px 0;
    background-color: #E53935;
}

.page-tai-xiu__advantages-list {
    list-style: none;
    padding: 0;
    margin: 40px auto 0;
    max-width: 900px;
    color: #f0f0f0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-tai-xiu__advantages-list li {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 5px solid #FF5A4F;
}

.page-tai-xiu__advantages-list li strong {
    color: #ffffff;
    font-weight: 700;
}

/* CTA Section */
.page-tai-xiu__cta-section {
    padding: 60px 0;
    background-color: #FFFFFF;
    text-align: center;
}

.page-tai-xiu__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-tai-xiu__cta-buttons--centered {
    justify-content: center;
    margin-top: 30px;
}

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

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

.page-tai-xiu__faq-item {
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    background-color: #ffffff;
    border-bottom: 1px solid #E0E0E0;
    list-style: none; /* Hide default marker for details */
}

.page-tai-xiu__faq-question::-webkit-details-marker,
.page-tai-xiu__faq-question::marker {
    display: none; /* Hide default marker for details in webkit and standard */
}

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

.page-tai-xiu__faq-qtext {
    flex-grow: 1;
    color: #E53935;
}

.page-tai-xiu__faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E53935;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg); /* Rotate to form an 'X' or similar */
}

.page-tai-xiu__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1rem;
    line-height: 1.7;
    color: #555555;
    background-color: #fdfdfd;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .page-tai-xiu__hero-content,
    .page-tai-xiu__hero-image {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .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, no header offset here */
        padding-bottom: 30px;
    }
    .page-tai-xiu__hero-container {
        padding: 30px 15px;
        gap: 20px;
    }
    .page-tai-xiu__hero-title {
        font-size: 2rem !important;
        margin-bottom: 15px;
    }
    .page-tai-xiu__hero-description {
        font-size: 1rem !important;
        margin-bottom: 25px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100% !important; /* Ensure container takes full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__btn-primary,
    .page-tai-xiu__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.95rem !important;
        padding: 12px 20px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-tai-xiu__side-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Module 1 Three-Column Circular Images */
    .page-tai-xiu__feature-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-tai-xiu__icon-box-media {
        width: 200px !important; /* Remain circular */
        height: 200px !important; /* Remain circular */
        border-width: 3px;
        box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
    }
    .page-tai-xiu__icon-box-media img {
        width: 100% !important;
        height: 100% !important;
    }

    /* Content Modules (Rules, Guide, Promo, FAQ) */
    .page-tai-xiu__container {
        padding: 30px 15px !important; /* Adjust padding for all containers */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-tai-xiu__section-title {
        font-size: 1.6rem !important;
        margin-bottom: 20px;
    }
    .page-tai-xiu__text-block {
        font-size: 0.95rem !important;
        margin-bottom: 20px;
    }
    .page-tai-xiu__rules-grid,
    .page-tai-xiu__tips-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }
    .page-tai-xiu__advantages-list {
        margin-top: 20px;
        font-size: 0.95rem !important;
    }
    .page-tai-xiu__advantages-list li {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    /* Universal Image Adaptation */
    .page-tai-xiu img:not(.page-tai-xiu__icon-box-media img) {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-tai-xiu__faq-list {
        margin-top: 20px;
    }
    .page-tai-xiu__faq-question {
        font-size: 1rem !important;
        padding: 15px 20px;
    }
    .page-tai-xiu__faq-qtext {
        font-size: 1rem !important;
    }
    .page-tai-xiu__faq-toggle {
        font-size: 1.2rem !important;
    }
    .page-tai-xiu__faq-answer {
        font-size: 0.9rem !important;
        padding: 10px 20px 15px;
    }
}