/* style/sports.css */

/* Custom CSS Variables for easier management */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9;
  --border-color: #e0e0e0;
}

/* Base styles for the page content, ensuring contrast with body background */
/* Assuming shared.css sets body background to var(--secondary-color) which is #FFFFFF (light) */
.page-sports {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default dark text for light background */
  background: var(--bg-light); /* Light background for sections */
}

/* Fixed header offset (desktop and mobile) */
.page-sports__hero-section {
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

/* Hero Section */
.page-sports__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px; /* Adjusted to prevent double padding with header-offset */
  background: linear-gradient(135deg, var(--primary-color), #4CAF50); /* Gradient for visual appeal */
  color: var(--text-light);
  overflow: hidden; /* To contain any overflowing image parts */
}

.page-sports__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.page-sports__hero-image {
  width: 100%;
  margin-bottom: 30px;
  z-index: 1; /* Ensure image is behind content if content is overlaid */
}

.page-sports__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-sports__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  margin-top: -80px; /* Pull content up over the image slightly */
  background: rgba(0, 0, 0, 0.3); /* Semi-transparent overlay for text readability */
  padding: 30px;
  border-radius: 12px;
}

.page-sports__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-sports__intro-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

.page-sports__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-sports__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 200px; /* Ensure buttons are not too small */
  text-align: center;
}

.page-sports__btn-primary {
  background: #EA7C07; /* Login color */
  color: var(--text-light);
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-sports__btn-primary:hover {
  background: #ff8c00;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-sports__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-sports__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styles */
.page-sports__section {
  padding: 80px 0;
  background-color: var(--secondary-color); /* Default light background */
  color: var(--text-dark); /* Default dark text */
  text-align: center;
}

.page-sports__section:nth-of-type(even) {
  background-color: var(--bg-light); /* Alternate light background for readability */
}

.page-sports__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-sports__dark-bg .page-sports__section-title {
  color: var(--text-light);
}

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

.page-sports__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 15px;
}

.page-sports__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #EA7C07; /* Accent color */
  border-radius: 2px;
}

.page-sports p {
  font-size: 1.1em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-sports__image-wrapper {
  margin: 40px auto;
  max-width: 900px;
}

.page-sports__image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Sport Grid */
.page-sports__sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__sport-card {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-sports__sport-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-sports__sport-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Important for responsive images */
}

.page-sports__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Feature List */
.page-sports__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__feature-item {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-sports__feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-sports__feature-item img {
  width: 200px; /* Adjusted to meet minimum size */
  height: 200px; /* Adjusted to meet minimum size */
  object-fit: contain;
  margin: 0 auto 20px;
  display: block;
}

.page-sports__feature-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.page-sports__cta-wrapper {
  margin-top: 50px;
}

/* Step-by-Step Guide */
.page-sports__step-by-step {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__step-item {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  border: 1px solid var(--border-color);
}

.page-sports__step-title {
  font-size: 1.6em;
  color: #EA7C07; /* Login color for steps */
  margin-bottom: 15px;
}

.page-sports__btn-small {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

.page-sports__btn-small:hover {
  background: #1e87b7;
}

/* Promotions Section */
.page-sports__promotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__promotion-card {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-sports__promotion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.page-sports__promotion-card img {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-sports__btn-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  transition: color 0.3s ease;
}

.page-sports__btn-link:hover {
  text-decoration: underline;
  color: #EA7C07;
}

/* FAQ Section */
.page-sports__faq-list {
  margin-top: 50px;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ container styles */
.page-sports__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ default state - answer hidden */
.page-sports__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height */
.page-sports__faq-item.active .page-sports__faq-answer {
  max-height: 2000px !important; /* 🚨 Ensure priority, value large enough for content */
  padding: 20px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
}

/* Question styles */
.page-sports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-sports__faq-question:hover {
  background: var(--bg-light);
  border-color: #d0d0d0;
}

.page-sports__faq-question:active {
  background: #eeeeee;
}

/* Question title styles */
.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-sports__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(38, 169, 224, 0.1); /* Light background for icon */
}

.page-sports__faq-item.active .page-sports__faq-toggle {
  color: #EA7C07; /* Accent color when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

.page-sports__inline-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-sports__inline-link:hover {
  color: #EA7C07;
}

/* Conclusion Section */
.page-sports__conclusion {
  padding-bottom: 80px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
  .page-sports {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Fixed header offset for mobile */
  .page-sports__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
  }

  .page-sports__hero-container {
    padding: 0 15px;
  }

  .page-sports__hero-content {
    margin-top: -40px; /* Adjust overlay position for mobile */
    padding: 20px;
  }

  .page-sports__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-sports__intro-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-sports__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px; /* Add padding to container to prevent overflow */
    box-sizing: border-box;
  }
}