/* 
   Responsive Team Cards Unification
   Overrides broken/fixed styles in style.css
*/

.team-card {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 30px !important;
    margin-block: 2rem !important;
    width: 100% !important;
    align-items: stretch !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    /* Force grid behavior */
}

.team-card-box {
    width: 100% !important;
    min-height: 321px !important;
    background: #fff !important;
    border-top-right-radius: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s ease-out !important;
    text-decoration: none !important;
}

.team-card-box:hover {
    transform: translateY(-5px) scale(1.005) translateZ(0) !important;
    box-shadow: 0 24px 36px rgba(0, 0, 0, 0.11),
        0 24px 46px rgba(0, 0, 0, 0.2) !important;
}

.team-card-box .overlay {
    width: 160px !important;
    position: absolute !important;
    height: 160px !important;
    border-radius: 50% !important;
    background: var(--team-bg-color, #ffd861) !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.5) !important;
    opacity: 0 !important;
    z-index: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.team-card-box:hover .overlay {
    transform: translate(-50%, -50%) scale(6) translateZ(0) !important;
    opacity: 1 !important;
    background: var(--team-bg-hover, #e6c04f) !important;
    /* Darker shade */
}

.team-card-box .circle {
    width: 170px !important;
    height: 170px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 3px solid var(--team-bg-color, #ffd861) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1 !important;
    transition: all 0.3s ease-out !important;
}

.team-card-box:hover .circle {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: var(--team-bg-hover, #e6c04f) !important;
}

.team-card-box .circle:after {
    content: "" !important;
    width: 154px !important;
    height: 154px !important;
    display: block !important;
    position: absolute !important;
    background: var(--team-bg-color, #ffd861) !important;
    border-radius: 50% !important;
    top: 5px !important;
    left: 5px !important;
    transition: opacity 0.3s ease-out !important;
}

.team-card-box:hover .circle:after {
    background: rgba(255, 255, 255, 0.2) !important;
}

.team-card-box .circle img {
    width: 110px !important;
    height: 110px !important;
    object-fit: contain !important;
    z-index: 10 !important;
    transform: translateZ(0) !important;
    position: relative !important;
}

.team-card-box p {
    font-size: 17px !important;
    color: #4C5656 !important;
    margin-top: 30px !important;
    z-index: 10 !important;
    transition: all 0.3s ease-out !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0 15px !important;
}

.team-card-box:hover p {
    color: #fff !important;
}

/* Mobile Menu Fixes */
.st-mob-menu {
    z-index: 999999 !important;
    /* Even higher to ensure it tops everything */
    background: #22126B !important;
    /* Solid background color mandatory */
    opacity: 1 !important;
    visibility: visible;
}

.st-mob-menu.open {
    background: #22126B !important;
    visibility: visible !important;
}

.menu-open .st-mob-menu {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5) !important;
}

.st-mob-menu .st-mob-menu-body {
    background-color: #22126B !important;
}

/* Responsive Overrides */
@media screen and (max-width: 768px) {
    .search-box-container {
        justify-content: center !important;
        margin-bottom: 30px !important;
    }

    .search-box-container>div {
        width: 100% !important;
        max-width: 400px !important;
    }

    .team-card {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 5px !important;
    }

    .team-card-box {
        min-height: 200px !important;
        height: auto !important;
        padding: 25px 10px !important;
        border-radius: 12px !important;
    }

    .team-card-box .circle {
        width: 110px !important;
        height: 110px !important;
        border-width: 2px !important;
    }

    .team-card-box .circle:after {
        width: 100px !important;
        height: 100px !important;
        top: 3px !important;
        left: 3px !important;
    }

    .team-card-box .circle img {
        width: 70px !important;
        height: 70px !important;
    }

    .team-card-box p {
        font-size: 14px !important;
        margin-top: 15px !important;
        letter-spacing: 0.5px !important;
    }
}

@media screen and (max-width: 375px) {
    .team-card {
        gap: 10px !important;
    }

    .team-card-box {
        min-height: 200px !important;
    }
}

/* Player Link Styles */
.fifa-card-bottom .name a:hover {
    color: var(--fifa-gold3) !important;
    text-decoration: underline !important;
}

.fx-ply-name a {
    color: #22126B !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.fx-ply-name a:hover {
    color: #ef4123 !important;
    text-decoration: underline !important;
}

.fixtureSquad-item {
    transition: transform 0.3s ease !important;
}

.fixtureSquad-item:hover {
    transform: translateY(-3px) !important;
}