.page-tai-xiu {
  font-family: Arial, sans-serif;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
  line-height: 1.6;
}

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

.page-tai-xiu__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-tai-xiu__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  color: #FFF1E8;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-tai-xiu p {
  margin-bottom: 1em;
  font-size: 1.1em;
}

.page-tai-xiu__list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 1em;
}

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

.page-tai-xiu__keyword {
  color: #F3C54D;
  font-weight: bold;
}

.page-tai-xiu__text-link {
  color: #FFB04A;
  text-decoration: underline;
}

.page-tai-xiu__text-link:hover {
  color: #D86A14;
}

/* Buttons */
.page-tai-xiu__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn--primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button */
  color: #FFF1E8; /* Text Main */
  border: none;
}

.page-tai-xiu__btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-tai-xiu__btn--secondary {
  background-color: #2A1212; /* Card BG */
  color: #F3C54D; /* Gold */
  border: 2px solid #F3C54D; /* Gold border */
}

.page-tai-xiu__btn--secondary:hover {
  background-color: #F3C54D;
  color: #140C0C; /* Background text */
  transform: translateY(-2px);
}

.page-tai-xiu__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-tai-xiu__cta-bottom {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 50px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Hero Section */
.page-tai-xiu__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Small top padding */
  margin-bottom: 40px;
  box-sizing: border-box;
}

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

.page-tai-xiu__hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

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

.page-tai-xiu__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
  background-color: rgba(20, 12, 12, 0.7); /* Semi-transparent background */
  border-radius: 10px;
}

.page-tai-xiu__main-title {
  font-size: 3.2em;
  font-weight: 900;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -1px;
}

.page-tai-xiu__hero-description {
  font-size: 1.3em;
  color: #FFF1E8;
  margin-bottom: 25px;
}

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

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

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

.page-tai-xiu__hero-slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.page-tai-xiu__hero-slider-dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-tai-xiu__hero-slider-dot.is-active {
  background-color: #F3C54D;
}

/* Guide Section */
.page-tai-xiu__guide-section {
  background-color: #2A1212; /* Card BG */
  padding: 60px 0;
  margin-bottom: 40px;
  border-top: 1px solid #6A1E1E;
  border-bottom: 1px solid #6A1E1E;
}

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

.page-tai-xiu__guide-card {
  flex: 0 0 18%; /* Adjusted to fit 5 cards with gap */
  max-width: 18%;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-tai-xiu__guide-card:hover {
  transform: translateY(-10px);
}

.page-tai-xiu__guide-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #F3C54D;
}

/* Positioning for the wave effect */
.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;
}

/* Content Section (home-content-box) */
.page-tai-xiu__content-section {
  padding: 40px 0;
  margin-bottom: 40px;
}

.page-tai-xiu__home-content-box {
  max-width: 90%; /* Adjusted from 91% for better fit */
  margin: 0 auto;
  padding: 10px 16px;
  border: 5px solid #6A1E1E; /* Border */
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(106, 30, 30, 0.7); /* Shadow based on border color */
  height: 700px;
  box-sizing: border-box;
}

.page-tai-xiu__home-content-inner {
  height: 100%;
  overflow-y: auto;
  padding-right: 15px; /* For scrollbar */
  box-sizing: border-box;
}

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

.page-tai-xiu__home-content-inner::-webkit-scrollbar-track {
  background: #2A1212; /* Card BG */
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb {
  background: #D86A14; /* Button gradient end */
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #FFB04A; /* Button gradient start */
}

/* Blog Section */
.page-tai-xiu__blog-section {
  padding: 40px 0;
  background-color: #2A1212; /* Card BG */
  border-top: 1px solid #6A1E1E;
}

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

.page-tai-xiu__blog-card {
  background-color: #140C0C; /* Background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #6A1E1E; /* Border */
}

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

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

.page-tai-xiu__blog-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.page-tai-xiu__blog-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  padding: 15px;
  margin: 0;
  min-height: 60px; /* Ensure consistent height for titles */
}

.page-tai-xiu__blog-meta {
  font-size: 0.9em;
  color: #FFF1E8;
  padding: 0 15px 15px;
  margin: 0;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-slider {
    height: 500px;
  }

  .page-tai-xiu__main-title {
    font-size: 2.8em;
  }

  .page-tai-xiu__hero-description {
    font-size: 1.2em;
  }

  .page-tai-xiu__guide-card {
    flex: 0 0 22%;
    max-width: 22%;
  }

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

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

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

  .page-tai-xiu__section-title {
    font-size: 2em;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.5em;
  }

  .page-tai-xiu__btn {
    padding: 10px 20px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-tai-xiu__cta-buttons,
  .page-tai-xiu__cta-bottom {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-tai-xiu__hero-slider {
    height: 350px; /* Adjusted height for mobile */
  }

  .page-tai-xiu__hero-content {
    max-width: 90%;
    padding: 15px;
  }

  .page-tai-xiu__main-title {
    font-size: 1.8em;
    margin-bottom: 10px;
  }

  .page-tai-xiu__hero-description {
    font-size: 1em;
    margin-bottom: 15px;
  }

  .page-tai-xiu__hero-slider-prev,
  .page-tai-xiu__hero-slider-next {
    padding: 10px 7px;
    font-size: 1.2em;
  }

  .page-tai-xiu__hero-slider-dots {
    bottom: 10px;
    gap: 8px;
  }

  /* 2. Guide/Features Section (5 vertical team cards) */
  .page-tai-xiu__guide-section {
    padding: 30px 0;
    margin-bottom: 20px;
  }

  .page-tai-xiu__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Base grid for detailed spanning */
    gap: 10px;
  }

  .page-tai-xiu__guide-card {
    padding-top: 0 !important; /* Reset desktop wave effect */
    flex: auto;
    max-width: 100%;
  }

  .page-tai-xiu__guide-card--pos-1,
  .page-tai-xiu__guide-card--pos-2 {
    grid-column: span 3; /* First two cards take half width each */
  }

  .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 each */
  }

  .page-tai-xiu__guide-card img {
    aspect-ratio: 250 / 350;
    object-fit: contain;
    width: 100%;
    height: auto;
  }

  /* 3. In-depth Content Section (home-content-box) */
  .page-tai-xiu__content-section {
    padding: 20px 0;
    margin-bottom: 20px;
  }

  .page-tai-xiu__home-content-box {
    max-width: 100% !important;
    height: auto !important; /* Full height on mobile */
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(106, 30, 30, 0.5);
  }

  .page-tai-xiu__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0;
  }

  /* 4. Related Blog Posts Section */
  .page-tai-xiu__blog-section {
    padding: 20px 0;
  }

  .page-tai-xiu__blog-grid {
    grid-template-columns: repeat(1, 1fr); /* Single column on mobile */
    gap: 20px;
  }

  .page-tai-xiu__blog-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .page-tai-xiu__blog-title {
    font-size: 1.1em;
    min-height: auto;
  }

  /* 5. General Images and Buttons */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !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;
  }
}