/* style/sports.css */

/* Custom properties for brand colors */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9; /* Slightly off-white for sections */
  --border-color: #e0e0e0;
}

.page-sports {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: var(--secondary-color); /* Default white background */
  padding-top: var(--header-offset, 120px); /* Desktop default, controlled by shared.css */
}

/* Container for consistent spacing */
.page-sports__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section Titles */
.page-sports__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* Section Descriptions */
.page-sports__section-description {
  font-size: 18px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-sports__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #a7e1f7 100%); /* Lighter blue to white-ish */
  color: var(--text-light); /* Light text for dark/brand background */
  overflow: hidden; /* Ensure image doesn't overflow */
  padding-top: 0; /* Handled by .page-sports padding-top */
}

.page-sports__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Ensure content is above any background effects */
}

.page-sports__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-sports__hero-content {
  text-align: center;
  width: 100%;
  max-width: 900px;
}

.page-sports__hero-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-sports__hero-description {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: var(--text-light);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-sports__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Ensure buttons are not too small */
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-sports__cta-button--primary {
  background: #EA7C07; /* Login/Register color */
  color: var(--text-light);
  border: 2px solid #EA7C07;
}

.page-sports__cta-button--primary:hover {
  background: #d46d06;
  border-color: #d46d06;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-sports__cta-button--secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-sports__cta-button--secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-sports__introduction-section {
  background-color: var(--background-light);
  padding: 80px 0;
}

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

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

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

.page-sports__feature-item img {
  width: 100%;
  height: 200px; /* Consistent height for feature images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
}

.page-sports__feature-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-sports__feature-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
}

/* Betting Types Section */
.page-sports__betting-types-section {
  background: var(--primary-color); /* Dark background for this section */
  color: var(--text-light); /* Light text for dark background */
  padding: 80px 0;
}

.page-sports__betting-types-section .page-sports__section-title {
  color: var(--text-light); /* Ensure title is white */
}

.page-sports__betting-types-section .page-sports__section-description {
  color: var(--text-light); /* Ensure description is white */
}

.page-sports__betting-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__card {
  background: rgba(255, 255, 255, 0.15); /* Slightly transparent white for cards on dark background */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-sports__card-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-light); /* Light text on dark card */
  margin-bottom: 15px;
}

.page-sports__card-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light); /* Light text on dark card */
}

/* Guide Section */
.page-sports__guide-section {
  background-color: var(--secondary-color);
  padding: 80px 0;
}

.page-sports__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-sports__step-item {
  background: var(--background-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 250px; /* Ensure consistent height */
}

.page-sports__step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--text-light);
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-sports__step-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-sports__step-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
}

.page-sports__cta-buttons--center {
  margin-top: 60px;
}

/* Advantages Section */
.page-sports__advantages-section {
  background-color: var(--background-light);
  padding: 80px 0;
}

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

.page-sports__advantage-item {
  background: var(--secondary-color);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-sports__advantage-item img {
  width: 100%;
  height: 250px; /* Consistent height for advantage images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
}

.page-sports__advantage-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-sports__advantage-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
}

/* Download App Section */
.page-sports__download-app-section {
  background: linear-gradient(135deg, #a7e1f7 0%, var(--primary-color) 100%);
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.page-sports__download-app-section .page-sports__section-title {
  color: var(--text-light);
}

.page-sports__download-app-section .page-sports__section-description {
  color: var(--text-light);
}

.page-sports__download-app-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-sports__download-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 50px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-sports__download-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-sports__faq-section {
  background-color: var(--secondary-color);
  padding: 80px 0;
}

.page-sports__faq-list {
  max-width: 800px;
  margin: 50px auto 0 auto;
}

.page-sports__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-sports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  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(--background-light);
  border-color: #d0d0d0;
}

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

.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.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: 30px;
  height: 30px;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' effect, or just change text to '-' in JS */
  color: #EA7C07; /* Highlight toggle when active */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: var(--background-light);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.page-sports__faq-item.active .page-sports__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to accommodate content */
  padding: 20px 25px !important;
  opacity: 1;
  border: 1px solid var(--border-color);
  border-top: none;
}

.page-sports__faq-answer p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  margin: 0;
}

/* Call to Action Section */
.page-sports__call-to-action-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #007bff 100%);
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.page-sports__call-to-action-section .page-sports__section-title {
  color: var(--text-light);
}

.page-sports__call-to-action-section .page-sports__section-description {
  color: var(--text-light);
}

.page-sports__cta-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-sports__hero-title {
    font-size: 42px;
  }
  .page-sports__section-title {
    font-size: 32px;
  }
  .page-sports__section-description {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  /* Ensure main content padding-top for fixed header on mobile */
  .page-sports {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-sports__container {
    padding: 30px 15px;
  }

  .page-sports__hero-section {
    padding: 40px 15px;
  }
  
  .page-sports__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-sports__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-sports__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-sports__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    margin: 0 auto; /* Center buttons when stacked */
  }

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

  .page-sports__features-grid,
  .page-sports__betting-cards-grid,
  .page-sports__steps-grid,
  .page-sports__advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-sports__feature-item,
  .page-sports__card,
  .page-sports__step-item,
  .page-sports__advantage-item {
    padding: 20px;
  }

  .page-sports__feature-title,
  .page-sports__card-title,
  .page-sports__step-title,
  .page-sports__advantage-title {
    font-size: 20px;
  }

  .page-sports__feature-item img,
  .page-sports__advantage-item img {
    height: auto; /* Allow image height to adjust */
    max-height: 200px; /* Cap max height for smaller screens */
  }

  .page-sports__download-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-sports__download-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* FAQ Mobile adjustments */
  .page-sports__faq-question {
    padding: 15px;
  }
  .page-sports__faq-question h3 {
    font-size: 16px;
  }
  .page-sports__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-sports__faq-item.active .page-sports__faq-answer {
    padding: 15px !important;
  }
  .page-sports__faq-answer p {
    font-size: 15px;
  }
}

/* Ensure all images are responsive and do not overflow */
.page-sports img {
  max-width: 100%;
  height: auto;
  display: block; /* Remove extra space below images */
}

/* Image containers responsive */
.page-sports__hero-image,
.page-sports__feature-item,
.page-sports__advantage-item,
.page-sports__download-app-content {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Ensure buttons and their containers are responsive on mobile */
@media (max-width: 768px) {
  .page-sports__cta-button,
  .page-sports__btn-primary,
  .page-sports__btn-secondary,
  .page-sports a[class*="button"],
  .page-sports 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-sports__hero-cta-buttons,
  .page-sports__download-buttons,
  .page-sports__button-group,
  .page-sports__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;
    flex-direction: column; /* Stack buttons vertically on mobile */
  }
}

/* No CSS filters allowed for images */
.page-sports img {
  filter: none; /* Explicitly ensure no filters are applied */
}