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

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

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

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

.page-game-bai__section-title {
  font-size: clamp(2em, 4vw, 2.5em);
  color: var(--custom-color-black);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.page-game-bai__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

.page-game-bai__hero-carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Aligns with body padding-top from shared.css */
  background-color: var(--primary-color);
}

.page-game-bai__hero-slider {
  position: relative;
  width: 100%;
  height: 600px; /* Default height for desktop */
}

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

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

.page-game-bai__hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-game-bai__hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  padding: 40px 20px 20px;
  text-align: center;
  color: #ffffff;
  box-sizing: border-box;
}

.page-game-bai__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.1;
  color: #ffffff;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__description {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%; /* Ensure button doesn't exceed container */
  box-sizing: border-box;
}

.page-game-bai__btn-primary {
  background: var(--button-gradient);
  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 5px 15px rgba(0, 0, 0, 0.2);
}

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

.page-game-bai__btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-game-bai__hero-slider-prev,
.page-game-bai__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  padding: 15px;
  cursor: pointer;
  z-index: 10;
  font-size: 1.5em;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

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

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

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

.page-game-bai__hero-slider-prev::before {
  content: '❮';
}

.page-game-bai__hero-slider-next::before {
  content: '❯';
}

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

.page-game-bai__game-card {
  background: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  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.15);
}

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

.page-game-bai__game-card .page-game-bai__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin: 20px 20px 10px;
  font-weight: 700;
}

.page-game-bai__game-card .page-game-bai__card-text {
  font-size: 1em;
  color: var(--text-main-color);
  padding: 0 20px 20px;
  line-height: 1.6;
  text-align: justify;
}

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

.page-game-bai__step-card {
  background: var(--card-bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

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

.page-game-bai__step-title {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-game-bai__step-text {
  font-size: 1.05em;
  line-height: 1.7;
  color: var(--text-main-color);
  margin-bottom: 25px;
  text-align: justify;
}

.page-game-bai__btn-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--button-gradient);
  color: #ffffff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.page-game-bai__btn-link:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
}

.page-game-bai__strategy-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
}

.page-game-bai__strategy-list li {
  background: var(--card-bg-color);
  border-left: 5px solid var(--primary-color);
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-game-bai__list-item-title {
  font-size: 1.4em;
  color: var(--custom-color-black);
  margin-bottom: 10px;
}

.page-game-bai__strategy-list p {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-main-color);
  text-align: justify;
}

.page-game-bai__guide-box {
  background: var(--background-page);
  padding: 40px 20px;
  text-align: center;
}

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

.page-game-bai__guide-card {
  flex: 0 0 18%; /* Approx 5 cards per row */
  max-width: 18%;
  transition: transform 0.3s ease;
}

.page-game-bai__guide-card:hover {
  transform: translateY(-8px);
}

.page-game-bai__guide-card img {
  width: 100%;
  height: 350px; /* Fixed height for team images */
  object-fit: contain; /* Ensure full image is visible */
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-game-bai__guide-card--pos-1 { padding-top: 50px; }
.page-game-bai__guide-card--pos-2 { padding-top: 25px; }
.page-game-bai__guide-card--pos-3 { padding-top: 0px; }
.page-game-bai__guide-card--pos-4 { padding-top: 25px; }
.page-game-bai__guide-card--pos-5 { padding-top: 50px; }

.page-game-bai__promo-list {
  list-style: disc;
  margin-left: 20px;
  font-size: 1.05em;
  line-height: 1.8;
  color: var(--text-main-color);
  margin-bottom: 30px;
}

.page-game-bai__promo-list li {
  margin-bottom: 10px;
}

.page-game-bai__cta-center {
  text-align: center;
  margin-top: 30px;
}

.page-game-bai__home-content-box {
  max-width: 91%;
  margin: 40px auto;
  padding: 20px 16px;
  border: 5px solid var(--primary-color);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--glow-color);
  height: 700px; /* Fixed height for desktop */
  background-color: var(--card-bg-color);
  box-sizing: border-box;
}

.page-game-bai__home-content-inner {
  height: 100%;
  overflow-y: auto; /* Enable scrolling for content */
  padding-right: 15px; /* Space for scrollbar */
}

.page-game-bai__home-content-inner::-webkit-scrollbar {
  width: 8px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 10px;
}

.page-game-bai__home-content-inner::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.page-game-bai__faq-item {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.page-game-bai__faq-question {
  font-size: 1.3em;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.page-game-bai__faq-answer {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-main-color);
  text-align: justify;
}

.page-game-bai__blog-section {
  background-color: var(--background-page);
  padding: 40px 0;
}

.page-game-bai__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columns for desktop */
  gap: 30px;
  margin-top: 30px;
}

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

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

.page-game-bai__blog-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-game-bai__blog-card .page-game-bai__card-title {
  font-size: 1.3em;
  color: var(--custom-color-black);
  margin: 15px 20px 10px;
  font-weight: 700;
}

.page-game-bai__blog-card .page-game-bai__card-date {
  font-size: 0.9em;
  color: #777;
  margin: 0 20px 10px;
}

.page-game-bai__blog-card .page-game-bai__card-excerpt {
  font-size: 0.95em;
  color: var(--text-main-color);
  padding: 0 20px 20px;
  line-height: 1.6;
  text-align: justify;
}

/* General image and button responsive styles */
.page-game-bai img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-game-bai__cta-buttons,
.page-game-bai__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media queries for tablet and mobile */
@media (max-width: 1024px) {
  .page-game-bai__container {
    padding: 0 15px;
  }
  .page-game-bai__hero-slider {
    height: 500px;
  }
  .page-game-bai__main-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }
  .page-game-bai__description {
    font-size: 1.1em;
  }
  .page-game-bai__game-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-game-bai__steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-game-bai__guide-card {
    flex: 0 0 22%;
    max-width: 22%;
  }
  .page-game-bai__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-game-bai__home-content-box {
    max-width: 95%;
    height: 600px;
  }
}

@media (max-width: 768px) {
  /* Hero Carousel Section */
  .page-game-bai__hero-carousel-section {
    padding-top: 10px !important;
  }
  .page-game-bai__hero-slider {
    height: 400px !important;
  }
  .page-game-bai__hero-content {
    padding: 20px 15px 15px !important;
  }
  .page-game-bai__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em) !important;
    margin-bottom: 10px !important;
  }
  .page-game-bai__description {
    font-size: 0.95em !important;
    margin-bottom: 20px !important;
  }
  .page-game-bai__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary,
  .page-game-bai__btn-link {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px !important;
    font-size: 0.95em !important;
  }
  .page-game-bai__hero-slider-prev,
  .page-game-bai__hero-slider-next {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.2em !important;
    padding: 10px !important;
    left: 10px !important;
    right: 10px !important;
  }

  /* Guide Box (Five Team Cards) */
  .page-game-bai__guide-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important; /* 6 columns to allow for custom spans */
    gap: 10px !important;
  }
  .page-game-bai__guide-card {
    padding-top: 0 !important; /* Reset desktop padding */
    flex: none !important;
    max-width: none !important;
  }
  .page-game-bai__guide-card--pos-1,
  .page-game-bai__guide-card--pos-2 {
    grid-column: span 3 !important; /* Top two cards span 3 columns each */
  }
  .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; /* Bottom three cards span 2 columns each */
  }
  .page-game-bai__guide-card img {
    height: 250px !important; /* Adjust height for mobile */
    object-fit: cover !important;
  }

  /* Home Content Box (FAQ/Long Text) */
  .page-game-bai__home-content-box {
    max-width: 100% !important;
    height: auto !important; /* Auto height for mobile */
    margin: 20px auto !important;
    padding: 15px !important;
  }
  .page-game-bai__home-content-inner {
    height: auto !important;
    overflow: visible !important; /* No scrollbar on mobile */
    padding-right: 0 !important;
  }

  /* Blog Cards Section */
  .page-game-bai__blog-grid {
    grid-template-columns: 1fr !important; /* Single column for mobile */
    gap: 20px !important;
  }

  /* General Images and Containers */
  .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__game-card,
  .page-game-bai__step-card,
  .page-game-bai__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-game-bai__section-title {
    font-size: clamp(1.8em, 6vw, 2.2em) !important;
  }
  .page-game-bai__text-block {
    font-size: 1em !important;
  }
  .page-game-bai__game-grid,
  .page-game-bai__steps-grid {
    grid-template-columns: 1fr !important;
  }
  .page-game-bai__game-card img {
    height: 200px !important;
  }
  .page-game-bai__blog-card img {
    
  }
}