/* =========================================
   SECCIÓN NUESTRO EQUIPO (Overlay Design)
   ========================================= */
.team-section {
    padding: 100px 5%;
    background-color: var(--bg-darker);
    text-align: center;
}

.team-section > h2 {
    font-family: var(--font-headers);
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;           /* Permite que los elementos bajen a la siguiente línea */
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Contenedor principal de la tarjeta */
.team-card {
    /* 1. ESTRUCTURA ORIGINAL (¡No tocar! Mantiene el tamaño y la cuadrícula) */
    flex: 0 1 320px; 
    width: 100%; 
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    transition: transform var(--transition-standard), border-color var(--transition-standard), box-shadow var(--transition-standard);
    
    /* 2. NUEVA ESTÉTICA (Más clara y con contraste) */
    background: var(--bg-card); /* Usamos el gris carbón de las nuevas variables, antes era #0d0d0d */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Borde sutil de luz en reposo para separar del fondo */
}

/* Elevación e iluminación del marco al pasar el cursor */
.team-card:hover {
    transform: translateY(-10px);
    border-color: var(--silver-main); /* El marco se vuelve plateado brillante */
    
    /* TRUCO DE DISEÑO: En fondos oscuros, combinamos una sombra negra suave con un ligerísimo "resplandor" blanco */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 255, 255, 0.05);
}

/* La Foto ocupa todo el recuadro */
.team-photo {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(40%);
    transition: transform 0.6s ease, filter 0.6s ease;
}

/* Animación sutil de la foto */
.team-card:hover .team-photo img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* =========================================
   CAPA DE TEXTO (OVERLAY)
   ========================================= */
.team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Cubre toda la tarjeta */
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Empuja el texto hacia abajo */
    padding: 30px 20px;
    
    /* Gradiente oscuro de abajo hacia arriba para que el texto se lea perfectamente */
    background: linear-gradient(to top, rgba(13, 13, 13, 0.95) 0%, rgba(13, 13, 13, 0.7) 40%, transparent 100%);
    
    /* Estado inicial: Invisible y desplazado hacia abajo */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Al hacer hover, la capa de texto aparece deslizándose */
.team-card:hover .team-info {
    opacity: 1;
    transform: translateY(0);
}

.team-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.specialty {
    color: var(--silver-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 12px;
}

.team-hover-text {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}