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

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

.page-tai-xiu__section {
  padding: 60px 0;
  text-align: center;
}

.page-tai-xiu__dark-bg {
  background-color: #7A0E0E; /* Deep Red for dark sections, ensuring contrast */
  color: #FFF5E1;
}

.page-tai-xiu__light-bg {
  background-color: #D32F2F; /* Card BG for light sections, ensuring contrast */
  color: #FFF5E1;
}

.page-tai-xiu__section-title {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 30px;
  color: #FFD86A; /* Gold color for titles */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__section-title--white {
  color: #FFF5E1;
}

.page-tai-xiu__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #FFF5E1;
}

.page-tai-xiu__text-block--white {
  color: #FFF5E1;
}

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

.page-tai-xiu__hero-image {
  width: 100%;
  max-height: 600px; /* Adjust as needed */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

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

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-tai-xiu__hero-title {
  font-size: clamp(2.5em, 5vw, 4em); /* Use clamp for H1 */
  font-weight: 900;
  color: #FFD86A;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.page-tai-xiu__hero-description {
  font-size: 1.3em;
  color: #FFF5E1;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.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.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #7A0E0E; /* Deep Red for contrast */
  border: none;
}

.page-tai-xiu__btn-primary:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__btn-secondary {
  background-color: #D32F2F; /* Card BG */
  color: #FFF5E1; /* Text Main */
  border: 2px solid #F2B544; /* Border */
}

.page-tai-xiu__btn-secondary:hover {
  background-color: #B71C1C; /* Background */
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Step Cards */
.page-tai-xiu__grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__grid-container--2-cols {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.page-tai-xiu__card {
  background-color: #D32F2F; /* Card BG */
  border: 1px solid #F2B544; /* Border */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  color: #FFF5E1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-tai-xiu__card-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #FFD86A; /* Gold */
  margin-bottom: 15px;
}

.page-tai-xiu__card p {
  font-size: 1em;
  line-height: 1.6;
  color: #FFF5E1;
}

.page-tai-xiu__step-card .page-tai-xiu__btn-primary {
  margin-top: 20px;
  align-self: flex-start;
  font-size: 0.9em;
  padding: 10px 20px;
}

/* Image Wrappers */
.page-tai-xiu__image-wrapper {
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

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

/* List Styles */
.page-tai-xiu__list {
  list-style: none;
  padding: 0;
  margin: 40px auto;
  max-width: 900px;
  text-align: left;
}

.page-tai-xiu__list li {
  font-size: 1.1em;
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
  color: #FFF5E1;
}

.page-tai-xiu__list li::before {
  content: '★';
  color: #FFD86A; /* Gold star */
  position: absolute;
  left: 0;
  font-weight: bold;
}

.page-tai-xiu__list--white li {
  color: #FFF5E1;
}

/* Promotion Grid */
.page-tai-xiu__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__promo-card {
  text-align: center;
  padding: 30px 20px;
}

.page-tai-xiu__promo-card .page-tai-xiu__card-title {
  font-size: 1.3em;
}

.page-tai-xiu__button-group {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Feature Grid */
.page-tai-xiu__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__feature-card {
  text-align: center;
  padding: 30px 20px;
}

.page-tai-xiu__feature-card .page-tai-xiu__card-title {
  font-size: 1.3em;
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #F2B544; /* Border */
  overflow: hidden;
  background: #D32F2F; /* Card BG */
  color: #FFF5E1;
}

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: #B71C1C; /* Background */
}

.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFD86A; /* Gold */
}

.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #FFF5E1; /* Text Main */
  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: #B71C1C; /* Background */
  border-radius: 0 0 5px 5px;
  color: #FFF5E1;
  text-align: left;
}

.page-tai-xiu__faq-answer p {
  color: #FFF5E1;
}

.page-tai-xiu__cta-content {
  padding: 40px 20px;
}

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

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-title {
    font-size: clamp(2.2em, 4vw, 3.5em);
  }
  .page-tai-xiu__section-title {
    font-size: 2.5em;
  }
  .page-tai-xiu__container {
    padding: 20px 30px;
  }
}

@media (max-width: 768px) {
  .page-tai-xiu {
    font-size: 15px;
  }
  .page-tai-xiu__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* HERO Section */
  .page-tai-xiu__hero-section {
    padding-top: 10px; /* Still small top padding */
    padding-bottom: 40px;
  }
  .page-tai-xiu__hero-image img {
    object-fit: contain !important; /* HERO mobile contain */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-tai-xiu__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }
  .page-tai-xiu__hero-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-tai-xiu__hero-buttons,
  .page-tai-xiu__button-group,
  .page-tai-xiu__cta-buttons {
    flex-direction: column !important; /* Buttons stack vertically */
    gap: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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: 1em;
  }

  /* General Section Titles and Text */
  .page-tai-xiu__section {
    padding: 40px 0;
  }
  .page-tai-xiu__section-title {
    font-size: 2em;
    margin-bottom: 20px;
    word-break: break-word;
  }
  .page-tai-xiu__text-block {
    font-size: 1em;
    padding: 0 10px;
  }

  /* Grid Containers (Step Cards, Bet Types, Promotions, Features) */
  .page-tai-xiu__grid-container,
  .page-tai-xiu__grid-container--2-cols,
  .page-tai-xiu__promo-grid,
  .page-tai-xiu__feature-grid {
    grid-template-columns: 1fr !important; /* Single column on mobile */
    gap: 20px;
    margin-top: 20px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
  .page-tai-xiu__card {
    padding: 25px 15px;
  }
  .page-tai-xiu__card-title {
    font-size: 1.3em;
  }
  .page-tai-xiu__step-card .page-tai-xiu__btn-primary {
    width: 100% !important;
    text-align: center;
  }

  /* Image Responsiveness */
  .page-tai-xiu__image-wrapper {
    margin-top: 30px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }
  .page-tai-xiu__image-wrapper img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* List Styles */
  .page-tai-xiu__list {
    margin: 30px auto;
    padding: 0 10px;
  }
  .page-tai-xiu__list li {
    font-size: 1em;
    margin-bottom: 10px;
    padding-left: 25px;
  }

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