/* style/sports.css */

/* --- General Page Styling --- */
.page-sports {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background: #FFFFFF; /* Body background color from shared.css var(--secondary-color) */
}

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

.page-sports__section-title {
    font-size: 36px;
    color: #017439; /* Primary color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-sports__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    color: #555555;
}

/* --- CTA Button Styling --- */
.page-sports__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-sports__cta-button--register {
    background: #C30808; /* Register button color */
    color: #FFFF00; /* Register button font color */
    border: 2px solid #C30808;
    margin-right: 15px;
}

.page-sports__cta-button--login {
    background: #C30808; /* Login button color */
    color: #FFFF00; /* Login button font color */
    border: 2px solid #C30808;
}

.page-sports__cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-sports__card-button {
    display: block;
    width: fit-content;
    margin: 20px auto 0 auto;
    padding: 10px 25px;
    background: #017439;
    color: #FFFFFF;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-sports__card-button:hover {
    background: #005f2f;
}

/* --- Image Styling (Global) --- */
.page-sports img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px; /* Default for most images */
}

/* --- 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;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, #017439, #005f2f); /* Green gradient for hero background */
    color: #FFFFFF;
}

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

.page-sports__hero-image {
    width: 100%;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

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

.page-sports__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFFFF;
}

.page-sports__intro-description {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #e0e0e0;
}

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

/* --- Overview Section --- */
.page-sports__overview-section {
    padding: 80px 0;
    background: #f9f9f9;
}

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

.page-sports__sports-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-sports__card-title {
    font-size: 24px;
    color: #017439;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-sports__card-text {
    font-size: 16px;
    color: #666666;
    line-height: 1.5;
}

/* --- Features Section --- */
.page-sports__features-section {
    padding: 80px 0;
    background: #017439; /* Dark background */
    color: #FFFFFF; /* Light text */
}

.page-sports__features-section .page-sports__section-title {
    color: #FFFFFF; /* White title for dark background */
}

.page-sports__features-section .page-sports__section-description {
    color: #e0e0e0;
}

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

.page-sports__feature-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white background */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-sports__feature-title {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #FFFFFF;
}

.page-sports__feature-text {
    font-size: 16px;
    color: #f0f0f0;
}

/* --- Promotions Section --- */
.page-sports__promotions-section {
    padding: 80px 0;
    background: #FFFFFF;
}

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

.page-sports__promotion-card {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-sports__more-promo-cta {
    text-align: center;
    margin-top: 40px;
}

.page-sports__more-promo-cta .page-sports__cta-button {
    background: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
}

/* --- Get Started Section --- */
.page-sports__get-started-section {
    padding: 80px 0;
    background: #f0f8f0; /* Light green background */
}

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

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

.page-sports__step-icon {
    width: 60px;
    height: 60px;
    background: #017439;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 20px auto;
}

.page-sports__step-title {
    font-size: 24px;
    color: #017439;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-sports__step-text {
    font-size: 16px;
    color: #666666;
}

.page-sports__cta-bottom {
    text-align: center;
    margin-top: 60px;
}

.page-sports__cta-bottom .page-sports__cta-button {
    background: #C30808;
    color: #FFFF00;
    border: 2px solid #C30808;
}

/* --- FAQ Section --- */
.page-sports__faq-section {
    padding: 80px 0;
    background: #f9f9f9;
}

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

/* FAQ容器样式 */
.page-sports__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-sports__faq-item.active .page-sports__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-sports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-sports__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* 问题标题样式 */
.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: #333333; /* Ensure contrast */
}

/* 切换图标 */
.page-sports__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Change to X or rotate for active state */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-sports__main-title {
        font-size: 40px;
    }
    .page-sports__intro-description {
        font-size: 18px;
    }
    .page-sports__section-title {
        font-size: 32px;
    }
}

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

    /* 🚨 Mobile Hero Section */
    .page-sports__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-sports__hero-image img {
        border-radius: 4px;
    }

    .page-sports__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-sports__intro-description {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .page-sports__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        width: 100% !important; /* Ensure buttons take full width */
        margin: 0 0 10px 0 !important; /* Adjust margins for stacked buttons */
    }
    .page-sports__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px;
    }

    /* General sections and cards */
    .page-sports__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .page-sports__section-description {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .page-sports__sports-grid,
    .page-sports__features-grid,
    .page-sports__promotions-grid,
    .page-sports__steps-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }

    .page-sports__sports-card,
    .page-sports__feature-item,
    .page-sports__promotion-card,
    .page-sports__step-item {
        padding: 20px;
    }

    .page-sports__sports-card img,
    .page-sports__feature-item img,
    .page-sports__promotion-card img {
         /* Adjust image height for mobile */
        border-radius: 4px;
    }

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

    .page-sports__card-text,
    .page-sports__feature-text,
    .page-sports__step-text {
        font-size: 15px;
    }

    .page-sports__card-button {
        width: 100%;
        margin-top: 15px;
        padding: 10px 20px;
    }

    .page-sports__more-promo-cta .page-sports__cta-button,
    .page-sports__cta-bottom .page-sports__cta-button {
        width: 100% !important;
        margin: 0 !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 🚨 Mobile Image Responsiveness */
    .page-sports img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-sports__section,
    .page-sports__card,
    .page-sports__container,
    .page-sports__hero-section,
    .page-sports__overview-section,
    .page-sports__features-section,
    .page-sports__promotions-section,
    .page-sports__get-started-section,
    .page-sports__faq-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Mobile */
    .page-sports__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-sports__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-sports__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-sports__faq-answer {
        padding: 0 15px;
    }
    
    .page-sports__faq-item.active .page-sports__faq-answer {
        padding: 15px !important;
    }
}