/* Base styles for the Tài Xỉu page */
.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #f8f8f8; /* Slightly off-white for main background */
}

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

.page-tai-xiu__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-tai-xiu__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-tai-xiu__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-tai-xiu__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from parent section */
}

.page-tai-xiu__main-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 font size with clamp */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #017439;
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-tai-xiu__intro-text {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #555555;
}

.page-tai-xiu__text-block {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: justify;
}

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, relying on body padding for header offset */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px; /* Ensure hero section has a minimum height */
}

.page-tai-xiu__hero-image-wrapper {
  width: 100%;
  max-height: 700px;
  overflow: hidden;
  position: relative;
}

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

.page-tai-xiu__hero-content {
  padding: 40px 20px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

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

.page-tai-xiu__cta-buttons--center {
  margin-top: 40px;
}

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-tai-xiu__btn-primary {
  background-color: #C30808; /* Use custom color for primary actions */
  color: #FFFF00; /* Use custom font color for primary actions */
  border: 2px solid #C30808;
}

.page-tai-xiu__btn-primary:hover {
  background-color: #e02a2a;
  border-color: #e02a2a;
  color: #fff;
}

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

.page-tai-xiu__btn-secondary:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-tai-xiu__btn-small {
  padding: 10px 20px;
  font-size: 16px;
}

.page-tai-xiu__image-content {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-tai-xiu__list {
  list-style: disc inside;
  margin-bottom: 20px;
  padding-left: 20px;
}

.page-tai-xiu__list-item {
  margin-bottom: 10px;
  font-size: 16px;
}

.page-tai-xiu__features-grid,
.page-tai-xiu__steps-grid,
.page-tai-xiu__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-tai-xiu__feature-card,
.page-tai-xiu__step-card,
.page-tai-xiu__promo-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: #333333;
}

.page-tai-xiu__dark-section .page-tai-xiu__feature-card {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.page-tai-xiu__feature-card .page-tai-xiu__card-title,
.page-tai-xiu__step-card .page-tai-xiu__card-title,
.page-tai-xiu__promo-card .page-tai-xiu__card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: inherit;
}

.page-tai-xiu__step-card .page-tai-xiu__btn-primary,
.page-tai-xiu__step-card .page-tai-xiu__btn-secondary {
  margin-top: 20px;
  width: auto; /* Allow buttons to size to content */
}

/* FAQ Section */
details.page-tai-xiu__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question::-webkit-details-marker {
  display: none;
}
details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question:hover {
  background: rgba(255, 255, 255, 0.1);
}
.page-tai-xiu__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #ffffff;
}
.page-tai-xiu__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer {
  padding: 0 20px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}
.page-tai-xiu__faq-answer p {
  margin-bottom: 0; /* Remove default paragraph margin */
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-tai-xiu__section-title {
    font-size: 32px;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(24px, 5vw, 40px);
  }
  .page-tai-xiu__intro-text {
    font-size: 17px;
  }
  .page-tai-xiu__btn-primary,
  .page-tai-xiu__btn-secondary {
    font-size: 16px;
    padding: 12px 25px;
  }
  .page-tai-xiu__container {
    padding: 15px;
  }
  .page-tai-xiu__section {
    padding: 40px 0;
  }
  .page-tai-xiu__features-grid,
  .page-tai-xiu__steps-grid,
  .page-tai-xiu__promo-grid {
    gap: 20px;
  }
  .page-tai-xiu__feature-card,
  .page-tai-xiu__step-card,
  .page-tai-xiu__promo-card {
    padding: 25px;
  }
  .page-tai-xiu__feature-card .page-tai-xiu__card-title,
  .page-tai-xiu__step-card .page-tai-xiu__card-title,
  .page-tai-xiu__promo-card .page-tai-xiu__card-title {
    font-size: 20px;
  }
  details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question { padding: 15px 18px; }
  .page-tai-xiu__faq-qtext { font-size: 17px; }
  .page-tai-xiu__faq-toggle { font-size: 26px; }
  details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer { padding: 0 18px 18px; }
}

@media (max-width: 768px) {
  /* HERO Chủ đề chính */
  .page-tai-xiu__hero-section {
    min-height: auto;
    padding-top: 10px; /* Dựa vào padding của body để bù đắp header */
  }
  .page-tai-xiu__hero-image {
    object-fit: contain !important; /* Ngăn cắt ảnh trên di động */
    aspect-ratio: unset !important; /* Cho phép ảnh tự điều chỉnh tỷ lệ */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px;
  }
  .page-tai-xiu__hero-content {
    padding: 30px 15px;
  }
  .page-tai-xiu__main-title {
    font-size: clamp(24px, 7vw, 36px); /* Điều chỉnh H1 cho màn hình nhỏ hơn */
    margin-bottom: 15px;
  }
  .page-tai-xiu__intro-text {
    font-size: 16px;
    margin-bottom: 20px;
  }

  /* Khu vực hiển thị sản phẩm (Không có gameshow trên trang này, nhưng thích ứng lưới chung) */
  .page-tai-xiu__features-grid,
  .page-tai-xiu__steps-grid,
  .page-tai-xiu__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow-x: hidden; /* Đảm bảo không có thanh cuộn ngang */
  }
  .page-tai-xiu__feature-card,
  .page-tai-xiu__step-card,
  .page-tai-xiu__promo-card {
    padding: 20px;
  }
  .page-tai-xiu__dark-section .page-tai-xiu__feature-card,
  .page-tai-xiu__light-bg .page-tai-xiu__step-card,
  .page-tai-xiu__light-bg .page-tai-xiu__promo-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Tiêu đề trang trí + Khu vực SEO văn bản dài */
  .page-tai-xiu__section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding: 0 15px;
    box-sizing: border-box;
  }
  .page-tai-xiu__text-block {
    font-size: 15px;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: left;
  }
  .page-tai-xiu__list {
    padding-left: 35px;
    margin-left: 0;
    padding-right: 15px;
  }
  .page-tai-xiu__list-item {
    font-size: 15px;
  }
  .page-tai-xiu__image-content {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    box-sizing: border-box;
  }
  .page-tai-xiu__container {
    padding: 0;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-tai-xiu__section {
    padding: 30px 0;
  }

  /* Hình ảnh và vùng chứa chung */
  .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; */ /* Được xử lý bởi các phần cụ thể nếu cần */
  }

  /* Nút và vùng chứa nút */
  .page-tai-xiu__cta-button,
  .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-direction: column !important;
    gap: 15px;
  }
  .page-tai-xiu__cta-buttons--center {
    margin-top: 20px;
  }

  /* Kiểu di động cụ thể cho FAQ */
  details.page-tai-xiu__faq-item summary.page-tai-xiu__faq-question { padding: 15px; }
  .page-tai-xiu__faq-qtext { font-size: 15px; }
  .page-tai-xiu__faq-toggle { font-size: 24px; }
  details.page-tai-xiu__faq-item .page-tai-xiu__faq-answer { padding: 0 15px 15px; }
}