/* Mentor Cards Styling - Consistent sizing regardless of image size */

.team-area-2 .team-card2 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-area-2 .team-card2:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.team-area-2 .img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    height: 280px; /* Fixed height for image container */
    flex-shrink: 0; /* Prevent shrinking */
}

.team-area-2 .team-img {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.team-area-2 .team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.team-area-2 .team-card2:hover .team-img img {
    transform: scale(1.05);
}

.team-area-2 .team-card-content {
    padding: 20px;
    text-align: center;
    flex-grow: 1; /* Take remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px; /* Minimum height for content area */
}

.team-area-2 .box-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
    line-height: 1.3;
    min-height: 48px; /* Fixed minimum height for titles */
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-area-2 .box-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-area-2 .box-title a:hover {
    color: var(--theme-color, #1a685b);
}

.team-area-2 .team-desig {
    font-size: 14px;
    color: var(--theme-color, #1a685b);
    font-weight: 500;
    margin-bottom: 8px;
    min-height: 20px; /* Fixed height for consistency */
    display: block;
}

.team-area-2 .mentor-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-top: 8px;
    text-align: center;
    max-height: 60px; /* Fixed max height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Social Media Hover Effects */
.team-area-2 .team-social-hover {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.team-area-2 .team-social-hover_btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color, #1a685b);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.team-area-2 .team-social-hover_btn:hover {
    background: var(--theme-color, #1a685b);
    color: #fff;
    transform: rotate(45deg);
}

.team-area-2 .th-social {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 45px;
}

.team-area-2 .team-social-hover:hover .th-social {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.team-area-2 .th-social a {
    display: block;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}

.team-area-2 .th-social a:hover {
    background: var(--theme-color, #1a685b);
    color: #fff;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .team-area-2 .img-wrap {
        height: 250px;
    }
    
    .team-area-2 .team-card-content {
        padding: 15px;
        min-height: 100px;
    }
    
    .team-area-2 .box-title {
        font-size: 16px;
        min-height: 40px;
    }
}

@media (max-width: 576px) {
    .team-area-2 .img-wrap {
        height: 220px;
    }
    
    .team-area-2 .team-card-content {
        padding: 12px;
        min-height: 90px;
    }
    
    .team-area-2 .box-title {
        font-size: 15px;
        min-height: 36px;
    }
    
    .team-area-2 .mentor-description {
        font-size: 12px;
        max-height: 48px;
        -webkit-line-clamp: 2;
    }
}

/* Ensure equal height for all cards in the slider */
.team-slider2 .swiper-slide {
    height: auto;
    display: flex;
}

.team-slider2 .swiper-slide .team-card2 {
    width: 100%;
}

/* Loading placeholder for images */
.team-area-2 .team-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-area-2 .team-img img[src=""] + ::before,
.team-area-2 .team-img img:not([src])::before {
    opacity: 1;
}

/* Fallback styling for missing images */
.team-area-2 .team-img img[onerror] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
