.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: #F5F7FA; /* Inherited from body, but good to define if needed */
}

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

.page-game-bai__section-title {
  font-size: 2.5em;
  color: #E53935;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-game-bai__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: #333333;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles header offset */
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Image above content */
  align-items: center;
  justify-content: center;
  background-color: #F5F7FA;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
}

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

.page-game-bai__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; /* Overlap slightly for visual effect */
  background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white background */
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  z-index: 10;
  position: relative;
}

.page-game-bai__main-title {
  font-size: clamp(2em, 3.5vw, 3.5em);
  color: #E53935;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-game-bai__hero-description {
  font-size: 1.2em;
  color: #333333;
  margin-bottom: 30px;
}

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

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

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

.page-game-bai__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

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

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

.page-game-bai__btn-text {
  color: #E53935;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-game-bai__btn-text:hover {
  color: #FF5A4F;
}

/* Dark Section */
.page-game-bai__dark-section {
  background: #E53935;
  color: #ffffff;
  padding: 60px 0;
}

.page-game-bai__dark-section .page-game-bai__section-title,
.page-game-bai__dark-section .page-game-bai__section-description {
  color: #ffffff;
}

/* Light Section */
.page-game-bai__light-bg {
  background: #F5F7FA;
  color: #333333;
  padding: 60px 0;
}

/* Intro Section */
.page-game-bai__intro-text {
  font-size: 1.15em;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Games Section */
.page-game-bai__games-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-game-bai__game-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-bai__game-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-game-bai__game-card-title {
  font-size: 1.5em;
  color: #E53935;
  margin: 20px 15px 10px;
}

.page-game-bai__game-card-description {
  font-size: 1em;
  color: #333333;
  margin: 0 15px 20px;
  flex-grow: 1;
}

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

.page-game-bai__feature-item {
  text-align: center;
  padding: 30px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__feature-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__feature-title {
  font-size: 1.4em;
  color: #E53935;
  margin-bottom: 10px;
}

.page-game-bai__feature-description {
  font-size: 1em;
  color: #333333;
}

/* CTA Section */
.page-game-bai__cta-section .page-game-bai__cta-buttons {
  margin-top: 40px;
}

/* How-to-play Section */
.page-game-bai__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}

.page-game-bai__step-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__step-number {
  font-size: 2.5em;
  color: #FF5A4F;
  font-weight: bold;
  margin-bottom: 15px;
}

.page-game-bai__step-title {
  font-size: 1.4em;
  color: #E53935;
  margin-bottom: 10px;
}

.page-game-bai__step-description {
  font-size: 1em;
  color: #333333;
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-game-bai__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-game-bai__faq-item {
  background: #ffffff;
  margin-bottom: 15px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  overflow: hidden;
}

.page-game-bai__faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  background-color: #f9f9f9;
  border-bottom: 1px solid #E0E0E0;
}

.page-game-bai__faq-item summary::-webkit-details-marker,
.page-game-bai__faq-item summary::marker {
  display: none;
}

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

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  color: #E53935;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  transform: rotate(45deg);
}

.page-game-bai__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: #333333;
  background-color: #ffffff;
  border-top: 1px solid #E0E0E0;
}

.page-game-bai__faq-item:not([open]) .page-game-bai__faq-answer {
  display: none;
}

/* Blog Promo Section */
.page-game-bai__blog-promo-section {
  padding: 60px 0;
}

.page-game-bai__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-game-bai__blog-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-game-bai__blog-card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

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

.page-game-bai__blog-card-title {
  font-size: 1.3em;
  color: #E53935;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1;
}

.page-game-bai__blog-card-title a {
  color: #E53935;
  text-decoration: none;
}

.page-game-bai__blog-card-title a:hover {
  color: #FF5A4F;
}

.page-game-bai__blog-card-date {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 10px;
}

.page-game-bai__blog-card-excerpt {
  font-size: 0.95em;
  color: #333333;
  margin-bottom: 15px;
}

.page-game-bai__view-all-button-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* Contact Promo Section */
.page-game-bai__contact-promo-section {
  padding: 60px 0;
  text-align: center;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__container {
    padding: 0 30px;
  }

  .page-game-bai__hero-content {
    margin-top: -80px;
    padding: 30px 20px;
  }

  .page-game-bai__main-title {
    font-size: 2.8em;
  }

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

  .page-game-bai__section-title {
    font-size: 2em;
  }

  .page-game-bai__game-card-image,
  .page-game-bai__blog-card-image {
    height: 180px;
  }

  .page-game-bai__feature-icon {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .page-game-bai__container {
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles header offset */
  }

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

  .page-game-bai__hero-content {
    margin-top: -50px;
    padding: 25px 15px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important; /* Adjusted for mobile */
  }

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

  .page-game-bai__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai a[class*="button"],
  .page-game-bai 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-game-bai__cta-buttons,
  .page-game-bai__button-group,
  .page-game-bai__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for multiple buttons */
  }

  .page-game-bai__section-title {
    font-size: 1.8em;
  }

  .page-game-bai__intro-section,
  .page-game-bai__games-section,
  .page-game-bai__features-section,
  .page-game-bai__cta-section,
  .page-game-bai__how-to-play-section,
  .page-game-bai__faq-section,
  .page-game-bai__blog-promo-section,
  .page-game-bai__contact-promo-section {
    padding: 40px 0;
  }

  .page-game-bai__intro-text {
    font-size: 1em;
  }

  .page-game-bai__game-grid,
  .page-game-bai__features-grid,
  .page-game-bai__steps-grid,
  .page-game-bai__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__game-card-image,
  .page-game-bai__blog-card-image {
    height: 160px;
  }

  .page-game-bai__game-card-title,
  .page-game-bai__feature-title,
  .page-game-bai__step-title,
  .page-game-bai__blog-card-title {
    font-size: 1.2em;
  }

  .page-game-bai__faq-item summary {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-game-bai__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }

  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 549px) {
  .page-game-bai__blog-grid {
    grid-template-columns: 1fr;
  }
}