.page-xs {
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #F5F7FA; /* Sử dụng màu nền từ tùy chỉnh */
  line-height: 1.6;
}

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

.page-xs__section {
  padding: 60px 0;
  text-align: center;
}

.page-xs__dark-section {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  color: #ffffff;
}

.page-xs__light-bg {
  background-color: #F5F7FA;
  color: #333333;
}

.page-xs__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: inherit; /* Kế thừa màu từ section cha */
}

.page-xs__section-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: inherit;
}

.page-xs__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size for H1 */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: #ffffff;
}

.page-xs__hero-description {
  font-size: 1.2em;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #ffffff;
}

.page-xs__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 80px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-xs__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for desktop hero image */
  overflow: hidden;
  position: relative;
  margin-bottom: 40px;
}

.page-xs__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

.page-xs__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 100%;
  box-sizing: border-box;
}

.page-xs__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
}

.page-xs__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-xs__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-xs__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
}

.page-xs__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-xs__btn-secondary:hover {
  background: #f0f0f0;
  color: #E53935;
}

.page-xs__card {
  background-color: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  color: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-xs__features-grid, .page-xs__game-grid, .page-xs__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-xs__feature-icon, .page-xs__game-image, .page-xs__promo-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-xs__feature-title, .page-xs__game-title, .page-xs__promo-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #E53935;
}

.page-xs__feature-text, .page-xs__game-text, .page-xs__promo-text {
  font-size: 1em;
  color: #333333;
  flex-grow: 1;
}

.page-xs__game-card .page-xs__game-title {
  color: #E53935;
}

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

.page-xs__step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 30px;
  height: 100%; /* Ensure cards are same height */
}

.page-xs__step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-xs__step-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: #E53935;
}

.page-xs__step-text {
  font-size: 1em;
  color: #333333;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-xs__security-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-xs__security-item {
  text-align: center;
  max-width: 280px;
  color: #333333;
}

.page-xs__security-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-xs__security-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #E53935;
}

.page-xs__security-text {
  font-size: 0.95em;
  color: #333333;
}

.page-xs__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

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

.page-xs__faq-item[open] .page-xs__faq-question {
  background-color: #f0f0f0;
}

.page-xs__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  background-color: #FFFFFF;
  color: #333333;
  transition: background-color 0.3s ease;
  list-style: none;
}

.page-xs__faq-question::-webkit-details-marker, 
.page-xs__faq-question::marker {
  display: none;
}

.page-xs__faq-qtext {
  flex-grow: 1;
  color: #E53935;
}

.page-xs__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #E53935;
}

.page-xs__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1em;
  color: #333333;
  line-height: 1.6;
}

.page-xs__final-cta .page-xs__section-title {
  color: #E53935;
}

.page-xs__final-cta .page-xs__section-description {
  color: #333333;
}

/* =========================================== */
/* Responsive Styles */
/* =========================================== */

/* Tablet and Mobile */
@media (max-width: 1024px) {
  .page-xs__section-title {
    font-size: 2em;
  }

  .page-xs__hero-image-wrapper {
    max-height: 500px;
  }

  .page-xs__hero-description {
    font-size: 1.1em;
  }

  .page-xs__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
  }

  .page-xs__features-grid, .page-xs__game-grid, .page-xs__promo-grid, .page-xs__steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .page-xs__security-features {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .page-xs__security-item {
    max-width: 90%;
  }
}

/* Mobile Specific */
@media (max-width: 768px) {
  .page-xs {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-xs__container {
    padding: 15px;
  }

  .page-xs__section {
    padding: 40px 0;
  }

  /* HERO 主图区域 */
  .page-xs__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-xs__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-xs__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-xs__main-title {
    font-size: clamp(2em, 8vw, 2.5em);
  }

  .page-xs__hero-description {
    font-size: 1em;
  }

  /* 按钮与按钮容器 */
  .page-xs__cta-buttons {
    flex-direction: column !important;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-xs__cta-button, 
  .page-xs__btn-primary,
  .page-xs__btn-secondary,
  .page-xs a[class*="button"],
  .page-xs 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-xs__features-grid, .page-xs__game-grid, .page-xs__promo-grid, .page-xs__steps-grid {
    grid-template-columns: 1fr !important; /* Single column layout for mobile */
    gap: 20px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-xs__feature-item, .page-xs__game-card, .page-xs__promo-card, .page-xs__step-item {
    padding: 20px;
  }

  .page-xs__feature-icon, .page-xs__game-image, .page-xs__promo-image {
    height: 180px; /* Adjust height for mobile */
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* 通用图片与容器 */
  .page-xs img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-xs__section,
  .page-xs__card,
  .page-xs__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Các loại hình xổ số (game-types) */
  .page-xs__game-card .page-xs__game-image {
    height: 150px; /* Smaller image for mobile game cards */
  }

  /* Hướng dẫn chơi (how-to-play) */
  .page-xs__step-item {
    padding: 20px;
  }

  /* Bảo mật (security) */
  .page-xs__security-features {
    gap: 20px;
  }

  .page-xs__security-icon {
    width: 80px;
    height: 80px;
  }

  /* Câu hỏi thường gặp (FAQ) */
  .page-xs__faq-question {
    font-size: 1em;
    padding: 15px;
  }

  .page-xs__faq-answer {
    font-size: 0.9em;
    padding: 0 15px 15px 15px;
  }

  /* Các module khác */
  .page-xs__section-title {
    font-size: 1.8em;
  }

  .page-xs__section-description {
    font-size: 0.95em;
  }

  .page-xs__feature-title, .page-xs__game-title, .page-xs__promo-title, .page-xs__step-title, .page-xs__security-title {
    font-size: 1.3em;
  }

  .page-xs__feature-text, .page-xs__game-text, .page-xs__promo-text, .page-xs__step-text, .page-xs__security-text {
    font-size: 0.9em;
  }
}