/* Main Squad Section - Restore Stadium Background */
.squad-section {
    padding: 60px 0;
    background:
        linear-gradient(135deg, rgba(230, 30, 36, 0.45) 0%, rgba(183, 28, 28, 0.5) 100%),
        url('../../images/stadium_background.webp?v=highres') center/cover no-repeat;
    background-attachment: fixed;
}

.filter-section {
    padding: 100px 0 60px 0;
    text-align: center;
}

.filter-wrapper h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.filter-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 30px;
    border: 2px solid var(--primary-red);
    background: transparent;
    color: var(--primary-red);
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 5px 15px rgba(230, 30, 36, 0.4);
}

/* Squad Carousel (Only shown in 'All') */
.squad-carousel-container {
    padding: 40px 0;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    position: relative;
}

.squad-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.squad-slide.active {
    opacity: 1;
    z-index: 2;
}

.squad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Squad View Button */
.squad-view-overlay {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.view-squad-btn {
    display: inline-block;
    padding: 15px 35px;
    background: rgba(230, 30, 36, 0.9);
    color: white;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.view-squad-btn:hover {
    background: var(--primary-red);
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(230, 30, 36, 0.5);
}

/* Player Grid */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 40px;
}

.player-card-grid {
    text-decoration: none;
    display: block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-card-grid:hover {
    transform: translateY(-10px);
}

.card-inner {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid #eee;
}

.player-image {
    height: 380px;
    background-color: #000;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.backdrop-blur {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.player-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    padding: 10px;
    transition: transform 0.5s ease;
}

.player-card-grid:hover img {
    transform: scale(1.05);
}

.jersey-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-red);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(230, 30, 36, 0.3);
    z-index: 10;
}

.player-name-plate {
    padding: 25px 20px;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
}

.player-name-plate h4 {
    color: var(--primary-red);
    font-size: 22px;
    margin-bottom: 5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-profile-btn-grid {
    display: inline-block;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.player-card-grid:hover .view-profile-btn-grid {
    color: var(--primary-red);
    transform: translateX(5px);
}

/* Animations for filtering */
.player-card-grid.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-section {
        padding: 60px 0 30px 0;
    }

    .squad-carousel-container {
        height: 350px;
        margin-bottom: 40px;
    }

    .player-image {
        height: 320px;
    }

    .player-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .player-name-plate h4 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .squad-carousel-container {
        height: 250px;
    }

    .player-image {
        height: 280px;
    }

    .player-grid {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
}