:root {
    --color-primary: #11A84E;
    --color-secondary: #22C768;
    --color-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --color-card-bg: #11271B;
    --color-background-page: #08160F; /* Specific page background */
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: var(--color-text-main); /* Main text color for dark background */
    background-color: var(--color-background-page); /* Page specific dark background */
    line-height: 1.6;
    padding-bottom: 50px;
}

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

/* HERO Section */
.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    margin-bottom: 40px;
    background-color: var(--color-deep-green);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    max-height: 675px; /* Max height for desktop */
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.page-tai-xiu__hero-image img {
    width: 100%;
    height: 675px; /* Specific height for desktop hero */
    object-fit: cover;
    display: block;
}

.page-tai-xiu__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 30px 20px 60px;
    max-width: 900px;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size */
    color: var(--color-gold);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-tai-xiu__hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Ensure wrapping on smaller screens */
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 180px; /* Minimum width for buttons */
}

.page-tai-xiu__btn-primary {
    background: var(--color-button-gradient);
    color: var(--color-text-main);
    border: 2px solid var(--color-glow);
    box-shadow: 0 0 15px var(--color-glow);
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--color-glow);
}

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

.page-tai-xiu__btn-secondary:hover {
    background: rgba(87, 227, 141, 0.1);
    transform: translateY(-3px);
}

/* General Section Styling */
.page-tai-xiu__section {
    padding: 60px 0;
    margin-bottom: 30px;
    background-color: var(--color-background-page); /* Default section background */
}

.page-tai-xiu__section--about,
.page-tai-xiu__section--bet-types,
.page-tai-xiu__section--advantages,
.page-tai-xiu__section--promotions,
.page-tai-xiu__section--conclusion {
    background-color: var(--color-card-bg); /* Lighter dark background for sections */
    border-radius: 10px;
    margin: 0 20px 40px;
    padding: 60px 0;
    border: 1px solid var(--color-border);
}


.page-tai-xiu__dark-section {
    background-color: var(--color-deep-green); /* Even darker background for specific sections */
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin: 0 20px 40px;
    padding: 60px 0;
}

.page-tai-xiu__section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-tai-xiu__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-glow);
    border-radius: 2px;
}

.page-tai-xiu__sub-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-glow);
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-tai-xiu__content-area {
    max-width: 900px;
    margin: 0 auto;
    color: var(--color-text-main);
}

.page-tai-xiu__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-tai-xiu__content-grid--reverse {
    grid-template-columns: 1fr 1fr; /* Default order */
}

.page-tai-xiu__text-block {
    color: var(--color-text-main);
}

.page-tai-xiu__text-block p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--color-text-main);
}

.page-tai-xiu__link-text {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-tai-xiu__link-text:hover {
    color: var(--color-glow);
    text-decoration: underline;
}

.page-tai-xiu__image-block {
    text-align: center;
}

.page-tai-xiu__image-block img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

/* Lists */
.page-tai-xiu__list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.page-tai-xiu__list li {
    background-color: var(--color-deep-green);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 5px;
    border-left: 5px solid var(--color-glow);
    color: var(--color-text-main);
    font-size: 1.05rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.page-tai-xiu__list li strong {
    color: var(--color-gold);
}

.page-tai-xiu__list--ordered {
    list-style: decimal;
    padding-left: 25px;
}

.page-tai-xiu__list--ordered li {
    background-color: transparent;
    border: none;
    padding: 5px 0;
    margin-bottom: 8px;
    border-left: none;
    box-shadow: none;
    color: var(--color-text-main);
}

/* FAQ Section */
.page-tai-xiu__faq-list {
    max-width: 900px;
    margin: 0 auto 40px;
}

details.page-tai-xiu__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    background: var(--color-card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    color: var(--color-text-main);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question::-webkit-details-marker {
    display: none;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question:hover {
    background: rgba(34, 199, 104, 0.1);
}
.page-tai-xiu__faq-qtext {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--color-gold);
}
.page-tai-xiu__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-glow);
    flex-shrink: 0;
    margin-left: 15px;
    width: 32px;
    text-align: center;
    line-height: 1;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
    padding: 0 25px 25px;
    background: rgba(17, 168, 78, 0.1); /* Slightly lighter background for answer */
    border-radius: 0 0 8px 8px;
    color: var(--color-text-main);
}
.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.page-tai-xiu__image-block--faq {
    margin-top: 40px;
}

.page-tai-xiu__cta-buttons--center {
    margin-top: 40px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-image img {
        height: 500px; /* Adjust hero image height for tablets */
    }
    .page-tai-xiu__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-tai-xiu__hero-description {
        font-size: 1.1rem;
    }
    .page-tai-xiu__section-title {
        font-size: 2rem;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.5rem;
    }
    .page-tai-xiu__content-grid {
        gap: 30px;
    }
}

@media (max-width: 849px) {
    .page-tai-xiu__hero-image img {
        object-fit: contain !important; /* Ensure image is fully visible */
        aspect-ratio: unset !important; /* Remove fixed aspect ratio */
        height: auto !important; /* Allow height to adjust */
        max-height: 400px;
    }
    .page-tai-xiu__hero-content {
        padding-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .page-tai-xiu__container {
        padding: 0 15px;
    }
    .page-tai-xiu__hero-section {
        margin-bottom: 30px;
        padding-top: 10px; /* Mobile: small top padding */
    }
    .page-tai-xiu__hero-image {
        max-height: 300px; /* Further adjust hero image height for mobile */
    }
    .page-tai-xiu__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    .page-tai-xiu__hero-description {
        font-size: 1rem;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        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-left: 15px;
        padding-right: 15px;
    }

    .page-tai-xiu__section {
        padding: 40px 0;
        margin: 0 15px 30px;
    }
    .page-tai-xiu__dark-section {
        padding: 40px 0;
        margin: 0 15px 30px;
    }
    .page-tai-xiu__section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
        line-height: 1.3;
    }
    .page-tai-xiu__sub-title {
        font-size: 1.3rem;
        margin-top: 25px;
        margin-bottom: 10px;
    }
    .page-tai-xiu__content-grid {
        grid-template-columns: 1fr; /* Stack content on mobile */
        gap: 30px;
        padding: 0 15px;
    }
    .page-tai-xiu__content-grid--reverse {
        grid-template-columns: 1fr; /* Maintain stack order */
    }
    .page-tai-xiu__image-block img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__text-block p,
    .page-tai-xiu__list li,
    .page-tai-xiu__faq-qtext,
    .page-tai-xiu__faq-answer p {
        font-size: 15px;
    }
    .page-tai-xiu__list {
        margin: 15px 0;
    }
    .page-tai-xiu__list li {
        padding: 12px 15px;
    }
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
        padding: 15px 20px;
    }
    .page-tai-xiu__faq-qtext {
        font-size: 1rem;
    }
    .page-tai-xiu__faq-toggle {
        font-size: 24px;
        width: 28px;
    }
    details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
        padding: 0 20px 20px;
    }
    .page-tai-xiu__faq-list {
        margin-bottom: 30px;
    }
    /* Ensure content area containers also adapt */
    .page-tai-xiu__section,
    .page-tai-xiu__container,
    .page-tai-xiu__content-area,
    .page-tai-xiu__text-block,
    .page-tai-xiu__image-block,
    .page-tai-xiu__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-tai-xiu__section:not(.page-tai-xiu__hero-section) .page-tai-xiu__container {
        padding-left: 0;
        padding-right: 0;
    }
}