/* Base styles for .page-tai-xiu, ensuring text contrast based on specified color scheme */
.page-tai-xiu {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main, #FFF5E1); /* Default text color from custom scheme */
    background-color: var(--background-page, #B71C1C); /* Default background from custom scheme */
    padding-bottom: 40px;
    box-sizing: border-box;
}

/* Custom properties for colors */
:root {
    --main-color: #C91F17;
    --accent-color: #E53935;
    --button-bg: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
    --card-bg: #D32F2F;
    --background-page: #B71C1C;
    --text-main: #FFF5E1;
    --border-color: #F2B544;
    --glow-color: #FFCC66;
    --gold-color: #F4D34D;
    --deep-red-color: #7A0E0E;
}

/* Container for main content, centered and max-width */
.page-tai-xiu__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Section styling */
.page-tai-xiu__hero-section,
.page-tai-xiu__introduction-section,
.page-tai-xiu__why-e88vip-section,
.page-tai-xiu__guide-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__faq-section,
.page-tai-xiu__conclusion-section {
    padding: 40px 0;
    overflow: hidden; /* Prevent content overflow */
}

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body for header offset */
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--background-page, #B71C1C);
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    max-height: 675px; /* Limit height for hero image */
    object-fit: cover;
    display: block;
    margin-bottom: 30px;
    border-radius: 10px;
}

.page-tai-xiu__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive font size for H1 */
    font-weight: 700;
    color: var(--text-main, #FFF5E1);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

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

.page-tai-xiu__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

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

.page-tai-xiu__btn-primary {
    background: var(--button-bg, linear-gradient(180deg, #FFD86A 0%, #E6B800 100%));
    color: #333333; /* Dark text on gold button for contrast */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__btn-secondary {
    background: transparent;
    color: var(--text-main, #FFF5E1);
    border: 2px solid var(--border-color, #F2B544);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-secondary:hover {
    background: var(--border-color, #F2B344); /* Use a slightly darker gold for hover if needed */
    color: #333333; /* Dark text on gold hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Section titles */
.page-tai-xiu__section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-color, #F4D34D); /* Gold color for section titles */
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Text block */
.page-tai-xiu__text-block {
    font-size: 1.05rem;
    margin-bottom: 30px;
    color: var(--text-main, #FFF5E1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Highlight text */
.page-tai-xiu__highlight {
    color: var(--gold-color, #F4D34D);
    font-weight: 700;
}

.page-tai-xiu__link-text {
    color: var(--gold-color, #F4D34D);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-tai-xiu__link-text:hover {
    color: var(--glow-color, #FFCC66);
}

/* Card backgrounds and text colors */
.page-tai-xiu__content-card,
.page-tai-xiu__feature-card,
.page-tai-xiu__strategy-item,
.page-tai-xiu__faq-item {
    background-color: var(--card-bg, #D32F2F); /* Card background from custom scheme */
    color: var(--text-main, #FFF5E1); /* Text color from custom scheme */
}

/* Content Grid for introduction section */
.page-tai-xiu__content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.page-tai-xiu__content-card {
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    height: 100%; /* Ensure cards are same height */
    display: flex;
    flex-direction: column;
}

.page-tai-xiu__card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-color, #F4D34D);
    margin-bottom: 15px;
}

.page-tai-xiu__card-text {
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1; /* Allow text to grow and push content down */
}

/* Image in content */
.page-tai-xiu__content-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Feature Grid for why e88vip section */
.page-tai-xiu__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.page-tai-xiu__feature-card {
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Guide List for how to play section */
.page-tai-xiu__guide-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 40px 0;
    counter-reset: guide-step;
}

.page-tai-xiu__guide-item {
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    padding-left: 80px;
}

.page-tai-xiu__guide-item::before {
    counter-increment: guide-step;
    content: "Bước " counter(guide-step);
    position: absolute;
    left: 25px;
    top: 25px;
    background: var(--button-bg, linear-gradient(180deg, #FFD86A 0%, #E6B800 100%));
    color: #333333;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__guide-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-color, #F4D34D);
    margin-bottom: 10px;
}

.page-tai-xiu__guide-step-text {
    font-size: 1rem;
    color: var(--text-main, #FFF5E1);
}

.page-tai-xiu__cta-buttons-bottom {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Strategy List */
.page-tai-xiu__strategy-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.page-tai-xiu__strategy-item {
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* FAQ Section */
.page-tai-xiu__faq-list {
    margin-top: 30px;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__faq-item {
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Ensure content doesn't spill */
}

.page-tai-xiu__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-color, #F4D34D);
    list-style: none; /* Remove default marker */
    position: relative;
    user-select: none; /* Prevent text selection on click */
}

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

.page-tai-xiu__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    transition: transform 0.3s ease;
    color: var(--text-main, #FFF5E1);
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
    transform: rotate(45deg);
}

.page-tai-xiu__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main, #FFF5E1);
}

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

/* Conclusion Section */
.page-tai-xiu__conclusion-section {
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
    background-color: var(--background-page, #B71C1C);
}

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

/* General image responsive styles */
.page-tai-xiu img {
    max-width: 100%;
    height: auto;
    display: block;
}