/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F3F8FF); /* Default text color for dark background */
  background-color: var(--deep-navy, #08162B); /* Body background from shared */
}

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

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

.page-game-bai__dark-section {
  background-color: var(--deep-navy, #08162B);
  color: var(--text-main, #F3F8FF);
}

.page-game-bai__light-section {
  background-color: #f5f5f5; /* Light background for contrast sections */
  color: var(--text-secondary, #333333); /* Dark text for light background */
}

.page-game-bai__light-section .page-game-bai__section-title,
.page-game-bai__light-section .page-game-bai__section-description,
.page-game-bai__light-section .page-game-bai__card h3,
.page-game-bai__light-section .page-game-bai__card p,
.page-game-bai__light-section .page-game-bai__btn-secondary {
  color: var(--text-secondary, #333333);
}

.page-game-bai__light-section .page-game-bai__card {
  background-color: #ffffff; /* White card background for light section */
  border: 1px solid var(--border-color, #e0e0e0);
}

.page-game-bai__light-section .page-game-bai__card a {
  color: var(--primary-color, #1D5FD1); /* Link color for light section */
}

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-main, #F3F8FF);
}

h2.page-game-bai__section-title {
    color: var(--gold, #F2C14E); /* Ensure h2 in dark sections uses gold */
}

.page-game-bai__light-section h2.page-game-bai__section-title {
    color: var(--primary-color, #1D5FD1); /* h2 in light section uses primary blue */
}

.page-game-bai__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary, #AFC4E8);
}

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

.page-game-bai__hero-image {
  width: 100%;
  max-height: 700px; /* Max height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-game-bai__hero-content {
  padding: 40px 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

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

.page-game-bai__description {
  font-size: 1.2em;
  color: var(--text-secondary, #AFC4E8);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow word breaking */
}

.page-game-bai__btn-primary {
  background: var(--button-gradient, linear-gradient(180deg, #2B73F6 0%, #1144A6 100%));
  color: var(--text-main, #F3F8FF);
  border: none;
}

.page-game-bai__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-game-bai__btn-secondary {
  background: transparent;
  color: var(--primary-color, #1D5FD1);
  border: 2px solid var(--primary-color, #1D5FD1);
}

.page-game-bai__btn-secondary:hover {
  background: var(--primary-color, #1D5FD1);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Game Cards Grid */
.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: var(--card-bg, #10233F);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-main, #F3F8FF);
}

.page-game-bai__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-game-bai__game-card-title,
.page-game-bai__benefit-title,
.page-game-bai__promotion-title {
  font-size: 1.4em;
  font-weight: bold;
  margin: 15px 20px 10px;
  color: var(--gold, #F2C14E);
}

.page-game-bai__game-card-title a,
.page-game-bai__promotion-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-game-bai__game-card-text,
.page-game-bai__benefit-text,
.page-game-bai__promotion-text,
.page-game-bai__step-text {
  font-size: 1em;
  color: var(--text-secondary, #AFC4E8);
  padding: 0 20px 20px;
}

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

.page-game-bai__benefit-card {
  text-align: center;
}

.page-game-bai__benefit-title {
  color: var(--primary-color, #1D5FD1);
  margin-top: 20px;
}

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

.page-game-bai__step-card {
  text-align: center;
  padding-bottom: 20px; /* Ensure button has space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-game-bai__step-title {
  color: var(--gold, #F2C14E);
  margin: 20px 20px 10px;
}

.page-game-bai__step-card .page-game-bai__btn-primary {
  margin-top: auto; /* Push button to bottom */
  margin-left: 20px;
  margin-right: 20px;
  width: calc(100% - 40px); /* Adjust width for padding */
}

.page-game-bai__step-card a {
  color: var(--primary-color, #1D5FD1);
  text-decoration: none;
}

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

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

.page-game-bai__promotion-card {
  text-align: center;
}

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

/* Responsive styles */
@media (max-width: 768px) {
  /* HERO Main Image */
  .page-game-bai__hero-section {
    padding-top: 10px; /* Small top padding */
  }

  /* Long Content Area */
  .page-game-bai__section-title {
    font-size: 2em;
  }

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

  /* Generic Images and Containers */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* Buttons and Button Containers */
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .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;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .page-game-bai__cta-buttons,
  .page-game-bai__cta-center {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .page-game-bai__step-card .page-game-bai__btn-primary {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Card specific adjustments */
  .page-game-bai__game-card-image,
  .page-game-bai__benefit-card img,
  .page-game-bai__promotion-card img {
     /* Slightly smaller height for mobile cards */
  }

  .page-game-bai__game-card-title,
  .page-game-bai__benefit-title,
  .page-game-bai__promotion-title {
    font-size: 1.2em;
  }

  .page-game-bai__game-card-text,
  .page-game-bai__benefit-text,
  .page-game-bai__promotion-text,
  .page-game-bai__step-text {
    font-size: 0.95em;
  }
}