/* style/sports.css */

/* Base styles for the sports page */
.page-sports {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Explicitly set for content area */
}

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

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

.page-sports__section:nth-of-type(even) {
    background-color: #f9f9f9;
}

.page-sports__section-title {
    font-size: 36px;
    color: #017439; /* Primary brand color for titles */
    margin-bottom: 30px;
    font-weight: bold;
    text-transform: uppercase;
}

.page-sports__text-block {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 900px;
    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); /* Ensure header offset */
    background: linear-gradient(135deg, #e0ffe0, #ffffff); /* Light gradient background */
}

.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 8px 16px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

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

.page-sports__hero-title {
    font-size: 48px;
    color: #017439;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.2;
}

.page-sports__hero-description {
    font-size: 20px;
    color: #333333;
    margin-bottom: 40px;
}

.page-sports__hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

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

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

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

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

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

.page-sports__cta-button--wide {
    min-width: 300px;
    background: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-sports__cta-button--wide:hover {
    background: #005a2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-sports__cta-button--final {
    background: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
    min-width: 300px;
}

.page-sports__cta-button--final:hover {
    background: #005a2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Featured Sports Cards */
.page-sports__sport-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-sports__card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 450px; /* Ensure cards have a minimum height */
}

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

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

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

.page-sports__card-description {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-sports__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-sports__btn-primary:hover {
    background: #005a2d;
}

/* Advantages Section */
.page-sports__dark-section {
    background: #017439;
    color: #ffffff; /* White text for dark background */
}

.page-sports__dark-section .page-sports__section-title {
    color: #ffffff; /* White title on dark background */
}

.page-sports__dark-section .page-sports__text-block {
    color: #e0ffe0; /* Lighter text for paragraphs on dark background */
}

.page-sports__dark-section a {
    color: #FFFF00; /* Yellow links on dark background */
    text-decoration: underline;
}

.page-sports__dark-section a:hover {
    color: #ffcc00;
}

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

.page-sports__advantage-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff; /* White text */
}

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

.page-sports__advantage-description {
    font-size: 16px;
    color: #e0ffe0;
}

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

.page-sports__step-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-sports__step-number {
    font-size: 48px;
    font-weight: bold;
    color: #017439;
    margin-bottom: 15px;
}

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

.page-sports__step-description {
    font-size: 16px;
    color: #555555;
}

.page-sports__step-description a {
    color: #017439;
    text-decoration: underline;
}

.page-sports__step-description a:hover {
    color: #005a2d;
}

.page-sports__button-group {
    margin-top: 40px;
}

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

.page-sports__promo-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 450px; /* Ensure cards have a minimum height */
}

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

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

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

.page-sports__promo-description {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

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

.page-sports__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
}

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

/* FAQ container style */
.page-sports__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.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 expanded state - 🚨 Use!important and sufficiently large max-height */
.page-sports__faq-item.active .page-sports__faq-answer {
    max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough to accommodate any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Question style */
.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;
}

/* Question title style */
.page-sports__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 tag from blocking click events */
    color: #333333;
}

/* Toggle icon */
.page-sports__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Use primary color for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click events */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
    color: #C30808; /* Change color when active */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Conclusion Section */
.page-sports__conclusion .page-sports__section-title {
    color: #017439;
}

/* Links within content */
.page-sports a {
    color: #017439;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-sports a:hover {
    color: #005a2d;
}

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

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

@media (max-width: 768px) {
    .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-title {
        font-size: 32px;
    }

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

    .page-sports__hero-cta-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px; /* Constrain button group width */
        margin: 0 auto;
    }

    .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__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__button-group {
        display: flex; /* Ensure flex behavior for column direction */
        flex-direction: column;
    }

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

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

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

    .page-sports__card,
    .page-sports__promo-card {
        padding: 20px;
        min-height: auto; /* Allow height to adjust */
    }

    .page-sports__card img,
    .page-sports__promo-card img {
        
        min-width: 200px !important; /* Enforce min width */
        min-height: 200px !important; /* Enforce min height */
        max-width: 100% !important;
        width: 100% !important;
    }

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

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

    .page-sports__step-number {
        font-size: 40px;
    }

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

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

    /* Enforce min image sizes for all images in content area */
    .page-sports img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-sports__section,
    .page-sports__card,
    .page-sports__container,
    .page-sports__promo-card,
    .page-sports__advantage-item,
    .page-sports__step-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}