/* Base styles for page-the-thao */
.page-the-thao {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light body background */
  background-color: var(--secondary-color, #FFFFFF); /* Inherit from shared or default to white */
}

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

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

.page-the-thao__section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: #017439;
}

.page-the-thao__text-block {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* Hero Section */
.page-the-thao__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, relying on body for header offset */
  background-color: #f5f5f5;
  position: relative;
  overflow: hidden;
}

.page-the-thao__hero-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-the-thao__hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover; /* Default for desktop */
  display: block;
}

.page-the-thao__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: -80px; /* Overlap slightly with the image for visual effect */
  position: relative;
  z-index: 1;
}

.page-the-thao__hero-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #017439;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-the-thao__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #555555;
}

/* Buttons */
.page-the-thao__btn-primary,
.page-the-thao__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%; /* Ensure buttons adapt */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-the-thao__btn-primary:hover {
  background-color: #e02a2a;
  border-color: #e02a2a;
  transform: translateY(-2px);
}

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

.page-the-thao__btn-secondary:hover {
  background-color: #017439;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.page-the-thao__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%; /* Button container width */
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Featured Sports Grid */
.page-the-thao__sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-the-thao__sport-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease;
}

.page-the-thao__sport-card:hover {
  transform: translateY(-5px);
}

.page-the-thao__sport-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-the-thao__card-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin: 20px 15px 10px;
}

.page-the-thao__card-description {
  font-size: 15px;
  color: #666666;
  padding: 0 15px 20px;
}

/* Why Choose Section (Dark Background) */
.page-the-thao__section--why-choose {
  background-color: #017439; /* Main brand color */
  color: #ffffff;
}

.page-the-thao__section--why-choose .page-the-thao__section-title {
  color: #ffffff;
}

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

.page-the-thao__feature-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
}

.page-the-thao__feature-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FFFF00; /* Highlight title with yellow */
}

.page-the-thao__feature-description {
  font-size: 16px;
  line-height: 1.7;
  color: #f0f0f0;
}

.page-the-thao__feature-item .page-the-thao__btn-secondary {
  margin-top: 20px;
  background-color: #FFFF00;
  color: #017439;
  border-color: #FFFF00;
}

.page-the-thao__feature-item .page-the-thao__btn-secondary:hover {
  background-color: #017439;
  color: #FFFF00;
}

/* Guide Section */
.page-the-thao__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-the-thao__guide-step {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-the-thao__step-number {
  width: 50px;
  height: 50px;
  background-color: #017439;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-the-thao__step-title {
  font-size: 22px;
  font-weight: 700;
  color: #017439;
  margin-bottom: 15px;
}

.page-the-thao__step-description {
  font-size: 16px;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-the-thao__guide-step .page-the-thao__btn-primary {
  margin-top: auto; /* Push button to bottom */
}

/* FAQ Section */
.page-the-thao__faq-list {
  margin-top: 40px;
}

details.page-the-thao__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}

details.page-the-thao__faq-item summary.page-the-thao__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-the-thao__faq-item summary.page-the-thao__faq-question::-webkit-details-marker {
  display: none;
}

details.page-the-thao__faq-item summary.page-the-thao__faq-question:hover {
  background: #f5f5f5;
}

.page-the-thao__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-the-thao__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-the-thao__faq-item .page-the-thao__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* Conclusion Section */
.page-the-thao__section--conclusion .page-the-thao__text-block {
  text-align: center;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-the-thao__hero-content {
    margin-top: -60px;
  }
  .page-the-thao__container {
    padding: 15px;
  }
  .page-the-thao__section {
    padding: 30px 0;
  }
  .page-the-thao__hero-title {
    font-size: clamp(28px, 4.5vw, 42px);
  }
  .page-the-thao__section-title {
    font-size: clamp(24px, 3.5vw, 34px);
  }
}

@media (max-width: 849px) {
  .page-the-thao__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    max-height: 400px; /* Adjust max height for better mobile view */
  }
}

@media (max-width: 768px) {
  /* General mobile adaptations */
  .page-the-thao {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-the-thao__container {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-the-thao__section {
    padding: 20px 0;
  }

  /* HERO 主图区域 */
  .page-the-thao__hero-section {
    padding-top: 10px; /* Small top padding, relying on body for header offset */
  }
  .page-the-thao__hero-image {
    max-height: 300px;
  }
  .page-the-thao__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    aspect-ratio: unset !important;
  }
  .page-the-thao__hero-content {
    padding: 25px 15px;
    margin-top: -40px; /* Less overlap on mobile */
  }
  .page-the-thao__hero-title {
    font-size: clamp(26px, 7vw, 36px);
  }
  .page-the-thao__hero-description {
    font-size: 16px;
  }

  /* Buttons and Button Containers */
  .page-the-thao__btn-primary,
  .page-the-thao__btn-secondary,
  .page-the-thao a[class*="button"],
  .page-the-thao 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;
    padding-right: 15px;
    font-size: 16px;
  }
  .page-the-thao__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 15px;
  }

  /* Products/Sports Grid (Content Images) */
  .page-the-thao__sport-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
  }
  .page-the-thao__sport-card {
    margin: 0 15px; /* Add side margin for cards */
  }
  .page-the-thao__sport-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px; /* Ensure minimum size */
    object-fit: cover;
  }
  .page-the-thao__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-the-thao__guide-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Universal Image Adaptations for Content Area */
  .page-the-thao img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
  }
  .page-the-thao__section,
  .page-the-thao__card,
  .page-the-thao__container,
  .page-the-thao__text-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-the-thao__card-title, .page-the-thao__feature-title, .page-the-thao__step-title {
    font-size: 18px;
  }
  .page-the-thao__section-title {
    font-size: clamp(22px, 6vw, 30px);
  }

  /* FAQ */
  details.page-the-thao__faq-item summary.page-the-thao__faq-question { padding: 15px; }
  .page-the-thao__faq-qtext { font-size: 15px; }
  details.page-the-thao__faq-item .page-the-thao__faq-answer { padding: 0 15px 15px; }
}