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

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

.page-tai-xiu__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-tai-xiu__section-description {
  font-size: 18px;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background: linear-gradient(135deg, #e0f2f1, #ffffff);
}

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

.page-tai-xiu__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  color: #333333;
}

.page-tai-xiu__main-title {
  font-size: 48px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-tai-xiu__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #555555;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary,
.page-tai-xiu__btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-tai-xiu__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-tai-xiu__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-tai-xiu__btn-secondary {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

.page-tai-xiu__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-tai-xiu__btn-link {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 500;
}

.page-tai-xiu__btn-link:hover {
  background-color: #017439;
  color: #FFFFFF;
}

.page-tai-xiu__hero-image {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

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

/* Intro Section */
.page-tai-xiu__intro-section {
  padding: 60px 0;
  background-color: #f8fcfb; /* Light background for contrast */
  color: #333333;
}

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

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

.page-tai-xiu__feature-item:hover {
  transform: translateY(-5px);
}

.page-tai-xiu__icon-box-media {
  width: 180px; /* Reduced for better fit on inner page */
  height: 180px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #017439;
  box-shadow: 0 0 0 8px rgba(1, 116, 57, 0.2);
}

.page-tai-xiu__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.page-tai-xiu__feature-title {
  font-size: 24px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 15px;
}

.page-tai-xiu__feature-text {
  font-size: 16px;
  color: #666666;
}

/* Rules Section */
.page-tai-xiu__rules-section {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__rules-section .page-tai-xiu__section-title,
.page-tai-xiu__rules-section .page-tai-xiu__section-description {
  color: #ffffff;
}

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

.page-tai-xiu__rule-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__rule-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
}

.page-tai-xiu__rule-title {
  font-size: 26px;
  font-weight: 600;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 15px;
}

.page-tai-xiu__rule-text,
.page-tai-xiu__rule-list {
  font-size: 17px;
  color: #f0f0f0;
  margin-bottom: 15px;
}

.page-tai-xiu__rule-list {
  list-style-type: disc;
  padding-left: 25px;
}

.page-tai-xiu__rule-list strong {
  color: #FFFFFF;
}

/* Guide Section */
.page-tai-xiu__guide-section {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

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

.page-tai-xiu__step-item {
  background-color: #f8f8f8;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-tai-xiu__step-number {
  font-size: 48px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-tai-xiu__step-title {
  font-size: 24px;
  font-weight: 600;
  color: #017439;
  margin-bottom: 15px;
}

.page-tai-xiu__step-text {
  font-size: 16px;
  color: #666666;
  margin-bottom: 20px;
}

.page-tai-xiu__step-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 20px;
  display: block;
}

/* Tips Section */
.page-tai-xiu__tips-section {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__tips-section .page-tai-xiu__section-title,
.page-tai-xiu__tips-section .page-tai-xiu__section-description {
  color: #ffffff;
}

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

.page-tai-xiu__tip-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__tip-title {
  font-size: 22px;
  font-weight: 600;
  color: #FFFF00;
  margin-bottom: 10px;
}

.page-tai-xiu__tip-text {
  font-size: 16px;
  color: #f0f0f0;
}

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

/* FAQ Section */
.page-tai-xiu__faq-section {
  padding: 60px 0;
  background-color: #ffffff;
  color: #333333;
}

.page-tai-xiu__faq-list {
  margin-top: 40px;
}

.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fcfcfc;
}

.page-tai-xiu__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 20px;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  background-color: #e8f5e9;
  outline: none;
}

.page-tai-xiu__faq-item summary::-webkit-details-marker {
  display: none;
}

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

.page-tai-xiu__faq-toggle {
  font-size: 28px;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-tai-xiu__faq-answer {
  padding: 20px 25px;
  font-size: 17px;
  color: #555555;
  border-top: 1px solid #e0e0e0;
  background-color: #ffffff;
}

.page-tai-xiu__faq-answer p {
  margin-bottom: 10px;
}

.page-tai-xiu__faq-answer .page-tai-xiu__btn-link {
  margin-top: 15px;
}

/* Call to Action Bottom Section */
.page-tai-xiu__cta-bottom-section {
  padding: 80px 0;
  background-color: #017439;
  color: #ffffff;
  text-align: center;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__section-title,
.page-tai-xiu__cta-bottom-section .page-tai-xiu__section-description {
  color: #ffffff;
}

.page-tai-xiu__cta-bottom-section .page-tai-xiu__cta-buttons {
  justify-content: center;
  margin-top: 40px;
}

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

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .page-tai-xiu__main-title {
    font-size: 42px;
  }
  .page-tai-xiu__hero-description {
    font-size: 18px;
  }
  .page-tai-xiu__section-title {
    font-size: 30px;
  }
  .page-tai-xiu__section-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-tai-xiu__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-tai-xiu__hero-container {
    flex-direction: column;
    text-align: center;
    padding: 30px 15px;
    gap: 30px;
  }

  .page-tai-xiu__hero-content {
    order: 2; /* Content after image on mobile */
  }

  .page-tai-xiu__hero-image {
    order: 1;
  }

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

  .page-tai-xiu__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

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

  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary,
  .page-tai-xiu__btn-link {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-tai-xiu__intro-section,
  .page-tai-xiu__rules-section,
  .page-tai-xiu__guide-section,
  .page-tai-xiu__tips-section,
  .page-tai-xiu__faq-section,
  .page-tai-xiu__cta-bottom-section {
    padding: 40px 0;
  }

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

  .page-tai-xiu__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }

  .page-tai-xiu__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  /* Module 1: Three-column round images */
  .page-tai-xiu__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-tai-xiu__icon-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

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

  .page-tai-xiu__feature-text {
    font-size: 15px;
  }

  /* Rules section */
  .page-tai-xiu__rules-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .page-tai-xiu__rule-title {
    font-size: 22px;
  }

  .page-tai-xiu__rule-text,
  .page-tai-xiu__rule-list {
    font-size: 15px;
  }

  /* Guide section */
  .page-tai-xiu__guide-steps {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-tai-xiu__step-number {
    font-size: 40px;
  }

  .page-tai-xiu__step-title {
    font-size: 20px;
  }

  .page-tai-xiu__step-text {
    font-size: 15px;
  }

  /* Tips section */
  .page-tai-xiu__tips-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__tip-item {
    padding: 20px;
  }

  .page-tai-xiu__tip-title {
    font-size: 20px;
  }

  .page-tai-xiu__tip-text {
    font-size: 15px;
  }

  /* FAQ section */
  .page-tai-xiu__faq-item summary {
    padding: 15px 20px;
    font-size: 18px;
  }

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

  /* General image rules for mobile */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Ensure content areas don't overflow */
  .page-tai-xiu__hero-section,
  .page-tai-xiu__intro-section,
  .page-tai-xiu__rules-section,
  .page-tai-xiu__guide-section,
  .page-tai-xiu__tips-section,
  .page-tai-xiu__faq-section,
  .page-tai-xiu__cta-bottom-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
}