/* Custom Team Section Styles */

.team-item {
    height: 100%;
    /* Ensure cards are full height of their column */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* rounded corners for the whole card */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.team-item .top {
    position: relative;
    overflow: hidden;
    /* Ensure image respects border radius if needed, though usually applied to item */
    height: 350px;
    /* Fixed height for uniformity */
    width: 100%;
}

.team-item .top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Key rule: crops image to fill container without distortion */
    object-position: top center;
    /* Focus on faces usually at the top */
    transition: all 0.5s;
}

.team-item:hover .top img {
    transform: scale(1.1);
}

.team-item .bottom {
    flex-grow: 1;
    /* Push content to fill space if needed */
    padding: 25px 20px;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center text vertically in the bottom area */
}

.team-item .bottom h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 700;
}

.team-item .bottom span {
    color: #23b187;
    /* Theme color */
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* Ensure responsive behavior */
@media (max-width: 767px) {
    .team-item .top {
        height: 400px;
        /* Taller on mobile if needed, or keep standard */
    }
}