/* style/game-bai.css */
.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF; /* Explicitly set for clarity */
}

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

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  background-color: #f8f8f8;
}

.page-game-bai__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  justify-content: center;
}

.page-game-bai__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: #1e1765; /* Darker text for contrast on light background */
}

.page-game-bai__main-title {
  font-size: clamp(2.2em, 4vw, 3.2em);
  font-weight: 700;
  margin-bottom: 15px;
  color: #017439; /* Brand color for main title */
  line-height: 1.2;
}

.page-game-bai__subtitle {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #555555;
}

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

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

/* CTA Buttons */
.page-game-bai__cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-game-bai__btn-secondary {
  background-color: #FFFFFF;
  color: #017439; /* Brand color */
  border: 2px solid #017439;
}

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

.page-game-bai__cta-center {
  text-align: center;
  margin-top: 40px;
}

/* Section Titles and Descriptions */
.page-game-bai__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #017439; /* Brand color */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-game-bai__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Light and Dark Sections for contrast */
.page-game-bai__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

.page-game-bai__dark-section {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF; /* White text for contrast */
}

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

/* Intro Section (Module 1) */
.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 {
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-game-bai__icon-box-media {
  width: 240px;
  height: 240px;
  aspect-ratio: 1/1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #017439;
}

.page-game-bai__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* Ensure image is round */
  display: block;
}

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

.page-game-bai__feature-text {
  font-size: 1em;
  color: #666666;
}

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

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

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

.page-game-bai__game-card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__game-card-link {
  color: #017439; /* Brand color for links */
  text-decoration: none;
}

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

.page-game-bai__game-card-description {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-game-bai__game-card-button {
  display: inline-block;
  background-color: #C30808;
  color: #FFFF00;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-game-bai__game-card-button:hover {
  background-color: #a30606;
}

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

.page-game-bai__guide-step {
  text-align: center;
  padding: 25px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-game-bai__guide-step-icon {
  width: 150px; /* Smaller square for guide icons */
  height: 150px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #e0f2f1; /* Light background for icons */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #017439;
}

.page-game-bai__guide-step-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.page-game-bai__guide-step-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #017439;
  margin-bottom: 10px;
}

.page-game-bai__guide-step-text {
  font-size: 0.95em;
  color: #666666;
}

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

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

.page-game-bai__promo-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-game-bai__promo-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__promo-link {
  color: #017439;
  text-decoration: none;
}

.page-game-bai__promo-link:hover {
  text-decoration: underline;
}

.page-game-bai__promo-text {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 20px;
  padding: 0 15px;
}

/* FAQ Section */
.page-game-bai__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__faq-item {
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #017439;
  cursor: pointer;
  list-style: none; /* For details/summary */
}

.page-game-bai__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker */
}

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
}

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #555555;
}

/* Contact CTA Section */
.page-game-bai__cta-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.page-game-bai__cta-flex .page-game-bai__cta-buttons {
  justify-content: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-game-bai__hero-content {
    order: 2;
  }

  .page-game-bai__hero-image {
    order: 1;
  }
}

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

  /* HERO Section */
  .page-game-bai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-game-bai__main-title {
    font-size: 2em !important;
  }

  .page-game-bai__subtitle {
    font-size: 1em !important;
  }

  .page-game-bai__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: 12px 20px;
  }

  /* Module 1: Intro Section (round images) */
  .page-game-bai__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__icon-box-media {
    width: 200px;
    height: 200px;
    border-width: 3px;
  }

  .page-game-bai__feature-title {
    font-size: 1.3em;
  }

  /* Popular Games Section */
  .page-game-bai__section-title {
    font-size: 1.8em !important;
  }

  .page-game-bai__section-description {
    font-size: 0.95em !important;
  }

  .page-game-bai__game-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  /* Guide Section */
  .page-game-bai__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__guide-step-icon {
    width: 120px;
    height: 120px;
  }

  .page-game-bai__guide-step-title {
    font-size: 1.2em;
  }

  /* Promo Section */
  .page-game-bai__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__promo-image {
    height: 180px;
  }

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

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

  /* General Image & Container Responsiveness */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

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

  /* Exception for round images (Module 1) */
  .page-game-bai__icon-box-media img {
    height: 100% !important; /* Fill parent round container */
    object-fit: cover !important;
  }
}