.team{
    margin: 0 auto;
    width: 90%;
    max-width: 1300px;
    display: flex;
    flex-direction: column;
    align-content: center;
}

.grid-container {
    margin: 30px auto 0 auto;
    display: grid;
    width: 95%;
    max-width: 1250px;
    gap: clamp(20px, 4vw, 40px);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.team-card-purple, .team-card-green {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: clamp(225px, 30vw, 270px);
    height: clamp(325px, 45vw, 370px);
    margin: 0 auto;
}

.team-card-purple p, .team-card-green p{
    width: clamp(160px, 25vw, 180px);
    line-height: 1.5;
    margin: 5px 0 8px 0;
    font-size: clamp(12px, 2vw, 16px);
    text-align: center;
}

.team-img{
    border-radius: 15px;
    width: clamp(135px, 20vw, 162px);
    height: clamp(135px, 20vw, 162px);
    background-position: center;
    background-size: cover;
}

.team-card-purple {
    background-image: url("../img/purple-border.03c755b63df7.png");
}

.team-card-green {
    background-image: url("../img/green-border.9d9f2a3e6b6c.png");
}

.team-border-purple{
    background-image: url("../img/small-purple-border.702114e2a230.png");
}

.team-border-green{
    background-image: url("../img/small-green-border.34d6e70abd89.png");
}

.team-border-purple, .team-border-green{
    width: clamp(170px, 25vw, 200px);
    height: clamp(170px, 25vw, 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

@media screen and (max-width: 1200px) {
    .grid-container{
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
    }

    .team-card-purple, .team-card-green {
        width: clamp(220px, 28vw, 260px);
        height: clamp(310px, 42vw, 360px);
    }
}

@media screen and (max-width: 1024px) {
    .grid-container{
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
    }

    .team-card-purple, .team-card-green {
        width: clamp(240px, 40vw, 270px);
        height: clamp(330px, 50vw, 370px);
    }

    .team-border-purple, .team-border-green {
        width: clamp(160px, 22vw, 200px);
        height: clamp(160px, 22vw, 200px);
    }

    .team-img {
        width: clamp(130px, 18vw, 162px);
        height: clamp(130px, 18vw, 162px);
    }
}

@media screen and (max-width: 768px) {
    .grid-container{
        grid-template-columns: repeat(2, 1fr);
        max-width: 550px;
        gap: 20px;
    }

    .team-card-purple, .team-card-green {
        width: clamp(200px, 45vw, 250px);
        height: clamp(290px, 55vw, 350px);
    }

    .team-card-purple p, .team-card-green p{
        width: clamp(140px, 30vw, 170px);
        font-size: 13px;
    }

    .team-border-purple, .team-border-green {
        width: clamp(140px, 25vw, 180px);
        height: clamp(140px, 25vw, 180px);
    }

    .team-img {
        width: clamp(115px, 20vw, 145px);
        height: clamp(115px, 20vw, 145px);
    }
}

@media screen and (max-width: 550px) {
    .grid-container {
        grid-template-columns: 1fr;
        max-width: 280px;
        gap: 25px;
    }

    .team-card-purple, .team-card-green {
        width: 260px;
        height: 350px;
    }

    .team-card-purple p, .team-card-green p{
        width: 170px;
        font-size: 14px;
    }

    .team-border-purple, .team-border-green {
        width: 180px;
        height: 180px;
    }

    .team-img {
        width: 145px;
        height: 145px;
    }
}

@media screen and (max-width: 320px) {
    .grid-container {
        max-width: 240px;
        gap: 20px;
    }

    .team-card-purple, .team-card-green {
        width: 225px;
        height: 325px;
    }

    .team-border-purple, .team-border-green {
        width: 170px;
        height: 170px;
    }

    .team-card-purple p, .team-card-green p{
        width: 160px;
        font-size: 12px;
    }

    .team-img{
        width: 135px;
        height: 135px;
    }
}