/****** ESTILS PEL CARRUSEL DE EQUIPO **/

body {
    overflow-x: hidden;
}

.carousel-container {
    width: 100vw;
    background: white;
    border-radius: 0;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
    margin: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Contenedor interno con max-width para el modo carrusel */
.carousel-content {
    position: relative;
    height: 750px;
    overflow: visible;
    width: 100%;
}

/* NO aplicar max-width - mantener full width siempre */
.carousel-content.has-main {
    padding: 0;
}

.carousel-track {
    position: relative;
    height: 100%;
    cursor: grab;
    user-select: none;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 50px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* En modo carrusel, permitir overflow visible para ver miniaturas */
.carousel-track.has-main {
    overflow: visible;
    justify-content: flex-start;
}

.carousel-track:active {
    cursor: grabbing;
}

/* Estado inicial: todas las imágenes del mismo tamaño */
.profile-card {
    position: relative;
    opacity: 1;
    cursor: pointer;
    flex-shrink: 0;
}

/* Estado inicial: tamaño uniforme para todas las imágenes */
.profile-card .profile-image {
    border-radius: 20px !important;
    object-fit: cover;
    width: 300px;
    height: 421px;
    transition: all 0.3s ease;
}

.carousel-track:not(.has-main) .profile-card:hover {
    z-index: 5;
}

.carousel-track:not(.has-main) {
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    padding: 40px 0;
}

.carousel-track:not(.has-main) .profile-card {
    flex: 0 0 auto;
    transition: all 0.3s ease;
    transform-origin: center;
}

.carousel-track:not(.has-main) .profile-card:hover {
    transform: scale(1);
    z-index: 9;
    margin: 0 35px;
}

.carousel-track:not(.has-main) .profile-card:hover .profile-image {
    width: 350px;
    height: 480px;
    transform: scale(1.2);
    transform-origin: center center !important;
    z-index: 9;
}

/* Estado cuando hay una imagen principal seleccionada */
.carousel-track.has-main {
    justify-content: flex-start;
}

.carousel-track.has-main .profile-card {
    position: absolute;
    bottom: 0;
    transition: all 0.3s ease;
}

/* Imagen principal - grande */
.profile-card.main .profile-image {
    width: 366px;
    height: 736px;
}

.profile-card.main {
    position: absolute !important;
    left: 0px;
    z-index: 10;
}

/* Miniaturas cuando hay una imagen principal */
.carousel-track.has-main .profile-card:not(.main) .profile-image {
    width: 300px;
    height: 421px;
}

/* Información del perfil principal - posición dinámica */
.profile-info {
    position: absolute;
    left: 420px; /* Se ajustará dinámicamente en JS */
    top: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    width: 650px; /* Reducido para evitar overflow */
    max-width: calc(100vw - 500px); /* Responsive width */
}

.profile-card.main .profile-info {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-number {
    font-size: 16px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-name {
    font-size: 25px;
    font-weight: 500;
    color: #061033;
    margin-bottom: 5px;
    letter-spacing: 1px;
    line-height: 25px;
}

.profile-position {
    font-size: 20px;
    font-weight: 400;
    color: #00E5FF;
    margin-bottom: 15px;
    letter-spacing: 1px;
    line-height: 20px;
}

.profile-text {
    font-size: 16px;
    color: #747986;
    line-height: 1.3;
}

/* Ocultar información en estado inicial */
.carousel-track:not(.has-main) .profile-info {
    display: none;
}

/* Responsive */
@media (min-width: 1200px) {
    .profile-linkedin {
        margin-top: -15px !important;
    }
}
@media (min-width: 1200px) and (max-width: 1500px) {
    .carousel-track.has-main .profile-card:not(.main) .profile-image {
        width: 240px;
        height: 391px;
    }
    
    .profile-info {
        width: 600px;
        max-width: calc(100vw - 450px);
    }
}

@media (max-width: 1200px) {
    .carousel-container {
        padding: 30px 0;
    }
    
    .profile-card.main .profile-image {
        width: 300px;
        height: 600px;
    }
    
    .carousel-track.has-main .profile-card:not(.main) .profile-image {
        width: 250px;
        height: 350px;
    }
    
    .carousel-track:not(.has-main) .profile-card:hover .profile-image {
        width: 280px;
        height: 380px;
        transform-origin: bottom center;
    }
    
    .profile-info {
        width: 550px;
        max-width: calc(100vw - 400px);
    }
    
    .profile-name {
        font-size: 24px;
    }
    
    .profile-position {
        font-size: 20px;
    }
    
    .profile-text {
        font-size: 16px;
    }
    
    .profile-text p {
        margin-bottom: 5px !important;
    }
    
    .profile-linkedin a {
        margin-top: 0px !important;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 30px 0;
    }
    
    .carousel-content.has-main {
        padding: 0 20px;
    }
    
    .carousel-content {
        height: 350px;
    }
    
    .carousel-track {
        padding: 0;
    }
    
    .carousel-track.has-main {
        overflow: visible;
        justify-content: flex-start;
    }
    
    .carousel-track.has-main .profile-card {
        position: absolute;
        bottom: 0;
        transition: all 0.3s ease;
    }
    
    /* Imagen principal: 160x300px */
    .profile-card.main .profile-image {
        width: 160px !important;
        height: 300px !important;
    }
    
    .profile-card.main {
        position: absolute !important;
        z-index: 10;
    }
    
    /* Miniaturas: 90x135px para mantener proporción */
    .carousel-track.has-main .profile-card:not(.main) .profile-image {
        width: 90px !important;
        height: 135px !important;
    }
    
    .profile-info {
        position: absolute;
        left: 170px;
        top: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateX(20px);
        width: calc(100% - 190px);
        max-width: none;
    }

    .profile-name, .profile-position {
        font-size: 16px;
        line-height: 18px;
        margin-bottom: 3px;
    }
    
    .profile-text, .profile-text p {
        font-size: 14px;
        line-height: 16px;
        margin-bottom: 2px;
    }
    
    /* Estado inicial sin main */
    .carousel-track:not(.has-main) .profile-card .profile-image {
        width: 150px;
        height: 200px;
    }
    
    .carousel-track:not(.has-main) .profile-card:hover .profile-image {
        width: 170px;
        height: 230px;
        transform-origin: bottom center;
    }
}

@media (max-width: 480px) {
    .carousel-content.has-main {
        padding: 0 15px;
    }
    
    .carousel-content {
        height: 320px;
    }
    
    .carousel-track {
        padding: 0;
    }
    
    .carousel-track.has-main .profile-card {
        position: absolute;
        bottom: 0;
        transition: all 0.3s ease;
    }
    
    /* Imagen principal: 160x300px también en móvil pequeño */
    .profile-card.main .profile-image {
        width: 160px !important;
        height: 300px !important;
    }
    
    /* Miniaturas: 80x120px en móvil pequeño */
    .carousel-track.has-main .profile-card:not(.main) .profile-image {
        width: 80px !important;
        height: 120px !important;
    }
    
    /* Estado inicial en móvil */
    .carousel-track:not(.has-main) .profile-card .profile-image {
        width: 100px;
        height: 130px;
    }
    
    /* Desactivar hover effect en móvil pequeño */
    .carousel-track:not(.has-main) .profile-card:hover .profile-image {
        transform: none;
        width: 100px;
        height: 130px;
    }
    
    .profile-info {
        width: 100%;
    }
    
    .profile-name, .profile-position {
        font-size: 14px;
        line-height: 16px;
    }
    
    .profile-text, .profile-text p {
        font-size: 12px;
        line-height: 14px;
    }
}

/* Contenedor para información del perfil en móvil */
#mobileProfileInfoContainer {
    display: none;
    padding: 20px;
    background: #FFF;
    margin-top: -20px;
    border-radius: 10px;
    margin-left: 15px;
}

@media (max-width: 768px) {
    #mobileProfileInfoContainer {
        display: block;
        text-align: left;
    }

    #mobileProfileInfoContainer .profile-name,
    #mobileProfileInfoContainer .profile-position {
        font-size: 16px;
        line-height: 20px;
        margin-bottom: 5px;
    }

    #mobileProfileInfoContainer .profile-text {
        font-size: 14px;
        line-height: 18px;
    }
    
    /* Ocultar el texto original en las cards para móvil */
    .profile-card .profile-info {
        display: none !important;
    }
}


/* ===== FLECHAS DE NAVEGACIÓN FIJAS ===== */
.carousel-arrow {
    position: absolute;
    top: 70%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    color: #666;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.1);    
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow svg {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.carousel-arrow:hover svg {
    transform: scale(1.1);
}

/* Posicionamiento en los extremos de la pantalla */
.carousel-arrow-left {
    left: 30px;
}

.carousel-arrow-right {
    right: 30px;
}

/* Estados de las flechas */
.carousel-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== CENTRADO VERTICAL ESPECÍFICO PARA EL CARRUSEL ===== */
@media (min-width: 769px) {
    .carousel-arrow {
        /* Ajustar la posición vertical para que coincida con el centro del carrusel */
        top: calc(70% + 50px); /* 50px es el padding del carousel-container */
    }
}

/* ===== RESPONSIVE PARA FLECHAS ===== */
@media (max-width: 1200px) {
    .carousel-arrow {
        width: 55px;
        height: 55px;
    }
    
    .carousel-arrow svg {
        width: 24px;
        height: 24px;
    }
    
    .carousel-arrow-left {
        left: 25px;
    }
    
    .carousel-arrow-right {
        right: 25px;
    }
}

@media (max-width: 768px) {
    .carousel-arrow {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.95);
        /* En móvil, centrar respecto al carrusel móvil */
        top: calc(50% + 30px); /* 30px es el padding móvil del carousel-container */
    }
    
    .carousel-arrow svg {
        width: 22px;
        height: 22px;
    }
    
    .carousel-arrow-left {
        left: 20px;
    }
    
    .carousel-arrow-right {
        right: 20px;
    }
    
    .carousel-arrow:hover {
        transform: translateY(-50%) scale(1.05);
    }
}

@media (max-width: 480px) {
    .carousel-arrow {
        width: 30px;
        height: 30px;
        top: calc(80%); 
    }
    
    .carousel-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-arrow-left {
        left: 15px;
    }
    
    .carousel-arrow-right {
        right: 15px;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes arrowPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.carousel-arrow.pulse {
    animation: arrowPulse 2s infinite;
}

/* Efecto de ondas en hover */
/*.carousel-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.carousel-arrow:hover::before {
    width: 100px;
    height: 100px;
}*/

/* ===== MEJOR VISIBILIDAD EN DIFERENTES FONDOS ===== */
.carousel-arrow {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border: none !important;
    background: none !important;
    padding: 0px !important;
}

.carousel-arrow::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    /*background: linear-gradient(45deg, transparent, rgba(0, 229, 255, 0.1), transparent);*/
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-arrow:hover::after {
    opacity: 1;
}

/* ===== OCULTAR EN PANTALLAS MUY PEQUEÑAS ===== */
@media (max-width: 320px) {
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-arrow svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-arrow-left {
        left: 10px;
    }
    
    .carousel-arrow-right {
        right: 10px;
    }
}