/* style/tai-xiu.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register: #C30808;
  --button-login: #C30808;
  --font-login-register: #FFFF00;
}

.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--secondary-color); /* Body background is white, so use dark text */
}

.page-tai-xiu__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-tai-xiu__light-bg {
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-tai-xiu__content-area {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
}

.page-tai-xiu__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: inherit; /* Inherit color from parent section (dark or light) */
  line-height: 1.2;
}

.page-tai-xiu__text-block {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: justify;
}

/* Hero Section */
.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
}

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

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

.page-tai-xiu__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--text-light); /* On dark background */
}

.page-tai-xiu__hero-description {
  font-size: 1.15em;
  line-height: 1.8;
  margin-bottom: 30px;
  color: var(--text-light);
}

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

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

.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: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
  background-color: var(--button-register);
  color: var(--font-login-register);
  border: 2px solid var(--button-register);
}

.page-tai-xiu__btn-primary:hover {
  background-color: darken(var(--button-register), 10%);
  border-color: darken(var(--button-register), 10%);
}

.page-tai-xiu__btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.page-tai-xiu__btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--primary-color);
}

.page-tai-xiu__hero-image {
  flex: 1 1 45%;
  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.3);
  display: block;
  margin: 0 auto;
}

/* Intro Section - Features Grid */
.page-tai-xiu__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: center;
}

.page-tai-xiu__feature-item {
  background-color: var(--secondary-color);
  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;
  height: 180px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.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: 1.5em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-tai-xiu__feature-description {
  font-size: 1em;
  color: var(--text-dark);
}

/* Guide Section */
.page-tai-xiu__guide-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-tai-xiu__step-item {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
}

.page-tai-xiu__step-number {
  font-size: 2.5em;
  font-weight: 800;
  color: var(--font-login-register);
  margin-bottom: 15px;
}

.page-tai-xiu__step-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-tai-xiu__step-description {
  font-size: 1em;
  color: var(--text-light);
}

/* Strategy Section */
.page-tai-xiu__strategy-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-tai-xiu__strategy-card {
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-tai-xiu__strategy-card:hover {
  transform: translateY(-5px);
}

.page-tai-xiu__strategy-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-tai-xiu__strategy-title {
  font-size: 1.3em;
  font-weight: 700;
  padding: 20px 20px 0;
  color: var(--primary-color);
}

.page-tai-xiu__strategy-description {
  font-size: 0.95em;
  padding: 10px 20px 20px;
  color: var(--text-dark);
}

/* Promo Section */
.page-tai-xiu__promo-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.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: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
}

.page-tai-xiu__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-tai-xiu__promo-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--font-login-register);
  padding: 0 15px;
}

.page-tai-xiu__promo-description {
  font-size: 1em;
  color: var(--text-light);
  margin-bottom: 25px;
  padding: 0 15px;
}

/* FAQ Section */
.page-tai-xiu__faq-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-tai-xiu__faq-item {
  background-color: var(--secondary-color);
  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.15em;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  background-color: #f9f9f9;
  list-style: none; /* For details/summary */
}

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

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

.page-tai-xiu__faq-toggle {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--primary-color);
  margin-left: 15px;
  line-height: 1;
}

.page-tai-xiu__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-dark);
  line-height: 1.7;
}

.page-tai-xiu__faq-answer p {
  margin-bottom: 0; /* Remove default paragraph margin */
}

/* --- Responsive Styles --- */

/* General responsive for images and containers */
.page-tai-xiu img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-tai-xiu__section,
.page-tai-xiu__card,
.page-tai-xiu__container,
.page-tai-xiu__hero-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-tai-xiu {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-tai-xiu__content-area {
    padding: 30px 15px;
  }

  .page-tai-xiu__section-title {
    font-size: 2em;
    margin-bottom: 20px;
  }

  .page-tai-xiu__text-block {
    font-size: 1em;
  }

  /* HERO Section - Single column */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important; /* Adhere to 10px top spacing */
    padding-bottom: 40px;
  }

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

  .page-tai-xiu__hero-content,
  .page-tai-xiu__hero-image {
    flex: 1 1 100%;
    min-width: unset;
    width: 100%;
    text-align: center;
  }

  .page-tai-xiu__main-title {
    font-size: 2.2em; /* Adjusted for mobile */
    text-align: center;
  }

  .page-tai-xiu__hero-description {
    font-size: 1em;
    text-align: center;
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  /* Buttons - forced full width */
  .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__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;
    gap: 10px;
  }

  /* Module 1 (Features Grid) */
  .page-tai-xiu__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__icon-box-media {
    width: 150px; /* Still square */
    height: 150px;
    border-width: 3px;
  }

  .page-tai-xiu__feature-title {
    font-size: 1.3em;
  }

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

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

  .page-tai-xiu__step-number {
    font-size: 2em;
  }

  .page-tai-xiu__step-title {
    font-size: 1.2em;
  }

  /* Strategy Section */
  .page-tai-xiu__strategy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__strategy-image {
    height: 180px;
  }

  .page-tai-xiu__strategy-title {
    font-size: 1.2em;
    padding: 15px 15px 0;
  }

  .page-tai-xiu__strategy-description {
    padding: 10px 15px 15px;
  }

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

  .page-tai-xiu__promo-image {
    height: 160px;
  }

  .page-tai-xiu__promo-title {
    font-size: 1.2em;
  }

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

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

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

  /* Images within content sections */
  .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;
  }
}

/* Ensure images maintain aspect ratio and don't overflow in any container */
.page-tai-xiu__hero-side-image,
.page-tai-xiu__strategy-image,
.page-tai-xiu__promo-image {
  max-width: 100%;
  height: auto;
  display: block;
}