/* style/the-thao.css */

/* --- Base Styles --- */
.page-the-thao {
  font-family: Arial, sans-serif;
  color: var(--text-main, #333333); /* Default text color */
  background-color: var(--background, #F5F7FA); /* Default background color */
  line-height: 1.6;
}

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

.page-the-thao__section {
  padding: 60px 0;
}

.page-the-thao__section:nth-of-type(even) {
  background-color: #f0f2f5; /* Light background for alternating sections */
}

.page-the-thao__section-title {
  font-size: 3em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main, #333333);
}

.page-the-thao__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

/* --- Buttons --- */
.page-the-thao__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-the-thao__cta-buttons--center {
  justify-content: center;
}

.page-the-thao__btn-primary,
.page-the-thao__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

.page-the-thao__btn-primary {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-the-thao__btn-primary:hover {
  background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-the-thao__btn-secondary {
  background: #ffffff;
  color: #E53935;
  border: 2px solid #E53935;
}

.page-the-thao__btn-secondary:hover {
  background: #f0f0f0;
  color: #FF5A4F;
  border-color: #FF5A4F;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Hero Section --- */
.page-the-thao__hero-section {
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  padding-bottom: 60px;
  background-color: var(--background, #F5F7FA);
}

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

.page-the-thao__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  text-align: left;
}

.page-the-thao__main-title {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #E53935; /* Brand color for H1 */
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive H1 font size */
  max-width: 600px;
}

.page-the-thao__hero-description {
  font-size: 1.2em;
  line-height: 1.7;
  margin-bottom: 30px;
  color: var(--text-main, #333333);
}

.page-the-thao__hero-image {
  flex: 1 1 40%;
  text-align: center;
  min-width: 300px;
}

.page-the-thao__hero-side-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: block; /* Ensure it behaves as a block element */
  margin: 0 auto; /* Center image */
}

/* --- General Content Images --- */
.page-the-thao__content-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* --- List Styles --- */
.page-the-thao__list {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  max-width: 800px;
  text-align: left;
}

.page-the-thao__list-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 1.1em;
  line-height: 1.6;
  color: var(--text-main, #333333);
}

.page-the-thao__list-item::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #E53935; /* Checkmark color */
  font-weight: bold;
}

/* --- Guide Section (Numbered List) --- */
.page-the-thao__guide-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  max-width: 900px;
  counter-reset: guide-step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-the-thao__guide-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  text-align: left;
  border: 1px solid var(--border, #E0E0E0);
}

.page-the-thao__guide-item::before {
  counter-increment: guide-step;
  content: "Bước " counter(guide-step);
  position: absolute;
  top: -15px;
  left: 30px;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-the-thao__guide-step-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #E53935;
  margin-top: 15px;
  margin-bottom: 10px;
}

.page-the-thao__guide-step-description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-main, #333333);
}

/* --- FAQ Section --- */
.page-the-thao__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-the-thao__faq-item {
  background-color: #ffffff;
  border: 1px solid var(--border, #E0E0E0);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-the-thao__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #f8f8f8;
  border-bottom: 1px solid var(--border, #E0E0E0);
  list-style: none; /* Hide default details marker */
}

.page-the-thao__faq-question::-webkit-details-marker {
  display: none; /* Hide default details marker for WebKit */
}

.page-the-thao__faq-qtext {
  flex-grow: 1;
}

.page-the-thao__faq-toggle {
  font-size: 1.5em;
  font-weight: normal;
  color: #E53935;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-the-thao__faq-item[open] .page-the-thao__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-the-thao__faq-answer {
  padding: 20px 25px;
  font-size: 1.1em;
  line-height: 1.7;
  color: #555555;
  background-color: #ffffff;
}

.page-the-thao__faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Global Image Sizing (Content Area) --- */
.page-the-thao img {
  max-width: 100%;
  height: auto;
  display: block; /* Ensures images behave predictably with max-width */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-the-thao__hero-container {
    flex-direction: column;
    text-align: center;
  }

  .page-the-thao__hero-content {
    text-align: center;
    order: 2; /* Content below image on smaller screens */
  }

  .page-the-thao__hero-image {
    order: 1; /* Image above content on smaller screens */
  }

  .page-the-thao__main-title {
    max-width: 100%;
    font-size: clamp(2.2em, 6vw, 3em);
  }

  .page-the-thao__section-title {
    font-size: 2.5em;
  }

  .page-the-thao__guide-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* 1. HERO Section */
  .page-the-thao__hero-section {
    padding-top: 10px !important; /* Small top padding, no var(--header-offset) */
    padding-bottom: 40px !important;
  }

  .page-the-thao__hero-container {
    padding: 20px 15px !important;
    gap: 30px !important;
  }

  .page-the-thao__main-title {
    font-size: clamp(2em, 8vw, 2.8em) !important;
  }

  .page-the-thao__hero-description {
    font-size: 1em !important;
  }

  /* 2. Module 1 three-column circular images - Not present in this page, so skip. */
  /* 3. Seven Tab game area - Not present in this page, so skip. */

  /* 4. Tutorial/Promo/Trust/FAQ/Blog/Intro sections */
  .page-the-thao__section {
    padding: 40px 0 !important;
  }

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

  .page-the-thao__section-title {
    font-size: 2em !important;
    margin-bottom: 15px !important;
  }

  .page-the-thao__section-description {
    font-size: 1em !important;
    margin-bottom: 25px !important;
  }

  .page-the-thao__list-item {
    font-size: 1em !important;
    padding-left: 25px !important;
    margin-bottom: 10px !important;
  }

  .page-the-thao__list-item::before {
    font-size: 0.9em !important;
  }

  .page-the-thao__guide-item {
    padding: 25px !important;
  }

  .page-the-thao__guide-item::before {
    top: -12px !important;
    left: 25px !important;
    padding: 6px 12px !important;
  }

  .page-the-thao__guide-step-title {
    font-size: 1.3em !important;
  }

  .page-the-thao__faq-question {
    padding: 15px 20px !important;
    font-size: 1.1em !important;
  }

  .page-the-thao__faq-answer {
    padding: 15px 20px !important;
    font-size: 1em !important;
  }

  /* 5. General Images and Containers */
  .page-the-thao img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }
  .page-the-thao__content-image {
    margin: 30px auto !important;
  }

  /* 6. Buttons and Button Containers */
  .page-the-thao__cta-buttons {
    flex-direction: column !important;
    gap: 15px !important;
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-the-thao__btn-primary,
  .page-the-thao__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
    min-width: unset !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-the-thao__cta-buttons.page-the-thao__cta-buttons--center {
    align-items: center !important; /* Ensure buttons are centered if flex-direction column */
  }
}

/* --- Ensure contrast for body background (assuming shared.css provides --background-color) --- */
/* If body background is dark, use light text. If light, use dark text. */
/* Assuming F5F7FA is light, so default text is #333333 */
.page-the-thao__dark-bg {
  background-color: #E53935;
  color: #ffffff;
}
.page-the-thao__dark-bg .page-the-thao__section-title,
.page-the-thao__dark-bg .page-the-thao__section-description,
.page-the-thao__dark-bg .page-the-thao__list-item {
  color: #ffffff;
}

/* Card background color */
.page-the-thao__faq-item,
.page-the-thao__guide-item {
  background-color: #FFFFFF; /* Card BG */
  color: var(--text-main, #333333);
}

.page-the-thao__faq-question {
  background-color: #f8f8f8; /* Slightly off-white for question header */
  color: var(--text-main, #333333);
}
.page-the-thao__faq-answer {
  background-color: #FFFFFF;
  color: #555555; /* Slightly lighter for answer text */
}