/* style/sports.css */
/* Base styles for the sports page content */
.page-sports {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light body background */
    line-height: 1.6;
    background-color: #f8f9fa; /* Light background for the page content */
}

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

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

.page-sports__section-title {
    font-size: 36px;
    color: #007bff;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-sports__section-description {
    font-size: 18px;
    color: #555555;
    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;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    background: linear-gradient(135deg, #007bff, #28a745); /* Brand colors as background */
    color: #ffffff; /* White text for dark background */
    overflow: hidden; /* Ensure content doesn't overflow */
}

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

.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.2);
}

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

.page-sports__hero-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff;
}

.page-sports__hero-description {
    font-size: 22px;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-sports__hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.page-sports__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-sports__cta-button--primary {
    background: #ffffff;
    color: #007bff;
    border-color: #ffffff;
}

.page-sports__cta-button--primary:hover {
    background: #e0e0e0;
    color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-sports__cta-button--secondary {
    background: #007bff;
    color: #ffffff;
    border-color: #ffffff;
}

.page-sports__cta-button--secondary:hover {
    background: #0056b3;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General button styles */
.page-sports__btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-sports__btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-sports__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: #ffffff;
    color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #007bff;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-sports__btn-secondary:hover {
    background: #f0f0f0;
    color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Introduction Section */
.page-sports__introduction-section {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-sports__introduction-section p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: left;
    color: #444444;
}

.page-sports__introduction-section p a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.page-sports__introduction-section p a:hover {
    text-decoration: underline;
}

/* Sports Types Section */
.page-sports__sports-types-section {
    background-color: #f8f9fa;
    padding-top: 80px;
    padding-bottom: 80px;
}

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

.page-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;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333333;
}

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

.page-sports__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: cover;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-sports__card-title {
    font-size: 24px;
    color: #007bff;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-sports__card-text {
    font-size: 16px;
    color: #555555;
    text-align: left;
}

/* Advantages Section */
.page-sports__advantages-section {
    background-color: #007bff; /* Dark background */
    color: #ffffff; /* White text */
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-sports__advantages-section .page-sports__section-title {
    color: #ffffff;
}

.page-sports__advantages-section .page-sports__section-description {
    color: #f0f0f0;
}

.page-sports__advantages-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: left;
}

.page-sports__advantages-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-sports__advantages-item h3 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 600;
}

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

.page-sports__advantages-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    object-fit: cover;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

/* Guide Section */
.page-sports__guide-section {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

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

.page-sports__step-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-sports__step-item h3 {
    font-size: 22px;
    color: #007bff;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-sports__step-item p {
    font-size: 16px;
    color: #555555;
    margin-bottom: 15px;
}

.page-sports__step-item p a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.page-sports__step-item p a:hover {
    text-decoration: underline;
}

/* Promotions Section */
.page-sports__promotions-section {
    background-color: #f0f7ff; /* Lighter shade of primary color */
    padding-top: 80px;
    padding-bottom: 80px;
}

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

.page-sports__card--promotion {
    background: #ffffff;
    padding: 20px;
    color: #333333;
}

.page-sports__card--promotion .page-sports__card-title {
    color: #28a745; /* Use secondary color for promotion titles */
}

.page-sports__cta-container {
    margin-top: 50px;
}

/* Support and Security Section */
.page-sports__support-security-section {
    background-color: #007bff; /* Dark background */
    color: #ffffff; /* White text */
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-sports__support-security-section .page-sports__section-title {
    color: #ffffff;
}

.page-sports__support-security-section .page-sports__section-description {
    color: #f0f0f0;
}

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

.page-sports__feature-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-sports__feature-item h3 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 600;
}

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

.page-sports__feature-item p a {
    color: #28a745; /* Secondary color for links in dark section */
    text-decoration: none;
    font-weight: bold;
}

.page-sports__feature-item p a:hover {
    text-decoration: underline;
}

.page-sports__feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

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

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

/* 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 và đủ lớn max-height để đảm bảo có thể 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 để 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 dáng */
.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;
}

/* Tiêu đề câu hỏi */
.page-sports__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp chuột */
    color: #333333; /* Đảm bảo độ tương phản */
}

/* Biểu tượng chuyển đổi */
.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 chặn biểu tượng chặn sự kiện nhấp chuột */
    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); /* Xoay để hiển thị dấu trừ */
}

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

@media (max-width: 768px) {
    .page-sports__container {
        padding: 0 15px; /* Thêm padding vào container trên di động */
    }

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

    /* Mobile Hero Section */
    .page-sports__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Padding-top cụ thể cho di động */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-sports__hero-image img {
        border-radius: 4px;
    }

    .page-sports__hero-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .page-sports__hero-description {
        font-size: 16px;
        line-height: 1.5;
    }

    .page-sports__hero-cta-buttons {
        flex-direction: column; /* Xếp chồng các nút theo chiều dọc */
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 15px; /* Thêm padding vào vùng chứa nút */
    }

    .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__section-title {
        font-size: 28px;
    }

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

    .page-sports__grid {
        grid-template-columns: 1fr; /* Một cột cho thẻ */
        gap: 20px;
    }
    
    .page-sports__card {
        padding: 20px;
    }

    .page-sports__card-image {
        min-width: unset; /* Cho phép hình ảnh nhỏ hơn trong thẻ */
        min-height: unset;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-sports__advantages-list,
    .page-sports__steps,
    .page-sports__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .page-sports__advantages-image,
    .page-sports__feature-image {
        min-width: unset; /* Cho phép hình ảnh nhỏ hơn */
        min-height: unset;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

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

    /* Đảm bảo tất cả hình ảnh và vùng chứa thích ứng với di động */
    .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-container,
    .page-sports__hero-image,
    .page-sports__hero-content,
    .page-sports__cta-container,
    .page-sports__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Ngăn chặn cuộn ngang */
    }
}

/* Đảm bảo hình ảnh vùng nội dung không quá nhỏ */
.page-sports__card-image,
.page-sports__advantages-image,
.page-sports__feature-image {
  min-width: 200px;
  min-height: 200px;
}
/* Đối với di động, cho phép hình ảnh thu nhỏ, nhưng đảm bảo vùng nội dung tổng thể không gây tràn */
@media (max-width: 768px) {
    .page-sports__card-image,
    .page-sports__advantages-image,
    .page-sports__feature-image {
        min-width: unset; /* Xóa min-width cho di động để cho phép tỷ lệ phù hợp */
        min-height: unset; /* Xóa min-height cho di động để cho phép tỷ lệ phù hợp */
    }
}