/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.team-member {
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    /* background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    overflow: hidden;
    /* IMPORTANTE para que la imagen se recorte dentro del círculo */
    position: relative;
    /* Asegura que el contenido quede dentro del marco */
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ajusta la imagen al contenedor sin deformarla */
    object-position: center;
    border-radius: 50%;
    /* Opcional (ya se recorta con overflow:hidden) */
}

/* Badge de Co-fundador - OPCIÓN 1: Esquina superior derecha (ACTIVA) */
.team-card {
    position: relative;
}




/* Badge de Co-fundador - Minimalista con tooltip */
.cofounder-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    z-index: 100;
    cursor: help;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.cofounder-badge i {
    font-size: 0.9rem;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.cofounder-badge:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

/* Tooltip - Ahora aparece hacia abajo */
.cofounder-badge::after {
    content: 'Co-fundador';
    position: absolute;
    top: 45px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Flecha del tooltip - Ahora apunta hacia arriba */
.cofounder-badge::before {
    content: '';
    position: absolute;
    top: 38px;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid rgba(17, 24, 39, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.cofounder-badge:hover::after,
.cofounder-badge:hover::before {
    opacity: 1;
}


.team-member h3 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: #666;
    font-weight: 500;
}

/* Team Carousel Styles */
.team-carousel {
    margin-top: 2rem;
}

/* Team Carousel Wrapper - overflow hidden para ocultar cards clonadas */
.team-carousel .carousel-wrapper {
    overflow: hidden;
}

/* Team Carousel Track */
.team-carousel .carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
}

.team-card {
    background: white;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    flex-shrink: 0;
    position: relative;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 2rem;
    text-align: center;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(59, 130, 246, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.2);
}

.team-card:hover::before {
    opacity: 1;
}

.team-card .team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    /* background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    overflow: hidden;
}

.team-card .team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.team-card h3 {
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.team-card p {
    color: #666;
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-card h4 {
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.team-card:hover .team-photo {
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section {
        padding: 3rem 5%;
        max-width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .team-carousel {
        max-width: 100%;
        padding: 0 40px;
    }

    .team-card {
        min-width: 280px;
    }

    .team-card .team-photo {
        width: 150px;
        height: 150px;
    }

    .team-card h3 {
        font-size: 1.1rem;
    }

    .team-card p {
        font-size: 0.9rem;
    }

    .team-card h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 5%;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .team-carousel {
        padding: 0 30px;
    }

    .team-card {
        min-width: calc(100vw - 100px);
        max-width: calc(100vw - 100px);
    }

    .team-card .team-photo {
        width: 120px;
        height: 120px;
    }
}