/* Base styles for the Game Bài page */
.page-game-bai {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main, #F2FFF6); /* Default text color for dark background */
  background-color: var(--page-bg, #08160F); /* Page background color */
}

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

.page-game-bai__section {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.page-game-bai__section-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--gold, #F2C14E);
  line-height: 1.2;
}

.page-game-bai__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-secondary, #A7D9B8);
}

/* Buttons */
.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: 18px;
  font-weight: bold;
  text-decoration: none;
  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: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-game-bai__btn-secondary {
  background: var(--card-bg, #11271B);
  color: var(--main-color, #11A84E);
  border: 2px solid var(--border-color, #2E7A4E);
}

.page-game-bai__btn-secondary:hover {
  background: var(--deep-green, #0A4B2C);
  color: #ffffff;
  transform: translateY(-2px);
}

.page-game-bai__link {
  color: var(--main-color, #11A84E);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-game-bai__link:hover {
  color: var(--glow, #57E38D);
}

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, relies on body padding-top from shared.css */
  padding-bottom: 60px;
  background-color: var(--background, #08160F);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-game-bai__hero-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

.page-game-bai__hero-content {
  max-width: 900px;
  text-align: center;
  padding: 40px 20px 0;
}

.page-game-bai__main-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  color: var(--gold, #F2C14E);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-game-bai__hero-description {
  font-size: 20px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
}

.page-game-bai__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Intro Section */
.page-game-bai__intro-section {
  background-color: var(--background, #08160F);
}

.page-game-bai__intro-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

.page-game-bai__intro-content p {
  font-size: 17px;
  color: var(--text-main, #F2FFF6);
  text-align: justify;
}

.page-game-bai__intro-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

/* Game Types Section */
.page-game-bai__game-types-section {
  background-color: var(--background, #08160F);
}

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

.page-game-bai__game-card {
  background: var(--card-bg, #11271B);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color, #2E7A4E);
}

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

.page-game-bai__card-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--gold, #F2C14E);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__card-text {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  padding: 0 15px;
  flex-grow: 1;
}

.page-game-bai__game-card .page-game-bai__btn-primary {
  width: calc(100% - 60px);
  margin: 0 30px;
}

/* Why Choose Section */
.page-game-bai__why-choose-section {
  background-color: var(--deep-green, #0A4B2C);
  color: #ffffff;
}

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

.page-game-bai__why-choose-section .page-game-bai__section-description {
  color: var(--text-secondary, #A7D9B8);
}

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

.page-game-bai__advantage-item {
  background: var(--card-bg, #11271B);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border-color, #2E7A4E);
}

.page-game-bai__advantage-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--gold, #F2C14E);
  margin-bottom: 10px;
}

.page-game-bai__advantage-text {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
}

/* Promo Section */
.page-game-bai__promo-section {
  background-color: var(--background, #08160F);
}

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

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

.page-game-bai__promo-text p {
  font-size: 17px;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__promo-image {
  flex-shrink: 0;
  width: 50%;
  max-width: 600px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-game-bai__promo-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Guide Section */
.page-game-bai__guide-section {
  background-color: var(--card-bg, #11271B);
}

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

.page-game-bai__guide-step-item {
  background: var(--deep-green, #0A4B2C);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border-color, #2E7A4E);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.page-game-bai__step-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--gold, #F2C14E);
  margin-bottom: 15px;
}

.page-game-bai__step-text {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-game-bai__guide-step-item .page-game-bai__btn-primary {
  margin-bottom: 15px;
  width: calc(100% - 0px);
}

.page-game-bai__guide-image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

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

/* Strategy Section */
.page-game-bai__strategy-section {
  background-color: var(--background, #08160F);
}

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

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

.page-game-bai__strategy-text p {
  font-size: 17px;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__strategy-image {
  flex-shrink: 0;
  width: 50%;
  max-width: 600px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-game-bai__strategy-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
details.page-game-bai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color, #2E7A4E);
  overflow: hidden;
  background: var(--card-bg, #11271B);
  color: var(--text-main, #F2FFF6);
}

details.page-game-bai__faq-item summary.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

details.page-game-bai__faq-item summary.page-game-bai__faq-question:hover {
  background: var(--deep-green, #0A4B2C);
}

.page-game-bai__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--gold, #F2C14E);
}

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--glow, #57E38D);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-game-bai__faq-item .page-game-bai__faq-answer {
  padding: 0 20px 20px;
  background: var(--deep-green, #0A4B2C);
  border-radius: 0 0 5px 5px;
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
}

.page-game-bai__faq-answer p {
  margin: 0;
  color: var(--text-secondary, #A7D9B8);
}

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

/* Conclusion Section */
.page-game-bai__conclusion-section {
  background-color: var(--deep-green, #0A4B2C);
  color: #ffffff;
}

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

.page-game-bai__conclusion-section .page-game-bai__section-description,
.page-game-bai__conclusion-section p {
  color: var(--text-secondary, #A7D9B8);
  font-size: 17px;
  text-align: center;
  margin-bottom: 20px;
}

.page-game-bai__conclusion-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__section-title {
    font-size: 34px;
  }
  .page-game-bai__hero-description {
    font-size: 18px;
  }
  .page-game-bai__intro-content p,
  .page-game-bai__promo-text p,
  .page-game-bai__strategy-text p,
  .page-game-bai__conclusion-section p {
    font-size: 16px;
  }
}

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

  .page-game-bai__section {
    padding: 40px 0;
  }

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

  .page-game-bai__section-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

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

  .page-game-bai__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    max-height: 300px; /* Constrain hero image height on mobile */
  }

  .page-game-bai__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

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

  .page-game-bai__hero-buttons,
  .page-game-bai__conclusion-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: 16px;
  }

  /* Intro Section */
  .page-game-bai__intro-content {
    flex-direction: column;
    gap: 20px;
  }

  .page-game-bai__intro-content p {
    font-size: 15px;
  }

  /* Game Types Section */
  .page-game-bai__game-cards-grid {
    grid-template-columns: 1fr 1fr; /* 2 columns for mobile */
    gap: 20px;
  }

  .page-game-bai__game-card img {
    
  }

  .page-game-bai__card-title {
    font-size: 20px;
  }

  .page-game-bai__card-text {
    font-size: 14px;
  }

  .page-game-bai__game-card .page-game-bai__btn-primary {
    width: calc(100% - 30px);
    margin: 0 15px;
  }

  /* Why Choose Section */
  .page-game-bai__advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__advantage-title {
    font-size: 20px;
  }

  .page-game-bai__advantage-text {
    font-size: 15px;
  }

  /* Promo Section */
  .page-game-bai__promo-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-game-bai__promo-image {
    width: 100%;
    order: -1; /* Image appears above text on mobile */
  }

  .page-game-bai__promo-text p {
    font-size: 15px;
  }

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

  .page-game-bai__step-title {
    font-size: 20px;
  }

  .page-game-bai__step-text {
    font-size: 15px;
  }

  .page-game-bai__guide-step-item .page-game-bai__btn-primary {
    width: 100%;
  }

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

  .page-game-bai__strategy-image {
    width: 100%;
  }

  .page-game-bai__strategy-text p {
    font-size: 15px;
  }

  /* FAQ Section */
  details.page-game-bai__faq-item summary.page-game-bai__faq-question {
    padding: 15px;
  }

  .page-game-bai__faq-qtext {
    font-size: 16px;
  }

  .page-game-bai__faq-toggle {
    font-size: 20px;
    width: 24px;
    margin-left: 10px;
  }

  details.page-game-bai__faq-item .page-game-bai__faq-answer {
    padding: 0 15px 15px;
    font-size: 15px;
  }

  /* General image and container rules for mobile */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-game-bai__section,
  .page-game-bai__container,
  .page-game-bai__game-card,
  .page-game-bai__advantage-item,
  .page-game-bai__guide-step-item,
  .page-game-bai__promo-content,
  .page-game-bai__strategy-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-game-bai__hero-buttons, .page-game-bai__conclusion-buttons {
    padding-left: 0;
    padding-right: 0;
  }

  .page-game-bai__game-cards-grid {
    padding-left: 0;
    padding-right: 0;
    display: grid;
    grid-template-columns: 1fr; /* Single column for game cards on very small screens */
  }
}

@media (max-width: 480px) {
  .page-game-bai__game-cards-grid {
    grid-template-columns: 1fr; /* Single column for game cards on smaller mobile */
  }
  .page-game-bai__game-card img {
    height: 200px;
  }
}