/* style/tai-xiu.css */
.page-tai-xiu {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF3E6; /* Text Main */
  background-color: #0D0E12; /* Background */
}

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

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

.page-tai-xiu__hero-section {
  position: relative;
  width: 100%;
  padding-top: 10px; /* Small top padding as shared.css handles body padding */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-tai-xiu__hero-image-wrapper {
  width: 100%;
  position: relative;
  z-index: 1;
}

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

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  max-width: 900px;
  margin-top: -100px; /* Adjust to bring content slightly over the image for visual flow */
  background: rgba(13, 14, 18, 0.85); /* Slightly transparent background for readability */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #FFB04D; /* Glow */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-tai-xiu__hero-description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #FFF3E6;
}

.page-tai-xiu__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn-primary:hover {
  background: linear-gradient(180deg, #FFB04D 0%, #FF8C1A 100%);
  transform: translateY(-2px);
}

.page-tai-xiu__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: #FFB04D; /* Glow */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-tai-xiu__content-block {
  font-size: 1.1rem;
  color: #FFF3E6;
  margin-bottom: 20px;
  text-align: justify;
}

.page-tai-xiu__sub-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #FFA53A; /* Auxiliary color */
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-tai-xiu__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #FFF3E6;
}

.page-tai-xiu__list li {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

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

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

.page-tai-xiu__image-figure figcaption {
  font-size: 0.9rem;
  color: #A84F0C; /* Border color as a subtle text */
  margin-top: 10px;
}

/* Guide Section - Five vertical cards */
.page-tai-xiu__guide-section {
  background-color: #17191F; /* Card BG */
  padding: 60px 0;
}

.page-tai-xiu__guide-box {
  padding: 30px;
  background: #0D0E12; /* Background */
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid #A84F0C; /* Border */
}

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

.page-tai-xiu__guide-card {
  flex: 0 0 calc(20% - 16px); /* 5 cards per row, accounting for gap */
  max-width: calc(20% - 16px);
  text-align: center;
  padding-top: 0; /* Default, positions adjusted by specific classes */
}

.page-tai-xiu__guide-card--pos-1,
.page-tai-xiu__guide-card--pos-5 {
  padding-top: 50px;
}

.page-tai-xiu__guide-card--pos-2,
.page-tai-xiu__guide-card--pos-4 {
  padding-top: 25px;
}

.page-tai-xiu__guide-card img {
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
  object-fit: contain;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid #A84F0C;
}

/* Home Content Box (for main detailed text) */
.page-tai-xiu__home-content-box {
  max-width: 91%;
  margin: 0 auto;
  padding: 20px 30px;
  background: #17191F; /* Card BG */
  border: 5px solid #A84F0C; /* Border */
  border-radius: 15px;
  box-shadow: 0 0 20px #FFB04D; /* Glow */
  height: 700px; /* Fixed height for desktop */
}

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

/* Custom scrollbar for home-content-inner */
.page-tai-xiu__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-track {
  background: #0D0E12; /* Background */
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb {
  background: #FFA53A; /* Auxiliary color */
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #FF8C1A; /* Main color */
}

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

.page-tai-xiu__faq-item {
  background: #17191F; /* Card BG */
  border: 1px solid #A84F0C; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  color: #FFF3E6;
  background: #0D0E12; /* Background */
  border-bottom: 1px solid #A84F0C; /* Border */
}

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

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-question {
  background: #FF8C1A; /* Main color when open */
  color: #ffffff;
  border-bottom-color: transparent;
}

.page-tai-xiu__faq-item[open] .page-tai-xiu__faq-toggle {
  content: '-';
}

.page-tai-xiu__faq-toggle {
  font-size: 1.5rem;
  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: 15px 20px;
  font-size: 1rem;
  color: #FFF3E6;
}

/* Blog Grid Section */
.page-tai-xiu__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns for blog cards */
  gap: 30px;
  margin-top: 30px;
}

.page-tai-xiu__blog-card {
  background: #17191F; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  border: 1px solid #A84F0C; /* Border */
}

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

.page-tai-xiu__blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-tai-xiu__blog-card-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #FFB04D; /* Glow */
  padding: 15px;
  margin-bottom: 5px;
}

.page-tai-xiu__blog-card-excerpt {
  font-size: 0.95rem;
  color: #FFF3E6;
  padding: 0 15px 15px;
}

.page-tai-xiu__blog-card-date {
  font-size: 0.85rem;
  color: #FFA53A; /* Auxiliary color */
  display: block;
  padding: 0 15px 15px;
}

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

.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: #17191F; /* Card BG */
  color: #FF8C1A; /* Main color */
  border: 2px solid #FF8C1A; /* Main color */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn-secondary:hover {
  background: #FF8C1A; /* Main color */
  color: #ffffff;
}

/* Conclusion Section */
.page-tai-xiu__conclusion-section {
  text-align: center;
  padding-bottom: 60px;
}

.page-tai-xiu__conclusion-section .page-tai-xiu__content-block {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

.page-tai-xiu a {
  color: #FF8C1A;
  text-decoration: none;
}

.page-tai-xiu a:hover {
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__container {
    padding: 15px;
  }

  .page-tai-xiu__hero-content {
    margin-top: -80px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .page-tai-xiu__hero-description {
    font-size: 1.1rem;
  }

  .page-tai-xiu__guide-card {
    flex: 0 0 calc(33.333% - 13.333px); /* 3 cards per row */
    max-width: calc(33.333% - 13.333px);
  }

  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-5 {
    padding-top: 30px;
  }
  .page-tai-xiu__guide-card--pos-2, .page-tai-xiu__guide-card--pos-4 {
    padding-top: 15px;
  }

  .page-tai-xiu__home-content-box {
    height: 600px;
  }

  .page-tai-xiu__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .page-tai-xiu__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  /* Hero Section */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important;
  }

  .page-tai-xiu__hero-content {
    margin-top: -60px;
    padding: 15px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .page-tai-xiu__hero-description {
    font-size: 1rem;
  }

  .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;
    display: flex;
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  /* Guide Section - Five vertical cards (top two, bottom three) */
  .page-tai-xiu__guide-section {
    padding: 40px 0;
  }
  .page-tai-xiu__guide-box {
    padding: 20px;
  }
  .page-tai-xiu__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Base grid for detailed spanning */
    gap: 15px;
  }
  .page-tai-xiu__guide-card {
    padding-top: 0 !important; /* Reset padding for mobile grid */
  }
  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-2 {
    grid-column: span 3; /* Top two cards take 3 columns each */
    max-width: 100%;
    flex: none;
  }
  .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; /* Bottom three cards take 2 columns each */
    max-width: 100%;
    flex: none;
  }
  .page-tai-xiu__guide-card img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  /* Home Content Box */
  .page-tai-xiu__home-content-box {
    max-width: 100%;
    height: auto; /* Auto height for mobile */
    padding: 15px;
    box-sizing: border-box !important;
  }
  .page-tai-xiu__home-content-inner {
    height: auto; /* Auto height for mobile */
    overflow: visible; /* No scrollbar for mobile */
    padding-right: 0;
  }

  /* Blog Grid */
  .page-tai-xiu__blog-grid {
    grid-template-columns: 1fr; /* Single column for blog cards */
    gap: 20px;
  }
  .page-tai-xiu__blog-card-image {
    height: 200px; /* Adjust height for single column */
  }

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

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

  .page-tai-xiu__faq-answer {
    padding: 12px 15px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .page-tai-xiu__guide-grid {
    grid-template-columns: 1fr; /* Single column for all guide cards on very small screens */
  }
  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-2, .page-tai-xiu__guide-card--pos-3, .page-tai-xiu__guide-card--pos-4, .page-tai-xiu__guide-card--pos-5 {
    grid-column: span 1; /* Each card takes full width */
    max-width: 100%;
    flex: none;
  }
}