/* style/game-bai.css */

:root {
  --rr8-primary: #E53935;
  --rr8-secondary: #FF5A4F;
  --rr8-text-main: #333333;
  --rr8-card-bg: #FFFFFF;
  --rr8-background: #F5F7FA;
  --rr8-border: #E0E0E0;
}

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

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

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

.page-game-bai__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
}

.page-game-bai__main-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--rr8-primary);
  margin-bottom: 16px;
  max-width: 600px;
}

.page-game-bai__description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 600px;
}

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

.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 250px;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

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

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

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

.page-game-bai__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--rr8-primary);
  text-align: center;
  margin-bottom: 20px;
}

.page-game-bai__section-description {
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-game-bai__intro-section {
  padding: 60px 0;
  background-color: var(--rr8-background);
}

.page-game-bai__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
}

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

.page-game-bai__icon-box-media {
  width: 240px;
  height: 240px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--rr8-secondary);
}

.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(--rr8-primary);
  margin-bottom: 10px;
}

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

.page-game-bai__game-list-section {
  padding: 60px 0;
  background-color: var(--rr8-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(--rr8-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  padding-bottom: 20px;
}

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

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

.page-game-bai__game-title a {
  color: var(--rr8-primary);
  text-decoration: none;
}

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

.page-game-bai__game-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--rr8-text-main);
  margin-bottom: 20px;
  padding: 0 15px;
}

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

.page-game-bai__btn-play:hover {
  opacity: 0.9;
}

.page-game-bai__guide-section {
  padding: 60px 0;
  background-color: var(--rr8-primary); /* Dark background */
  color: #ffffff;
}

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

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

.page-game-bai__guide-step {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 12px;
}

.page-game-bai__step-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--rr8-secondary);
}

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

.page-game-bai__step-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rr8-secondary);
  margin-bottom: 10px;
}

.page-game-bai__step-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.page-game-bai__faq-section {
  padding: 60px 0;
  background-color: var(--rr8-background);
}

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

.page-game-bai__faq-item {
  background-color: var(--rr8-card-bg);
  border: 1px solid var(--rr8-border);
  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.1rem;
  font-weight: 600;
  color: var(--rr8-primary);
  cursor: pointer;
  list-style: none; /* For details tag */
}

.page-game-bai__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for details tag */
}

.page-game-bai__faq-qtext {
  flex-grow: 1;
}

.page-game-bai__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--rr8-secondary);
}

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

.page-game-bai__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--rr8-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; /* Sufficient height for content */
  padding-top: 10px;
}

.page-game-bai__cta-bottom-section {
  padding: 60px 0;
  background-color: var(--rr8-primary);
  color: #ffffff;
  text-align: center;
}

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

/* --- Responsive Styles --- */

@media (max-width: 1024px) {
  .page-game-bai__hero-container {
    padding: 30px 16px;
  }

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

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

  .page-game-bai__section-title {
    font-size: clamp(1.6rem, 3.8vw, 2.2rem);
  }

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

  .page-game-bai__feature-item {
    padding: 25px;
  }

  .page-game-bai__icon-box-media {
    width: 200px;
    height: 200px;
  }

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

  .page-game-bai__game-title {
    font-size: 1.2rem;
  }

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

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

@media (max-width: 768px) {
  .page-game-bai__hero-section {
    padding-top: 10px !important;
  }

  .page-game-bai__hero-container {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
    gap: 20px;
  }

  .page-game-bai__hero-content,
  .page-game-bai__hero-image {
    flex: 1 1 100%;
    width: 100%;
    min-width: unset;
  }

  .page-game-bai__main-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
    margin-bottom: 10px;
  }

  .page-game-bai__description {
    font-size: 0.95rem !important;
    margin-bottom: 20px;
  }

  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to container */
  }

  .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;
    padding: 12px 15px !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-game-bai__hero-side-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-game-bai__section-title {
    font-size: clamp(1.4rem, 5vw, 2rem) !important;
    margin-bottom: 15px;
  }

  .page-game-bai__section-description {
    font-size: 0.9rem !important;
    margin-bottom: 30px;
  }

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

  .page-game-bai__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__icon-box-media {
    width: 180px !important; /* Smaller square */
    height: 180px !important;
    margin-bottom: 15px;
    border-width: 3px;
  }

  .page-game-bai__icon-box-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .page-game-bai__feature-title {
    font-size: 1.2rem;
  }

  .page-game-bai__feature-text {
    font-size: 0.85rem;
  }

  .page-game-bai__game-list-section {
    padding: 40px 0;
  }

  .page-game-bai__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__game-card {
    padding-bottom: 15px;
  }

  .page-game-bai__game-thumbnail {
    height: 160px !important;
    max-width: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .page-game-bai__game-title {
    font-size: 1.1rem;
    padding: 0 10px;
  }

  .page-game-bai__game-description {
    font-size: 0.85rem;
    padding: 0 10px;
    margin-bottom: 15px;
  }

  .page-game-bai__btn-play {
    padding: 8px 15px;
    font-size: 0.9rem;
    max-width: 160px !important;
    width: 100% !important;
  }

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

  .page-game-bai__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__step-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }

  .page-game-bai__step-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .page-game-bai__step-title {
    font-size: 1.1rem;
  }

  .page-game-bai__step-text {
    font-size: 0.85rem;
  }

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

  .page-game-bai__faq-list {
    margin-top: 20px;
  }

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

  .page-game-bai__faq-toggle {
    font-size: 1.3rem;
  }

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

  .page-game-bai__cta-bottom-section {
    padding: 40px 0;
  }

  .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;
  }
}