/* Contenedor principal */
.characters-carousel-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* Carrusel de personajes */
.carousel-container {
    position: relative;
    margin-bottom: 30px;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel-track-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Ocultar scrollbar pero mantener funcionalidad */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
    cursor: grab;
}

.carousel-track-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-track-container:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: max-content;
    padding: 0 50%;
    gap: 40px;
}

/* Items del carrusel */
.carousel-item {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    transition: width 0.5s ease, opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Tamaños para desktop */
    width: 280px;
    height: auto;
    opacity: 0.6;
    filter: brightness(0.7);
    transform: scale(0.85);
}

.carousel-item.active {
    width: 500px;
    opacity: 1;
    filter: brightness(1.2);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    z-index: 10;
    transform: scale(1);
}

.carousel-item:hover:not(.active) {
    opacity: 0.75;
    filter: brightness(0.8);
}

/* Ocultar items que no están visibles */
.carousel-item.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* Imágenes de los personajes en el carrusel */
.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.carousel-item .character-normal {
    opacity: 1;
}

.carousel-item .character-focus {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Estado activo */
.carousel-item.active .character-normal {
    opacity: 0;
}

.carousel-item.active .character-focus {
    opacity: 1;
}

/* Botones de navegación - ELIMINADOS */
.carousel-nav {
    display: none !important;
}

/* Información del personaje */
.character-info {
    text-align: center;
}

.character-description {
    margin-bottom: 30px;
    position: relative;
    min-height: 120px;
}

.character-description img {
    max-width: 100%;
    height: auto;
    display: none;
    margin: 0 auto;
}

.character-description img.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Contenedor de imagen - Desktop (por defecto visible) */
.character-image-desktop {
    position: relative;
    min-height: 300px;
    display: block;
}

.character-image-desktop img {
    max-width: 100%;
    height: auto;
    display: none;
    margin: 0 auto;
}

.character-image-desktop img.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Contenedor de imágenes móviles - Oculto por defecto */
.character-image-mobile {
    display: none;
}

.mobile-character-grid {
    display: none;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
}

.mobile-character-grid.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.mobile-character-part {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

/* Animación de aparición */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .carousel-container {
        height: 500px;
    }
    
    .carousel-track {
        gap: 30px;
    }
    
    .carousel-item {
        width: 220px;
    }
    
    .carousel-item.active {
        width: 400px;
    }
}

/* Responsive - Móvil grande */
@media (max-width: 768px) {
    .characters-carousel-wrapper {
        padding: 10px 0;
    }
	
	.character-info {
		margin-top: -100px !important;
	}
    
    .carousel-container {
        padding: 0;
        margin-bottom: 10px;
        height: 450px;
    }
    
    .carousel-track {
        gap: 20px;
        padding: 0 40%;
    }
    
    .carousel-item {
        width: 140px;
        opacity: 0.5;
        transform: scale(0.8);
    }
    
    .carousel-item.active {
        width: 300px;
        opacity: 1;
        transform: scale(1);
    }
    
    .character-description {
        margin-bottom: 10px;
        min-height: 80px;
        padding: 0 10%;
    }
    
    /* CAMBIO IMPORTANTE: Ocultar imagen desktop, mostrar móvil */
    .character-image-desktop {
        display: none !important;
    }
    
    .character-image-mobile {
        display: block;
        margin-top: 20px;
        padding: 0 10%;
    }
    
    .mobile-character-grid {
        gap: 12px;
    }
}

/* Responsive - Móvil pequeño */
@media (max-width: 480px) {
    .characters-carousel-wrapper {
        padding: 5px 0;
    }
	
	.character-info {
		margin-top: -100px !important;
	}
    
    .carousel-container {
        padding: 0;
        margin-bottom: 8px;
        height: 400px;
    }
    
    .carousel-track {
        gap: 15px;
        padding: 0 35%;
    }
    
    .carousel-item {
        width: 120px;
        opacity: 0.5;
        transform: scale(0.75);
    }
    
    .carousel-item.active {
        width: 260px;
        opacity: 1;
        transform: scale(1);
    }
    
    .character-description {
        margin-bottom: 8px;
        min-height: 60px;
        padding: 0 10%;
    }
    
    .character-image-mobile {
        padding: 0 10%;
    }
    
    .mobile-character-grid {
        gap: 10px;
    }
}

