/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: Arial, sans-serif;
  color: #333333; /* Default text color for light background */
  background-color: #ffffff; /* Default body background */
}

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

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

.page-game-bai__section-subtitle {
  font-size: 1.5em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
}

.page-game-bai__text-block {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 1em;
  text-align: justify;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary,
.page-game-bai__btn-outline {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  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-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: #a30606;
  border-color: #a30606;
}

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

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

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

.page-game-bai__btn-outline:hover {
  background-color: #017439;
  color: #ffffff;
}

/* Hero Section */
.page-game-bai__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  padding-bottom: 40px;
  text-align: center;
  overflow: hidden;
}

.page-game-bai__hero-image-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

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

.page-game-bai__hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: -100px auto 0; /* Adjust to slightly overlap the image, but not text on image */
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-game-bai__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 900;
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

/* Introduction Section */
.page-game-bai__introduction-section {
  padding: 60px 20px;
}

.page-game-bai__dark-section {
  background-color: #017439;
  color: #ffffff;
}

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

.page-game-bai__dark-section .page-game-bai__text-block {
  color: #f0f0f0;
}

/* Game Types Section */
.page-game-bai__game-types-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
}

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

.page-game-bai__card {
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-game-bai__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-game-bai__card-title {
  font-size: 1.8em;
  font-weight: bold;
  color: #017439;
  margin-bottom: 10px;
}

.page-game-bai__card-description {
  font-size: 1em;
  line-height: 1.6;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Benefits Section */
.page-game-bai__benefits-section {
  padding: 60px 20px;
}

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

.page-game-bai__benefit-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__benefit-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #FFFF00; /* Use custom color for emphasis on dark background */
  margin-bottom: 15px;
}

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

/* Guide Section */
.page-game-bai__guide-section {
  padding: 60px 20px;
  background-color: #f9f9f9;
}

.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 {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-game-bai__step-description {
  font-size: 1em;
  color: #666666;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Strategy Section */
.page-game-bai__strategy-section {
  padding: 60px 20px;
}

.page-game-bai__strategy-content {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.page-game-bai__strategy-text {
  flex: 1;
}

.page-game-bai__strategy-list {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-game-bai__strategy-list li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.page-game-bai__strategy-image-wrapper {
  flex: 0 0 500px;
  max-width: 500px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-game-bai__strategy-image {
  width: 100%;
  height: auto;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

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

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

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

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  list-style: none; /* Hide default marker for details summary */
}

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

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #C30808;
  transition: transform 0.3s ease;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  transform: rotate(45deg); /* Rotate '+' to 'x' or use a '-' */
}

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #666666;
  line-height: 1.6;
  border-top: 1px solid #eee;
  margin-top: 10px;
}

.page-game-bai__faq-answer p {
  margin-bottom: 10px;
}

.page-game-bai__mobile-gaming-image {
  width: 100%;
  height: auto;
  max-width: 400px; /* Constrain image within FAQ answer */
  display: block;
  margin: 15px auto;
  border-radius: 8px;
  min-width: 200px;
  min-height: 200px;
}

/* Conclusion Section */
.page-game-bai__conclusion-section {
  padding: 60px 20px;
  text-align: center;
}

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

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

/* Media Queries for responsiveness */
@media (max-width: 1024px) {
  .page-game-bai__container {
    padding: 15px;
  }

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

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

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

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

  .page-game-bai__game-cards-grid,
  .page-game-bai__benefits-grid,
  .page-game-bai__guide-steps {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .page-game-bai__card-image {
    height: 200px;
  }

  .page-game-bai__strategy-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-game-bai__strategy-image-wrapper {
    max-width: 100%;
    flex: none;
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-game-bai__hero-section {
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .page-game-bai__hero-content {
    margin-top: -60px;
    padding: 20px;
    border-radius: 10px;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
    line-height: 1.3;
  }

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

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

  /* Long Text/Introduction Section */
  .page-game-bai__introduction-section,
  .page-game-bai__benefits-section,
  .page-game-bai__guide-section,
  .page-game-bai__strategy-section,
  .page-game-bai__faq-section,
  .page-game-bai__conclusion-section {
    padding: 30px 15px;
  }

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

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

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

  /* Game Cards Grid */
  .page-game-bai__game-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-game-bai__card-title {
    font-size: 1.5em;
  }

  .page-game-bai__card-description {
    font-size: 0.9em;
  }

  /* Benefits Grid */
  .page-game-bai__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-game-bai__benefit-description {
    font-size: 0.9em;
  }

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

  /* Strategy Section (already column on smaller screens) */
  .page-game-bai__strategy-text {
    order: 2; /* Text after image on mobile for better flow */
  }

  .page-game-bai__strategy-image-wrapper {
    order: 1;
    margin-bottom: 20px;
  }

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

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

  .page-game-bai__faq-answer p {
    font-size: 0.95em;
  }

  /* Conclusion Section Buttons */
  .page-game-bai__cta-buttons-bottom {
    flex-direction: column;
    gap: 15px;
  }

  /* General Image Responsiveness (forced for all content images) */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    min-width: unset; /* Allow images to shrink below 200px if needed for layout */
    min-height: unset;
  }

  /* All containers holding images or buttons */
  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container,
  .page-game-bai__hero-image-wrapper,
  .page-game-bai__strategy-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons and button containers (forced for all buttons) */
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-outline,
  .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__hero-cta-buttons,
  .page-game-bai__cta-buttons-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-game-bai__hero-cta-buttons,
  .page-game-bai__cta-buttons-bottom {
    display: flex;
    flex-direction: column; /* Force vertical stacking for button groups */
  }
}