/* style/sports.css */

/* Variables */
:root {
  --primary-color: #2F6BFF;
  --secondary-color: #6FA3FF;
  --button-gradient-start: #4A8BFF;
  --button-gradient-end: #2F6BFF;
  --card-bg: #FFFFFF;
  --page-bg: #F4F7FB; /* From custom colors */
  --text-main: #1F2D3D;
  --text-black: #000000;
  --border-color: #D6E2FF;
  --glow-color: #A5C4FF;
}

/* Base styles for the page content */
.page-sports {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for light background */
  background-color: var(--page-bg); /* Page background */
  line-height: 1.6;
  font-size: 16px;
}

.page-sports__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-sports__section-padding {
  padding: 60px 0;
}

.page-sports__section-title {
  font-size: clamp(28px, 4vw, 38px); /* Responsive font size */
  color: var(--text-main);
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.page-sports__section-title--light {
  color: #ffffff;
}

.page-sports__section-description {
  font-size: 18px;
  color: var(--text-main);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
}

.page-sports__section-description--light {
  color: #f0f0f0;
}

/* Hero Section */
.page-sports__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  background-color: var(--primary-color); /* Fallback color */
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  overflow: hidden; /* Ensure no overflow from image */
}

.page-sports__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

.page-sports__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 200px; /* Ensure minimum size */
}

.page-sports__hero-content {
  text-align: center;
  color: #ffffff;
  max-width: 900px;
  padding: 0 20px;
  z-index: 1; /* Ensure content is above any background elements */
}

.page-sports__main-title {
  font-size: clamp(36px, 5vw, 52px); /* Responsive H1 */
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-sports__intro-text {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.7;
  color: #f0f0f0;
}

.page-sports__hero-cta-buttons,
.page-sports__cta-buttons-bottom {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
}

/* Buttons */
.page-sports__btn-primary,
.page-sports__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
  text-align: center;
}

.page-sports__btn-primary {
  background: linear-gradient(180deg, var(--button-gradient-start) 0%, var(--button-gradient-end) 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-sports__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.3);
}

.page-sports__btn-secondary {
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-sports__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(47, 107, 255, 0.3);
}

.page-sports__btn-centered {
  margin: 40px auto 0 auto;
  display: block; /* For centered block button */
  max-width: 250px; /* Limit width for single centered button */
}

/* Content Images */
.page-sports__content-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 40px auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum size */
  min-height: 200px; /* Minimum size */
}

/* Lists */
.page-sports__sports-list,
.page-sports__benefits-list,
.page-sports__steps-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
}

.page-sports__sports-list-item,
.page-sports__benefits-list-item,
.page-sports__steps-list-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-main); /* Ensure text color for card */
}

.page-sports__sports-list-item:hover,
.page-sports__benefits-list-item:hover,
.page-sports__steps-list-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-sports__sports-item-title,
.page-sports__benefits-item-title,
.page-sports__steps-item-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-sports__steps-list {
  counter-reset: step-counter;
}

.page-sports__steps-list-item {
  position: relative;
  padding-left: 50px;
  text-align: left;
}

.page-sports__steps-list-item::before {
  counter-increment: step-counter;
  content: "Bước " counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--primary-color);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

/* Dark Section */
.page-sports__dark-section {
  background-color: var(--primary-color);
  color: #ffffff;
}

.page-sports__dark-section .page-sports__section-description {
  color: #f0f0f0;
}

.page-sports__dark-section .page-sports__sports-list-item,
.page-sports__dark-section .page-sports__benefits-list-item {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent card on dark background */
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.page-sports__dark-section .page-sports__sports-item-title,
.page-sports__dark-section .page-sports__benefits-item-title {
  color: var(--secondary-color); /* Lighter color for titles on dark background */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-sports__hero-image-wrapper {
    max-height: 500px;
  }
}

@media (max-width: 768px) {
  .page-sports {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-sports__section-padding {
    padding: 40px 0;
  }

  .page-sports__container {
    padding: 0 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-sports__hero-section {
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-sports__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-sports__hero-image,
  .page-sports__content-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important; /* Enforce min-width */
    min-height: 200px !important; /* Enforce min-height */
  }

  .page-sports__main-title {
    font-size: clamp(30px, 8vw, 42px);
    margin-bottom: 15px;
  }

  .page-sports__intro-text {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .page-sports__hero-cta-buttons,
  .page-sports__cta-buttons-bottom {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-sports__btn-primary,
  .page-sports__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-sports__btn-centered {
    max-width: 100%; /* Full width for centered buttons on mobile */
  }

  .page-sports__sports-list,
  .page-sports__benefits-list,
  .page-sports__steps-list {
    grid-template-columns: 1fr; /* Single column layout for lists */
    gap: 20px;
  }

  .page-sports__sports-list-item,
  .page-sports__benefits-list-item,
  .page-sports__steps-list-item {
    padding: 25px;
  }

  .page-sports__steps-list-item::before {
    left: 15px; /* Adjust step number position */
  }

  /* No video section in this page, but keeping the rule in case it's added later */
  .page-sports__video-section {
    padding-top: 10px !important; /* Small top padding for video section */
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-sports__section-title {
    font-size: clamp(24px, 7vw, 32px);
  }

  .page-sports__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
}

/* Ensure no filter on images */
.page-sports img {
  filter: none !important;
}

/* Contrast fix for unknown body background, assuming light-ish */
.page-sports {
  color: var(--text-main); /* Default to dark text */
}
.page-sports__dark-bg { /* If a section is explicitly dark */
  color: #ffffff;
}
.page-sports__light-bg { /* If a section is explicitly light */
  color: var(--text-main);
}