.sts-team-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.sts-team-member {
    flex: 1 1 calc(33.333% - 40px);
    max-width: calc(33.333% - 40px);
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
    min-width: 250px;
}

.sts-team-member:hover {
    transform: scale(1.05);
    z-index: 2;
}

.sts-member-photo {
    width: 100%;
    padding-top: 100%;
    background-size: cover;
    background-position: center center;
    position: relative;
}

/* Center overlay text vertically and horizontally */
.sts-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    width: 90%;
    border-radius: 8px;
}

/* Show overlay on hover */
.sts-team-member:hover .sts-overlay {
    opacity: 1;
}

/* Responsive font sizes */
.sts-overlay h4 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
}

.sts-overlay strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.sts-overlay p {
    font-size: 1rem;
    margin: 0;
}

/* Medium devices (tablets) */
@media (max-width: 768px) {
    .sts-team-member {
        flex: 1 1 calc(50% - 30px);
        max-width: calc(50% - 30px);
        min-width: auto;
    }
    .sts-overlay h4 {
        font-size: 1.3rem;
    }
    .sts-overlay strong {
        font-size: 1.1rem;
    }
    .sts-overlay p {
        font-size: 0.9rem;
    }
}

/* Small devices (mobile) */
@media (max-width: 480px) {
    .sts-team-member {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        min-width: auto;
    }
    .sts-overlay {
        width: 95%;
        padding: 12px;
    }
    .sts-overlay h4 {
        font-size: 1.1rem;
    }
    .sts-overlay strong {
        font-size: 1rem;
    }
    .sts-overlay p {
        font-size: 0.85rem;
    }
}
