/* Base styles for the page */
.page-tai-xiu {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF5E1; /* Text Main */
  background-color: var(--bg-color, #B71C1C); /* Background color from custom, fallback to Deep Red */
}

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

.page-tai-xiu__hero-section {
  padding-top: 10px; /* Small top padding, not var(--header-offset) */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-tai-xiu__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Max height for hero image */
  overflow: hidden;
}

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

.page-tai-xiu__hero-content {
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; /* Overlap slightly for visual effect, but not text on image */
  background: rgba(193, 30, 23, 0.8); /* Semi-transparent main color */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: #FFD86A; /* Gold-like color for main title */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-tai-xiu__description {
  font-size: 1.1rem;
  color: #FFF5E1; /* Text Main */
  margin-bottom: 30px;
}

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

.page-tai-xiu__btn-primary,
.page-tai-xiu__btn-secondary {
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-tai-xiu__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Button color */
  color: #333333; /* Dark text for light button */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-tai-xiu__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-tai-xiu__btn-secondary {
  background: #C91F17; /* Main color */
  color: #FFF5E1; /* Text Main */
  border: 2px solid #FFD86A; /* Gold border */
}

.page-tai-xiu__btn-secondary:hover {
  background: #E53935; /* Auxiliary color */
  border-color: #F4D34D; /* Gold */
}

.page-tai-xiu__introduction-section,
.page-tai-xiu__tips-section,
.page-tai-xiu__faq-section {
  background-color: #B71C1C; /* Background color */
  padding: 60px 20px;
}

.page-tai-xiu__how-to-play-section,
.page-tai-xiu__why-choose-section {
  background-color: var(--bg-color, #0d0d0d); /* Default dark background for contrast */
  padding: 60px 20px;
}

.page-tai-xiu__cta-bottom-section {
  background-color: #E53935; /* Auxiliary color */
  padding: 60px 20px;
  text-align: center;
}

.page-tai-xiu__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #FFD86A; /* Gold-like color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-tai-xiu__text-block {
  font-size: 1.1rem;
  color: #FFF5E1; /* Text Main */
  text-align: justify;
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.page-tai-xiu__content-grid,
.page-tai-xiu__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-tai-xiu__card,
.page-tai-xiu__feature-item {
  background-color: #D32F2F; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%; /* Ensure cards in a row have equal height */
}

.page-tai-xiu__card-title,
.page-tai-xiu__feature-title {
  font-size: 1.5rem;
  color: #FFD86A; /* Gold-like color */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-tai-xiu__card-image,
.page-tai-xiu__feature-icon {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-tai-xiu__card-text,
.page-tai-xiu__feature-text {
  font-size: 1rem;
  color: #FFF5E1; /* Text Main */
  text-align: justify;
}

.page-tai-xiu__tips-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 900px;
}

.page-tai-xiu__list-item {
  background-color: #D32F2F; /* Card BG */
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.page-tai-xiu__list-item:last-child {
  margin-bottom: 0;
}

.page-tai-xiu__list-title {
  font-size: 1.4rem;
  color: #FFD86A; /* Gold-like color */
  margin-bottom: 10px;
  font-weight: 600;
}

.page-tai-xiu__list-text {
  font-size: 1rem;
  color: #FFF5E1; /* Text Main */
  text-align: justify;
}

.page-tai-xiu__faq-list {
  max-width: 900px;
  margin: 0 auto;
  margin-top: 40px;
}

.page-tai-xiu__faq-item {
  background-color: #D32F2F; /* Card BG */
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-tai-xiu__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #FFD86A; /* Gold-like color */
  cursor: pointer;
  list-style: none; /* Hide default marker */
  user-select: none;
}

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

.page-tai-xiu__faq-toggle {
  font-size: 1.8rem;
  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: 0 25px 20px;
  font-size: 1rem;
  color: #FFF5E1; /* Text Main */
  text-align: justify;
}

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

.page-tai-xiu__faq-answer a {
  color: #FFD86A; /* Gold-like color for links */
  text-decoration: underline;
}

.page-tai-xiu__faq-answer a:hover {
  color: #F4D34D; /* Gold */
}

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

/* --- Homepage boilerplate styles (included as per instructions, even if not actively used in this specific tai-xiu page HTML) --- */
/* This section ensures all specified module CSS definitions are present */
.page-tai-xiu__home-content {
  border: 1px solid #F2B544; /* Border color */
  border-radius: 10px;
  padding: 30px;
  margin: 40px auto;
  max-width: 1200px;
  background-color: #7A0E0E; /* Deep Red */
  color: #FFF5E1;
}

.page-tai-xiu__row-games, 
.page-tai-xiu__row-sport, 
.page-tai-xiu__row-coop {
  background-color: var(--bg-color, #1A202C);
  padding: 40px 20px;
  max-width: 1330px;
  margin: 0 auto;
}

.page-tai-xiu__games-title, 
.page-tai-xiu__sport-title, 
.page-tai-xiu__coop-title {
  color: #fff;
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

.page-tai-xiu__slider-wrapper {
  overflow: hidden;
  position: relative;
  padding: 20px 0;
}

.page-tai-xiu__slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  transition: transform 0.5s ease-in-out;
}

.page-tai-xiu__game-slide {
  flex: 0 0 200px;
  max-width: 200px;
  background-color: #D32F2F;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  text-align: center;
  padding-bottom: 15px;
}

.page-tai-xiu__game-slide img {
  width: 100%;
  
  object-fit: cover;
}

.page-tai-xiu__game-slide h4 {
  color: #FFF5E1;
  font-size: 1.1rem;
  margin: 10px 5px 5px;
}

.page-tai-xiu__game-slide .page-tai-xiu__btn-primary {
  font-size: 0.9rem;
  padding: 8px 15px;
  min-width: unset;
}

.page-tai-xiu__banners-top-wrapper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 40px auto;
  align-items: center;
  justify-items: center;
}

.page-tai-xiu__banner-item img {
  
  
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.page-tai-xiu__blog-masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-top: 40px;
}

.page-tai-xiu__blog-card {
  background-color: #D32F2F;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-tai-xiu__blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-tai-xiu__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-tai-xiu__blog-card-title {
  font-size: 1.3rem;
  color: #FFD86A;
  margin-bottom: 10px;
  line-height: 1.3;
  flex-grow: 1;
}

.page-tai-xiu__blog-card-title a {
  color: inherit;
  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: #FFF5E1;
  margin-bottom: 15px;
}

.page-tai-xiu__blog-card-text {
  font-size: 1rem;
  color: #FFF5E1;
  margin-bottom: 20px;
}

.page-tai-xiu__btn-outline {
  background: transparent;
  border: 2px solid #FFD86A;
  color: #FFD86A;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: auto; /* Push to bottom of card */
  align-self: flex-start;
}

.page-tai-xiu__btn-outline:hover {
  background: #FFD86A;
  color: #333333;
}

.page-tai-xiu__blog-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.5s ease-in-out;
}

.page-tai-xiu__blog-slide {
  flex: 0 0 calc(33.333% - 14px); /* For 3 items with 20px gap */
  max-width: calc(33.333% - 14px);
}
/* --- End of homepage boilerplate styles --- */

/* Responsive styles */
@media (max-width: 1024px) {
  .page-tai-xiu__hero-content {
    margin-top: -80px;
    padding: 30px 20px;
  }

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

  .page-tai-xiu__banners-top-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .page-tai-xiu__blog-slide {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

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

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

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

  .page-tai-xiu__main-title {
    font-size: 2.2rem;
  }

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

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

  .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__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-tai-xiu__text-block {
    font-size: 1rem;
  }

  .page-tai-xiu__content-grid,
  .page-tai-xiu__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-tai-xiu__card,
  .page-tai-xiu__feature-item {
    padding: 20px;
  }

  .page-tai-xiu__card-image,
  .page-tai-xiu__feature-icon {
    min-width: 200px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-tai-xiu__list-item {
    padding: 20px;
  }

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

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

  /* General image responsive styles for mobile */
  .page-tai-xiu img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* --- Homepage boilerplate styles (mobile versions) --- */
  .page-tai-xiu__home-content {
    padding: 20px;
  }

  .page-tai-xiu__games-title, 
  .page-tai-xiu__sport-title, 
  .page-tai-xiu__coop-title {
    font-size: 1.8rem;
  }

  .page-tai-xiu__slider-track {
    display: flex;
    flex-wrap: nowrap;
  }

  .page-tai-xiu__game-slide {
    flex: 0 0 160px;
    max-width: 160px;
  }

  .page-tai-xiu__banners-top-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .page-tai-xiu__blog-masonry {
    grid-template-columns: 1fr;
  }

  .page-tai-xiu__blog-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}