/* General styles for page-game-bai */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: #333333;
  line-height: 1.6;
}

.page-game-bai__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

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

.page-game-bai__section-title {
  font-size: clamp(28px, 4vw, 36px);
  color: #017439;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-game-bai__section-title--light {
  color: #FFFFFF;
}

.page-game-bai__section-description {
  font-size: 18px;
  color: #555555;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-game-bai__section-description--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 10px; /* Adjusted for header offset, using ~10px */
  background-color: #017439;
  color: #FFFFFF;
  overflow: hidden;
}

.page-game-bai__hero-image {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.page-game-bai__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 15px;
  max-width: 900px;
  margin-top: -150px; /* Pull content up over the bottom of the image for visual flow */
  background: linear-gradient(to bottom, rgba(1, 116, 57, 0.8), #017439);
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-game-bai__main-title {
  font-size: clamp(36px, 5vw, 52px);
  margin-bottom: 20px;
  color: #FFFF00; /* Use custom color for prominent titles */
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-game-bai__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* Buttons */
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-play,
.page-game-bai__btn-learn-more,
.page-game-bai__btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-bai__btn-primary {
  background-color: #C30808; /* Custom color for register/login */
  color: #FFFF00; /* Custom font color for register/login */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #e00b0b;
  border-color: #e00b0b;
  transform: translateY(-2px);
}

.page-game-bai__btn-secondary {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-game-bai__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #017439;
  transform: translateY(-2px);
}

.page-game-bai__btn-play {
  background-color: #017439;
  color: #FFFFFF;
  border: 2px solid #017439;
  padding: 12px 25px;
  font-size: 16px;
}

.page-game-bai__btn-play:hover {
  background-color: #005a2e;
  border-color: #005a2e;
}

.page-game-bai__btn-learn-more {
  background-color: #f0f0f0;
  color: #017439;
  border: 2px solid #f0f0f0;
  padding: 10px 20px;
  font-size: 15px;
}

.page-game-bai__btn-learn-more:hover {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
}

.page-game-bai__btn-link {
  background-color: transparent;
  color: #017439;
  border: 2px solid #017439;
  padding: 12px 25px;
  font-size: 16px;
}

.page-game-bai__btn-link:hover {
  background-color: #017439;
  color: #FFFFFF;
}

/* Features Section */
.page-game-bai__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__feature-item {
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-bai__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-game-bai__feature-item img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-game-bai__feature-title {
  font-size: 24px;
  color: #017439;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-game-bai__feature-item p {
  font-size: 16px;
  color: #555555;
}

/* Game Types Section */
.page-game-bai__game-types-section {
  background-color: #017439;
  color: #FFFFFF;
}

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

.page-game-bai__game-card {
  background: #ffffff;
  color: #333333;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-game-bai__game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-game-bai__game-card h3 {
  font-size: 22px;
  color: #017439;
  margin: 20px 20px 10px;
  font-weight: 600;
}

.page-game-bai__game-card p {
  font-size: 16px;
  color: #555555;
  padding: 0 20px;
  flex-grow: 1;
}

.page-game-bai__btn-play {
  margin: 20px;
  align-self: flex-start;
}

/* Promotion Section */
.page-game-bai__promotions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__promotion-card {
  background: #ffffff;
  color: #333333;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-game-bai__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-game-bai__promotion-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-game-bai__promotion-card h3 {
  font-size: 22px;
  color: #017439;
  margin: 20px 20px 10px;
  font-weight: 600;
}

.page-game-bai__promotion-card p {
  font-size: 16px;
  color: #555555;
  padding: 0 20px;
  flex-grow: 1;
}

.page-game-bai__btn-learn-more {
  margin: 20px;
  align-self: flex-start;
}

.page-game-bai__all-promotions-btn {
  margin-top: 50px;
}

/* Guide Section */
.page-game-bai__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-game-bai__step-item {
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #ffffff;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-bai__step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-game-bai__step-icon {
  background-color: #017439;
  color: #FFFFFF;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
}

.page-game-bai__step-title {
  font-size: 24px;
  color: #017439;
  margin-bottom: 15px;
  font-weight: 600;
}

.page-game-bai__step-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-game-bai__btn-link {
  align-self: center;
}

/* FAQ Section */
.page-game-bai__faq-section {
  background-color: #f9f9f9;
}

.page-game-bai__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
}

details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}

details.page-game-bai__faq-item summary.page-game-bai__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-game-bai__faq-item summary.page-game-bai__faq-question::-webkit-details-marker {
  display: none;
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
  background: #f5f5f5;
}

.page-game-bai__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  text-align: left;
}

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-game-bai__faq-item .page-game-bai__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

.page-game-bai__faq-answer p {
  margin: 0;
  padding-top: 10px;
  font-size: 16px;
  line-height: 1.6;
}

/* CTA Section */
.page-game-bai__cta-section {
  background-color: #017439;
  color: #FFFFFF;
}

.page-game-bai__cta-buttons {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Card general styling for contrast */
.page-game-bai__card {
  background: #ffffff; /* White background for cards */
  color: #333333; /* Dark text for cards */
  border: 1px solid #e0e0e0;
}

/* Dark section specific styles for contrast */
.page-game-bai__dark-section {
  background: #017439;
  color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-content {
    margin-top: -100px;
    padding: 30px 15px;
  }

  .page-game-bai__main-title {
    font-size: clamp(32px, 4.5vw, 48px);
  }

  .page-game-bai__hero-description {
    font-size: 18px;
  }

  .page-game-bai__section {
    padding: 40px 0;
  }

  .page-game-bai__section-description {
    font-size: 16px;
  }

  .page-game-bai__faq-qtext {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-game-bai__hero-section {
    min-height: auto;
    padding-bottom: 30px;
  }

  .page-game-bai__hero-image {
    max-height: 400px;
  }

  .page-game-bai__hero-image img {
    object-fit: contain !important; /* Prevent cropping on mobile */
    aspect-ratio: unset !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-bai__hero-content {
    margin-top: -80px; /* Adjust for smaller screens */
    padding: 25px 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .page-game-bai__main-title {
    font-size: clamp(28px, 8vw, 38px);
    margin-bottom: 15px;
  }

  .page-game-bai__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-game-bai__hero-buttons,
  .page-game-bai__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-play,
  .page-game-bai__btn-learn-more,
  .page-game-bai__btn-link,
  .page-game-bai a[class*="button"],
  .page-game-bai a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-bai__section {
    padding: 30px 0;
  }

  .page-game-bai__section-title {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 15px;
  }

  .page-game-bai__section-description {
    font-size: 15px;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .page-game-bai__features-grid,
  .page-game-bai__game-grid,
  .page-game-bai__promotions-grid,
  .page-game-bai__guide-steps {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    margin-top: 30px;
  }

  .page-game-bai__feature-item,
  .page-game-bai__game-card,
  .page-game-bai__promotion-card,
  .page-game-bai__step-item {
    padding: 20px;
    margin: 0 10px; /* Add horizontal margin to cards */
  }

  .page-game-bai__feature-item img,
  .page-game-bai__game-card img,
  .page-game-bai__promotion-card img,
  .page-game-bai__step-item img,
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  .page-game-bai__game-card h3,
  .page-game-bai__promotion-card h3,
  .page-game-bai__feature-title,
  .page-game-bai__step-title {
    font-size: 20px;
    margin: 15px 0 10px;
  }

  .page-game-bai__game-card p,
  .page-game-bai__promotion-card p,
  .page-game-bai__feature-item p,
  .page-game-bai__step-item p {
    font-size: 15px;
    padding: 0;
  }

  .page-game-bai__btn-play,
  .page-game-bai__btn-learn-more,
  .page-game-bai__btn-link {
    align-self: stretch;
    margin: 15px 0 0;
  }

  .page-game-bai__faq-list {
    margin: 30px auto 0;
    padding: 0 10px;
  }

  details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    padding: 15px;
  }

  .page-game-bai__faq-qtext {
    font-size: 16px;
  }

  details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 15px 15px;
  }

  .page-game-bai__faq-answer p {
    font-size: 15px;
  }

  .page-game-bai__container {
    padding: 0 10px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure all content areas prevent overflow */
  .page-game-bai__hero-section,
  .page-game-bai__features-section,
  .page-game-bai__game-types-section,
  .page-game-bai__promotion-section,
  .page-game-bai__guide-section,
  .page-game-bai__faq-section,
  .page-game-bai__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }

  .page-game-bai__all-promotions-btn {
    margin-top: 30px;
  }
}