.page-tai-xiu {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light body background */
    background-color: #F4F7FB; /* Background color from custom palette */
    line-height: 1.6;
}

.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, assuming shared.css handles body padding-top */
    margin-bottom: 40px;
    text-align: center;
}

.page-tai-xiu__hero-image {
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

.page-tai-xiu__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.page-tai-xiu__hero-content {
    padding: 20px;
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-50px); /* Overlap with image for visual effect */
    margin-bottom: -50px; /* Adjust margin to pull content up */
    position: relative;
    z-index: 1;
}

.page-tai-xiu__main-title {
    font-size: clamp(28px, 3.5vw, 48px);
    color: #1F2D3D; /* Text Main color */
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.page-tai-xiu__intro-text {
    font-size: clamp(16px, 1.2vw, 20px);
    color: #333333;
    margin-bottom: 30px;
}

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

/* General Section Styling */
.page-tai-xiu__section {
    padding: 40px 0;
    margin-bottom: 30px;
}

.page-tai-xiu__section-title {
    font-size: clamp(24px, 2.5vw, 36px);
    color: #1F2D3D; /* Text Main color */
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

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

.page-tai-xiu__sub-title {
    font-size: clamp(20px, 2vw, 28px);
    color: #2F6BFF; /* Primary color */
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-tai-xiu__content-block {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__article-figure {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.page-tai-xiu__list,
.page-tai-xiu__ordered-list {
    list-style-position: inside;
    margin-bottom: 20px;
    padding-left: 0;
}

.page-tai-xiu__list li,
.page-tai-xiu__ordered-list li {
    margin-bottom: 10px;
    font-size: 17px;
    color: #333333;
}

.page-tai-xiu__list strong,
.page-tai-xiu__ordered-list strong {
    color: #2F6BFF; /* Primary color */
}

/* Buttons */
.page-tai-xiu__btn-primary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Custom button gradient */
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tai-xiu__btn-primary:hover {
    background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-tai-xiu__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    background: #FFFFFF;
    color: #2F6BFF; /* Primary color */
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #2F6BFF;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tai-xiu__btn-secondary:hover {
    background: #2F6BFF;
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(47, 107, 255, 0.3);
}

.page-tai-xiu__btn-small {
    padding: 10px 20px;
    font-size: 16px;
}

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

/* Game Variations Section (Content Grid) */
.page-tai-xiu__game-variations .page-tai-xiu__content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.page-tai-xiu__card {
    background: #FFFFFF;
    border: 1px solid #D6E2FF; /* Border color */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-tai-xiu__card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-tai-xiu__card-title {
    font-size: clamp(18px, 1.5vw, 24px);
    color: #1F2D3D; /* Text Main color */
    margin-bottom: 15px;
    font-weight: 600;
}

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

.page-tai-xiu__card p {
    font-size: 16px;
    color: #333333;
    margin-bottom: 25px;
}

.page-tai-xiu__card-text--light {
    color: #f0f0f0;
}

/* Promotions Section */
.page-tai-xiu__promotions {
    background: #2F6BFF; /* Primary color as background */
    color: #ffffff;
    padding: 60px 0;
}

.page-tai-xiu__dark-section {
    background: #2F6BFF;
    color: #ffffff;
}

.page-tai-xiu__dark-section .page-tai-xiu__content-block {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for content block */
    box-shadow: none;
}

.page-tai-xiu__promo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.page-tai-xiu__promo-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.page-tai-xiu__promo-card:hover {
    transform: translateY(-5px);
}

.page-tai-xiu__promo-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #D6E2FF; /* Border color */
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
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: #f5f5f5;
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #1F2D3D; /* Text Main color */
}
.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #2F6BFF; /* Primary 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: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333;
}
.page-tai-xiu__faq-answer p {
    margin-bottom: 0;
    font-size: 16px;
}

/* Highlight text */
.page-tai-xiu__highlight {
    color: #2F6BFF; /* Primary color for highlights */
    font-weight: bold;
}

/* Responsive Styles */

/* For screens smaller than 849px (hero image object-fit) */
@media (max-width: 849px) {
    .page-tai-xiu__hero-image img {
        object-fit: contain !important;
        aspect-ratio: unset !important;
    }
}

/* For screens smaller than 768px (mobile) */
@media (max-width: 768px) {
    .page-tai-xiu__container {
        padding: 0 15px;
    }

    /* Hero Section */
    .page-tai-xiu__hero-section {
        margin-bottom: 20px;
        padding-top: 10px; /* Ensure small top padding */
    }

    .page-tai-xiu__hero-content {
        transform: translateY(-30px);
        margin-bottom: -30px;
        padding: 20px 15px;
    }

    .page-tai-xiu__main-title {
        font-size: 28px;
        line-height: 1.3;
    }

    .page-tai-xiu__intro-text {
        font-size: 16px;
    }

    .page-tai-xiu__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-tai-xiu__cta-button,
    .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: 16px;
    }
    
    .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; /* Already handled by container padding */
      padding-right: 0; /* Already handled by container padding */
      flex-wrap: wrap !important;
      gap: 10px;
    }

    /* General Section Styling */
    .page-tai-xiu__section {
        padding: 30px 0;
        margin-bottom: 20px;
    }

    .page-tai-xiu__section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .page-tai-xiu__sub-title {
        font-size: 20px;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .page-tai-xiu__content-block {
        padding: 20px 15px;
    }

    .page-tai-xiu__list li,
    .page-tai-xiu__ordered-list li {
        font-size: 15px;
    }

    /* Game Variations Section */
    .page-tai-xiu__game-variations .page-tai-xiu__content-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile */
        gap: 20px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

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

    .page-tai-xiu__card-title {
        font-size: 18px;
    }

    .page-tai-xiu__card p {
        font-size: 14px;
    }

    /* Promotions Section */
    .page-tai-xiu__promotions {
        padding: 40px 0;
    }

    .page-tai-xiu__promo-grid {
        grid-template-columns: 1fr !important; /* Stack promotions vertically */
        gap: 20px;
    }
    
    .page-tai-xiu__promo-card {
        padding: 20px 15px;
    }

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

    /* Ensure all images and containers are responsive */
    .page-tai-xiu img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-tai-xiu__section,
    .page-tai-xiu__card,
    .page-tai-xiu__container,
    .page-tai-xiu__content-grid,
    .page-tai-xiu__promo-grid,
    .page-tai-xiu__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-tai-xiu__content-grid,
    .page-tai-xiu__promo-grid {
        padding-left: 0;
        padding-right: 0;
    }
}