/* style/game-bai.css */

:root {
  --page-game-bai-primary: #2F6BFF;
  --page-game-bai-secondary: #6FA3FF;
  --page-game-bai-button-gradient: 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: #D6E2FF;
  --page-game-bai-glow: #A5C4FF;
}

.page-game-bai {
  font-family: Arial, sans-serif;
  color: var(--page-game-bai-text-main);
  background-color: var(--page-game-bai-background);
}

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

.page-game-bai__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--page-game-bai-text-dark);
  text-align: center;
  margin-bottom: 20px;
}

.page-game-bai__section-description {
  font-size: 18px;
  color: var(--page-game-bai-text-main);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-game-bai__btn-primary {
  background: var(--page-game-bai-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.page-game-bai__btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

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

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

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

.page-game-bai__hero-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 20px 16px;
  box-sizing: border-box;
}

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

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

.page-game-bai__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-game-bai__main-title {
  font-size: 48px;
  font-weight: 900;
  color: var(--page-game-bai-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-game-bai__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Intro Section */
.page-game-bai__intro-section {
  background-color: var(--page-game-bai-card-bg);
  padding: 80px 0;
}

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

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

.page-game-bai__icon-box-media {
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--page-game-bai-secondary);
  box-shadow: 0 0 0 8px rgba(111, 163, 255, 0.3);
}

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

.page-game-bai__icon-box-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--page-game-bai-primary);
  margin-bottom: 15px;
}

.page-game-bai__icon-box-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
}

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

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

.page-game-bai__game-card {
  background-color: var(--page-game-bai-card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--page-game-bai-border);
}

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

.page-game-bai__game-card-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--page-game-bai-primary);
  margin: 20px 15px 10px;
}

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

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

.page-game-bai__game-card-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
  padding: 0 15px;
  flex-grow: 1;
}

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

/* Guide Section */
.page-game-bai__guide-section {
  padding: 80px 0;
  background-color: var(--page-game-bai-card-bg);
}

.page-game-bai__guide-steps {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.page-game-bai__guide-step-item {
  display: flex;
  align-items: center;
  gap: 40px;
  background-color: var(--page-game-bai-background);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--page-game-bai-border);
}

.page-game-bai__guide-step-item--reverse {
  flex-direction: row-reverse;
}

.page-game-bai__guide-step-content {
  flex: 1 1 50%;
}

.page-game-bai__guide-step-image {
  flex: 1 1 50%;
  text-align: center;
}

.page-game-bai__guide-step-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-game-bai__guide-step-title {
  font-size: 28px;
  font-weight: bold;
  color: var(--page-game-bai-primary);
  margin-bottom: 15px;
}

.page-game-bai__guide-step-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--page-game-bai-text-main);
  margin-bottom: 20px;
}

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

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

.page-game-bai__faq-item {
  background-color: var(--page-game-bai-card-bg);
  border: 1px solid var(--page-game-bai-border);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-game-bai__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: bold;
  color: var(--page-game-bai-text-dark);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-game-bai__faq-qtext {
  flex-grow: 1;
  color: var(--page-game-bai-text-dark);
}

.page-game-bai__faq-toggle {
  font-size: 24px;
  font-weight: normal;
  margin-left: 15px;
  color: var(--page-game-bai-primary);
}

.page-game-bai__faq-item[open] .page-game-bai__faq-toggle {
  content: '−';
}

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--page-game-bai-text-main);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-game-bai__faq-item[open] .page-game-bai__faq-answer {
  max-height: 500px; /* Sufficiently large to show content */
  padding-top: 10px;
}

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

.page-game-bai__faq-answer a {
  color: var(--page-game-bai-primary);
  text-decoration: underline;
}

.page-game-bai__faq-answer a:hover {
  color: var(--page-game-bai-secondary);
}

/* CTA Section */
.page-game-bai__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-game-bai__dark-section {
  background-color: var(--page-game-bai-primary);
  color: #ffffff;
}

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

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

.page-game-bai__dark-section .page-game-bai__btn-secondary:hover {
  background: var(--page-game-bai-secondary);
  color: #ffffff;
  border-color: var(--page-game-bai-secondary);
}


/* Responsive Styles */
@media (max-width: 1024px) {
  .page-game-bai__main-title {
    font-size: 42px;
  }

  .page-game-bai__section-title {
    font-size: 32px;
  }

  .page-game-bai__intro-grid,
  .page-game-bai__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-game-bai__content-container,
  .page-game-bai__hero-container {
    padding: 20px 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

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

  .page-game-bai__hero-container {
    flex-direction: column-reverse; /* Image above text */
    gap: 30px;
  }

  .page-game-bai__main-title {
    font-size: 32px;
    text-align: center;
  }

  .page-game-bai__hero-description {
    font-size: 16px;
    text-align: center;
  }

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Intro Section */
  .page-game-bai__intro-section {
    padding: 60px 0;
  }

  .page-game-bai__icon-box-media {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
  }

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

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

  /* Game Categories Section */
  .page-game-bai__game-categories-section {
    padding: 60px 0;
  }

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

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

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

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

  .page-game-bai__guide-steps {
    gap: 40px;
  }

  .page-game-bai__guide-step-item,
  .page-game-bai__guide-step-item--reverse {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .page-game-bai__guide-step-title {
    font-size: 22px;
    text-align: center;
  }

  .page-game-bai__guide-step-text {
    font-size: 15px;
    text-align: center;
  }

  .page-game-bai__guide-step-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* FAQ Section */
  .page-game-bai__faq-section {
    padding: 60px 0;
  }

  .page-game-bai__faq-item summary {
    padding: 15px 20px;
    font-size: 16px;
  }

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

  /* CTA Section */
  .page-game-bai__cta-section {
    padding: 60px 0;
  }

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

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

  /* General image responsiveness */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}