﻿.sport-card {
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

    .sport-card:hover {
        transform: translateY(-10px);
    }

.sport-image-container {
    /*    position: relative;
    height: 220px;
    overflow: hidden;*/
    position: relative;
    height: clamp(220px, 25vw, 380px);
    overflow: hidden;
}

.sport-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sport-image-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    pointer-events: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}

.sport-card:hover .overlay {
    background: rgba(0,0,0,0.3);
}

.sport-name {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    font-size: 15px;
    text-shadow: 0px 2px 5px rgba(0,0,0,0.5);
    z-index: 2;
    text-transform: uppercase;
}

.sport-btn {
    width: 100%;
    background-color: #f27423; /* orange */
    color: #fff;
    border-radius: 0;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}

.modal-content-sport {
    /*border-radius: 12px; keep rounded corners 
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    outline: 0;*/
    /*    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;*/
    border-radius: 0;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh; /* full screen height */
    min-height: 100dvh;
    border: none;
}

.modal-dialog-sport {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    height: 100dvh; /* dynamic viewport height */
    min-height: 100dvh;
}

.modal-body-sport {
    /*overflow-y: auto;
    padding: 2rem;*/
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem;
    display: flex;
    justify-content: center; /* horizontal centering */
    align-items: center;
}

.sport-container {
    width: 100%;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .col-12, .col-sm-6, .col-md-4, .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .sport-card {
        width: 100%;
        margin-bottom: 1rem;
    }
}
/* Tablet / iPad layout: centered and 60% width */
@media (min-width: 768px) and (max-width: 1199px) {
    .modal-body-sport {
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem;
    }

    .sport-card {
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-header {
        justify-content: center; /* center horizontally */
        text-align: center;
        padding: 1rem; /* remove large side padding */
    }

    .modal-title {
        font-size: 40px;
        font-weight: bold;
        margin-top: 0;
    }
}


.modal-header {
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.2rem clamp(1rem, 3vw, 2rem) clamp(1rem, 5vw, 3rem) 0 clamp(1rem, 5vw, 2rem);
}

.modal-title {
    margin: 0;
    margin-top: -0.5rem;
    font-size: 40px;
    font-weight: bold;
}

@media (max-width: 767px) {
    .modal-body-sport {
        align-items: flex-start; /* content starts from the top */
        justify-content: flex-start;
        padding: 1rem; /* smaller padding on small screens */
    }

    .modal-header {
        justify-content: center; /* center horizontally */
        text-align: center;
        padding: 1rem; /* remove large side padding */
    }

    .modal-title {
        font-size: 28px !important;
        margin-top: 0;
    }

    .sport-container {
        max-width: 100%; /* use full width */
    }

    .sport-card {
        max-width: 80%; /* not full width */
        margin-left: auto;
        margin-right: auto;
    }

    .sport-name {
        font-size: 12px; /* slightly smaller text for small screens */
    }
}


.modal-body-sport::-webkit-scrollbar {
    display: none;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}
/* Tablet / iPad layout vertical view*/
@media (min-width: 767px) and (max-width: 1199px) and (orientation: portrait) {
    .modal-body-sport {
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem;
    }

    .sport-card {
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem; /* spacing between rows when stacked */
    }

    .modal-header {
        justify-content: center;
        text-align: center;
        padding: 2rem 4rem 1rem 4rem;
    }

    .modal-title {
        font-size: 40px;
        font-weight: bold;
        margin-top: -0.2rem;
    }
}
/* Mobile landscape: make cards narrower and centered */
@media (max-width: 1000px) and (orientation: landscape) {
    .modal-body-sport {
        align-items: flex-start; /* top align (not center vertically) */
        justify-content: flex-start; /* left-top flow */
        overflow-y: auto; /* enable vertical scrolling */
        padding: 1.5rem; /* maintain spacing */
    }

    .modal-header {
        justify-content: center;
        text-align: center;
        padding: 2rem 4rem 1rem 4rem;
    }

    .modal-title {
        font-size: 40px;
        font-weight: bold;
        margin-top: -0.2rem;
    }

    .sport-card {
        max-width: 50%; /* not full width */
        margin-left: auto;
        margin-right: auto;
    }
}
