.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* Custom background color */
}

.page-game-bai__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

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

.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
  padding-bottom: 40px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
}

.page-game-bai__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 40px 16px;
  gap: 24px;
}

.page-game-bai__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  padding-right: 20px;
}

.page-game-bai__hero-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
}

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

.page-game-bai__hero-cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-game-bai__hero-image {
  flex: 1 1 45%;
  text-align: center;
  min-width: 300px;
}

.page-game-bai__hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow word breaking */
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
}

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

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

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

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

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

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

.page-game-bai__intro-section {
  padding: 60px 0;
}

.page-game-bai__intro-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.page-game-bai__intro-text {
  flex: 1 1 55%;
  min-width: 300px;
}

.page-game-bai__intro-text p {
  margin-bottom: 15px;
  font-size: 1.05em;
}

.page-game-bai__intro-image {
  flex: 1 1 40%;
  min-width: 250px;
  text-align: center;
}

.page-game-bai__intro-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-game-bai__featured-games-section {
  padding: 60px 0;
}

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

.page-game-bai__game-card {
  background-color: #ffffff;
  color: #333333;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
}

.page-game-bai__card-media {
  height: 200px; /* Fixed height for consistent card image display */
  overflow: hidden;
  margin-bottom: 15px;
}

.page-game-bai__card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-game-bai__card-title {
  font-size: 1.5em;
  color: #E53935;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__card-description {
  font-size: 0.95em;
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-game-bai__card-btn {
  margin-top: auto; /* Push button to bottom */
}

.page-game-bai__why-choose-section {
  padding: 60px 0;
}

.page-game-bai__why-choose-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.page-game-bai__why-choose-text {
  flex: 1 1 55%;
  min-width: 300px;
}

.page-game-bai__advantage-list {
  list-style: none;
  padding: 0;
}

.page-game-bai__advantage-list li {
  margin-bottom: 25px;
}

.page-game-bai__advantage-list li h3 {
  font-size: 1.3em;
  color: #E53935;
  margin-bottom: 8px;
}

.page-game-bai__advantage-list li p {
  font-size: 1em;
}

.page-game-bai__why-choose-image {
  flex: 1 1 40%;
  min-width: 250px;
  text-align: center;
}

.page-game-bai__why-choose-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-game-bai__guide-section {
  padding: 60px 0;
}

.page-game-bai__guide-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.page-game-bai__guide-steps {
  flex: 1 1 55%;
  min-width: 300px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.page-game-bai__step-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  padding-left: 70px;
  color: #ffffff;
}

.page-game-bai__step-number {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  background-color: #FF5A4F;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
}

.page-game-bai__step-item h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-game-bai__step-item p {
  font-size: 0.95em;
  color: #f0f0f0;
}

.page-game-bai__guide-image {
  flex: 1 1 40%;
  min-width: 250px;
  text-align: center;
}

.page-game-bai__guide-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

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

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-game-bai__container,
  .page-game-bai__game-cards-grid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
  }

  .page-game-bai__hero-container {
    flex-direction: column;
    padding: 30px 15px;
    gap: 20px;
  }

  .page-game-bai__hero-content {
    padding-right: 0;
    text-align: center;
  }

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

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

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    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__intro-content,
  .page-game-bai__why-choose-content,
  .page-game-bai__guide-content {
    flex-direction: column;
  }

  .page-game-bai__intro-text,
  .page-game-bai__intro-image,
  .page-game-bai__why-choose-text,
  .page-game-bai__why-choose-image,
  .page-game-bai__guide-steps,
  .page-game-bai__guide-image {
    min-width: unset;
    width: 100%;
  }

  .page-game-bai__card-media {
    height: 180px; /* Adjust height for smaller screens */
  }

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

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
}