/* style/game-bai.css */

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

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

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

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

/* Colors based on intelligent contrast and brand guidelines */
.page-game-bai__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

/* Hero Section */
.page-game-bai__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  background-color: #ffffff;
  text-align: center;
}

.page-game-bai__hero-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px;
  box-sizing: border-box;
}

.page-game-bai__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: #017439;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-game-bai__description {
  font-size: 1.2em;
  color: #555555;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* CTA Buttons */
.page-game-bai__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-game-bai__cta-buttons--centered {
    text-align: center;
}

.page-game-bai__btn-register,
.page-game-bai__btn-login,
.page-game-bai__btn-primary,
.page-game-bai__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

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

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

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

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

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

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

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

/* Game Types Section */
.page-game-bai__game-types-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-game-bai__game-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-game-bai__game-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-height: 200px; /* Ensure images are not too small */
}

.page-game-bai__game-card-title {
  font-size: 1.6em;
  color: #017439;
  padding: 15px 20px 10px;
  font-weight: bold;
}

.page-game-bai__game-card-text {
  font-size: 1em;
  padding: 0 20px 20px;
  flex-grow: 1;
}

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

.page-game-bai__guide-list {
  list-style: none;
  counter-reset: guide-step;
  padding: 0;
  margin-top: 40px;
}

.page-game-bai__guide-item {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  padding-left: 80px;
}

.page-game-bai__guide-item::before {
  counter-increment: guide-step;
  content: "Bước " counter(guide-step);
  position: absolute;
  left: 20px;
  top: 30px;
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
  background-color: #017439;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 5px;
  box-sizing: border-box;
}

.page-game-bai__guide-step-title {
  font-size: 1.4em;
  color: #017439;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-game-bai__guide-text {
  font-size: 1em;
  color: #555555;
}

/* Benefits Section */
.page-game-bai__benefits-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-game-bai__benefits-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.page-game-bai__benefits-image-wrapper {
  flex: 1 1 45%;
  text-align: center;
}

.page-game-bai__benefits-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
  min-width: 200px; /* Ensure images are not too small */
  min-height: 200px;
}

.page-game-bai__benefits-list {
  flex: 1 1 45%;
  list-style: none;
  padding: 0;
}

.page-game-bai__benefits-item {
  margin-bottom: 25px;
  position: relative;
  padding-left: 40px;
}

.page-game-bai__benefits-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.5em;
  color: #FFFF00; /* Custom yellow for checkmark */
  font-weight: bold;
}

.page-game-bai__benefits-item-title {
  font-size: 1.3em;
  color: #ffffff;
  margin-bottom: 5px;
  font-weight: bold;
}

.page-game-bai__benefits-item-text {
  font-size: 1em;
  color: #f0f0f0;
}

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

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

.page-game-bai__faq-item {
  background-color: #ffffff;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.page-game-bai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
}

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

.page-game-bai__faq-question::marker {
    display: none;
}

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

.page-game-bai__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #017439;
  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: 1em;
  color: #555555;
  line-height: 1.6;
}

/* Conclusion Section */
.page-game-bai__conclusion-section {
  padding-top: 60px;
  padding-bottom: 80px;
  text-align: center;
}

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

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .page-game-bai__section-title {
    font-size: 2em;
  }

  .page-game-bai__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

  .page-game-bai__hero-content-wrapper {
    padding: 30px 16px;
  }

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

  .page-game-bai__guide-item {
    padding: 25px;
    padding-left: 70px;
  }

  .page-game-bai__guide-item::before {
    width: 45px;
    height: 45px;
    font-size: 1em;
    left: 15px;
    top: 25px;
  }

  .page-game-bai__benefits-wrapper {
    flex-direction: column;
  }

  .page-game-bai__benefits-image-wrapper {
    flex: 1 1 100%;
    order: -1;
  }

  .page-game-bai__benefits-list {
    flex: 1 1 100%;
  }

  .page-game-bai__benefits-item {
    padding-left: 35px;
  }
}

@media (max-width: 768px) {
  /* HERO Section */
  .page-game-bai__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px;
  }

  .page-game-bai__main-title {
    font-size: 2em !important;
  }

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

  /* CTA Buttons */
  .page-game-bai__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-game-bai__btn-register,
  .page-game-bai__btn-login,
  .page-game-bai__btn-primary,
  .page-game-bai__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto;
  }

  /* General Containers and Sections */
  .page-game-bai__container {
    padding: 30px 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-game-bai__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px;
  }

  .page-game-bai__text-block {
    font-size: 1em;
  }

  /* Game Types Section */
  .page-game-bai__game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-game-bai__game-image {
    height: 200px; /* Adjust height for mobile */
  }

  .page-game-bai__game-card-title {
    font-size: 1.4em;
  }

  /* Guide Section */
  .page-game-bai__guide-item {
    padding: 20px;
    padding-left: 60px;
  }

  .page-game-bai__guide-item::before {
    width: 40px;
    height: 40px;
    font-size: 0.9em;
    left: 10px;
    top: 20px;
  }

  .page-game-bai__guide-step-title {
    font-size: 1.2em;
  }

  /* Benefits Section */
  .page-game-bai__benefits-item {
    padding-left: 30px;
  }

  .page-game-bai__benefits-item::before {
    font-size: 1.3em;
  }

  .page-game-bai__benefits-item-title {
    font-size: 1.1em;
  }

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

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

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

  /* General Image Responsiveness */
  .page-game-bai img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  /* Ensure all content containers are responsive */
  .page-game-bai__hero-content-wrapper,
  .page-game-bai__game-card,
  .page-game-bai__guide-item,
  .page-game-bai__benefits-image-wrapper,
  .page-game-bai__benefits-list,
  .page-game-bai__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent horizontal overflow */
  .page-game-bai {
    overflow-x: hidden;
  }
}