/* Estilos principales */
.main-title {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
}

.main-title h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.main-title h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2c3e50);
    border-radius: 2px;
}

.main-title p {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto;
}

/* Sección del equipo */
.team-section {
    margin-bottom: 4rem;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.team-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #3498db, #2c3e50);
    border-radius: 2px;
}

/* Grid del equipo */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Estilos para enlaces del equipo - NUEVO */
a.team-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Miembro del equipo */
.team-member {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-align: center;
    cursor: pointer;
    height: 100%;
    position: relative;
}

/* Efectos hover para elementos con enlace */
a.team-link:hover .team-member {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    background-color: rgba(52, 152, 219, 0.03);
}

/* Efecto hover para elementos sin enlace */
.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* Imagen del miembro - MODIFICADO para soportar imágenes de fondo */
.team-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-style: italic;
    transition: background-color 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Capa oscura sobre la imagen para mejorar legibilidad del texto */
.team-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Texto sobre la imagen */
.team-img span {
    position: relative;
    z-index: 2;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* Efecto hover en la imagen cuando está dentro de un enlace */
a.team-link:hover .team-img {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Información del miembro */
.team-info {
    padding: 1.5rem;
    transition: color 0.3s ease;
}

/* Cambio de color en título cuando está en enlace */
a.team-link:hover .team-info h3 {
    color: #3498db;
}

.team-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    font-size: 1.2rem;
}

.team-info p {
    color: #7f8c8d;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

a.team-link:hover .team-info p {
    color: #5d6d7e;
}

/* Indicador visual de que es clickeable (solo para enlaces) */
a.team-link .team-member::after {
    content: '↗';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    z-index: 10;
    font-weight: bold;
}

a.team-link:hover .team-member::after {
    opacity: 1;
    transform: translateY(0);
    background: rgba(52, 152, 219, 0.15);
}

/* Borde sutil para enlaces */
a.team-link .team-member {
    border: 1px solid transparent;
}

a.team-link:hover .team-member {
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .main-title h1 {
        font-size: 2.2rem;
    }
    
    .main-title p {
        font-size: 1rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .team-img {
        height: 180px;
    }
    
    .team-info h3 {
        font-size: 1.1rem;
    }
    
    /* Ajuste para móviles del indicador clickeable */
    a.team-link .team-member::after {
        opacity: 0.7;
        transform: translateY(0);
        background: rgba(52, 152, 219, 0.15);
        width: 28px;
        height: 28px;
        font-size: 13px;
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .team-img {
        height: 160px;
    }
    
    .team-info {
        padding: 1rem;
    }
    
    .team-info h3 {
        font-size: 1rem;
    }
    
    .team-info p {
        font-size: 0.85rem;
    }
}