/* style/sports.css */

/* Base styles for the page content */
.page-sports {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #FFFFFF; /* Default white background */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

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

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

.page-sports__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand color for titles */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-sports__section-intro {
    font-size: 1.1em;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Hero Section */
.page-sports__hero-section {
    position: relative;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* Light text */
    padding-top: calc(100px + var(--header-offset, 120px)); /* Adjust for header offset */
}

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

.page-sports__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFF00; /* Yellow for hero title */
    font-weight: bold;
    line-height: 1.2;
}

.page-sports__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #ffffff;
}

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

.page-sports__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.page-sports__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle overlay */
    filter: brightness(0.7); /* Darken image for better text contrast */
    /* No color changing filter allowed, brightness is for contrast */
}

/* Buttons */
.page-sports__btn-primary,
.page-sports__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-sports__btn-primary {
    background-color: #C30808; /* Red for primary action (Login/Register) */
    color: #FFFF00; /* Yellow for text on red button */
    border: 2px solid #C30808;
}

.page-sports__btn-primary:hover {
    background-color: #a30606;
    border-color: #a30606;
}

.page-sports__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand green for text on white button */
    border: 2px solid #017439;
}

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

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

.page-sports__card {
    background-color: #ffffff;
    color: #333333;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 450px; /* Ensure cards have similar height */
}

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

.page-sports__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.page-sports__card-text {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-sports__card-button {
    margin-top: auto; /* Push button to the bottom */
}

/* Guide List */
.page-sports__guide-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    text-align: left;
}

.page-sports__guide-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-sports__guide-step-title {
    font-size: 1.3em;
    color: #017439;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-sports__guide-step-text {
    color: #555555;
    margin-bottom: 15px;
}

/* FAQ Section */
.page-sports__faq-list {
    margin-top: 40px;
    text-align: left;
}

.page-sports__faq-item {
    background-color: #f0f0f0;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-sports__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: #017439; /* Brand color for question background */
    color: #ffffff; /* White text for question */
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.page-sports__faq-question:hover {
    background-color: #005a2d;
}

.page-sports__faq-title {
    margin: 0;
    color: #ffffff; /* Ensure title is white */
}

.page-sports__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-sports__faq-item.active .page-sports__faq-toggle {
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

.page-sports__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    background-color: #ffffff;
    color: #333333;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-sports__faq-item.active .page-sports__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 20px 25px;
}

.page-sports__faq-answer p {
    margin-bottom: 15px;
}

.page-sports__faq-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 15px;
    display: block; /* Ensure it takes full width */
}

/* Call to Action Bottom */
.page-sports__cta-bottom {
    background-color: #f0f0f0;
    padding: 80px 0;
}

.page-sports__cta-container {
    max-width: 900px;
}

.page-sports__cta-title {
    font-size: 2.2em;
    color: #017439;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-sports__cta-description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 40px;
}

.page-sports__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Color Contrast Specifics */
.page-sports__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

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

/* Ensure content area images are at least 200px */
.page-sports img {
    min-width: 200px;
    min-height: 200px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-sports__hero-title {
        font-size: 2.8em;
    }
    .page-sports__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-sports {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-sports__hero-section {
        padding: 80px 0;
        padding-top: calc(80px + var(--header-offset, 120px));
    }

    .page-sports__hero-title {
        font-size: 2.2em;
    }

    .page-sports__hero-description {
        font-size: 1em;
    }

    .page-sports__hero-cta {
        flex-direction: column;
        gap: 15px;
    }

    .page-sports__btn-primary,
    .page-sports__btn-secondary {
        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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* Stack buttons vertically on mobile */
    }

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

    .page-sports__section-title {
        font-size: 1.8em;
    }

    .page-sports__section-intro {
        margin-bottom: 20px;
    }

    .page-sports__sport-grid,
    .page-sports__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-sports__card {
        padding: 20px;
        min-height: unset; /* Allow height to adjust */
    }

    .page-sports__card-title {
        font-size: 1.3em;
    }

    .page-sports__guide-item {
        padding: 20px;
    }

    .page-sports__guide-step-title {
        font-size: 1.1em;
    }

    .page-sports__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }

    .page-sports__faq-answer {
        padding: 15px 20px;
    }

    .page-sports__cta-bottom {
        padding: 60px 0;
    }

    .page-sports__cta-title {
        font-size: 1.8em;
    }

    /* Image responsive rules for mobile */
    .page-sports img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size on mobile as well */
        min-height: 200px !important;
    }
    
    /* Video responsive rules for mobile (if any video) */
    .page-sports video,
    .page-sports__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-sports__section,
    .page-sports__card,
    .page-sports__container,
    .page-sports__video-section,
    .page-sports__video-container,
    .page-sports__video-wrapper,
    .page-sports__hero-section,
    .page-sports__popular-sports,
    .page-sports__benefits,
    .page-sports__guide,
    .page-sports__faq,
    .page-sports__cta-bottom {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent content overflow */
    }
    .page-sports__hero-section {
        padding-left: 0;
        padding-right: 0;
    }
    .page-sports__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}