..team-block {
    margin-top: 95px;
}

.team-heading {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 9vw;
    align-items: end;
    margin-bottom: 42px;
}

.team-heading h2 {
    margin: 14px 0 0;
    font: 600 clamp(2.4rem, 5vw, 5rem)/1 Manrope, sans-serif;
    letter-spacing: -.05em;
}

.team-heading p {
    margin: 0;
    color: #64686c;
    line-height: 1.65;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #c9cbc9;
    border-left: 1px solid #c9cbc9;
}

.team-card {
    background: #f3f3f1;
    border-right: 1px solid #c9cbc9;
    border-bottom: 1px solid #c9cbc9;
    transition: transform .35s ease, background .35s ease;
}

.team-card:hover {
    background: #fff;
    transform: translateY(-6px);
}

.team-photo {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #d9dad8;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.035);
}

.team-photo span {
    position: absolute;
    top: 22px;
    left: 22px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: #c75b2b;
    color: #fff;
    font: 700 .8rem Manrope, sans-serif;
}

.team-details {
    padding: 30px;
}

/* H4 line spacing and margin corrected */
.team-details h4 {
    margin: 0 0 6px;
    line-height: 1.15;
    font-size: 15px;
    font-weight: 600;
}

/* Name */
.team-details h3 {
    margin: 0 0 9px;
    font: 600 clamp(1.6rem, 2.5vw, 2.35rem)/1.1 Manrope, sans-serif;
    letter-spacing: -.035em;
}

/* H4 appearing after the name */
.team-details h3 + h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.team-designation {
    margin-top: 0;
    padding-bottom: 19px;
    border-bottom: 1px solid #c9cbc9;
    color: #c75b2b;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.team-details p {
    margin: 20px 0 0;
    color: #64686c;
    line-height: 1.65;
}

@media (max-width: 900px) {
    .team-heading {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        display: grid;
        grid-template-columns: minmax(220px, 40%) 1fr;
    }

    .team-photo {
        aspect-ratio: 1/1;
    }

    .team-details {
        align-self: center;
    }
}

@media (max-width: 600px) {
    .team-block {
        margin-top: 68px;
    }

    .team-card {
        display: block;
    }

    .team-photo {
        aspect-ratio: 4/5;
    }

    .team-details {
        padding: 26px 24px;
    }
}
