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

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

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

.page-tai-xiu__section-title--light {
  color: #FFFFFF;
}

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

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, relying on shared body padding-top */
  padding-bottom: 60px;
  background-color: #f8f8f8;
}

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

.page-tai-xiu__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  text-align: left;
}

.page-tai-xiu__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  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: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
}

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

.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 10px 30px rgba(0, 0, 0, 0.1);
}

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

.page-tai-xiu__features-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;
  padding: 20px;
  border-radius: 12px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-tai-xiu__icon-box-media {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  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;
  display: block;
}

.page-tai-xiu__feature-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 10px;
}

.page-tai-xiu__feature-text {
  font-size: 1em;
  color: #666666;
}

.page-tai-xiu__game-tabs-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background for this section */
  color: #FFFFFF; /* Light text for dark background */
}

.page-tai-xiu__tab-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.page-tai-xiu__tab-button {
  background-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__tab-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.page-tai-xiu__tab-button.is-active {
  background-color: #FFFFFF;
  color: #017439;
  border-color: #FFFFFF;
}

.page-tai-xiu__tab-content {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__game-panel {
  display: none;
  color: #333333; /* Dark text for light background */
}

.page-tai-xiu__game-panel.is-active {
  display: block;
}

.page-tai-xiu__panel-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 20px;
  text-align: center;
}

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

.page-tai-xiu__panel-text {
  flex: 1 1 55%;
  min-width: 300px;
}

.page-tai-xiu__panel-text p {
  margin-bottom: 15px;
}

.page-tai-xiu__panel-text ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 15px;
}

.page-tai-xiu__panel-text li {
  margin-bottom: 8px;
}

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

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

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

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

.page-tai-xiu__promo-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding-bottom: 20px;
  text-align: center;
  overflow: hidden;
}

.page-tai-xiu__promo-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-bottom: 20px;
}

.page-tai-xiu__promo-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 10px;
  padding: 0 20px;
}

.page-tai-xiu__promo-text {
  font-size: 1em;
  color: #666666;
  margin-bottom: 20px;
  padding: 0 20px;
}

.page-tai-xiu__promo-card .page-tai-xiu__btn-primary {
  margin: 0 20px;
  width: calc(100% - 40px);
}

.page-tai-xiu__view-all-promos {
  text-align: center;
  margin-top: 40px;
}

.page-tai-xiu__faq-section {
  padding: 60px 0;
  background-color: #017439; /* Dark background */
  color: #FFFFFF; /* Light text */
}

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

.page-tai-xiu__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #FFFFFF;
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none; /* For details/summary */
}

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.page-tai-xiu__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
  transform: rotate(45deg);
}

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

.page-tai-xiu__final-cta-section {
  padding: 60px 0;
  background-color: #FFFFFF;
  text-align: center;
}

.page-tai-xiu__final-cta-section .page-tai-xiu__cta-buttons {
  justify-content: center;
  margin-top: 30px;
}

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

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .page-tai-xiu__hero-content {
    text-align: center;
  }

  .page-tai-xiu__hero-description {
    text-align: center;
  }

  .page-tai-xiu__cta-buttons {
    justify-content: center;
  }

  .page-tai-xiu__panel-grid {
    flex-direction: column;
  }

  .page-tai-xiu__panel-text,
  .page-tai-xiu__panel-image {
    min-width: unset;
    width: 100%;
  }

  .page-tai-xiu__promo-image {
    height: 200px; /* Adjust height for smaller screens */
  }
}

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

  .page-tai-xiu__hero-container {
    padding: 20px 15px !important;
    gap: 20px !important;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
    margin-bottom: 15px !important;
  }

  .page-tai-xiu__hero-description {
    font-size: 1em !important;
    margin-bottom: 20px !important;
  }

  /* Buttons & Button Containers */
  .page-tai-xiu__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .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-left: 15px !important;
    padding-right: 15px !important;
  }

  .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;
    padding-right: 15px;
    flex-wrap: wrap !important;
  }

  /* Module 1 (Three-Column Intro) - Feature Items */
  .page-tai-xiu__features-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .page-tai-xiu__icon-box-media {
    width: 150px !important;
    height: 150px !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 6px rgba(1, 116, 57, 0.2) !important;
  }

  /* Game Tabs Section */
  .page-tai-xiu__tab-nav {
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 30px !important;
  }

  .page-tai-xiu__tab-button {
    font-size: 0.95em !important;
    padding: 10px 20px !important;
  }

  .page-tai-xiu__tab-content {
    padding: 20px 15px !important;
  }

  .page-tai-xiu__panel-title {
    font-size: 1.5em !important;
    margin-bottom: 15px !important;
  }

  .page-tai-xiu__panel-grid {
    flex-direction: column !important;
    gap: 20px !important;
  }

  /* Promo Section */
  .page-tai-xiu__promo-cards {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  .page-tai-xiu__promo-image {
    height: 180px !important;
  }

  .page-tai-xiu__promo-title {
    font-size: 1.3em !important;
  }

  .page-tai-xiu__promo-text {
    font-size: 0.95em !important;
  }

  .page-tai-xiu__promo-card .page-tai-xiu__btn-primary {
    width: calc(100% - 30px) !important;
    margin: 0 15px !important;
  }

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

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

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

  /* General content sections */
  .page-tai-xiu__section-title {
    font-size: 2em !important;
    margin-bottom: 15px !important;
  }

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

  /* All images */
  .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;
  }

  .page-tai-xiu__promo-card .page-tai-xiu__btn-primary {
    padding: 12px 20px !important;
  }
}