/* CSS cho trang Tài Xỉu */

/* Biến màu tùy chỉnh */
:root {
    --page-tai-xiu-primary-color: #11A84E;
    --page-tai-xiu-secondary-color: #22C768;
    --page-tai-xiu-card-bg: #11271B;
    --page-tai-xiu-background: #08160F;
    --page-tai-xiu-text-main: #F2FFF6;
    --page-tai-xiu-text-secondary: #A7D9B8;
    --page-tai-xiu-border-color: #2E7A4E;
    --page-tai-xiu-glow-color: #57E38D;
    --page-tai-xiu-gold-color: #F2C14E;
    --page-tai-xiu-divider-color: #1E3A2A;
    --page-tai-xiu-deep-green: #0A4B2C;
}

/* Body content styling - ensures light text on dark body background */
.page-tai-xiu {
    color: var(--page-tai-xiu-text-main); /* Light text on dark background */
    background-color: var(--page-tai-xiu-background);
}

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

/* Hero Section */
.page-tai-xiu__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 10px; /* Small top padding, assuming body handles header offset */
    padding-bottom: 60px;
    overflow: hidden;
    background-color: var(--page-tai-xiu-deep-green);
}

.page-tai-xiu__hero-image-wrapper {
    width: 100%;
    max-height: 600px; /* Limit height for desktop */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover the area, may crop */
    aspect-ratio: 16/9;
}

.page-tai-xiu__hero-content {
    position: relative;
    z-index: 2;
    padding: 30px 20px;
    max-width: 900px;
    margin-top: -150px; /* Pull content up over image a bit for visual flow, but not *on* image */
    background: rgba(8, 22, 15, 0.85); /* Semi-transparent dark background for text */
    border-radius: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__main-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--page-tai-xiu-text-main);
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(87, 227, 141, 0.5);
}

.page-tai-xiu__hero-description {
    font-size: 1.15rem;
    color: var(--page-tai-xiu-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%;
    box-sizing: border-box;
}

.page-tai-xiu__btn-primary {
    background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    color: #ffffff; /* Ensure white text on dark button */
    border: none;
}

.page-tai-xiu__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-tai-xiu__btn-secondary {
    background: none;
    color: var(--page-tai-xiu-glow-color); /* Light text on dark background */
    border: 2px solid var(--page-tai-xiu-glow-color);
}

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

/* General Section Styling */
.page-tai-xiu__section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.page-tai-xiu__section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--page-tai-xiu-text-main);
    text-shadow: 0 0 8px rgba(87, 227, 141, 0.3);
}

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

.page-tai-xiu__description--light {
    color: var(--page-tai-xiu-text-secondary);
}

.page-tai-xiu__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.page-tai-xiu__text-block {
    line-height: 1.7;
    font-size: 1.05rem;
    color: var(--page-tai-xiu-text-secondary);
}

.page-tai-xiu__text-block p {
    margin-bottom: 20px;
}

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

.page-tai-xiu__image-block {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__image-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-tai-xiu__image-center {
    margin: 0 auto;
}

.page-tai-xiu__article-body {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--page-tai-xiu-text-secondary);
}

.page-tai-xiu__article-body p {
    margin-bottom: 20px;
}

.page-tai-xiu__article-body ul {
    list-style: disc inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

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

.page-tai-xiu__list strong {
    color: var(--page-tai-xiu-text-main);
}

/* How-to-play Section */
.page-tai-xiu__how-to-play .page-tai-xiu__content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Steps on left, image/CTA on right */
    gap: 40px;
    align-items: start;
}

.page-tai-xiu__steps-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.page-tai-xiu__step-card {
    background: var(--page-tai-xiu-card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__step-title {
    font-size: 1.3rem;
    color: var(--page-tai-xiu-gold-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.page-tai-xiu__step-card p {
    font-size: 1rem;
    color: var(--page-tai-xiu-text-secondary);
    line-height: 1.6;
}

.page-tai-xiu__cta-block {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--page-tai-xiu-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-tai-xiu-border-color);
}

.page-tai-xiu__btn-full-width {
    width: 100%;
    text-align: center;
}

/* Advantages Section */
.page-tai-xiu__advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tai-xiu__card {
    background: var(--page-tai-xiu-card-bg); /* Dark background for cards */
    color: var(--page-tai-xiu-text-main); /* Light text on dark card */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--page-tai-xiu-border-color);
    text-align: center;
}

.page-tai-xiu__card-title {
    font-size: 1.4rem;
    color: var(--page-tai-xiu-gold-color);
    margin-top: 0;
    margin-bottom: 15px;
}

.page-tai-xiu__card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--page-tai-xiu-text-secondary);
}

/* Promotions Section - similar to content-grid but with image/text swapped */
.page-tai-xiu__promotions .page-tai-xiu__content-grid {
    grid-template-columns: 1fr 1fr;
}

.page-tai-xiu__promotions .page-tai-xiu__text-block {
    order: 2; /* Text after image on desktop */
}

.page-tai-xiu__promotions .page-tai-xiu__image-block {
    order: 1; /* Image before text on desktop */
}

.page-tai-xiu__btn-inline {
    margin-top: 20px;
}

/* Call to Action Section */
.page-tai-xiu__call-to-action {
    background-color: var(--page-tai-xiu-deep-green);
    text-align: center;
    padding: 60px 20px;
}

.page-tai-xiu__call-to-action .page-tai-xiu__container {
    background: linear-gradient(135deg, var(--page-tai-xiu-card-bg) 0%, var(--page-tai-xiu-deep-green) 100%);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--page-tai-xiu-border-color);
}

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

.page-tai-xiu__call-to-action .page-tai-xiu__description {
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* FAQ Section */
.page-tai-xiu__faq-section {
    padding-top: 60px;
    padding-bottom: 80px;
}

details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--page-tai-xiu-border-color);
  overflow: hidden;
  background: var(--page-tai-xiu-card-bg);
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
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: var(--page-tai-xiu-deep-green);
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--page-tai-xiu-text-main);
}
.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--page-tai-xiu-glow-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 20px 20px;
  background: var(--page-tai-xiu-deep-green);
  border-radius: 0 0 5px 5px;
  color: var(--page-tai-xiu-text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-tai-xiu__hero-content {
        margin-top: -100px;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(2.2rem, 3.8vw, 3rem);
    }
    .page-tai-xiu__hero-description {
        font-size: 1.1rem;
    }
    .page-tai-xiu__section {
        padding: 60px 0;
    }
    .page-tai-xiu__section-title {
        font-size: clamp(1.8rem, 3.2vw, 2.5rem);
        margin-bottom: 40px;
    }
    .page-tai-xiu__content-grid,
    .page-tai-xiu__promotions .page-tai-xiu__content-grid {
        grid-template-columns: 1fr;
    }
    .page-tai-xiu__promotions .page-tai-xiu__text-block {
        order: unset; /* Reset order for mobile */
    }
    .page-tai-xiu__promotions .page-tai-xiu__image-block {
        order: unset; /* Reset order for mobile */
    }
    .page-tai-xiu__how-to-play .page-tai-xiu__content-wrapper {
        grid-template-columns: 1fr;
    }
    .page-tai-xiu__cta-block img {
        max-height: 400px;
    }
    .page-tai-xiu__advantage-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .page-tai-xiu__card {
        padding: 25px;
    }
    .page-tai-xiu__card-title {
        font-size: 1.3rem;
    }
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question { padding: 15px; }
    .page-tai-xiu__faq-qtext { font-size: 15px; }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-tai-xiu__hero-section {
        padding-top: 10px; /* Small top padding */
        padding-bottom: 40px;
    }
    .page-tai-xiu__hero-image-wrapper {
        max-height: 400px;
    }
    .page-tai-xiu__hero-image {
        object-fit: contain !important; /* Ensure image is fully visible */
        aspect-ratio: unset !important;
    }
    .page-tai-xiu__hero-content {
        margin-top: -80px; /* Adjust for smaller screens */
        padding: 20px 15px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .page-tai-xiu__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem); /* Smaller font for mobile */
        margin-bottom: 10px;
    }
    .page-tai-xiu__hero-description {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }

    /* 通用图片与容器 */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tai-xiu__section,
    .page-tai-xiu__container,
    .page-tai-xiu__content-grid,
    .page-tai-xiu__advantage-grid,
    .page-tai-xiu__how-to-play .page-tai-xiu__content-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__section {
        padding: 40px 0;
    }
    .page-tai-xiu__section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 30px;
    }
    .page-tai-xiu__content-grid,
    .page-tai-xiu__how-to-play .page-tai-xiu__content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .page-tai-xiu__promotions .page-tai-xiu__text-block,
    .page-tai-xiu__promotions .page-tai-xiu__image-block {
        order: unset; /* Ensure natural flow on mobile */
    }
    .page-tai-xiu__text-block,
    .page-tai-xiu__article-body {
        font-size: 1rem;
        line-height: 1.6;
    }
    .page-tai-xiu__image-block {
        border-radius: 8px;
    }

    /* 按钮与按钮容器 */
    .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: 12px 20px;
        font-size: 1rem;
    }
    .page-tai-xiu__cta-buttons,
    .page-tai-xiu__button-group,
    .page-tai-xiu__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-tai-xiu__cta-buttons {
        flex-direction: column;
    }
    .page-tai-xiu__btn-inline {
        margin-top: 15px;
    }

    /* FAQ */
    details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question { padding: 15px; }
    .page-tai-xiu__faq-qtext { font-size: 15px; }
    details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer { padding: 0 15px 15px; }

    /* Decor title + Long text SEO area - ensure proper wrapping and sizing */
    .page-tai-xiu__section-title-wrap,
    .page-tai-xiu__article-body,
    .page-tai-xiu__article-figure {
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .page-tai-xiu__article-body p,
    .page-tai-xiu__article-body ul {
        text-align: left; /* Keep text left-aligned for readability */
        padding-left: 0; /* Remove extra padding from list */
    }
}