.page-tai-xiu {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #F5F7FA; /* Default background color */
}

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
  padding-bottom: 60px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
}

.page-tai-xiu__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 40px 16px;
}

.page-tai-xiu__hero-image {
  flex: 1 1 50%;
  text-align: center;
  order: 2; /* Image below text on mobile, so order 2 on desktop for right side */
}

.page-tai-xiu__hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  display: block;
}

.page-tai-xiu__hero-content {
  flex: 1 1 40%;
  order: 1; /* Text above image on mobile, so order 1 on desktop for left side */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

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

.page-tai-xiu__description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.page-tai-xiu__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  box-shadow: 0 6px 16px rgba(229, 57, 53, 0.6);
}

.page-tai-xiu__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.page-tai-xiu__btn-secondary:hover {
  background: #f0f0f0;
  color: #FF5A4F;
  border-color: #FF5A4F;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.5);
}

.page-tai-xiu__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #E53935;
}

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

.page-tai-xiu__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
}

.page-tai-xiu__text-block {
  font-size: 1.05rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
  color: #333333;
}

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

.page-tai-xiu__intro-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

.page-tai-xiu__icon-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.page-tai-xiu__icon-box {
  flex: 1 1 calc(33.333% - 30px);
  max-width: calc(33.333% - 30px);
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  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__icon-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-tai-xiu__icon-box-media {
  width: 200px;
  height: 200px;
  aspect-ratio: 1/1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #FF5A4F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-tai-xiu__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* Ensure image inside is also round */
  display: block;
}

.page-tai-xiu__icon-box-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #E53935;
}

.page-tai-xiu__icon-box-description {
  font-size: 1rem;
  color: #555555;
}

.page-tai-xiu__how-to-play-section,
.page-tai-xiu__benefits-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-tai-xiu__tips-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
}

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

.page-tai-xiu__content-grid--reverse .page-tai-xiu__text-content {
  order: 2;
}

.page-tai-xiu__content-grid--reverse .page-tai-xiu__image-content {
  order: 1;
}

.page-tai-xiu__text-content {
  flex: 1 1 calc(50% - 20px);
  min-width: 300px;
}

.page-tai-xiu__text-content--white {
  color: #ffffff;
}

.page-tai-xiu__image-content {
  flex: 1 1 calc(50% - 20px);
  min-width: 300px;
  text-align: center;
}

.page-tai-xiu__image-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-tai-xiu__step-list,
.page-tai-xiu__tip-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-tai-xiu__step-item,
.page-tai-xiu__tip-item {
  background: #ffffff;
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  padding-left: 45px;
  color: #333333;
}

.page-tai-xiu__step-item:last-child,
.page-tai-xiu__tip-item:last-child {
  margin-bottom: 0;
}

.page-tai-xiu__step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: #E53935;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.page-tai-xiu__step-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 8px;
  color: #E53935;
}

.page-tai-xiu__step-description {
  font-size: 1rem;
  color: #555555;
}

.page-tai-xiu__tip-list .page-tai-xiu__tip-item {
  background: rgba(255, 255, 255, 0.15); /* Lighter background for tips section */
  color: #ffffff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 25px; /* No number for tips */
}

.page-tai-xiu__tip-list .page-tai-xiu__tip-item strong {
  color: #FFEB3B; /* Highlight strong text in tips */
}

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

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

.page-tai-xiu__benefit-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-tai-xiu__benefit-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 15px;
  color: #E53935;
}

.page-tai-xiu__benefit-description {
  font-size: 1rem;
  color: #555555;
}

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

.page-tai-xiu__faq-section {
  padding: 60px 0;
  background-color: #F5F7FA;
}

.page-tai-xiu__faq-list {
  max-width: 900px;
  margin: 0 auto;
  margin-top: 40px;
}

.page-tai-xiu__faq-item {
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-tai-xiu__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  outline: none;
  list-style: none; /* Remove default marker */
}

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

.page-tai-xiu__faq-item[open] summary {
  background-color: #f8f8f8;
  color: #E53935;
}

.page-tai-xiu__faq-qtext {
  flex-grow: 1;
}

.page-tai-xiu__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 20px;
  color: #E53935;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-tai-xiu__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #555555;
}

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

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

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-tai-xiu {
    font-size: 16px;
    line-height: 1.6;
  }

  /* HERO Section */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important; /* Small top padding */
    padding-bottom: 40px;
  }

  .page-tai-xiu__hero-container {
    flex-direction: column; /* Stack items vertically */
    padding: 20px 15px;
    gap: 30px;
  }

  .page-tai-xiu__hero-content {
    order: 1; /* Text above image */
    flex: 1 1 100%;
    align-items: center;
    text-align: center;
  }

  .page-tai-xiu__hero-image {
    order: 2; /* Image below text */
    flex: 1 1 100%;
  }

  .page-tai-xiu__main-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .page-tai-xiu__description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 10px;
  }

  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    font-size: 1rem;
  }

  /* Module 1: Intro Section (3-column icon boxes) */
  .page-tai-xiu__icon-boxes {
    flex-direction: column;
    gap: 20px;
  }

  .page-tai-xiu__icon-box {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 25px;
  }

  .page-tai-xiu__icon-box-media {
    width: 160px;
    height: 160px;
    margin-bottom: 15px;
  }

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

  /* Content Sections (How-to-Play, Tips, Benefits) */
  .page-tai-xiu__container {
    padding: 30px 15px;
  }

  .page-tai-xiu__section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

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

  .page-tai-xiu__content-grid {
    flex-direction: column;
    gap: 30px;
  }

  .page-tai-xiu__content-grid--reverse .page-tai-xiu__text-content {
    order: 1;
  }

  .page-tai-xiu__content-grid--reverse .page-tai-xiu__image-content {
    order: 2;
  }

  .page-tai-xiu__text-content,
  .page-tai-xiu__image-content {
    flex: 1 1 100%;
    min-width: unset;
  }

  .page-tai-xiu__image-content img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .page-tai-xiu__step-item,
  .page-tai-xiu__tip-item {
    padding: 15px 20px;
    padding-left: 40px;
    margin-bottom: 10px;
  }

  .page-tai-xiu__step-item::before {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    left: 10px;
  }

  .page-tai-xiu__step-title {
    font-size: 1.15rem;
    margin-bottom: 5px;
  }

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

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

  .page-tai-xiu__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__benefit-title {
    font-size: 1.25rem;
  }

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

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

  /* FAQ Section */
  .page-tai-xiu__faq-list {
    margin-top: 30px;
  }

  .page-tai-xiu__faq-item summary {
    padding: 15px 20px;
    font-size: 1.1rem;
  }

  .page-tai-xiu__faq-toggle {
    font-size: 1.5rem;
  }

  .page-tai-xiu__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }

  /* Universal image styles for mobile */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}