/* style/sports.css */

/* Variables for consistent styling */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9; /* A slightly off-white for sections */
  --button-login: #EA7C07; /* Specific color for login if needed */
  --black: #000000; /* Specific color for black if needed */
}

/* Base styles for the page content */
.page-sports {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* Assuming body background is light for default text color */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-sports__section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--primary-color);
  line-height: 1.3;
}

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

.page-sports__subtitle {
  font-size: 24px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-sports__subtitle--light {
  color: var(--text-light);
}

.page-sports__text-block {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-sports__text-block--light {
  color: var(--text-light);
}

/* 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 80px; /* Adjust padding-top as it's already on .page-sports */
  background: linear-gradient(135deg, var(--primary-color) 0%, #36baf0 100%); /* Gradient background for visual appeal */
  color: var(--text-light);
}

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

.page-sports__hero-image {
  width: 100%;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-sports__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

.page-sports__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

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

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

.page-sports__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--button-login); /* Use specific login color for CTA */
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-sports__cta-button:hover {
  background: #e06c00; /* Slightly darker orange on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-sports__cta-button--dark {
  background: var(--button-login);
}

.page-sports__cta-button--dark:hover {
  background: #e06c00;
}

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

/* Sports Offerings Section */
.page-sports__sports-offerings {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-sports__grid-item {
  background: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-sports__image-wrapper {
  margin-top: 50px;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.page-sports__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Live Betting Section */
.page-sports__live-betting {
  padding: 80px 0;
  background-color: var(--secondary-color);
}

.page-sports__content-flex {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.page-sports__content-flex--reverse {
  flex-direction: row-reverse;
}

.page-sports__text-content {
  flex: 1;
}

.page-sports__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-sports__btn-primary:hover {
  background: #1e87c0; /* Slightly darker primary on hover */
}

/* Promotions Section */
.page-sports__promotions {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-sports__promo-card {
  background: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Why Choose Vicwin Section */
.page-sports__why-vicwin {
  padding: 80px 0;
  background-color: var(--background-light);
}

.page-sports__feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-sports__feature-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 17px;
}

.page-sports__feature-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 20px;
  line-height: 1;
}

/* Get Started Section */
.page-sports__get-started {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-sports__step-item {
  background: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

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

.page-sports__faq-list {
  max-width: 900px;
  margin: 40px auto 0;
}

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

/* FAQ默认状态 - 答案隐藏 */
.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;
}

/* FAQ展开状态 - 🚨 Sử dụng !important và đủ lớn max-height để đảm bảo mở rộng */
.page-sports__faq-item.active .page-sports__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important đảm bảo ưu tiên, giá trị đủ lớn */
  padding: 20px !important;
  opacity: 1;
  background: #f0f8ff; /* Light blue background for answer */
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e0e0e0;
}

/* Vấn đề FAQ */
.page-sports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.page-sports__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* Tiêu đề câu hỏi */
.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
}

/* Biểu tượng chuyển đổi */
.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; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
  color: var(--button-login); /* Thay đổi màu khi active */
  transform: rotate(180deg); /* Xoay để tạo hiệu ứng dấu trừ */
}

/* Final CTA Section */
.page-sports__final-cta {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-sports__hero-content h1 {
    font-size: 42px;
  }
  .page-sports__section-title {
    font-size: 32px;
  }
  .page-sports__subtitle {
    font-size: 22px;
  }
  .page-sports__content-flex {
    flex-direction: column;
  }
  .page-sports__content-flex--reverse {
    flex-direction: column-reverse;
  }
  .page-sports__image-wrapper {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  /* Global mobile padding */
  .page-sports__container {
    padding: 0 15px;
  }

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

  /* Hero section adjustments */
  .page-sports__hero-section {
    padding: 40px 15px 60px;
  }
  .page-sports__hero-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-sports__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-sports__cta-button {
    padding: 15px 30px;
    font-size: 16px;
    width: 100%;
    max-width: 300px; /* Constrain max width for a better look */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
  }

  /* Section titles */
  .page-sports__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  /* Subtitles */
  .page-sports__subtitle {
    font-size: 20px;
  }

  /* Text blocks */
  .page-sports__text-block {
    font-size: 15px;
  }

  /* Grid layouts */
  .page-sports__grid,
  .page-sports__promo-grid,
  .page-sports__steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Images responsive */
  .page-sports img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }
  .page-sports__section,
  .page-sports__card,
  .page-sports__container,
  .page-sports__image-wrapper,
  .page-sports__grid-item,
  .page-sports__promo-card,
  .page-sports__step-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-sports__image-wrapper {
    padding: 0; /* Remove padding for image wrappers to allow full width */
  }

  /* Buttons responsive */
  .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; /* Ensure text padding within button */
  }

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

  .page-sports__content-flex {
    flex-direction: column;
    gap: 20px;
  }

  /* FAQ mobile styles */
  .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;
  }
}