/* style/sports.css */

/* Base Styles for Thể Thao Page */
.page-sports {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default dark text for light body background */
    line-height: 1.6;
    background-color: #f8f8f8; /* Light background for the page content */
}

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

.page-sports__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #E44D26;
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
}

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

.page-sports__dark-bg {
    background-color: #333333;
    color: #ffffff;
}

.page-sports__dark-bg .page-sports__section-title {
    color: #E44D26; /* Primary color for titles on dark background */
}

.page-sports__dark-bg .page-sports__section-description {
    color: #f0f0f0;
}

/* CTA Button Styles */
.page-sports__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    margin: 0 10px;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
}

.page-sports__btn-primary {
    background: #E44D26;
    color: #ffffff;
}

.page-sports__btn-primary:hover {
    background: #c23d20;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-sports__btn-secondary {
    background: #ffffff;
    color: #E44D26;
    border: 2px solid #E44D26;
}

.page-sports__btn-secondary:hover {
    background: #f0f0f0;
    color: #c23d20;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.page-sports__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    height: 600px; /* Fixed height for hero */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.page-sports__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6); /* Darken image for text contrast */
}

.page-sports__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
    color: #ffffff;
}

.page-sports__main-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.page-sports__hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: #f0f0f0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

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

/* Features Section */
.page-sports__features-section {
    padding: 80px 0;
    background-color: #ffffff;
}

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

.page-sports__feature-item {
    background: #fefefe;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.page-sports__feature-item img {
    width: 400px; /* Display width */
    height: 267px; /* Display height */
    max-width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-sports__feature-item h3 {
    font-size: 24px;
    color: #333333;
    margin-bottom: 15px;
}

.page-sports__feature-item p {
    font-size: 16px;
    color: #555555;
}

/* Betting Options Section */
.page-sports__betting-options {
    padding: 80px 0;
}

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

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

.page-sports__option-item h3 {
    font-size: 24px;
    color: #E44D26;
    margin-bottom: 15px;
}

.page-sports__option-item p {
    font-size: 16px;
    color: #f0f0f0;
}

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

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

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

.page-sports__promo-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

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

.page-sports__promo-item img {
    width: 400px; /* Display width */
    height: 225px; /* Display height */
    max-width: 100%;
    object-fit: cover;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-sports__promo-item h3 {
    font-size: 22px;
    color: #333333;
    margin-bottom: 10px;
    padding: 0 20px;
}

.page-sports__promo-item p {
    font-size: 16px;
    color: #555555;
    padding: 0 20px 20px;
}

.page-sports__promo-link {
    display: inline-block;
    color: #E44D26;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 5px 15px;
    border: 1px solid #E44D26;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-sports__promo-link:hover {
    background-color: #E44D26;
    color: #ffffff;
}

/* Guide Section */
.page-sports__guide-section {
    padding: 80px 0;
}

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

.page-sports__guide-step {
    background: #444444;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-sports__guide-step h3 {
    font-size: 26px;
    color: #E44D26;
    margin-bottom: 20px;
}

.page-sports__guide-step p {
    font-size: 17px;
    color: #f0f0f0;
    margin-bottom: 30px;
}

.page-sports__guide-button {
    display: inline-block;
    padding: 12px 25px;
    background: #E44D26;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
}

.page-sports__guide-button:hover {
    background: #c23d20;
}

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

.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;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 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.3s ease;
  padding: 0 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.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 để chứa mọi nội dung */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề kiểu */
.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;
}

/* Vấn đề tiêu đề kiểu */
.page-sports__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
  color: #333333;
}

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

.page-sports__faq-item.active .page-sports__faq-toggle {
  color: #E44D26; /* Màu chính cho chuyển đổi hoạt động */
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}


/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .page-sports__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    /* Hero Section Mobile */
    .page-sports__hero-section {
        height: auto;
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        padding-bottom: 40px;
        box-sizing: border-box !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .page-sports__hero-content {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

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

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

    .page-sports__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-sports__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0; /* Remove horizontal margins when stacked */
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Sections Mobile */
    .page-sports__features-section,
    .page-sports__betting-options,
    .page-sports__promotions-section,
    .page-sports__guide-section,
    .page-sports__faq-section {
        padding: 40px 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-sports__feature-grid,
    .page-sports__options-grid,
    .page-sports__promo-grid,
    .page-sports__guide-steps {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
        margin-top: 30px;
    }

    .page-sports__feature-item,
    .page-sports__option-item,
    .page-sports__promo-item,
    .page-sports__guide-step {
        padding: 20px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-sports__feature-item img,
    .page-sports__promo-item img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Enforce min size */
        min- /* Adjust min height for mobile */
        object-fit: contain;
    }

    .page-sports__feature-item h3,
    .page-sports__option-item h3,
    .page-sports__promo-item h3,
    .page-sports__guide-step h3 {
        font-size: 20px;
    }

    .page-sports__feature-item p,
    .page-sports__option-item p,
    .page-sports__promo-item p,
    .page-sports__guide-step p {
        font-size: 15px;
    }

    .page-sports__promo-link,
    .page-sports__guide-button {
        font-size: 15px;
        padding: 10px 20px;
        width: auto;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-sports__cta-center .page-sports__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* FAQ Mobile */
    .page-sports__faq-list {
        margin-top: 30px;
    }
    
    .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: 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;
    }
}