.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  color: #1F2D3D;
  background-color: #F4F7FB;
  line-height: 1.6;
}

.page-tai-xiu__hero-carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Adhere to fixed header spacing rule */
  background-color: #2F6BFF;
}

.page-tai-xiu__hero-slider {
  position: relative;
  width: 100%;
  height: 600px; /* Fixed height for desktop hero */
  display: flex;
  align-items: center;
  justify-content: center;
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-tai-xiu__hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px 15%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  color: #ffffff;
  text-align: center;
  box-sizing: border-box;
}

.page-tai-xiu__hero-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-tai-xiu__hero-description {
  font-size: 1.25rem;
  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;
}

.page-tai-xiu__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1F2D3D;
  text-align: center;
  margin-bottom: 20px;
  margin-top: 60px;
}

.page-tai-xiu__section-description {
  font-size: 1.1rem;
  color: #1F2D3D;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-tai-xiu__guide-box {
  padding: 40px 20px 60px;
  background-color: #F4F7FB;
  margin-top: 40px;
}

.page-tai-xiu__guide-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.page-tai-xiu__guide-card {
  flex: 0 0 calc(20% - 12px);
  max-width: calc(20% - 12px);
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

.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__home-content-box {
  max-width: 91%;
  margin: 60px auto;
  padding: 10px 16px;
  border: 5px solid #D6E2FF;
  border-radius: 15px;
  box-shadow: 0 0 20px #A5C4FF;
  height: 700px;
  background-color: #ffffff;
  box-sizing: border-box;
}

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

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

.page-tai-xiu__home-content-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb {
  background: #2F6BFF;
  border-radius: 10px;
}

.page-tai-xiu__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: #4A8BFF;
}

.page-tai-xiu__content-title {
  font-size: 2rem;
  color: #1F2D3D;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
  padding-top: 20px;
}

.page-tai-xiu__sub-title {
  font-size: 1.6rem;
  color: #2F6BFF;
  margin-top: 30px;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-tai-xiu p {
  margin-bottom: 15px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1F2D3D;
}

.page-tai-xiu ul {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 15px;
  color: #1F2D3D;
}

.page-tai-xiu li {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.page-tai-xiu strong {
  color: #000000;
}

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

.page-tai-xiu__image-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__image-figure figcaption {
  font-style: italic;
  font-size: 0.95rem;
  color: #555;
  margin-top: 10px;
}

.page-tai-xiu__faq-list {
  margin-top: 30px;
  padding-bottom: 20px;
}

.page-tai-xiu__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #D6E2FF;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-tai-xiu__faq-item summary {
  list-style: none;
  padding: 18px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2F6BFF;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
  user-select: none;
}

.page-tai-xiu__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-tai-xiu__faq-item summary:hover {
  background-color: #F4F7FB;
}

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

.page-tai-xiu__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  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: 1rem;
  color: #1F2D3D;
}

.page-tai-xiu__faq-answer p {
  margin-bottom: 0;
}

.page-tai-xiu__blog-section {
  padding: 60px 0;
  background-color: #F4F7FB;
}

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

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

.page-tai-xiu__blog-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

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

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

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

.page-tai-xiu__blog-card-title a {
  color: #2F6BFF;
  text-decoration: none;
}

.page-tai-xiu__blog-card-title a:hover {
  text-decoration: underline;
}

.page-tai-xiu__blog-card-meta {
  font-size: 0.9rem;
  color: #6FA3FF;
  margin-bottom: 10px;
}

.page-tai-xiu__blog-card-excerpt {
  font-size: 1rem;
  color: #1F2D3D;
  margin-bottom: 15px;
}

.page-tai-xiu__blog-card-link {
  display: inline-block;
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 600;
}

.page-tai-xiu__blog-card-link:hover {
  text-decoration: underline;
}

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

.page-tai-xiu__cta-section {
  background-color: #2F6BFF;
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

.page-tai-xiu__cta-section .page-tai-xiu__section-title,
.page-tai-xiu__cta-section .page-tai-xiu__section-description {
  color: #ffffff;
}

.page-tai-xiu__cta-section .page-tai-xiu__section-title {
  margin-top: 0;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-tai-xiu__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-secondary {
  background-color: #ffffff;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
}

.page-tai-xiu__btn-secondary:hover {
  background-color: #F4F7FB;
  color: #2F6BFF;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu .highlight {
  color: #2F6BFF;
  font-weight: bold;
}

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

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

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

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

  .page-tai-xiu__guide-card {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }

  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-5,
  .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);
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .page-tai-xiu__hero-carousel-section {
    padding-top: 10px !important;
  }

  .page-tai-xiu__hero-slider {
    height: 400px;
  }

  .page-tai-xiu__hero-content {
    padding: 20px 10%;
  }

  .page-tai-xiu__hero-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 10px;
  }

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

  .page-tai-xiu__hero-cta-buttons,
  .page-tai-xiu__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .page-tai-xiu__section-title {
    font-size: 2rem;
    margin-top: 40px;
  }

  .page-tai-xiu__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-tai-xiu__guide-box {
    padding: 30px 15px 40px;
  }

  .page-tai-xiu__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }

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

  .page-tai-xiu__guide-card--pos-1, .page-tai-xiu__guide-card--pos-2 {
    grid-column: span 3;
  }

  .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;
  }

  .page-tai-xiu__guide-card img {
    aspect-ratio: 250 / 350; /* Maintain aspect ratio */
    object-fit: contain;
  }

  .page-tai-xiu__home-content-box {
    max-width: 100%;
    height: auto;
    margin: 40px 15px;
    padding: 10px;
  }

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

  .page-tai-xiu__content-title {
    font-size: 1.8rem;
    padding-top: 15px;
  }

  .page-tai-xiu__sub-title {
    font-size: 1.4rem;
    margin-top: 25px;
  }

  .page-tai-xiu p,
  .page-tai-xiu li {
    font-size: 1rem;
  }

  .page-tai-xiu ul {
    margin-left: 20px;
  }

  .page-tai-xiu__faq-item summary {
    padding: 15px 20px;
    font-size: 1.05rem;
  }

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

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

  .page-tai-xiu__container {
    padding: 0 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.2rem;
  }

  .page-tai-xiu__cta-section {
    padding: 60px 0;
  }

  /* General image responsiveness for mobile */
  .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__home-content-box,
  .page-tai-xiu__guide-box {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-tai-xiu__cta-buttons,
  .page-tai-xiu__hero-cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}