/* style/game-bai.css */

/* Base styles */
.page-game-bai {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #F5F7FA; /* Page background color */
}

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

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

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

.page-game-bai__description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: #333333;
}

/* Buttons */
.page-game-bai__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-game-bai__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: none;
}

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

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

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

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

.page-game-bai__hero-image-wrapper {
  margin-bottom: 30px;
}

.page-game-bai__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

.page-game-bai__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-game-bai__main-title {
  font-size: 3em;
  color: #E53935;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.page-game-bai__hero-content .page-game-bai__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #333333;
}

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

/* Why Choose Section */
.page-game-bai__why-choose {
  background-color: #F5F7FA;
}

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

.page-game-bai__card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-game-bai__card-title {
  font-size: 1.5em;
  color: #E53935;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-game-bai__card-text {
  font-size: 1em;
  margin-bottom: 15px;
}

.page-game-bai__list {
  list-style-type: disc;
  padding-left: 20px;
  font-size: 1em;
}

.page-game-bai__list-item {
  margin-bottom: 8px;
}

.page-game-bai__figure {
  text-align: center;
  margin: 40px auto;
  max-width: 800px;
}

.page-game-bai__image-content {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-game-bai__figcaption {
  font-size: 0.9em;
  color: #555555;
  margin-top: 10px;
}

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

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

.page-game-bai__game-card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-game-bai__game-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__game-title {
  font-size: 1.4em;
  color: #E53935;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-game-bai__game-description {
  font-size: 0.95em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* How to Join Section */
.page-game-bai__how-to-join {
  background-color: #F5F7FA;
}

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

.page-game-bai__step-card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-game-bai__step-description {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
}

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

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

.page-game-bai__promo-card {
  background: #ffffff;
  color: #333333;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-game-bai__promo-title {
  font-size: 1.4em;
  color: #E53935;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-game-bai__promo-text {
  font-size: 0.95em;
  color: #555555;
}

.page-game-bai__view-all-promos {
  margin-top: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

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

.page-game-bai__faq-list {
  max-width: 900px;
  margin: 0 auto 40px auto;
}

.page-game-bai__faq-item {
  background: #ffffff;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #E0E0E0;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-question {
  background-color: #E53935;
  color: #ffffff;
  border-bottom: none;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  content: '-';
  transform: rotate(180deg);
}

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

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

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

.page-game-bai__faq-answer p {
  margin-bottom: 0;
  text-align: left;
}

.page-game-bai__view-all-faq {
  margin-top: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Conclusion Section */
.page-game-bai__conclusion {
  background-color: #F5F7FA;
  text-align: center;
  padding-bottom: 60px;
}

.page-game-bai__conclusion .page-game-bai__description {
  margin-bottom: 40px;
}

/* Media Queries for Responsiveness */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-game-bai__main-title {
    font-size: 2.5em;
  }

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

  .page-game-bai__card,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promo-card {
    padding: 25px;
  }

  .page-game-bai__card-title,
  .page-game-bai__game-title,
  .page-game-bai__step-title,
  .page-game-bai__promo-title {
    font-size: 1.3em;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Top Section */
  .page-game-bai__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
  }

  .page-game-bai__hero-content {
    padding: 0 15px;
  }

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

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

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

  .page-game-bai__btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General Section & Container */
  .page-game-bai__section {
    padding: 30px 0;
  }

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

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

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

  /* Cards & Grids */
  .page-game-bai__grid,
  .page-game-bai__game-card-wrapper,
  .page-game-bai__steps-grid,
  .page-game-bai__promo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__card,
  .page-game-bai__game-card,
  .page-game-bai__step-card,
  .page-game-bai__promo-card {
    padding: 20px;
  }

  .page-game-bai__card-title,
  .page-game-bai__game-title,
  .page-game-bai__step-title,
  .page-game-bai__promo-title {
    font-size: 1.2em;
  }

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

  .page-game-bai__figure {
    margin: 30px auto;
  }

  .page-game-bai__figcaption {
    font-size: 0.85em;
  }

  /* FAQ */
  .page-game-bai__faq-list {
    margin-bottom: 30px;
  }

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

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

  .page-game-bai__view-all-promos,
  .page-game-bai__view-all-faq {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
  }

  /* Conclusion Section */
  .page-game-bai__conclusion {
    padding-bottom: 40px;
  }

  .page-game-bai__conclusion .page-game-bai__description {
    margin-bottom: 30px;
  }
}

/* Additional rules for image containers to prevent overflow */
.page-game-bai__hero-image-wrapper,
.page-game-bai__figure,
.page-game-bai__game-card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .page-game-bai__hero-image-wrapper,
  .page-game-bai__figure,
  .page-game-bai__game-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}