/* style/game-bai.css */

:root {
  --page-game-bai-primary-color: #2F6BFF;
  --page-game-bai-secondary-color: #6FA3FF;
  --page-game-bai-gradient-button: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  --page-game-bai-card-bg: #FFFFFF;
  --page-game-bai-background: #F4F7FB;
  --page-game-bai-text-main: #1F2D3D;
  --page-game-bai-text-dark: #000000;
  --page-game-bai-border-color: #D6E2FF;
  --page-game-bai-glow-color: #A5C4FF;
}

.page-game-bai {
  font-family: 'Arial', sans-serif;
  color: var(--page-game-bai-text-main); /* Default text color for light body background */
  background-color: var(--page-game-bai-background);
}

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

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--page-game-bai-background);
}

.page-game-bai__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px 16px;
  max-width: 1170px;
  margin: 0 auto;
}

.page-game-bai__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
  color: var(--page-game-bai-text-main);
}

.page-game-bai__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--page-game-bai-primary-color);
  margin-bottom: 20px;
}

.page-game-bai__hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--page-game-bai-text-main);
}

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

.page-game-bai__hero-side-image {
  max-width: 600px;
  width: 100%;
  height: 600px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.page-game-bai__hero-cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Buttons */
.page-game-bai__cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
}

.page-game-bai__btn-primary {
  background: var(--page-game-bai-gradient-button);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-game-bai__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.4);
}

.page-game-bai__btn-secondary {
  background: #ffffff;
  color: var(--page-game-bai-primary-color);
  border: 2px solid var(--page-game-bai-primary-color);
}

.page-game-bai__btn-secondary:hover {
  background: var(--page-game-bai-primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.2);
}

.page-game-bai__btn-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--page-game-bai-primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-game-bai__btn-link:hover {
  color: var(--page-game-bai-secondary-color);
  text-decoration: underline;
}

.page-game-bai__btn-small {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 5px;
  background-color: var(--page-game-bai-primary-color);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-game-bai__btn-small:hover {
  background-color: var(--page-game-bai-secondary-color);
}

/* Section Titles and Descriptions */
.page-game-bai__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--page-game-bai-text-dark);
  text-align: center;
  margin-bottom: 20px;
}

.page-game-bai__section-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* Intro Section (Module 1 - Features) */
.page-game-bai__intro-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-game-bai__feature-item {
  text-align: center;
  padding: 20px;
  background-color: var(--page-game-bai-card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--page-game-bai-border-color);
}

.page-game-bai__icon-box-media {
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--page-game-bai-primary-color);
  box-shadow: 0 0 0 8px var(--page-game-bai-glow-color);
}

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

.page-game-bai__feature-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--page-game-bai-primary-color);
  margin-bottom: 10px;
}

.page-game-bai__feature-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
}

/* Game Categories Section */
.page-game-bai__game-categories-section {
  padding: 60px 0;
  background-color: var(--page-game-bai-primary-color);
  color: #ffffff;
}

.page-game-bai__game-categories-section .page-game-bai__section-title,
.page-game-bai__game-categories-section .page-game-bai__section-description {
  color: #ffffff;
}

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

.page-game-bai__game-card {
  display: block;
  background-color: var(--page-game-bai-card-bg);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-game-bai__game-card-content {
  padding: 20px;
}

.page-game-bai__game-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--page-game-bai-primary-color);
  margin-bottom: 10px;
}

.page-game-bai__game-card-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--page-game-bai-text-main);
}

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

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

.page-game-bai__step-item {
  text-align: center;
  background-color: var(--page-game-bai-card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--page-game-bai-border-color);
}

.page-game-bai__step-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-game-bai__step-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--page-game-bai-primary-color);
  margin-bottom: 10px;
}

.page-game-bai__step-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
}

/* Promotion Section */
.page-game-bai__promo-section {
  padding: 60px 0;
  background-color: var(--page-game-bai-primary-color);
  color: #ffffff;
}

.page-game-bai__promo-section .page-game-bai__section-title,
.page-game-bai__promo-section .page-game-bai__section-description {
  color: #ffffff;
}

.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: var(--page-game-bai-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px 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: 20px;
}

.page-game-bai__promo-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--page-game-bai-primary-color);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-game-bai__promo-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--page-game-bai-text-main);
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-game-bai__promo-cta {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: var(--page-game-bai-background);
}

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

.page-game-bai__faq-item {
  background-color: var(--page-game-bai-card-bg);
  border: 1px solid var(--page-game-bai-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  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.15rem;
  font-weight: 600;
  color: var(--page-game-bai-primary-color);
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
  list-style: none; /* For details tag */
}

.page-game-bai__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for Chrome */
}

.page-game-bai__faq-item summary::marker {
  display: none; /* Hide default marker for Firefox */
}

.page-game-bai__faq-question:hover {
  background-color: #f8faff;
}

.page-game-bai__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
  border-top: 1px solid var(--page-game-bai-border-color);
  margin-top: -1px; /* Overlap border */
}

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

/* Call to Action Bottom Section */
.page-game-bai__cta-bottom-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--page-game-bai-primary-color);
}

.page-game-bai__cta-bottom-section .page-game-bai__container {
  background-color: var(--page-game-bai-primary-color);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-game-bai__cta-bottom-section .page-game-bai__section-title,
.page-game-bai__cta-bottom-section .page-game-bai__section-description {
  color: #ffffff;
}

.page-game-bai__cta-bottom-section .page-game-bai__cta-buttons {
  margin-top: 40px;
  justify-content: center;
}

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

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

  .page-game-bai__hero-content {
    flex: 1 1 100%;
  }

  .page-game-bai__hero-image {
    flex: 1 1 100%;
    margin-bottom: 30px;
  }

  .page-game-bai__hero-cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* General content areas */
  .page-game-bai__container,
  .page-game-bai__hero-container {
    padding: 15px;
  }

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

  .page-game-bai__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .page-game-bai__hero-description {
    font-size: 1rem;
  }

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

  /* Buttons - forced full width */
  .page-game-bai__cta-button,
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .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-side-image {
    height: 400px; /* Adjust height for smaller screens */
  }

  /* Module 1 (3-column circular images) */
  .page-game-bai__features-grid {
    grid-template-columns: 1fr;
  }

  .page-game-bai__icon-box-media {
    width: 180px;
    height: 180px;
    border-width: 3px;
    box-shadow: 0 0 0 5px var(--page-game-bai-glow-color);
  }

  /* Game Categories Section */
  .page-game-bai__game-grid {
    grid-template-columns: 1fr;
  }

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

  /* Guide Section */
  .page-game-bai__steps-grid {
    grid-template-columns: 1fr;
  }

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

  /* Promotion Section */
  .page-game-bai__promo-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  /* General Images & Containers - forced responsive */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-game-bai__section,
  .page-game-bai__card,
  .page-game-bai__container,
  .page-game-bai__promo-card,
  .page-game-bai__game-card,
  .page-game-bai__feature-item,
  .page-game-bai__step-item,
  .page-game-bai__cta-bottom-section .page-game-bai__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Specific text sizes for mobile */
  .page-game-bai__section-title {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  .page-game-bai__section-description {
    font-size: 0.95rem;
  }

  .page-game-bai__feature-title,
  .page-game-bai__game-card-title,
  .page-game-bai__step-title,
  .page-game-bai__promo-title {
    font-size: 1.2rem;
  }

  .page-game-bai__feature-text,
  .page-game-bai__game-card-text,
  .page-game-bai__step-text,
  .page-game-bai__promo-text {
    font-size: 0.9rem;
  }
}