.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
}

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

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  position: relative;
  text-align: center;
  background-color: #140C0C;
  overflow: hidden;
  padding-bottom: 40px;
}

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

.page-tai-xiu__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover; /* Cover for desktop, will change to contain for mobile */
  display: block;
  max-width: 100%;
}

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 10;
  padding: 30px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.page-tai-xiu__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: #F3C54D; /* Gold */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-tai-xiu__tagline {
  font-size: 1.2rem;
  color: #FFF1E8;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button color */
  color: #140C0C; /* Dark text for contrast */
  border: none;
}

.page-tai-xiu__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-tai-xiu__btn-secondary {
  background: transparent;
  color: #F3C54D; /* Gold */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-tai-xiu__btn-secondary:hover {
  background: #F3C54D;
  color: #140C0C;
  transform: translateY(-2px);
}

.page-tai-xiu__section-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #F3C54D; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
}

.page-tai-xiu__text-block {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #FFF1E8;
  text-align: justify;
}

.page-tai-xiu__introduction-section,
.page-tai-xiu__strategy-section,
.page-tai-xiu__promotions-section,
.page-tai-xiu__responsible-gaming-section {
  padding: 60px 0;
  background-color: #140C0C; /* Background */
}

.page-tai-xiu__dark-section {
  background-color: #2A1212; /* Card BG */
}

.page-tai-xiu__rules-section,
.page-tai-xiu__why-8xxbet-section,
.page-tai-xiu__get-started-section,
.page-tai-xiu__faq-section {
  padding: 60px 0;
  background-color: #140C0C; /* Background */
}

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

.page-tai-xiu__image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-tai-xiu__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  max-width: 100%;
}

.page-tai-xiu__text-content {
  flex: 1;
}

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

.page-tai-xiu__list-item {
  background: #2A1212; /* Card BG */
  border-left: 5px solid #F3C54D; /* Gold */
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  color: #FFF1E8;
  font-size: 1.05rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.page-tai-xiu__card {
  background: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 20px;
  color: #FFF1E8;
}

.page-tai-xiu__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  max-width: 100%;
}

.page-tai-xiu__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #F3C54D; /* Gold */
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-tai-xiu__card-description {
  font-size: 1rem;
  line-height: 1.7;
  color: #FFF1E8;
  padding: 0 15px;
}

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

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

.page-tai-xiu__feature-item {
  background: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  max-width: 100%;
}

.page-tai-xiu__feature-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #F3C54D; /* Gold */
  margin-bottom: 10px;
}

.page-tai-xiu__feature-description {
  font-size: 1rem;
  color: #FFF1E8;
}

.page-tai-xiu__promo-list {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.page-tai-xiu__promo-list .page-tai-xiu__list-item {
  background: #140C0C; /* Background */
  border-left-color: #C61F1F; /* Main color */
}

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

.page-tai-xiu__step-item {
  background: #2A1212; /* Card BG */
  border: 1px solid #6A1E1E; /* Border */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  padding-top: 60px;
}

.page-tai-xiu__step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button color */
  color: #140C0C;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  border: 3px solid #F3C54D;
}

.page-tai-xiu__step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-tai-xiu__step-description {
  font-size: 1rem;
  color: #FFF1E8;
  margin-bottom: 20px;
}

.page-tai-xiu__btn-link {
  display: inline-block;
  color: #F3C54D; /* Gold */
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid #F3C54D;
  padding-bottom: 5px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-tai-xiu__btn-link:hover {
  color: #FFB04A;
  border-color: #FFB04A;
}

.page-tai-xiu__mt-large {
  margin-top: 60px;
}

/* FAQ styles */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #6A1E1E; /* Border */
  overflow: hidden;
  background: #2A1212; /* Card BG */
  color: #FFF1E8;
}
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: #3a1a1a;
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F3C54D; /* Gold */
}
.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  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: #140C0C; /* Background */
  border-radius: 0 0 5px 5px;
  color: #FFF1E8;
}

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

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
  .page-tai-xiu {
    font-size: 15px;
  }

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

  /* HERO Section */
  .page-tai-xiu__hero-section {
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .page-tai-xiu__hero-image-wrapper {
    max-height: 300px;
  }

  .page-tai-xiu__hero-image {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important; /* Remove fixed aspect ratio if any */
    width: 100% !important;
    height: auto !important;
  }

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

  .page-tai-xiu__main-title {
    font-size: 2rem; /* Adjusted for smaller screens */
    margin-bottom: 15px;
  }

  .page-tai-xiu__tagline {
    font-size: 1rem;
    margin-bottom: 20px;
  }

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

  /* Buttons general */
  .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-center {
    margin-top: 30px;
  }

  /* Section titles */
  .page-tai-xiu__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-top: 30px;
  }

  /* Text blocks */
  .page-tai-xiu__text-block {
    font-size: 1rem;
    text-align: left;
  }

  /* Content grid (rules section) */
  .page-tai-xiu__content-grid {
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
  }

  .page-tai-xiu__image-wrapper {
    min-width: unset;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-tai-xiu__image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  .page-tai-xiu__list-item {
    font-size: 0.95rem;
    padding: 12px 15px;
  }

  /* Strategy grid (cards) */
  .page-tai-xiu__strategy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-tai-xiu__card-image {
    height: 200px; /* Adjust height for mobile cards */
  }

  .page-tai-xiu__card-title {
    font-size: 1.2rem;
  }

  .page-tai-xiu__card-description {
    font-size: 0.95rem;
  }

  /* Features grid */
  .page-tai-xiu__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-tai-xiu__feature-item {
    padding: 25px;
  }

  .page-tai-xiu__feature-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
  }

  .page-tai-xiu__feature-title {
    font-size: 1.1rem;
  }

  /* Promo list */
  .page-tai-xiu__promo-list {
    margin: 20px 0;
  }

  /* Steps grid */
  .page-tai-xiu__steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
  }

  .page-tai-xiu__step-item {
    padding-top: 50px;
  }

  .page-tai-xiu__step-number {
    width: 45px;
    height: 45px;
    font-size: 1.6rem;
    top: -22px;
  }

  .page-tai-xiu__step-title {
    font-size: 1.3rem;
  }

  .page-tai-xiu__step-description {
    font-size: 0.95rem;
  }

  /* FAQ section */
  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;
  }

  /* General content area padding */
  .page-tai-xiu__section,
  .page-tai-xiu__card,
  .page-tai-xiu__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Ensuring all images are responsive */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Article body for long text sections (compliance check) */
  .page-tai-xiu__article-body {
    max-width: 100% !important;
    padding: 0 15px;
    box-sizing: border-box;
  }
}

/* Additional mobile specific for larger devices up to 1024px */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-image-wrapper {
    max-height: 500px;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(2.2rem, 3.8vw, 3rem);
  }
  .page-tai-xiu__section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
  }
  .page-tai-xiu__content-grid {
    flex-direction: column;
  }
  .page-tai-xiu__image-wrapper {
    width: 100%;
  }
  .page-tai-xiu__text-content {
    width: 100%;
  }
  .page-tai-xiu__strategy-grid,
  .page-tai-xiu__features-grid,
  .page-tai-xiu__steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 849px) {
  .page-tai-xiu__hero-image {
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
}