/* style/tai-xiu.css */
.page-tai-xiu {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-main, #FFF6D6); /* Default text color for dark background */
  background-color: var(--color-background, #0A0A0A); /* Default background color */
}

.page-tai-xiu__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-glow, #FFD36B);
  text-shadow: 0 0 10px rgba(255, 211, 107, 0.5);
}

.page-tai-xiu__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--color-primary, #F2C14E);
}

.page-tai-xiu__text-block {
  margin-bottom: 1em;
  color: var(--color-text-main, #FFF6D6);
}

.page-tai-xiu__list,
.page-tai-xiu__list-ordered {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1em;
  color: var(--color-text-main, #FFF6D6);
}

.page-tai-xiu__list-ordered {
  list-style-type: decimal;
}

.page-tai-xiu__list li,
.page-tai-xiu__list-ordered li {
  margin-bottom: 0.5em;
}

/* Hero Section */
.page-tai-xiu__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Adjusted for fixed header, as body handles main offset */
  overflow: hidden;
  color: var(--color-text-main, #FFF6D6);
  background-color: var(--color-background, #0A0A0A);
}

.page-tai-xiu__hero-slider {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.page-tai-xiu__hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page-tai-xiu__hero-slide.is-active {
  opacity: 1;
}

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

.page-tai-xiu__hero-slider-prev,
.page-tai-xiu__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 15px 10px;
  cursor: pointer;
  font-size: 2em;
  z-index: 10;
  border-radius: 5px;
}

.page-tai-xiu__hero-slider-prev {
  left: 10px;
}

.page-tai-xiu__hero-slider-next {
  right: 10px;
}

.page-tai-xiu__hero-content {
  max-width: 1200px;
  margin: 40px auto;
  text-align: center;
  padding: 0 20px;
}

.page-tai-xiu__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-glow, #FFD36B);
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(255, 211, 107, 0.7);
}

.page-tai-xiu__subtitle {
  font-size: 1.2em;
  color: var(--color-text-main, #FFF6D6);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  border: none;
}

.page-tai-xiu__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.page-tai-xiu__btn-secondary {
  background: none;
  border: 2px solid var(--color-primary, #F2C14E);
  color: var(--color-primary, #F2C14E);
}

.page-tai-xiu__btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.3);
  background-color: rgba(242, 193, 78, 0.1);
}

.page-tai-xiu__btn-primary--large,
.page-tai-xiu__btn-secondary--large {
  padding: 18px 35px;
  font-size: 1.1em;
}

.page-tai-xiu__cta-buttons--centered {
  margin-top: 40px;
  margin-bottom: 60px;
}

/* Guide Box Section */
.page-tai-xiu__guide-box {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  background: var(--color-card-bg, #111111);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-border, #3A2A12);
}

.page-tai-xiu__guide-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.page-tai-xiu__guide-card {
  flex: 0 0 calc(20% - 16px); /* 5 items per row, accounting for gap */
  max-width: calc(20% - 16px);
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-tai-xiu__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(242, 193, 78, 0.3);
}

.page-tai-xiu__guide-card--pos-1 { padding-top: 50px; }
.page-tai-xiu__guide-card--pos-2 { padding-top: 25px; }
.page-tai-xiu__guide-card--pos-3 { padding-top: 0px; }
.page-tai-xiu__guide-card--pos-4 { padding-top: 25px; }
.page-tai-xiu__guide-card--pos-5 { padding-top: 50px; }

.page-tai-xiu__guide-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical cards */
  object-fit: contain;
  border-radius: 8px;
}

/* Home Content Box (main text area) */
.page-tai-xiu__home-content-box {
  max-width: 91%;
  margin: 60px auto;
  padding: 30px;
  border: 5px solid var(--color-border, #3A2A12);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--color-glow, #FFD36B);
  height: 700px; /* Fixed height for desktop */
  background-color: var(--color-card-bg, #111111);
  color: var(--color-text-main, #FFF6D6);
}

.page-tai-xiu__home-content-inner {
  height: 100%;
  overflow-y: auto; /* Scrollable content for fixed height */
  padding-right: 15px; /* Space for scrollbar */
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-track {
  background: var(--color-background, #0A0A0A);
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb {
  background: var(--color-primary, #F2C14E);
  border-radius: 10px;
}

.page-tai-xiu__image-container {
  margin: 30px 0;
  text-align: center;
}

.page-tai-xiu__content-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__image-caption {
  font-size: 0.9em;
  color: #bbb;
  margin-top: 10px;
}

/* FAQ Section */
.page-tai-xiu__faq-list {
  max-width: 900px;
  margin: 40px auto;
}

.page-tai-xiu__faq-item {
  background: var(--color-card-bg, #111111);
  border: 1px solid var(--color-border, #3A2A12);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--color-text-main, #FFF6D6);
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--color-primary, #F2C14E);
  background-color: rgba(242, 193, 78, 0.05);
}

.page-tai-xiu__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.1);
}

.page-tai-xiu__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  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: 0 25px 20px 25px;
  font-size: 1em;
  line-height: 1.6;
  color: var(--color-text-main, #FFF6D6);
}

/* Blog Section */
.page-tai-xiu__blog-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px 20px;
  background: var(--color-card-bg, #111111);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-border, #3A2A12);
  color: var(--color-text-main, #FFF6D6);
}

.page-tai-xiu__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.page-tai-xiu__blog-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--color-border, #3A2A12);
}

.page-tai-xiu__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 211, 107, 0.4);
}

.page-tai-xiu__blog-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-tai-xiu__blog-card-content {
  padding: 20px;
}

.page-tai-xiu__blog-card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-tai-xiu__blog-card-title a {
  color: var(--color-primary, #F2C14E);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-tai-xiu__blog-card-title a:hover {
  color: var(--color-glow, #FFD36B);
}

.page-tai-xiu__blog-card-meta {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 15px;
}

.page-tai-xiu__blog-card-description {
  font-size: 1em;
  color: var(--color-text-main, #FFF6D6);
  margin-bottom: 20px;
}

.page-tai-xiu__btn-link {
  display: inline-block;
  color: var(--color-glow, #FFD36B);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--color-glow, #FFD36B);
  padding-bottom: 5px;
  transition: all 0.3s ease;
}

.page-tai-xiu__btn-link:hover {
  color: #fff;
  border-color: #fff;
}

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

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

.page-tai-xiu__btn-container,
.page-tai-xiu__cta-buttons {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
  .page-tai-xiu__guide-card {
    flex: 0 0 calc(33.333% - 14px); /* 3 items per row */
    max-width: calc(33.333% - 14px);
  }
  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-5 {
    padding-top: 0;
  }
  .page-tai-xiu__guide-card--pos-2, .page-tai-xiu__guide-card--pos-4 {
    padding-top: 0;
  }
  .page-tai-xiu__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Hero Section */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(2em, 8vw, 2.5em);
  }
  .page-tai-xiu__subtitle {
    font-size: 1em;
  }
  .page-tai-xiu__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  /* Guide Box Section - 上二下三 layout */
  .page-tai-xiu__guide-box {
    margin: 40px 15px;
    padding: 20px 15px;
  }
  .page-tai-xiu__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Base grid for flexible span */
    gap: 15px;
  }
  .page-tai-xiu__guide-card {
    padding-top: 0 !important; /* Reset all padding-top */
    flex: none;
    max-width: none;
  }
  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-2 {
    grid-column: span 3; /* First two cards take half width */
  }
  .page-tai-xiu__guide-card--pos-3, .page-tai-xiu__guide-card--pos-4, .page-tai-xiu__guide-card--pos-5 {
    grid-column: span 2; /* Remaining three cards take one-third width */
  }
  .page-tai-xiu__guide-card img {
    aspect-ratio: 250 / 350; /* Maintain aspect ratio */
  }

  /* Home Content Box */
  .page-tai-xiu__home-content-box {
    max-width: 100%;
    margin: 40px 15px;
    height: auto; /* Allow content to expand */
    padding: 20px;
    box-shadow: none;
  }
  .page-tai-xiu__home-content-inner {
    height: auto;
    overflow: visible; /* Remove scrollbar */
    padding-right: 0;
  }
  .page-tai-xiu__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  .page-tai-xiu__sub-title {
    font-size: 1.4em;
  }

  /* Blog Section */
  .page-tai-xiu__blog-section {
    margin: 40px 15px;
    padding: 20px 15px;
  }
  .page-tai-xiu__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-tai-xiu__blog-card-image {
    height: 180px;
  }
  .page-tai-xiu__blog-card-title {
    font-size: 1.2em;
  }
  .page-tai-xiu__blog-card-description {
    font-size: 0.95em;
  }

  /* General image and container responsiveness */
  .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,
  .page-tai-xiu__faq-list,
  .page-tai-xiu__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-tai-xiu__faq-question {
    padding: 15px 20px;
  }
  .page-tai-xiu__faq-answer {
    padding: 0 20px 15px 20px;
  }
}