.team-summary-card h3 {
    color: var(--primary-color);
    font-family: "Montserrat Alternates", sans-serif
}

.team-name {
    grid-column: 3
}

.team-summary-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1000px;
    margin-top: 2rem;
    margin-bottom: 3rem;
    padding: 0 20px
}

.team-summary-card {
    background: #000000bf;
    border: 1px solid #cfae704d;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 280px;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center
}

.team-summary-card-wide {
    width: 420px
}

.team-summary-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px #00000080 0 0 15px #cfae7033
}

.team-card-icon {
    display: flex;
    margin-bottom: 1.5rem;
    justify-content: center
}

.team-card-icon {
    width: 80px;
    height: 80px;
    align-items: center
}

.team-card-icon img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 5px #cfae7080)
}

.team-summary-card h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
    text-transform: uppercase
}

.team-summary-card p {
    color: var(--text-color);
    opacity: .7;
    font-size: .9rem;
    line-height: 1.4
}

.team-logo-helmet {
    width: 100px;
    /* Dimensione dei caschi */
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.team-item img:hover {
    filter: drop-shadow(0 0 15px var(--primary-color))
}

.team-menu {
    position: relative;
    width: min(85vmin, 420px);
    height: min(85vmin, 420px);
    overflow: visible;
    margin: 0 auto
}

.team-center-name,
.team-item {
    position: absolute;
    transform: translate(-50%, -50%)
}

.team-center-name {
    top: 50%;
    left: 50%;
    width: 60%;
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    pointer-events: none;
    z-index: 5;
    text-shadow: 0 0 12px #000000d9;
    transition: opacity .3s ease
}

.team-item {
    width: 70px;
    height: 70px
}

.team-item a {
    display: block;
    width: 100%;
    height: 100%
}

.team-item img {
    height: 100%;
    transition: transform var(--transition-fast), filter var(--transition-fast);
    cursor: pointer
}

.team-item img:hover {
    transform: scale(1.15)
}

.team-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem
}

.team-records-grid {
    width: 100%;
    margin-top: 1rem
}

.team-grid-header,
.team-grid-row {
    display: grid;
    grid-template-columns: 70px 3fr 80px;
    align-items: center;
    gap: 12px
}

.team-grid-header {
    color: var(--primary-color);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #cfae7033;
    padding-bottom: 6px;
    margin-bottom: 10px
}

.team-grid-row {
    min-height: 32px;
    padding: 4px 0
}

.team-bw-score,
.team-bw-week {
    text-align: center;
    white-space: nowrap
}

.team-bw-vs {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word
}

.team-grid-coaches {
    grid-template-columns: 1fr 100px !important
}

.team-albo-pos {
    color: var(--primary-color);
    font-weight: 700;
    text-align: center
}

.team-coach-period {
    color: var(--primary-color);
    font-weight: 700;
    text-align: center
}

.team-coach-franchise {
    color: var(--primary-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 400;
    opacity: 0.8;
}

.team-albo-icons {
    display: flex;
    justify-content: center;
    gap: 5px
}

.team-albo-icons img {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 5px #cfae7099)
}

.team-albo-season {
    text-align: center
}

.team-grid-row {
    border-bottom: 1px solid #ffffff0d;
    transition: background .2s ease
}

.team-grid-row:hover {
    background: #cfae700d
}

.team-stats-summary-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
    padding: 0 20px;
    animation: kickoffZoom 1s ease-out both
}


.team-stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #000000a6;
    border: 1px solid #cfae704d;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-soft);
    gap: 10px
}


.team-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid #cfae7026
}

.team-stat-item:last-child {
    border-right: none
}

.team-stat-item img {
    width: 32px;
    height: 32px;
    margin-bottom: .8rem;
    filter: drop-shadow(0 0 8px #cfae7066)
}



.team-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px
}

.team-stat-label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .6
}

.team-grid-albo {
    grid-template-columns: 1fr 1fr 1fr !important
}

.team-match-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform .2s ease
}

.team-match-link:hover {
    cursor: pointer
}

@media (max-width:768px) {
    .team-summary-grid {
        flex-direction: column;
        align-items: center
    }    

    .team-summary-card {
        width: 100%;
        max-width: 320px
    }

    .team-summary-card-wide {
        width: 100%;
        max-width: 480px
    }

    .team-stats-summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 10px
    }

    .team-stat-item:nth-child(3) {
        border-right: none
    }
}

@media (max-width:480px) {
    .team-summary-grid {
        margin-top: 3.5rem;
        gap: 1.5rem
    }

    .team-logo-helmet {
        width: 60px
    }

    .team-item {
        width: 55px;
        height: 55px;
        display: flex;
        justify-content: center;
        align-items: center
    }

    .team-stats-summary-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .team-stat-item:nth-child(even) {
        border-right: none
    }

    .team-stat-value {
        font-size: 1.1rem
    }

    /* Riduce il gap e il padding dell'header */
    .team-header {
        gap: 1rem;
        padding: 1rem 0.5rem;
        justify-content: space-evenly;
    }

    /* Diminuisce la dimensione del logo e del casco */
    .team-logo-helmet {
        width: 60px;
        /* Ridotto da 100px */
        flex-shrink: 0;
    }
}

@media (max-width:360px) {
    .team-menu {
        transform: scale(.68)
    }
}

/* === SLIDESHOW TROFEI === */
.trophies-slideshow-container {
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
    padding: 0 20px;
}

/* Pulsante per mostrare la galleria */
.gallery-toggle-btn {
    display: block;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    background: rgba(207, 174, 112, 0.2);
    border: 1px solid rgba(207, 174, 112, 0.5);
    border-radius: var(--radius-lg);
    color: var(--primary-color);
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.gallery-toggle-btn:hover {
    background: rgba(207, 174, 112, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(207, 174, 112, 0.4);
    transform: translateY(-2px);
}

.trophies-slideshow {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(207, 174, 112, 0.3);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    display: none; /* Inizialmente nascosta */
    margin-top: 1.5rem;
}

.trophies-slideshow.visible {
    display: block;
}

.trophy-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.8s ease-in-out;
}

.trophy-slide.active {
    display: flex;
}

.trophy-slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(207, 174, 112, 0.4));
}

/* Pulsanti navigazione */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(207, 174, 112, 0.2);
    border: 1px solid rgba(207, 174, 112, 0.5);
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: bold;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0 0 8px 0; /* Aggiunto padding-bottom per spostare verso l'alto */
    z-index: 10;
}

.slide-nav:hover {
    background: rgba(207, 174, 112, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(207, 174, 112, 0.5);
}

.slide-nav.prev {
    left: 15px;
}

.slide-nav.next {
    right: 15px;
}

/* Dots di navigazione */
.slide-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(207, 174, 112, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(207, 174, 112, 0.6);
}

.dot.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(207, 174, 112, 0.8);
}

/* Animazione fade */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .trophies-slideshow {
        height: 300px;
    }
    
    .slide-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .slide-nav.prev {
        left: 10px;
    }
    
    .slide-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .trophies-slideshow-container {
        margin: 1.5rem auto;
    }
    
    .trophies-slideshow {
        height: 250px;
    }
    
    .slide-nav {
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}
