/* Base Styles for Tai Xiu Page */
.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Explicitly set for clarity, assuming shared default is white */
}

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

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

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

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

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

.page-tai-xiu__article-body {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 30px;
}

.page-tai-xiu__article-body p {
  margin-bottom: 15px;
}

.page-tai-xiu__article-body ul,
.page-tai-xiu__article-body ol {
  margin-bottom: 15px;
  padding-left: 25px;
}

.page-tai-xiu__article-body li {
  margin-bottom: 8px;
}

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

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

.page-tai-xiu__hero-image {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  margin-top: -100px; /* Pull up to overlap image slightly for design */
  max-width: 800px;
}

.page-tai-xiu__main-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-tai-xiu__hero-description {
  font-size: 18px;
  color: #333333;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.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: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
}

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

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

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

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

/* Intro Section */
.page-tai-xiu__intro-section p strong {
  color: #017439;
}

/* How-To-Play Section */
.page-tai-xiu__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__dark-section .page-tai-xiu__subtitle {
  color: #ffffff;
}

.page-tai-xiu__dark-section .page-tai-xiu__article-body {
  color: #f0f0f0;
}

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

.page-tai-xiu__card {
  background-color: #ffffff;
  color: #333333;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-tai-xiu__card-title {
  font-size: 20px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-tai-xiu__card p {
  font-size: 16px;
  line-height: 1.6;
}

/* Promotions Section */
.page-tai-xiu__light-bg {
  background-color: #f9f9f9;
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
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;
  color: #333333;
  font-weight: 600;
}
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: #f5f5f5;
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #017439;
}
.page-tai-xiu__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px;
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  color: #555555;
  font-size: 16px;
  line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-section {
    min-height: 500px;
  }
  .page-tai-xiu__hero-image {
    height: 500px;
  }
  .page-tai-xiu__hero-content {
    margin-top: -80px;
    padding: 30px 20px;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(26px, 3.5vw, 40px);
  }
  .page-tai-xiu__hero-description {
    font-size: 17px;
  }
  .page-tai-xiu__section-title {
    font-size: 32px;
  }
  .page-tai-xiu__subtitle {
    font-size: 22px;
  }
  .page-tai-xiu__grid-3-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  .page-tai-xiu__card {
    padding: 20px;
  }
  .page-tai-xiu__card-title {
    font-size: 18px;
  }
  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
  }
  details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    padding: 15px 18px;
  }
  .page-tai-xiu__faq-qtext {
    font-size: 17px;
  }
  .page-tai-xiu__faq-toggle {
    font-size: 26px;
  }
  details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
    padding: 0 18px 18px;
  }
}

@media (max-width: 768px) {
  .page-tai-xiu__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-tai-xiu__section-padding {
    padding: 40px 0;
  }
  .page-tai-xiu__hero-section {
    min-height: 400px;
    padding-top: 10px; /* Ensure small top padding */
  }
  .page-tai-xiu__hero-image {
    height: 250px;
    overflow-x: hidden !important; /* Prevent overflow */
  }
  .page-tai-xiu__hero-image img {
    object-fit: contain !important; /* HERO: object-fit:contain */
    aspect-ratio: unset !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-tai-xiu__hero-content {
    margin-top: -50px;
    padding: 25px 15px;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 15px;
  }
  .page-tai-xiu__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .page-tai-xiu__cta-buttons {
    flex-direction: column !important; /* Buttons: flex-direction: column */
    gap: 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 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 15px;
    font-size: 16px;
  }
  .page-tai-xiu__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-tai-xiu__subtitle {
    font-size: 20px;
  }
  .page-tai-xiu__article-body {
    font-size: 16px;
    max-width: 100% !important; /* Long text SEO area */
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .page-tai-xiu__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 20px auto !important;
    box-sizing: border-box !important;
  }
  .page-tai-xiu__grid-3-cols {
    grid-template-columns: 1fr; /* Products: Single column */
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    overflow-x: hidden !important;
  }
  .page-tai-xiu__card {
    padding: 20px;
  }
  .page-tai-xiu__card-title {
    font-size: 18px;
  }
  details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    padding: 15px;
  }
  .page-tai-xiu__faq-qtext {
    font-size: 16px;
  }
  .page-tai-xiu__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
    padding: 0 15px 15px;
    font-size: 15px;
  }
  .page-tai-xiu__intro-section, .page-tai-xiu__how-to-play-section, .page-tai-xiu__strategy-section, .page-tai-xiu__promotions-section, .page-tai-xiu__registration-section, .page-tai-xiu__faq-section {
    overflow-x: hidden !important; /* Ensure no horizontal scroll for sections */
  }
}