/* Base styles for the Tài Xỉu page */
.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Text Main */
    background-color: #F5F7FA; /* Background */
    line-height: 1.6;
}

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

.page-tai-xiu__section-title {
    font-size: 2.5em;
    color: #E53935; /* Main color */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-tai-xiu__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-tai-xiu__list {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

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

/* Hero Section */
.page-tai-xiu__hero-section {
    background-color: #FFFFFF; /* Card BG */
    padding-top: 10px; /* Small top padding, shared.css handles body padding-top */
    padding-bottom: 60px;
}

.page-tai-xiu__hero-section .page-tai-xiu__container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
}

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

.page-tai-xiu__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* H1 font size clamp */
    color: #E53935; /* Main color */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: bold;
}

.page-tai-xiu__hero-description {
    font-size: 1.2em;
    color: #333333; /* Text Main */
    margin-bottom: 30px;
}

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

.page-tai-xiu__main-visual {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    max-width: 100%; /* Ensure button doesn't overflow */
}

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

.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;
}

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

/* Rules Section */
.page-tai-xiu__rules-section {
    padding: 60px 0;
    background-color: #FFFFFF; /* Card BG */
}

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

.page-tai-xiu__content-grid--reverse {
    flex-direction: row-reverse;
}

.page-tai-xiu__content-grid .page-tai-xiu__text-block,
.page-tai-xiu__content-grid .page-tai-xiu__image-block {
    flex: 1 1 45%;
    min-width: 300px;
}

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

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

/* Platform Advantage Section (Dark Background) */
.page-tai-xiu__platform-advantage-section {
    padding: 60px 0;
    background-color: #E53935; /* Main color */
    color: #ffffff; /* White text for dark background */
}

.page-tai-xiu__platform-advantage-section .page-tai-xiu__section-title {
    color: #ffffff;
}

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

.page-tai-xiu__card {
    background-color: #ffffff; /* Card BG */
    color: #333333; /* Text Main */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.page-tai-xiu__card-title {
    font-size: 1.5em;
    color: #E53935; /* Main color */
    margin-bottom: 15px;
    font-weight: bold;
}

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

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

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

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

.page-tai-xiu__faq-item {
    background-color: #F5F7FA; /* Background */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #E0E0E0; /* Border */
}

.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: #333333; /* Text Main */
    cursor: pointer;
    background-color: #FFFFFF; /* Card BG */
    border-bottom: 1px solid #E0E0E0; /* Border */
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
    border-bottom: none;
}

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

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

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

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    content: "\2212"; /* Minus sign */
}

.page-tai-xiu__faq-answer {
    padding: 15px 25px 25px;
    font-size: 1em;
    color: #333333; /* Text Main */
}

/* Call to Action Section */
.page-tai-xiu__call-to-action-section {
    padding: 60px 0;
    background-color: #F5F7FA; /* Background */
    text-align: center;
}

.page-tai-xiu__call-to-action-section .page-tai-xiu__section-title {
    margin-bottom: 20px;
}

.page-tai-xiu__call-to-action-section .page-tai-xiu__text-block {
    max-width: 800px;
    margin: 0 auto 30px;
}

/* --- Responsive Styles --- */

/* Tablet and Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-tai-xiu__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

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

    .page-tai-xiu__hero-section .page-tai-xiu__container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .page-tai-xiu__hero-image {
        order: -1; /* Image appears above content on smaller screens */
    }

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

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

    .page-tai-xiu__content-grid--reverse {
        flex-direction: column; /* Ensure reverse order is also column */
    }

    .page-tai-xiu__card {
        padding: 25px;
    }

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

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


/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* HERO section (first content section) */
    .page-tai-xiu__hero-section {
        padding-top: 10px !important; /* Small top padding, shared.css handles body padding-top */
        padding-bottom: 40px;
    }

    .page-tai-xiu__hero-section .page-tai-xiu__container {
        padding-top: 20px;
        padding-bottom: 20px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__hero-image {
        order: -1; /* Image appears above content on smaller screens */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__main-visual {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em); /* Adjust H1 for smaller screens */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__hero-description {
        font-size: 1em;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Buttons and button containers */
    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 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-left: 15px; /* Add internal padding */
        padding-right: 15px; /* Add internal padding */
    }

    /* General content sections */
    .page-tai-xiu__intro-section,
    .page-tai-xiu__rules-section,
    .page-tai-xiu__strategy-section,
    .page-tai-xiu__platform-advantage-section,
    .page-tai-xiu__faq-section,
    .page-tai-xiu__call-to-action-section {
        padding: 40px 0; /* Reduce vertical padding */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__section-title {
        font-size: 1.8em; /* Adjust section titles */
        margin-bottom: 30px;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__text-block,
    .page-tai-xiu__list {
        font-size: 1em; /* Adjust text size */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Content grid for rules and strategy */
    .page-tai-xiu__content-grid {
        flex-direction: column; /* Stack columns */
        gap: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__content-grid .page-tai-xiu__text-block,
    .page-tai-xiu__content-grid .page-tai-xiu__image-block {
        min-width: unset; /* Remove min-width for mobile */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__content-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* Advantage grid */
    .page-tai-xiu__advantage-grid {
        grid-template-columns: 1fr; /* Single column for cards */
        gap: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__card {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__card-title {
        font-size: 1.3em;
    }

    /* FAQ section */
    .page-tai-xiu__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__faq-question {
        font-size: 1em;
        padding: 15px 15px;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-tai-xiu__faq-answer {
        padding: 10px 15px 15px;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

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

    /* Ensure all images adhere to mobile rules */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}