/* 
 * Modern Minimalist Team Section
 * Clean, professional and focused design
 */

.our-team {
    background: #ffffff;
    padding: 100px 0;
    position: relative;
}

.our-team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(31, 121, 113, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.our-team .container {
    position: relative;
    z-index: 2;
}

/* Mejoras para el título de la sección */
.our-team h2 {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.our-team h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #1f7971, #4CAF50);
    border-radius: 2px;
}

.our-team .line {
    display: none; /* Ocultamos la línea anterior para usar la nueva */
}

/* Material Design Cards para miembros del equipo */
.team-member {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(31, 121, 113, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    margin-bottom: 2rem;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1f7971, #4CAF50);
    z-index: 10;
    transition: all 0.3s ease;
}

.team-member:hover::before {
    background: linear-gradient(90deg, #1f7971, #2196F3);
    height: 6px;
}

.team-member:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 25px 30px -5px rgba(0, 0, 0, 0.15),
        0 10px 15px -5px rgba(0, 0, 0, 0.08);
    border-color: rgba(31, 121, 113, 0.2);
}

/* Mejoras para las imágenes del equipo */
.team-member img {
    border-radius: 20px 20px 0 0;
    transition: all 0.4s ease;
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: brightness(1) contrast(1.05);
}

.team-member:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

/* Mejoras para el overlay del equipo */
.team-overlay {
    background: linear-gradient(
        180deg, 
        transparent 0%, 
        rgba(31, 121, 113, 0.8) 60%, 
        rgba(31, 121, 113, 0.95) 100%
    );
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    border-radius: 0 0 20px 20px;
    transition: all 0.4s ease;
    transform: translateY(60%);
}

.team-member:hover .team-overlay {
    transform: translateY(0);
    background: linear-gradient(
        180deg, 
        rgba(31, 121, 113, 0.1) 0%, 
        rgba(31, 121, 113, 0.9) 40%, 
        rgba(31, 121, 113, 0.98) 100%
    );
}

/* Mejoras para la información del equipo */
.team-overlay .info h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.team-overlay .info .puesto {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Efecto Material Ripple para las cards del equipo */
.team-member {
    position: relative;
    overflow: hidden;
}

.team-member::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(31, 121, 113, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 5;
}

.team-member:active::after {
    width: 400px;
    height: 400px;
}

/* Animaciones de entrada escalonadas */
@keyframes fadeInUpTeam {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-member.wow {
    animation: fadeInUpTeam 0.8s ease-out;
}

.col-md-3:nth-child(1) .team-member {
    animation-delay: 0.1s;
}

.col-md-3:nth-child(2) .team-member {
    animation-delay: 0.2s;
}

.col-md-3:nth-child(3) .team-member {
    animation-delay: 0.3s;
}

.col-md-3:nth-child(4) .team-member {
    animation-delay: 0.4s;
}

/* Badge de especialidad (se puede agregar dinámicamente) */
.team-member .specialty-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #1f7971, #4CAF50);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 8;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.team-member:hover .specialty-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Mejoras responsivas */
@media (max-width: 768px) {
    .team-member {
        margin-bottom: 2rem;
        border-radius: 16px;
    }
    
    .team-member img {
        height: 250px;
        border-radius: 16px 16px 0 0;
    }
    
    .team-overlay {
        padding: 1.5rem 1rem 1rem;
        border-radius: 0 0 16px 16px;
        transform: translateY(50%);
    }
    
    .team-overlay .info h4 {
        font-size: 1.2rem;
    }
    
    .team-overlay .info .puesto {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .team-member {
        border-radius: 12px;
    }
    
    .team-member img {
        height: 220px;
        border-radius: 12px 12px 0 0;
    }
    
    .team-overlay {
        border-radius: 0 0 12px 12px;
    }
}

/* Focus states para accesibilidad */
.team-member:focus {
    outline: 3px solid rgba(31, 121, 113, 0.5);
    outline-offset: 2px;
}

/* Hover state adicional para desktop */
@media (hover: hover) {
    .team-member:hover {
        animation: none; /* Prevenir conflictos con WOW.js */
    }
}

/* Loading skeleton opcional */
.team-member.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
