/* Base Styles for .page-game-bai */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: #FFF5E1; /* Default text color for the page, assuming dark body background */
  background-color: #B71C1C; /* Page specific background */
}

.page-game-bai__section-padding {
  padding: 60px 20px;
}

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

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding as body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  background-color: #7A0E0E;
}

.page-game-bai__hero-image-wrapper {
  position: relative;
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.page-game-bai__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  min-height: 200px; /* Ensure minimum size */
}

.page-game-bai__hero-content-wrapper {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.page-game-bai__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  color: #FFF5E1;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

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

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

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

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #7A0E0E; /* Darker text for bright button */
  border: 2px solid #F4D34D;
}

.page-game-bai__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-game-bai__btn-secondary {
  background: #7A0E0E;
  color: #FFF5E1;
  border: 2px solid #F4D34D;
}

.page-game-bai__btn-secondary:hover {
  background: #5a0a0a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* General Section Titles and Text Blocks */
.page-game-bai__section-title {
  font-size: 2.2em;
  color: #FFF5E1;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-game-bai__text-block {
  font-size: 1.05em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #FFF5E1;
  text-align: justify;
}

.page-game-bai__text-block a {
  color: #F4D34D;
  text-decoration: underline;
}

.page-game-bai__text-block a:hover {
  color: #FFD86A;
}

/* Introduction Section */
.page-game-bai__introduction-section {
  background-color: #B71C1C;
}

/* Popular Games Section */
.page-game-bai__popular-games-section {
  background-color: #7A0E0E;
}

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

.page-game-bai__game-card {
  background-color: #D32F2F; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #F2B544;
}

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

.page-game-bai__game-card-title {
  font-size: 1.5em;
  color: #FFD86A;
  padding: 15px 20px 10px;
  margin: 0;
  text-align: center;
}

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

.page-game-bai__game-card-title a:hover {
  text-decoration: underline;
}

.page-game-bai__game-card-description {
  font-size: 0.95em;
  color: #FFF5E1;
  padding: 0 20px 15px;
  flex-grow: 1;
  line-height: 1.5;
  text-align: center;
}

.page-game-bai__btn-link {
  display: block;
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  color: #7A0E0E;
  text-align: center;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 12px 12px;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-link:hover {
  filter: brightness(1.15);
}

/* Benefits Section */
.page-game-bai__benefits-section {
  background-color: #C91F17;
}

.page-game-bai__dark-bg {
  background-color: #7A0E0E;
  color: #FFF5E1;
}

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

.page-game-bai__benefit-item {
  background-color: #D32F2F;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid #F2B544;
}

.page-game-bai__benefit-title {
  font-size: 1.4em;
  color: #FFD86A;
  margin-bottom: 15px;
}

.page-game-bai__benefit-description {
  font-size: 1em;
  line-height: 1.6;
  color: #FFF5E1;
}

/* Promotions Section */
.page-game-bai__promotions-section {
  background-color: #B71C1C;
}

.page-game-bai__cta-container {
  text-align: center;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* How to Start Section */
.page-game-bai__how-to-start-section {
  background-color: #7A0E0E;
}

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

.page-game-bai__step-item {
  background-color: #D32F2F;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #F2B544;
}

.page-game-bai__step-icon {
  font-size: 2.5em;
  font-weight: bold;
  color: #FFD86A;
  margin-bottom: 15px;
  line-height: 1;
}

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

.page-game-bai__step-description {
  font-size: 0.95em;
  line-height: 1.6;
  color: #FFF5E1;
}

.page-game-bai__step-description a {
  color: #F4D34D;
  text-decoration: underline;
}

.page-game-bai__step-description a:hover {
  color: #FFD86A;
}

/* Mobile Section */
.page-game-bai__mobile-section {
  background-color: #B71C1C;
}

.page-game-bai__mobile-layout {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-game-bai__mobile-content {
  flex: 1;
}

.page-game-bai__mobile-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-game-bai__mobile-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  min-height: 200px;
}

/* Security Section */
.page-game-bai__security-section {
  background-color: #C91F17;
}

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

.page-game-bai__faq-list {
  margin-top: 40px;
}

.page-game-bai__faq-item {
  background-color: #D32F2F;
  border: 1px solid #F2B544;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #FFD86A;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.page-game-bai__faq-question::-webkit-details-marker {
  display: none;
}

.page-game-bai__faq-question .page-game-bai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  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: 0 25px 20px;
  font-size: 1em;
  line-height: 1.7;
  color: #FFF5E1;
}

/* Conclusion Section */
.page-game-bai__conclusion-section {
  background-color: #7A0E0E;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-game-bai__hero-image-wrapper {
    max-height: 400px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.8em, 5vw, 2.5em);
  }

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

  .page-game-bai__mobile-layout {
    flex-direction: column;
  }

  .page-game-bai__mobile-image-wrapper {
    order: -1;
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-game-bai__section-padding {
    padding: 40px 15px;
  }

  .page-game-bai__hero-section {
    padding-bottom: 40px;
    padding-top: 10px; /* Consistent small top padding */
  }

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

  .page-game-bai__main-title {
    font-size: clamp(1.6em, 7vw, 2.2em);
    margin-bottom: 15px;
  }

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

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__cta-container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-game-bai__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-game-bai__text-block {
    font-size: 0.95em;
  }

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

  .page-game-bai__game-card-image,
  .page-game-bai__mobile-image,
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px !important; /* Ensure min size on mobile */
    object-fit: cover;
  }

  .page-game-bai__game-card {
    box-sizing: border-box;
  }

  .page-game-bai__mobile-layout {
    gap: 30px;
  }

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

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

  /* Mandatory mobile styles for specific elements */
  .page-game-bai__home-content { /* Placeholder for long text gold frame if it existed */
    height: auto;
    overflow-y: visible;
  }

  .page-game-bai__slider-track { /* Placeholder for game carousel track */
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .page-game-bai__game-slide { /* Placeholder for game carousel slide */
    flex: 0 0 calc(80% - 10px); /* Example: 80% width for mobile slides */
    max-width: calc(80% - 10px);
    scroll-snap-align: start;
  }

  .page-game-bai__banners-top-wrapper { /* Placeholder for cooperative brand grid */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px;
  }

  .page-game-bai__banner-item img { /* Placeholder for cooperative brand grid images */
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }

  .page-game-bai__blog-masonry { /* Placeholder for blog card masonry */
    grid-template-columns: 1fr !important;
    gap: 20px;
    align-items: stretch;
  }

  .page-game-bai__blog-slider-track { /* Placeholder for blog slider track */
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .page-game-bai__blog-slide { /* Placeholder for blog slider slide */
    flex: 0 0 calc(90% - 10px); /* Example: 90% width for mobile blog slides */
    max-width: calc(90% - 10px);
    scroll-snap-align: start;
  }

  .page-game-bai__container,
  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__content-area,
  .page-game-bai__text-block,
  .page-game-bai__hero-content-wrapper,
  .page-game-bai__mobile-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-game-bai__cta-buttons {
    gap: 10px;
  }
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    font-size: 0.95em;
    padding: 10px 15px;
  }
  .page-game-bai__faq-question {
    font-size: 0.95em;
    padding: 12px 15px;
  }
  .page-game-bai__faq-answer {
    font-size: 0.9em;
    padding: 0 15px 12px;
  }
  .page-game-bai__section-title {
    font-size: 1.6em;
  }
  .page-game-bai__main-title {
    font-size: clamp(1.4em, 8vw, 2em);
  }
  .page-game-bai__hero-image-wrapper {
    max-height: 250px;
  }
}