/* style/the-thao.css */

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

.page-the-thao {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--secondary-color); /* Body background is #FFFFFF */
}

.page-the-thao__hero-carousel-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #000;
}

.page-the-thao__hero-slider {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.page-the-thao__hero-slide {
  min-width: 100%;
  display: none;
  position: relative;
}

.page-the-thao__hero-slide.is-active {
  display: block;
}

.page-the-thao__hero-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-the-thao__hero-slider-prev,
.page-the-thao__hero-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-light);
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.page-the-thao__hero-slider-prev:hover,
.page-the-thao__hero-slider-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.page-the-thao__hero-slider-prev {
  left: 10px;
}

.page-the-thao__hero-slider-next {
  right: 10px;
}

.page-the-thao__hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  color: var(--text-light);
  text-align: center;
  z-index: 5;
}

.page-the-thao__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-the-thao__description {
  font-size: clamp(1em, 2vw, 1.2em);
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-the-thao__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.page-the-thao__btn-primary,
.page-the-thao__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-the-thao__btn-primary {
  background-color: var(--button-register);
  color: var(--button-font-color);
  border: 2px solid var(--button-register);
}

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

.page-the-thao__btn-secondary {
  background-color: transparent;
  color: var(--button-font-color);
  border: 2px solid var(--button-font-color);
}

.page-the-thao__btn-secondary:hover {
  background-color: var(--button-font-color);
  color: var(--button-register);
}

.page-the-thao__section-title {
  font-size: 2.2em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  padding-top: 30px;
}

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

.page-the-thao__guide-box {
  padding: 40px 20px;
  background-color: #f5f5f5; /* Light grey background */
  border-top: 5px solid var(--primary-color);
  border-bottom: 5px solid var(--primary-color);
  margin-top: 30px;
}

.page-the-thao__guide-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-the-thao__guide-card {
  flex: 0 0 calc(20% - 16px); /* 5 cards per row, accounting for gap */
  max-width: calc(20% - 16px);
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.page-the-thao__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.page-the-thao__guide-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 250 / 350; /* Fixed aspect ratio for vertical images */
}

/* Positioning for guide cards (desktop only) */
.page-the-thao__guide-card--pos-1,
.page-the-thao__guide-card--pos-5 {
  padding-top: 50px;
}

.page-the-thao__guide-card--pos-2,
.page-the-thao__guide-card--pos-4 {
  padding-top: 25px;
}

.page-the-thao__home-content-box {
  max-width: 90%;
  margin: 40px auto;
  padding: 30px;
  border: 5px solid var(--primary-color);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(1, 116, 57, 0.5);
  height: 700px; /* Fixed height for desktop */
  background-color: var(--secondary-color);
  color: var(--text-dark);
}

.page-the-thao__home-content-inner {
  height: 100%;
  overflow-y: auto; /* Scrollable content on desktop */
  padding-right: 15px; /* Space for scrollbar */
}

.page-the-thao__home-content-inner h2,
.page-the-thao__home-content-inner h3,
.page-the-thao__home-content-inner h4 {
  color: var(--primary-color);
  margin-top: 25px;
  margin-bottom: 15px;
}

.page-the-thao__home-content-inner h2 {
  font-size: 2.5em;
}

.page-the-thao__home-content-inner h3 {
  font-size: 1.8em;
}

.page-the-thao__home-content-inner h4 {
  font-size: 1.4em;
}

.page-the-thao__home-content-inner p,
.page-the-thao__home-content-inner li {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.page-the-thao__home-content-inner ul,
.page-the-thao__home-content-inner ol {
  margin-left: 25px;
  margin-bottom: 15px;
}

.page-the-thao__home-content-inner a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-the-thao__home-content-inner a:hover {
  color: darken(var(--primary-color), 10%);
}

.page-the-thao__content-image {
  margin: 30px auto;
  text-align: center;
  max-width: 100%;
}

.page-the-thao__content-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  min-height: 200px;
}

.page-the-thao__content-image figcaption {
  font-style: italic;
  margin-top: 10px;
  color: #666;
  font-size: 0.95em;
}

.page-the-thao__blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.page-the-thao__blog-card {
  background-color: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-the-thao__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.page-the-thao__blog-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-the-thao__blog-title {
  font-size: 1.25em;
  font-weight: bold;
  margin: 15px;
  color: var(--primary-color);
  line-height: 1.4;
}

.page-the-thao__blog-date {
  font-size: 0.9em;
  color: #888;
  margin: 0 15px 15px 15px;
}

.page-the-thao__view-all-button-container {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-the-thao__faq-list {
  margin-top: 30px;
}

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

.page-the-thao__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.15em;
  color: var(--primary-color);
  background-color: #eaf7ed; /* Lighter green for question background */
  list-style: none; /* Hide default details marker */
}

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

.page-the-thao__faq-toggle {
  font-size: 1.5em;
  transition: transform 0.3s ease;
}

.page-the-thao__faq-item[open] .page-the-thao__faq-toggle {
  transform: rotate(45deg);
}

.page-the-thao__faq-answer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 1em;
  color: var(--text-dark);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-the-thao__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

  .page-the-thao__description {
    font-size: clamp(1em, 2.5vw, 1.1em);
  }

  .page-the-thao__guide-card {
    flex: 0 0 calc(33.33% - 13.33px); /* 3 cards per row */
    max-width: calc(33.33% - 13.33px);
    padding-top: 0 !important; /* Reset padding-top */
  }

  .page-the-thao__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .page-the-thao__hero-slider-prev,
  .page-the-thao__hero-slider-next {
    padding: 10px;
    font-size: 20px;
  }

  .page-the-thao__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
  }

  .page-the-thao__description {
    font-size: clamp(0.9em, 3.5vw, 1em) !important;
  }

  .page-the-thao__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

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

  .page-the-thao__cta-buttons,
  .page-the-thao__button-group,
  .page-the-thao__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-the-thao__section-title {
    font-size: 1.8em;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-the-thao__section-description {
    font-size: 1em;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-the-thao__guide-box {
    padding: 20px 0;
  }

  .page-the-thao__guide-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 0 10px;
  }

  .page-the-thao__guide-card {
    flex: auto;
    max-width: 100%;
    padding-top: 0 !important; /* Reset padding-top for mobile */
  }

  .page-the-thao__guide-card--pos-1,
  .page-the-thao__guide-card--pos-2 {
    grid-column: span 3;
  }

  .page-the-thao__guide-card--pos-3,
  .page-the-thao__guide-card--pos-4,
  .page-the-thao__guide-card--pos-5 {
    grid-column: span 2;
  }

  .page-the-thao__home-content-box {
    max-width: 100%;
    height: auto; /* Full content on mobile */
    padding: 20px 15px;
    margin: 20px auto;
    box-shadow: none;
    border: none;
  }

  .page-the-thao__home-content-inner {
    height: auto; /* Full content on mobile */
    overflow: visible; /* No scrollbar on mobile */
    padding-right: 0;
  }

  .page-the-thao__home-content-inner h2 {
    font-size: 2em;
  }

  .page-the-thao__home-content-inner h3 {
    font-size: 1.5em;
  }

  .page-the-thao__home-content-inner h4 {
    font-size: 1.2em;
  }

  .page-the-thao__home-content-inner p,
  .page-the-thao__home-content-inner li {
    font-size: 1em;
  }

  .page-the-thao__content-image img,
  .page-the-thao img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }
  .page-the-thao__blog-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 15px;
  }
  .page-the-thao__blog-card img {
    height: auto; /* Allow height to adjust for mobile */
  }
  .page-the-thao__faq-question {
    font-size: 1em;
    padding: 12px 15px;
  }
  .page-the-thao__faq-answer {
    padding: 12px 15px;
    font-size: 0.95em;
  }
  .page-the-thao__faq-list {
    padding: 0 15px;
  }
  .page-the-thao__view-all-button-container {
    padding: 0 15px;
  }
}