:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --background-color: #F5F7FA;
    --border-color: #E0E0E0;
    --button-gradient: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

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

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

/* Hero Section */
.page-tai-xiu__hero-section {
    padding-top: 10px; /* Consistent with shared body padding, avoiding double */
    padding-bottom: 60px;
    background-color: var(--background-color);
    text-align: center;
}

.page-tai-xiu__hero-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
}

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

.page-tai-xiu__main-title {
    font-size: 3.2em;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
    max-width: 600px;
}

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

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

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

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

/* General 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: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

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

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

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

/* Intro Section (Module 1) */
.page-tai-xiu__intro-section {
    padding: 80px 0;
    background-color: var(--card-bg-color); /* Light background for contrast */
}

.page-tai-xiu__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

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

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

.page-tai-xiu__icon-box {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-tai-xiu__icon-box:hover {
    transform: translateY(-5px);
}

.page-tai-xiu__icon-box-media {
    width: 200px; /* Maintain square for desktop */
    height: 200px; /* Maintain square for desktop */
    aspect-ratio: 1 / 1;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--background-color);
    border: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

/* Content Area Sections */
.page-tai-xiu__game-overview-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__why-79kinh-section {
    padding: 80px 0;
}

.page-tai-xiu__game-overview-section,
.page-tai-xiu__why-79kinh-section {
    background-color: var(--background-color);
}

.page-tai-xiu__strategy-section {
    background-color: var(--primary-color); /* Dark background for this section */
    color: #ffffff; /* White text for contrast */
}

.page-tai-xiu__strategy-section .page-tai-xiu__section-title,
.page-tai-xiu__strategy-section .page-tai-xiu__sub-title,
.page-tai-xiu__strategy-section .page-tai-xiu__content-area p,
.page-tai-xiu__strategy-section .page-tai-xiu__content-area li,
.page-tai-xiu__strategy-section .page-tai-xiu__content-area strong {
    color: #ffffff; /* Ensure all text is white */
}

.page-tai-xiu__content-area {
    padding: 0 16px;
}

.page-tai-xiu__sub-title {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.page-tai-xiu__strategy-section .page-tai-xiu__sub-title {
    color: #ffffff;
}

.page-tai-xiu__content-area p {
    margin-bottom: 1em;
    font-size: 1.05em;
}

.page-tai-xiu__content-area ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.page-tai-xiu__content-area li {
    margin-bottom: 0.5em;
    font-size: 1.05em;
}

.page-tai-xiu__image-wrapper {
    margin: 40px 0;
    text-align: center;
}

.page-tai-xiu__content-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding: 80px 0;
    background-color: var(--card-bg-color);
}

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

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

.page-tai-xiu__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.3s ease;
}

.page-tai-xiu__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}

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

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

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    content: "−"; /* Change to minus when open */
}

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

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

/* Bottom CTA Section */
.page-tai-xiu__cta-bottom-section {
    padding: 80px 0;
    background-color: var(--primary-color); /* Dark background */
    color: #ffffff; /* White text for contrast */
    text-align: center;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__section-title {
    color: #ffffff;
    margin-bottom: 25px;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__section-description {
    color: #ffffff;
    margin-bottom: 40px;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
    justify-content: center;
    gap: 20px;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__btn-secondary {
    border-color: #ffffff;
    color: #ffffff;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__btn-secondary:hover {
    background-color: #ffffff;
    color: var(--primary-color);
}

/* General image rules for content area */
.page-tai-xiu img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: 2.8em;
    }
    .page-tai-xiu__section-title {
        font-size: 2.2em;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.6em;
    }
    .page-tai-xiu__hero-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* HERO Section */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Consistent with shared body padding, avoiding double */
        padding-bottom: 40px;
    }
    .page-tai-xiu__hero-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 16px;
        gap: 20px;
    }
    .page-tai-xiu__hero-content {
        flex: 1 1 100%;
        text-align: center;
        order: 2; /* Content below image */
    }
    .page-tai-xiu__hero-image {
        flex: 1 1 100%;
        order: 1; /* Image above content */
    }
    .page-tai-xiu__main-title {
        font-size: 2.2em;
        text-align: center;
        max-width: 100%;
    }
    .page-tai-xiu__hero-description {
        font-size: 1em;
        text-align: center;
        max-width: 100%;
    }
    .page-tai-xiu__hero-cta-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        padding: 0 15px; /* Add padding to container */
        box-sizing: border-box;
    }
    .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;
        padding-right: 15px;
    }

    /* Module 1 - Intro Section */
    .page-tai-xiu__intro-section {
        padding: 60px 0;
    }
    .page-tai-xiu__section-title {
        font-size: 1.8em;
        padding: 0 16px;
    }
    .page-tai-xiu__section-description {
        font-size: 0.95em;
        padding: 0 16px;
    }
    .page-tai-xiu__intro-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
        padding: 0 16px;
    }
    .page-tai-xiu__icon-box-media {
        width: 150px; /* Smaller square/circle */
        height: 150px; /* Smaller square/circle */
        margin-bottom: 15px;
    }
    .page-tai-xiu__icon-box-title {
        font-size: 1.3em;
    }
    .page-tai-xiu__icon-box-text {
        font-size: 0.95em;
    }

    /* Content Area Sections */
    .page-tai-xiu__game-overview-section,
    .page-tai-xiu__strategy-section,
    .page-tai-xiu__why-79kinh-section {
        padding: 60px 0;
    }
    .page-tai-xiu__content-area {
        padding: 0 16px;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    .page-tai-xiu__content-area p,
    .page-tai-xiu__content-area li {
        font-size: 1em;
    }
    .page-tai-xiu__content-image {
        max-width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-tai-xiu__faq-section {
        padding: 60px 0;
    }
    .page-tai-xiu__faq-list {
        padding: 0 16px;
    }
    .page-tai-xiu__faq-item summary {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-tai-xiu__faq-toggle {
        font-size: 1.3em;
    }
    .page-tai-xiu__faq-answer {
        font-size: 1em;
        padding: 0 20px 15px;
    }

    /* Bottom CTA Section */
    .page-tai-xiu__cta-bottom-section {
        padding: 60px 0;
    }
    .page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    /* Universal image responsive for mobile */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container,
    .page-tai-xiu__image-wrapper,
    .page-tai-xiu__hero-cta-buttons,
    .page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__hero-container,
    .page-tai-xiu__intro-grid {
        padding-left: 15px;
        padding-right: 15px;
    }
}