/* style/the-thao.css */

:root {
  --by88-primary-color: #017439;
  --by88-secondary-color: #FFFFFF;
  --by88-register-color: #C30808;
  --by88-login-color: #C30808;
  --by88-background-color: #FFFFFF;
  --by88-register-login-font-color: #FFFF00;
  --text-dark: #333333;
  --text-light: #ffffff;
}

.page-the-thao {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--by88-background-color);
}

.page-the-thao__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 40px;
  background-color: var(--by88-background-color);
  color: var(--text-dark);
}

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

.page-the-thao__hero-content {
  flex: 1 1 45%;
  min-width: 300px;
}

.page-the-thao__hero-title {
  font-size: clamp(2.2rem, 4vw, 3rem); /* H1 title with clamp for responsiveness */
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--by88-primary-color);
  line-height: 1.2;
}

.page-the-thao__hero-description {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--text-dark);
}

.page-the-thao__hero-cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.page-the-thao__btn-primary,
.page-the-thao__btn-secondary,
.page-the-thao__btn-tertiary,
.page-the-thao__btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-the-thao__btn-primary {
  background-color: var(--by88-register-color); /* Use register color for primary CTA */
  color: var(--by88-register-login-font-color); /* Use specific font color */
  border: 2px solid var(--by88-register-color);
}

.page-the-thao__btn-primary:hover {
  background-color: darken(var(--by88-register-color), 10%);
  border-color: darken(var(--by88-register-color), 10%);
}

.page-the-thao__btn-secondary {
  background-color: var(--by88-primary-color);
  color: var(--by88-secondary-color);
  border: 2px solid var(--by88-primary-color);
}

.page-the-thao__btn-secondary:hover {
  background-color: darken(var(--by88-primary-color), 10%);
  border-color: darken(var(--by88-primary-color), 10%);
}

.page-the-thao__btn-tertiary {
  background-color: transparent;
  color: var(--by88-primary-color);
  border: 2px solid var(--by88-primary-color);
}

.page-the-thao__btn-tertiary:hover {
  background-color: var(--by88-primary-color);
  color: var(--by88-secondary-color);
}

.page-the-thao__btn-link {
  background-color: transparent;
  color: var(--by88-primary-color);
  border: none;
  padding: 8px 0;
  text-decoration: underline;
}

.page-the-thao__btn-link:hover {
  color: darken(var(--by88-primary-color), 10%);
}

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

.page-the-thao__hero-side-image {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-the-thao__content-area {
  max-width: 1170px;
  margin: 0 auto;
  padding: 40px 16px;
}

.page-the-thao__section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--by88-primary-color);
  text-align: center;
  margin-bottom: 20px;
}

.page-the-thao__section-description {
  font-size: 1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-dark);
}

.page-the-thao__intro-section {
  background-color: var(--by88-background-color);
  padding: 60px 0;
}

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

.page-the-thao__feature-item {
  text-align: center;
  padding: 25px;
  background-color: var(--by88-secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.page-the-thao__feature-item:hover {
  transform: translateY(-5px);
}

.page-the-thao__icon-box-media {
  width: 200px; /* Maintain square aspect ratio */
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--by88-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-the-thao__icon-box-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; /* Ensure image is also round */
  display: block;
}

.page-the-thao__feature-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--by88-primary-color);
  margin-bottom: 10px;
}

.page-the-thao__feature-text {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.page-the-thao__sports-types-section {
  background-color: #f8f8f8;
  padding: 60px 0;
}

.page-the-thao__sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-the-thao__sport-card {
  background-color: var(--by88-secondary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

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

.page-the-thao__sport-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-the-thao__sport-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--by88-primary-color);
  padding: 15px 20px 5px;
}

.page-the-thao__sport-text {
  font-size: 0.9rem;
  color: var(--text-dark);
  padding: 0 20px 20px;
}

.page-the-thao__guide-section {
  padding: 60px 0;
  background-color: var(--by88-background-color);
}

.page-the-thao__guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-the-thao__guide-step {
  background-color: var(--by88-secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding-bottom: 20px;
  text-align: center;
}

.page-the-thao__guide-media {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-the-thao__guide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-the-thao__guide-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-the-thao__promo-section {
  background-color: #f0f0f0;
  padding: 60px 0;
}

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

.page-the-thao__promo-card {
  background-color: var(--by88-secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding-bottom: 20px;
  text-align: center;
}

.page-the-thao__promo-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-the-thao__promo-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--by88-primary-color);
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-the-thao__promo-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding: 0 15px;
}

.page-the-thao__center-button {
  text-align: center;
  margin-top: 40px;
}

.page-the-thao__faq-section {
  padding: 60px 0;
  background-color: var(--by88-background-color);
}

.page-the-thao__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

.page-the-thao__faq-item {
  background-color: var(--by88-secondary-color);
  border: 1px solid #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.15rem;
  font-weight: 600;
  color: var(--by88-primary-color);
  cursor: pointer;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.page-the-thao__faq-item[open] .page-the-thao__faq-question {
  border-bottom: 1px solid transparent;
}

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

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

.page-the-thao__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--by88-primary-color);
}

.page-the-thao__faq-item[open] .page-the-thao__faq-toggle {
  content: '−';
  transform: rotate(0deg);
}

.page-the-thao__faq-answer {
  padding: 15px 25px 25px;
  font-size: 1rem;
  color: var(--text-dark);
  background-color: var(--by88-secondary-color);
}

.page-the-thao__faq-answer p {
  margin-bottom: 10px;
}

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

.page-the-thao__faq-button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-the-thao__faq-button-group .page-the-thao__btn-primary,
.page-the-thao__faq-button-group .page-the-thao__btn-secondary {
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* General image responsiveness */
.page-the-thao img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  .page-the-thao__hero-content {
    flex: 1 1 100%;
    order: 2;
  }

  .page-the-thao__hero-image {
    flex: 1 1 100%;
    order: 1;
    margin-bottom: 30px;
  }

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

  .page-the-thao__icon-box-media {
    width: 180px;
    height: 180px;
  }

  .page-the-thao__sport-image {
    height: 180px;
  }

  .page-the-thao__guide-media {
    height: 180px;
  }

  .page-the-thao__promo-image {
    height: 200px;
  }
}

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

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

  .page-the-thao__hero-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .page-the-thao__hero-description {
    font-size: 1rem;
  }

  /* Buttons responsiveness */
  .page-the-thao__btn-primary,
  .page-the-thao__btn-secondary,
  .page-the-thao__btn-tertiary,
  .page-the-thao__btn-link,
  .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 !important;
    padding-right: 15px !important;
  }

  .page-the-thao__hero-cta-buttons,
  .page-the-thao__faq-button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .page-the-thao__content-area {
    padding: 30px 15px;
  }

  .page-the-thao__section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-the-thao__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  /* Module 1 (features grid) */
  .page-the-thao__features-grid {
    gap: 20px;
  }

  .page-the-thao__icon-box-media {
    width: 150px; /* Maintain square aspect ratio for round icons */
    height: 150px;
    border-width: 3px;
  }

  .page-the-thao__feature-title {
    font-size: 1.2rem;
  }

  /* Sports types grid */
  .page-the-thao__sports-grid {
    gap: 20px;
  }

  .page-the-thao__sport-image {
    height: 160px;
  }

  .page-the-thao__sport-title {
    font-size: 1.1rem;
  }

  .page-the-thao__sport-text {
    font-size: 0.85rem;
  }

  /* Guide section */
  .page-the-thao__guide-steps {
    gap: 20px;
  }

  .page-the-thao__guide-media {
    height: 160px;
  }

  .page-the-thao__guide-title {
    font-size: 1.2rem;
  }

  .page-the-thao__guide-text {
    font-size: 0.9rem;
  }

  /* Promo section */
  .page-the-thao__promo-cards {
    gap: 20px;
  }

  .page-the-thao__promo-image {
    height: 180px;
  }

  .page-the-thao__promo-title {
    font-size: 1.2rem;
  }

  .page-the-thao__promo-text {
    font-size: 0.9rem;
  }

  /* FAQ section */
  .page-the-thao__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-the-thao__faq-answer {
    padding: 10px 20px 20px;
    font-size: 0.95rem;
  }

  /* Generic image and container responsiveness */
  .page-the-thao img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-the-thao__hero-section,
  .page-the-thao__intro-section,
  .page-the-thao__sports-types-section,
  .page-the-thao__guide-section,
  .page-the-thao__promo-section,
  .page-the-thao__faq-section,
  .page-the-thao__content-area,
  .page-the-thao__feature-item,
  .page-the-thao__sport-card,
  .page-the-thao__guide-step,
  .page-the-thao__promo-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}