/* Base styles for the Tài Xỉu page */
.page-tai-xiu {
  font-family: Arial, sans-serif;
  color: #333333; /* Dark text on light body background */
  background-color: var(--secondary-color, #FFFFFF); /* Body background is white */
  line-height: 1.6;
  font-size: 16px;
}

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

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

.page-tai-xiu__section-title {
  font-size: 32px;
  font-weight: bold;
  color: #26A9E0; /* Brand color for titles */
  text-align: center;
  margin-bottom: 30px;
}

.page-tai-xiu__sub-title {
  font-size: 24px;
  font-weight: bold;
  color: #333333;
  margin-top: 25px;
  margin-bottom: 15px;
}

.page-tai-xiu__intro-text {
  font-size: 18px;
  text-align: center;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Hero Section */
.page-tai-xiu__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--secondary-color, #FFFFFF);
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-tai-xiu__hero-image-wrap {
    width: 100%;
    max-width: 1200px; /* Match img width */
    margin-bottom: 20px;
}

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

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

.page-tai-xiu__main-title {
  font-size: 40px;
  font-weight: bold;
  color: #26A9E0; /* Brand color for H1 */
  margin-bottom: 15px;
  line-height: 1.2;
  font-size: clamp(28px, 3.5vw, 48px);
}

/* CTA Buttons */
.page-tai-xiu__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  margin-top: 30px;
}

.page-tai-xiu__cta-buttons--center {
    justify-content: center;
}

.page-tai-xiu__btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't overflow */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
  text-align: center;
}

.page-tai-xiu__btn--primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
}

.page-tai-xiu__btn--primary:hover {
  background-color: #1e87c0;
  border-color: #1e87c0;
}

.page-tai-xiu__btn--secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-tai-xiu__btn--secondary:hover {
  background-color: #e0f2f7;
  color: #1e87c0;
}

.page-tai-xiu__btn--login {
  background-color: #EA7C07;
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

.page-tai-xiu__btn--login:hover {
  background-color: #d16b06;
  border-color: #d16b06;
}

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

/* Article Content */
.page-tai-xiu__article-content {
  font-size: 17px;
  line-height: 1.7;
  color: #333333;
}

.page-tai-xiu__article-content p {
  margin-bottom: 15px;
}

.page-tai-xiu__list {
  list-style: disc;
  margin-left: 25px;
  margin-bottom: 15px;
  padding-left: 0;
}

.page-tai-xiu__list li {
  margin-bottom: 8px;
}

.page-tai-xiu__figure {
  margin: 30px auto;
  text-align: center;
  max-width: 800px; /* Default for blog type images */
  width: 100%;
}

.page-tai-xiu__image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 auto; /* Center images in figure */
}

.page-tai-xiu__figcaption {
  font-style: italic;
  font-size: 14px;
  color: #666666;
  margin-top: 10px;
}

/* Promotions Grid */
.page-tai-xiu__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.page-tai-xiu__promo-card {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

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

.page-tai-xiu__promo-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
}

.page-tai-xiu__promo-title {
    font-size: 20px;
    font-weight: bold;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-tai-xiu__promo-description {
    font-size: 15px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

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

.page-tai-xiu__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 18px;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
  list-style: none;
}

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

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

.page-tai-xiu__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: #26A9E0;
  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 25px 20px;
  font-size: 16px;
  color: #555555;
  border-top: 1px solid #f0f0f0;
}

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

/* Dark Section */
.page-tai-xiu__dark-section {
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 60px 0;
}

.page-tai-xiu__dark-section .page-tai-xiu__section-title,
.page-tai-xiu__dark-section .page-tai-xiu__intro-text {
  color: #FFFFFF;
}

.page-tai-xiu__dark-section .page-tai-xiu__keyword {
    color: #FFFFFF;
}

.page-tai-xiu__dark-section .page-tai-xiu__btn--secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border-color: #FFFFFF;
}

.page-tai-xiu__dark-section .page-tai-xiu__btn--secondary:hover {
    background-color: #e0f2f7;
    color: #1e87c0;
    border-color: #e0f2f7;
}

/* Responsive Styles */
/* Tablet & Mobile */
@media (max-width: 1024px) {
  .page-tai-xiu__section-title {
    font-size: 28px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(26px, 4vw, 40px);
  }

  .page-tai-xiu__promo-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  /* 1. Top section title + dual CTA */
  .page-tai-xiu__hero-section {
    padding-top: 10px !important;
    padding-bottom: 20px;
  }

  .page-tai-xiu__main-title {
    font-size: clamp(24px, 6vw, 36px);
    padding: 0 15px;
  }

  .page-tai-xiu__intro-text {
    font-size: 16px;
    padding: 0 15px;
  }

  .page-tai-xiu__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. Single column long text container */
  .page-tai-xiu__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-tai-xiu__section-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .page-tai-xiu__sub-title {
    font-size: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 0 15px;
  }

  .page-tai-xiu__article-content {
    font-size: 16px;
    padding: 0 15px;
  }

  .page-tai-xiu__list {
    margin-left: 20px;
    padding: 0 15px;
  }

  /* 3. General images and figure */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .page-tai-xiu__figure {
    margin: 20px auto;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-tai-xiu__figcaption {
    padding: 0 15px;
  }

  /* 4. Buttons and button containers */
  .page-tai-xiu__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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  
  .page-tai-xiu__promo-card .page-tai-xiu__btn {
      width: auto !important;
      max-width: 100% !important;
  }

  /* 5. Registration tutorial and FAQ block (promo grid, FAQ list) */
  .page-tai-xiu__promo-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
    padding: 0 15px;
  }

  .page-tai-xiu__promo-card {
      padding: 15px;
  }

  .page-tai-xiu__promo-image {
      max-height: 200px;
  }

  .page-tai-xiu__faq-list {
    margin-top: 20px;
    padding: 0 15px;
  }

  .page-tai-xiu__faq-question {
    font-size: 16px;
    padding: 15px 20px;
  }

  .page-tai-xiu__faq-answer {
    padding: 10px 20px 15px;
    font-size: 15px;
  }

  .page-tai-xiu__dark-section {
    padding: 40px 15px;
  }
}