/* style/tai-xiu.css */

/* General Styles for .page-tai-xiu scope */
.page-tai-xiu {
  font-family: Arial, sans-serif;
  color: #333333; /* Default dark text for light body background */
  line-height: 1.6;
  background-color: #f8f8f8; /* Light background for the page content */
}

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

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

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

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

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  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: transparent;
  color: #017439;
  border: 2px solid #017439;
}

.page-tai-xiu__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__btn-secondary--white {
  color: #ffffff;
  border-color: #ffffff;
}

.page-tai-xiu__btn-secondary--white:hover {
  background-color: #ffffff;
  color: #017439;
}

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

/* HERO Section */
.page-tai-xiu__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
  margin-bottom: 40px;
}

.page-tai-xiu__hero-image-wrapper {
  width: 100%;
  height: 600px; /* Fixed height for desktop hero */
  overflow: hidden;
  position: relative;
}

.page-tai-xiu__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Default cover for desktop */
}

.page-tai-xiu__hero-content {
  text-align: center;
  padding: 40px 20px;
  background-color: #017439; /* Brand color background for text */
  color: #ffffff;
}

.page-tai-xiu__main-title {
  font-size: clamp(32px, 4vw, 48px); /* Responsive font size */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__hero-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

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

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

.page-tai-xiu__content-text {
  flex: 1;
  font-size: 17px;
}

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

.page-tai-xiu__content-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-tai-xiu__image-responsive {
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* How To Play Section */
.page-tai-xiu__how-to-play-section {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

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

.page-tai-xiu__step-card {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-tai-xiu__step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFF00; /* Yellow for step titles */
}

.page-tai-xiu__step-card p {
  font-size: 16px;
  color: #f0f0f0;
}

.page-tai-xiu__step-card a {
  color: #FFFF00; /* Yellow for links in steps */
  text-decoration: underline;
}

.page-tai-xiu__step-card a:hover {
  color: #fff;
}

.page-tai-xiu__cta-center {
  text-align: center;
}

/* Strategy Section */
.page-tai-xiu__strategy-section {
  padding: 60px 0;
  background-color: #f8f8f8;
}

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

.page-tai-xiu__strategy-card {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.page-tai-xiu__card-image {
  border-radius: 8px;
  margin-bottom: 20px;
  width: 100%; /* Ensure card images fill width */
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
}

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

.page-tai-xiu__strategy-card p {
  font-size: 16px;
  color: #555555;
}

/* Why Choose Us Section */
.page-tai-xiu__why-choose-us {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

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

.page-tai-xiu__feature-card {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.page-tai-xiu__feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFF00; /* Yellow for feature titles */
}

.page-tai-xiu__feature-card p {
  font-size: 16px;
  color: #f0f0f0;
}

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

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

details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
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;
}
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: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.page-tai-xiu__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure contrast */
}

/* Final CTA Section */
.page-tai-xiu__cta-final-section {
  padding: 60px 0;
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__final-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Responsive Styles */

/* @media (max-width: 1024px) for wider tablets */
@media (max-width: 1024px) {
  .page-tai-xiu__container {
    padding: 15px;
  }
  .page-tai-xiu__section-title {
    font-size: 32px;
  }
  .page-tai-xiu__hero-image-wrapper {
    height: 500px;
  }
  .page-tai-xiu__hero-description {
    font-size: 18px;
  }
}

/* @media (max-width: 849px) for hero image object-fit */
@media (max-width: 849px) {
  .page-tai-xiu__hero-image {
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
  .page-tai-xiu__hero-image-wrapper {
    height: auto; /* Allow height to adjust with contain */
  }
}


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

  /* General container and image responsiveness */
  .page-tai-xiu__container,
  .page-tai-xiu__hero-section,
  .page-tai-xiu__intro-section,
  .page-tai-xiu__how-to-play-section,
  .page-tai-xiu__strategy-section,
  .page-tai-xiu__why-choose-us,
  .page-tai-xiu__faq-section,
  .page-tai-xiu__cta-final-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* HERO Section Mobile */
  .page-tai-xiu__hero-section {
    padding-top: 10px; /* Still small top padding */
  }
  .page-tai-xiu__hero-image-wrapper {
    height: auto;
  }
  .page-tai-xiu__hero-image {
    object-fit: contain !important; /* Ensure image is fully visible */
    aspect-ratio: unset !important;
  }
  .page-tai-xiu__hero-content {
    padding: 30px 15px;
  }
  .page-tai-xiu__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-tai-xiu__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-tai-xiu__hero-cta-buttons,
  .page-tai-xiu__final-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Section Titles & Descriptions Mobile */
  .page-tai-xiu__section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .page-tai-xiu__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Intro Section Mobile */
  .page-tai-xiu__content-grid {
    flex-direction: column;
    gap: 30px;
  }
  .page-tai-xiu__content-text {
    font-size: 16px;
  }

  /* How To Play Section Mobile */
  .page-tai-xiu__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-tai-xiu__step-card {
    padding: 25px;
  }
  .page-tai-xiu__step-title {
    font-size: 20px;
  }

  /* Strategy Section Mobile */
  .page-tai-xiu__strategy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-tai-xiu__card-image {
    height: 180px;
  }
  .page-tai-xiu__card-title {
    font-size: 20px;
  }

  /* Why Choose Us Section Mobile */
  .page-tai-xiu__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-tai-xiu__feature-title {
    font-size: 20px;
  }

  /* FAQ Section Mobile */
  details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
    padding: 15px;
  }
  .page-tai-xiu__faq-qtext {
    font-size: 15px;
  }
  .page-tai-xiu__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
    padding: 0 15px 15px;
  }

  /* Buttons Mobile */
  .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;
    padding-right: 15px;
  }

  .page-tai-xiu__hero-cta-buttons,
  .page-tai-xiu__final-cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 15px; /* Adjust gap for vertical stacking */
  }
}