/* Custom styles for team member cards */

/* Add spacing between rows */
.tp-team-area .row > [class*="col-"] {
    margin-bottom: 30px;
}

/* Ensure uniform card height */
.tp-team-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px; /* Ensures minimum height for uniformity */
    margin-bottom: 0; /* Remove default margin since we're handling it on the column */
}

/* Improved image display - rectangular with rounded corners instead of circle */
.tp-team-thumb {
    border-radius: 12px !important;
    overflow: hidden;
    display: block !important;
    width: 100%;
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio - creates a square container */
}

.tp-team-thumb img {
    border-radius: 12px !important;
    width: 100% !important;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    object-position: center top; /* Position image to show faces better */
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.6s ease;
}

/* Keep hover effect smooth */
.tp-team-item:hover .tp-team-thumb img {
    transform: scale(1.05); /* Slightly less aggressive zoom */
}

/* Ensure content area takes remaining space */
.tp-team-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
}

/* Ensure text content doesn't overflow */
.tp-team-content p {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limits description to 3 lines */
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

/* Make title sizing consistent */
.tp-team-title {
    min-height: 56px; /* Ensures titles align even if different lengths */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Consistent spacing for role/position labels */
.tp-team-content span {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media only screen and (max-width: 767px) {
    .tp-team-item {
        min-height: 380px;
    }

    .tp-team-title {
        min-height: 48px;
        font-size: 18px !important;
    }
}

@media only screen and (max-width: 575px) {
    .tp-team-item {
        min-height: 360px;
    }
}
