/* Biến màu sắc */
:root {
  --x8bet-primary: #113B7A;
  --x8bet-secondary: #1D5FD1;
  --x8bet-text-main: #F3F8FF;
  --x8bet-text-secondary: #AFC4E8;
  --x8bet-card-bg: #10233F;
  --x8bet-border: #244D84;
  --x8bet-glow: #4FA8FF;
  --x8bet-gold: #F2C14E;
  --x8bet-divider: #1B3357;
  --x8bet-deep-navy: #08162B;
  --x8bet-button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
}

/* Cấu trúc chung */
.page-ban-ca {
  font-family: 'Arial', sans-serif;
  color: var(--x8bet-text-main); /* Mặc định chữ sáng trên nền tối */
  background-color: var(--x8bet-deep-navy); /* Nền body từ shared.css, đây là màu tối */
}

.page-ban-ca__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

.page-ban-ca__section {
  padding: 60px 0;
}

.page-ban-ca__dark-bg {
  background-color: var(--x8bet-deep-navy);
  color: var(--x8bet-text-main);
}

.page-ban-ca__section-title {
  font-size: 38px;
  font-weight: 700;
  color: var(--x8bet-gold);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.4);
}

.page-ban-ca__sub-section-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--x8bet-text-main);
  text-align: center;
  margin-top: 50px;
  margin-bottom: 30px;
}

.page-ban-ca__text-block {
  font-size: 17px;
  line-height: 1.7;
  color: var(--x8bet-text-secondary);
  margin-bottom: 20px;
  text-align: justify;
}

.page-ban-ca__highlight {
  color: var(--x8bet-gold);
  font-weight: 600;
}

.page-ban-ca a {
  color: var(--x8bet-secondary);
  text-decoration: none;
}

.page-ban-ca a:hover {
  text-decoration: underline;
  color: var(--x8bet-glow);
}

/* Nút chung */
.page-ban-ca__btn-primary,
.page-ban-ca__btn-secondary,
.page-ban-ca__btn-game,
.page-ban-ca__btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border: none;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-ban-ca__btn-primary,
.page-ban-ca__btn-game,
.page-ban-ca__btn-download {
  background: var(--x8bet-button-gradient);
  color: var(--x8bet-text-main);
  box-shadow: 0 4px 15px rgba(43, 115, 246, 0.4);
}

.page-ban-ca__btn-primary:hover,
.page-ban-ca__btn-game:hover,
.page-ban-ca__btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 115, 246, 0.6);
}

.page-ban-ca__btn-secondary {
  background: none;
  border: 2px solid var(--x8bet-secondary);
  color: var(--x8bet-secondary);
}

.page-ban-ca__btn-secondary:hover {
  background: var(--x8bet-secondary);
  color: var(--x8bet-text-main);
  transform: translateY(-2px);
}

/* Card chung */
.page-ban-ca__card {
  background-color: var(--x8bet-card-bg);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--x8bet-border);
  color: var(--x8bet-text-main);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-ban-ca__card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  display: block;
  width: 100%; /* Đảm bảo hình ảnh lấp đầy chiều rộng của card */
  min-width: 200px;
  min-height: 200px;
}

.page-ban-ca__card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--x8bet-gold);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-ban-ca__card-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--x8bet-text-secondary);
  flex-grow: 1; /* Đảm bảo text chiếm đủ không gian */
}

/* HERO Section */
.page-ban-ca__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 500px;
  padding-top: 10px; /* Nhỏ hơn so với --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-ban-ca__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-ban-ca__hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Đảm bảo hình ảnh phủ kín */
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-ban-ca__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
  background: rgba(8, 22, 43, 0.7); /* Nền bán trong suốt cho chữ dễ đọc */
  border-radius: 15px;
  margin-top: 150px; /* Đẩy nội dung xuống dưới hình ảnh */
}

.page-ban-ca__main-title {
  font-size: clamp(32px, 5vw, 56px); /* Sử dụng clamp cho kích thước linh hoạt */
  font-weight: 800;
  color: var(--x8bet-gold);
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 0 15px rgba(242, 193, 78, 0.6);
}

.page-ban-ca__subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--x8bet-text-secondary);
  margin-bottom: 30px;
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-ban-ca__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Introduction Section */
.page-ban-ca__introduction-section {
  background-color: var(--x8bet-deep-navy);
}

.page-ban-ca__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-ban-ca__feature-card {
  text-align: center;
  align-items: center;
}

/* Popular Games Section */
.page-ban-ca__popular-games-section {
  background-color: var(--x8bet-card-bg);
}

.page-ban-ca__game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-ban-ca__game-card {
  text-align: center;
  align-items: center;
}

.page-ban-ca__btn-game {
  margin-top: 20px;
}

/* Guide Section */
.page-ban-ca__guide-section {
  background-color: var(--x8bet-deep-navy);
}

.page-ban-ca__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-ban-ca__guide-step {
  text-align: left;
}

.page-ban-ca__step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--x8bet-gold);
  margin-bottom: 15px;
}

.page-ban-ca__step-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--x8bet-text-secondary);
}

.page-ban-ca__list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-ban-ca__list li {
  background-color: var(--x8bet-card-bg);
  border: 1px solid var(--x8bet-border);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--x8bet-text-secondary);
}

.page-ban-ca__list li::before {
  content: '✔️';
  color: var(--x8bet-gold);
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}

.page-ban-ca__list li p {
  margin: 0;
  color: var(--x8bet-text-secondary);
}

/* Promotions Section */
.page-ban-ca__promotions-section {
  background-color: var(--x8bet-card-bg);
}

.page-ban-ca__promotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-ban-ca__promotion-card {
  text-align: center;
  align-items: center;
}

/* Advantages Section */
.page-ban-ca__advantages-section {
  background-color: var(--x8bet-deep-navy);
}

.page-ban-ca__advantages-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
  list-style: none;
  padding: 0;
}

.page-ban-ca__advantage-item {
  text-align: left;
}

.page-ban-ca__item-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--x8bet-gold);
  margin-bottom: 10px;
}

.page-ban-ca__item-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--x8bet-text-secondary);
}

/* App Download Section */
.page-ban-ca__app-download-section {
  background-color: var(--x8bet-card-bg);
}

.page-ban-ca__app-flex-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.page-ban-ca__app-content {
  flex: 1;
}

.page-ban-ca__app-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-ban-ca__app-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  min-height: 200px;
}

.page-ban-ca__app-benefits-list {
  list-style: none;
  padding: 0;
  margin-top: 25px;
  margin-bottom: 30px;
}

.page-ban-ca__app-benefits-list li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--x8bet-text-secondary);
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
}

.page-ban-ca__app-benefits-list li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--x8bet-gold);
}

.page-ban-ca__btn-download {
  margin-top: 20px;
}

/* FAQ Section */
.page-ban-ca__faq-section {
  background-color: var(--x8bet-deep-navy);
}

.page-ban-ca__faq-list {
  margin-top: 40px;
}

details.page-ban-ca__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--x8bet-border);
  overflow: hidden;
  background: var(--x8bet-card-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question::-webkit-details-marker {
  display: none;
}
details.page-ban-ca__faq-item summary.page-ban-ca__faq-question:hover {
  background: rgba(var(--x8bet-primary), 0.2);
}
.page-ban-ca__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--x8bet-text-main);
}
.page-ban-ca__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--x8bet-gold);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-ban-ca__faq-item .page-ban-ca__faq-answer {
  padding: 0 25px 20px;
  background: var(--x8bet-card-bg);
  border-radius: 0 0 12px 12px;
}

.page-ban-ca__faq-answer p {
  margin: 0;
  color: var(--x8bet-text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-ban-ca__section-title {
    font-size: 34px;
  }
  .page-ban-ca__sub-section-title {
    font-size: 26px;
  }
  .page-ban-ca__hero-content {
    margin-top: 100px;
  }
  .page-ban-ca__app-flex-container {
    flex-direction: column;
    text-align: center;
  }
  .page-ban-ca__app-image {
    margin-top: 30px;
  }
  .page-ban-ca__app-benefits-list li {
    justify-content: center;
    padding-left: 0;
  }
  .page-ban-ca__app-benefits-list li::before {
    position: static;
    margin-right: 10px;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-ban-ca__hero-section {
    padding-top: 10px; /* 约 10px 顶距 */
    padding-bottom: 40px;
    min-height: 400px;
  }
  .page-ban-ca__hero-image img {
    object-fit: contain !important; /* 禁止 cover 裁切两侧 */
    aspect-ratio: unset !important;
    height: auto !important;
  }
  .page-ban-ca__hero-content {
    margin-top: 80px;
    padding: 15px;
  }
  .page-ban-ca__main-title {
    font-size: clamp(28px, 8vw, 40px); /* 更小的 clamp 范围 */
    margin-bottom: 15px;
  }
  .page-ban-ca__subtitle {
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 25px;
  }
  .page-ban-ca__cta-buttons {
    flex-direction: column; /* 移动端垂直排列 */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-ban-ca__btn-primary,
  .page-ban-ca__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }

  /* 通用图片与容器 */
  .page-ban-ca img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-ban-ca__section,
  .page-ban-ca__card,
  .page-ban-ca__container,
  .page-ban-ca__cta-buttons,
  .page-ban-ca__button-group,
  .page-ban-ca__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  /* 产品展示图区域 */
  .page-ban-ca__feature-grid,
  .page-ban-ca__game-list,
  .page-ban-ca__promotion-grid,
  .page-ban-ca__guide-steps,
  .page-ban-ca__advantages-list {
    grid-template-columns: 1fr; /* Một cột trên di động */
    gap: 25px;
  }
  .page-ban-ca__products-section { /* Ví dụ nếu có */
    overflow-x: hidden; /* Đảm bảo không tràn ngang */
  }

  /* 装饰主标题 + 长文 SEO 区 */
  .page-ban-ca__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-ban-ca__sub-section-title {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 25px;
  }
  .page-ban-ca__text-block {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-ban-ca__list li {
    font-size: 16px;
    padding: 12px 15px;
  }
  .page-ban-ca__card-title {
    font-size: 20px;
  }
  .page-ban-ca__card-text {
    font-size: 15px;
  }
  .page-ban-ca__step-title {
    font-size: 22px;
  }
  .page-ban-ca__step-text {
    font-size: 15px;
  }
  .page-ban-ca__item-title {
    font-size: 22px;
  }
  .page-ban-ca__item-text {
    font-size: 15px;
  }
  .page-ban-ca__app-flex-container {
    flex-direction: column;
  }
  .page-ban-ca__app-image {
    margin-top: 30px;
  }
  .page-ban-ca__app-benefits-list li {
    font-size: 16px;
    padding-left: 0;
    text-align: center;
  }
  .page-ban-ca__app-benefits-list li::before {
    position: static;
    margin-right: 5px;
  }

  /* FAQ */
  details.page-ban-ca__faq-item summary.page-ban-ca__faq-question { padding: 15px; }
  .page-ban-ca__faq-qtext { font-size: 16px; }
  .page-ban-ca__faq-toggle { font-size: 24px; width: 24px; }
  details.page-ban-ca__faq-item .page-ban-ca__faq-answer { padding: 0 15px 15px; }
  .page-ban-ca__faq-answer p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .page-ban-ca__section-title {
    font-size: 24px;
  }
  .page-ban-ca__main-title {
    font-size: clamp(24px, 10vw, 36px);
  }
  .page-ban-ca__subtitle {
    font-size: clamp(15px, 4vw, 18px);
  }
  .page-ban-ca__btn-primary,
  .page-ban-ca__btn-secondary {
    font-size: 15px;
    padding: 10px 15px;
  }
  .page-ban-ca__card-title {
    font-size: 18px;
  }
  .page-ban-ca__text-block {
    font-size: 15px;
  }
  .page-ban-ca__list li,
  .page-ban-ca__app-benefits-list li {
    font-size: 15px;
  }
}