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

.page-tai-xiu__article-wrap {
  max-width: 1150px;
  margin: 0 auto;
  padding: 20px;
}

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

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

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

.page-tai-xiu__sub-title {
  font-size: 1.8em;
  color: #017439;
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-tai-xiu__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-tai-xiu__highlight {
  font-weight: bold;
  color: #017439;
}

/* Hero Section */
.page-tai-xiu__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-tai-xiu__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Subtle overlay for text readability */
  border-radius: 8px;
}

.page-tai-xiu__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFF00; /* Register/Login font color */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

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

.page-tai-xiu__btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

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

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

.page-tai-xiu__btn-small {
  padding: 8px 15px;
  font-size: 0.9em;
}

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

/* Image & Figure styles */
.page-tai-xiu__figure {
  margin: 40px 0;
  text-align: center;
}

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

.page-tai-xiu__figcaption {
  font-size: 0.9em;
  color: #666666;
  margin-top: 10px;
}

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

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

.page-tai-xiu__step-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

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

/* Rules Table */
.page-tai-xiu__table-container {
  overflow-x: auto;
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-tai-xiu__rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  min-width: 600px; /* Ensure table is readable on smaller desktops */
}

.page-tai-xiu__rules-table th,
.page-tai-xiu__rules-table td {
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
  text-align: left;
}

.page-tai-xiu__rules-table th {
  background-color: #017439;
  color: #ffffff;
  font-weight: bold;
}

.page-tai-xiu__rules-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.page-tai-xiu__rules-table tr:hover {
  background-color: #f1f1f1;
}

.page-tai-xiu__note {
  font-size: 0.9em;
  color: #666666;
  text-align: center;
  margin-top: 20px;
}

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

.page-tai-xiu__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #ffffff;
}

.page-tai-xiu__feature-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFFF00; /* Register/Login font color */
}

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

.page-tai-xiu__promo-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-tai-xiu__promo-title {
  font-size: 1.3em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

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

.page-tai-xiu__tip-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__tip-title {
  font-size: 1.4em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

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

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

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #f7f7f7;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.3s ease;
}

.page-tai-xiu__faq-question:hover {
  background-color: #e9e9e9;
}

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

.page-tai-xiu__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
  content: "-";
}

.page-tai-xiu__faq-answer {
  padding: 15px 25px 25px;
  font-size: 1em;
  color: #555555;
}

/* Final CTA Section */
.page-tai-xiu__final-cta-section {
  background-color: #017439;
  color: #ffffff;
  text-align: center;
  padding: 80px 0;
}

.page-tai-xiu__cta-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__article-wrap {
    padding: 0 30px;
  }

  .page-tai-xiu__section-title {
    font-size: 2em;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.6em;
  }

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

  .page-tai-xiu__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }

  .page-tai-xiu__btn {
    padding: 10px 25px;
  }

  .page-tai-xiu__step-item, .page-tai-xiu__feature-item, .page-tai-xiu__promo-card, .page-tai-xiu__tip-item {
    padding: 25px;
  }

  .page-tai-xiu__rules-table th, .page-tai-xiu__rules-table td {
    padding: 10px 12px;
  }

  .page-tai-xiu__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-tai-xiu__faq-answer {
    padding: 12px 20px 20px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + dual CTA */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 40px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important; /* Smaller on mobile */
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column !important;
    gap: 15px;
    padding: 0 15px;
  }

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

  /* 2. Single column long text container */
  .page-tai-xiu__article-wrap,
  .page-tai-xiu__cta-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-tai-xiu__section {
    padding: 40px 0;
  }

  .page-tai-xiu__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.4em !important;
  }

  .page-tai-xiu__description {
    font-size: 1em !important;
  }

  /* 3. General images and figure */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .page-tai-xiu__figure {
    margin: 30px 0;
  }

  .page-tai-xiu__figcaption {
    font-size: 0.85em !important;
  }

  /* 4. Buttons and button containers */
  .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: 15px !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column !important;
  }

  /* 5. Registration tutorial and FAQ block */
  .page-tai-xiu__step-list,
  .page-tai-xiu__feature-list,
  .page-tai-xiu__promo-grid,
  .page-tai-xiu__tip-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
    margin-top: 30px;
  }

  .page-tai-xiu__step-item,
  .page-tai-xiu__feature-item,
  .page-tai-xiu__promo-card,
  .page-tai-xiu__tip-item {
    padding: 20px;
  }

  .page-tai-xiu__step-title,
  .page-tai-xiu__feature-title,
  .page-tai-xiu__promo-title,
  .page-tai-xiu__tip-title {
    font-size: 1.2em !important;
  }

  .page-tai-xiu__rules-table {
    min-width: unset;
  }

  .page-tai-xiu__rules-table th,
  .page-tai-xiu__rules-table td {
    font-size: 0.9em !important;
    padding: 8px 10px;
  }

  .page-tai-xiu__faq-question {
    font-size: 1em !important;
    padding: 15px 20px;
  }

  .page-tai-xiu__faq-answer {
    font-size: 0.9em !important;
    padding: 10px 20px 15px;
  }
}