.teams-container {
    display: grid;
    gap: 10px;
    padding: 5px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
}

.team-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0px 0px 0px 0px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background: transparent;
    box-sizing: border-box;
}

.team-card h3 {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-accent-ice);
    color: var(--color-text-secondary);
    margin-top: 0px;
    margin-bottom: 10px;
    white-space: normal;
    width: 100%;
    word-break: break-word;
}

.team-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* spinge lista in alto e immagine in basso */
    align-items: center;
    width: 100%;
}

.team-players {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
    flex-grow: 0;
}

.team-players li {
    padding: 3px 0;
}

.team-players li:last-child {
    border-bottom: none;
}

.team-image-link {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    align-self: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.team-photo {
    width: 60%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    margin-top: 10px;
    margin-bottom: 10px;
}

.team-photo:hover {
    transform: scale(1.03);
}

/* Mobile */
@media (max-width: 768px) {
    .teams-container {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .teams-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}
