/* style/sports.css */

:root {
    --primary-color: #1A202C;
    --secondary-color: #FFD700;
    --text-on-dark: #ffffff;
    --text-on-light: #333333;
    --background-dark: #0F172A; /* Body background from shared.css */
    --card-background-dark: rgba(255, 255, 255, 0.1);
    --card-background-light: #ffffff;
    --border-color: #e0e0e0;
}

.page-sports {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark); /* Default text color for the page, assuming dark body background */
    background-color: var(--background-dark);
}

.page-sports a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-sports a:hover {
    color: var(--text-on-dark);
}

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

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

.page-sports__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-on-dark);
}

.page-sports__sub-title {
    font-size: 24px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-on-dark);
}

.page-sports__text-block {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-on-dark);
}

.page-sports__inline-link {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-sports__inline-link:hover {
    color: var(--text-on-dark);
}

/* Color Contrast Fixes */
.page-sports__dark-section {
    background-color: var(--primary-color);
    color: var(--text-on-dark);
}

.page-sports__dark-section .page-sports__section-title,
.page-sports__dark-section .page-sports__sub-title,
.page-sports__dark-section .page-sports__text-block {
    color: var(--text-on-dark);
}

.page-sports__light-bg {
    background-color: var(--card-background-light);
    color: var(--text-on-light);
}

.page-sports__light-bg .page-sports__section-title,
.page-sports__light-bg .page-sports__sub-title,
.page-sports__light-bg .page-sports__text-block,
.page-sports__light-bg .page-sports__card-title,
.page-sports__light-bg .page-sports__card-description {
    color: var(--text-on-light);
}

.page-sports__light-bg .page-sports__inline-link {
    color: var(--primary-color);
}

.page-sports__light-bg .page-sports__inline-link:hover {
    color: var(--secondary-color);
}

/* 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);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0F172A 100%);
    overflow: hidden;
}

.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: 1;
}

.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: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-sports__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.page-sports__cta-button:hover {
    background: var(--text-on-dark);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-sports__grid--2-cols {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.page-sports__grid--3-cols {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Card Styles */
.page-sports__card {
    background: var(--card-background-dark);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-sports__card-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    height: 200px; /* Fixed height for consistent card image display */
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.page-sports__card-title a {
    color: var(--text-on-dark);
}

.page-sports__card-title a:hover {
    color: var(--secondary-color);
}

.page-sports__card-description {
    font-size: 16px;
    color: var(--text-on-dark);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-sports__btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
}

.page-sports__btn-secondary:hover {
    background: var(--text-on-dark);
    color: var(--primary-color);
}

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

/* Betting Guide Section specific */
.page-sports__betting-guide-section .page-sports__content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.page-sports__betting-guide-section .page-sports__text-block {
    flex: 2;
}

.page-sports__betting-guide-section .page-sports__image-block {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-sports__betting-guide-section .page-sports__image-block img {
    width: 100%;
    height: auto;
    display: block;
}

.page-sports__betting-guide-section ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--text-on-light);
}

.page-sports__betting-guide-section li {
    margin-bottom: 10px;
    color: var(--text-on-light);
}

/* FAQ Section */
.page-sports__faq-section .page-sports__section-title {
    color: var(--text-on-dark);
}

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

/* FAQ容器样式 */
.page-sports__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--card-background-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 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;
  padding: 0 20px;
  opacity: 0;
  color: var(--text-on-dark);
}

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

/* 问题样式 */
.page-sports__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-on-dark);
}

.page-sports__faq-question:hover {
  background: #2a3447; /* Slightly lighter primary color */
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* 问题标题样式 */
.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--text-on-dark);
}

/* 切换图标 */
.page-sports__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  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: 32px;
  height: 32px;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
  color: var(--text-on-dark);
  transform: rotate(45deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-sports__hero-title {
        font-size: 40px;
    }

    .page-sports__hero-description {
        font-size: 18px;
    }

    .page-sports__section-title {
        font-size: 30px;
    }

    .page-sports__grid--2-cols {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-sports__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-sports__hero-image {
        margin-bottom: 20px;
    }

    .page-sports__hero-image img {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-sports__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

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

    .page-sports__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .page-sports__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .page-sports__sub-title {
        font-size: 20px;
    }

    .page-sports__text-block {
        font-size: 16px;
    }

    .page-sports__grid {
        grid-template-columns: 1fr;
    }

    .page-sports__grid--2-cols,
    .page-sports__grid--3-cols {
        grid-template-columns: 1fr;
    }

    .page-sports__card {
        padding: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-sports__card-image {
        height: 180px;
    }

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

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

    .page-sports__card-description {
        font-size: 15px;
    }

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

    .page-sports__betting-guide-section .page-sports__content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-sports__betting-guide-section .page-sports__image-block {
        min-width: unset;
        width: 100%;
    }

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

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