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

.page-game-bai__dark-section {
  background-color: #017439;
  color: #ffffff;
}

.page-game-bai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-game-bai__text-contrast-fix {
  color: #ffffff !important;
}

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

.page-game-bai__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #017439;
}

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

.page-game-bai__sub-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #017439;
}

.page-game-bai__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-game-bai__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-game-bai__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

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

.page-game-bai__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005f2e;
}

.page-game-bai__btn-link {
  background: none;
  border: none;
  color: #017439;
  padding: 0;
  text-align: left;
}

.page-game-bai__btn-link:hover {
  text-decoration: underline;
}

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

.page-game-bai__flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Hero Carousel Section */
.page-game-bai__hero-carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles main offset */
  padding-bottom: 50px;
}

.page-game-bai__hero-slider {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust as needed */
  overflow: hidden;
}

.page-game-bai__hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}

.page-game-bai__hero-slide.is-active {
  opacity: 1;
}

.page-game-bai__hero-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-game-bai__hero-content {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  padding: 30px;
  border-radius: 8px;
  max-width: 800px;
  margin-bottom: 50px;
  color: #ffffff;
}

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

.page-game-bai__hero-description {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: #f0f0f0;
}

.page-game-bai__hero-slider-prev,
.page-game-bai__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px 10px;
  cursor: pointer;
  z-index: 3;
  font-size: 1.5em;
  border-radius: 5px;
}

.page-game-bai__hero-slider-prev {
  left: 10px;
}

.page-game-bai__hero-slider-next {
  right: 10px;
}

.page-game-bai__hero-slider-prev:hover,
.page-game-bai__hero-slider-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Introduction Section */
.page-game-bai__introduction-section {
  padding: 60px 15px;
  text-align: center;
}

/* Guide Box Section (5 Team Cards) */
.page-game-bai__guide-box {
  padding: 16px 20px 24px;
  background: #f5e6d3;
  border-radius: 8px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.page-game-bai__guide-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-game-bai__guide-card {
  flex: 0 0 calc(20% - 12px); /* 5 cards per row */
  max-width: calc(20% - 12px);
  box-sizing: border-box;
  text-align: center;
}

.page-game-bai__guide-card img {
  aspect-ratio: 250 / 350;
  object-fit: contain;
  width: 100%;
  height: auto;
  display: block;
}

.page-game-bai__guide-card--pos-1,
.page-game-bai__guide-card--pos-5 {
  padding-top: 50px;
}

.page-game-bai__guide-card--pos-2,
.page-game-bai__guide-card--pos-4 {
  padding-top: 25px;
}

/* Home Content Box (Scrollable Text) */
.page-game-bai__home-content-box {
  max-width: 91%;
  margin: 0 auto;
  padding: 30px;
  border: 5px solid #017439;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(1, 116, 57, 0.5);
  height: 700px;
  box-sizing: border-box;
  margin-bottom: 50px;
}

.page-game-bai__home-content-inner {
  height: 100%;
  overflow-y: auto;
  padding-right: 15px; /* For scrollbar */
  box-sizing: border-box;
}

.page-game-bai__home-content-inner p {
  margin-bottom: 1em;
}

.page-game-bai__content-figure {
  margin: 20px 0;
  text-align: center;
}

.page-game-bai__content-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

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

/* Blog Section */
.page-game-bai__blog-section {
  padding: 60px 15px;
}

.page-game-bai__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.page-game-bai__blog-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.page-game-bai__blog-card:hover {
  transform: translateY(-5px);
}

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

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

.page-game-bai__blog-card-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-game-bai__blog-card-title a {
  color: #017439;
  text-decoration: none;
}

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

.page-game-bai__blog-card-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-game-bai__blog-card-excerpt {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
}

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

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

.page-game-bai__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  list-style: none; /* Remove default marker for summary */
}

.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-item[open] .page-game-bai__faq-toggle {
  transform: rotate(45deg);
}

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  color: #333333;
  font-size: 1em;
  line-height: 1.6;
}

/* Final CTA Section */
.page-game-bai__final-cta-section {
  padding: 80px 15px;
  text-align: center;
}

/* Universal Image Sizing */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-game-bai__hero-slider {
    height: 500px;
  }
  .page-game-bai__guide-card {
    flex: 0 0 calc(33.333% - 10px); /* 3 cards per row */
    max-width: calc(33.333% - 10px);
    padding-top: 0 !important; /* Reset specific padding for smaller screens */
  }
  .page-game-bai__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-game-bai__hero-carousel-section {
    padding-top: 10px !important;
    padding-bottom: 30px !important;
  }
  .page-game-bai__hero-slider {
    height: 400px !important;
  }
  .page-game-bai__hero-content {
    padding: 20px !important;
    margin-bottom: 30px !important;
  }
  .page-game-bai__hero-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
  }
  .page-game-bai__hero-description {
    font-size: 1em !important;
  }
  .page-game-bai__hero-cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .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 !important;
    padding-right: 15px !important;
  }
  .page-game-bai__cta-buttons,
  .page-game-bai__button-group,
  .page-game-bai__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  
  .page-game-bai__section-title {
    font-size: 2em !important;
    margin-bottom: 20px !important;
  }
  .page-game-bai__section-description {
    font-size: 1em !important;
    margin-bottom: 30px !important;
  }
  .page-game-bai__guide-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 10px !important;
  }
  .page-game-bai__guide-card {
    flex: unset !important;
    max-width: unset !important;
    padding-top: 0 !important;
  }
  .page-game-bai__guide-card--pos-1,
  .page-game-bai__guide-card--pos-2 {
    grid-column: span 3 !important;
  }
  .page-game-bai__guide-card--pos-3,
  .page-game-bai__guide-card--pos-4,
  .page-game-bai__guide-card--pos-5 {
    grid-column: span 2 !important;
  }
  .page-game-bai__home-content-box {
    max-width: 100% !important;
    height: auto !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
  }
  .page-game-bai__home-content-inner {
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }
  .page-game-bai__content-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-game-bai__blog-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .page-game-bai__blog-card img {
    
  }
  .page-game-bai__blog-card-title {
    font-size: 1.1em !important;
  }
  .page-game-bai__faq-question {
    padding: 15px 20px !important;
    font-size: 1.1em !important;
  }
  .page-game-bai__faq-answer {
    padding: 0 20px 15px !important;
    font-size: 0.95em !important;
  }
  .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 !important;
    padding-right: 15px !important;
  }
}