/*=============================
	Enhanced Team Cards CSS
===============================*/

/* Team members container */
.team-members .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.team-members .col-lg-3,
.team-members .col-md-6,
.team-members .col-sm-6,
.team-members .col-xs-12 {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 30px;
}

.team-card {
    position: relative;
    width: 100%;
    max-width: 280px;
    min-width: 240px;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 25px rgba(88, 11, 34, 0.15);
    margin: 0 auto;
    flex: 1;
}

/* LinkedIn Icon */
.team-card-linkedin {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 119, 181, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.team-card-linkedin:hover {
    background: rgba(0, 119, 181, 1);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.4);
    text-decoration: none;
}

.team-card-linkedin i {
    color: white;
    font-size: 18px;
}

.team-card:hover .team-card-linkedin {
    opacity: 1;
    transform: translateY(0);
}

/* Desktop hover effects */
@media (min-width: 992px) {
    .team-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(88, 11, 34, 0.25);
    }
}

/* Background Layer */
.team-card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.6s ease;
    z-index: 1;
}

/* Person Layer */
.team-card-person {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.6s ease;
    z-index: 2;
}

/* Hover Effects */
.team-card:hover .team-card-background {
    filter: blur(4px) brightness(0.8);
    transform: scale(1.05);
}

.team-card:hover .team-card-person {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Name Overlay - Always Visible */
.team-card-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 50px 20px 18px;
    z-index: 3;
    transition: all 0.4s ease;
}

/* Content Overlay - Full Info on Hover */
.team-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(42, 37, 44, 0.95));
    color: white;
    padding: 40px 20px 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 4;
}

.team-card:hover .team-card-content {
    transform: translateY(0);
    opacity: 1;
}

.team-card:hover .team-card-name-overlay {
    opacity: 0;
    transform: translateY(-10px);
}

.team-card-name-overlay .team-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.team-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #ffffff;
}

.team-card-role {
    font-size: 0.9rem;
    color: #E04D79;
    margin-bottom: 12px;
    font-weight: 500;
}

.team-card-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Background Image Definitions */
.team-card-background-hernando {
    background-image: url('../images/team-members/backgrounds/hernando-bg.png');
    background-color: #E04D79;
}

.team-card-background-roberto {
    background-image: url('../images/team-members/backgrounds/roberto-bg.png');
    background-color: #BE375F;
}

.team-card-background-ricardo {
    background-image: url('../images/team-members/backgrounds/ricardo-bg.png');
    background-color: #9C2548;
}

.team-card-background-jose {
    background-image: url('../images/team-members/backgrounds/jose-bg.png');
    background-color: #7A1A3A;
}

/* Person Image Definitions */
.team-card-person-hernando {
    background-image: url('../images/team-members/persons/hernando-person.png');
}

.team-card-person-roberto {
    background-image: url('../images/team-members/persons/roberto-person.png');
}

.team-card-person-ricardo {
    background-image: url('../images/team-members/persons/ricardo-person.png');
}

.team-card-person-jose {
    background-image: url('../images/team-members/persons/jose-person.png');
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-card {
        width: 260px;
        height: 320px;
        margin-bottom: 30px;
    }
    
    .team-card-name-overlay {
        padding: 40px 15px 15px;
    }
    
    .team-card-content {
        padding: 30px 15px 15px;
    }
    
    .team-card-name {
        font-size: 1.1rem;
    }
    
    .team-card-name-overlay .team-card-name {
        font-size: 1.1rem;
    }
    
    .team-card-role {
        font-size: 0.85rem;
    }
    
    .team-card-description {
        font-size: 0.75rem;
    }
}

/* Responsive Design */
@media (max-width: 1199px) {
    .team-card {
        max-width: 260px;
        height: 330px;
    }
}

@media (max-width: 991px) {
    .team-members .col-lg-3,
    .team-members .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .team-card {
        max-width: 280px;
        height: 350px;
    }
    
    /* Show LinkedIn icon immediately on tablet/mobile */
    .team-card-linkedin {
        opacity: 1;
        transform: translateY(0);
        background: rgba(0, 119, 181, 0.8);
    }
    
    .team-card-linkedin:hover {
        background: rgba(0, 119, 181, 1);
        transform: scale(1.05);
    }
    
    /* Remove hover effects on tablet/mobile */
    .team-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(88, 11, 34, 0.15);
    }
    
    .team-card:hover .team-card-linkedin {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .team-members .col-lg-3,
    .team-members .col-md-6,
    .team-members .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 25px;
    }
    
    .team-card {
        max-width: 320px;
        height: 360px;
    }
    
    .team-card-name-overlay {
        padding: 40px 15px 15px;
    }
    
    .team-card-content {
        padding: 30px 15px 15px;
    }
    
    .team-card-name {
        font-size: 1.1rem;
    }
    
    .team-card-name-overlay .team-card-name {
        font-size: 1.1rem;
    }
    
    .team-card-role {
        font-size: 0.85rem;
    }
    
    .team-card-description {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .team-card {
        max-width: 300px;
        height: 340px;
    }
    
    .team-card-name-overlay {
        padding: 35px 12px 12px;
    }
    
    .team-card-name-overlay .team-card-name {
        font-size: 1rem;
    }
    
    .team-card-linkedin {
        width: 35px;
        height: 35px;
        top: 12px;
        right: 12px;
    }
    
    .team-card-linkedin i {
        font-size: 16px;
    }
}

/* Loading State for Images */
.team-card-background,
.team-card-person {
    background-color: transparent;
}