.splide-fondo {
    width: 100%;
    /* padding-bottom: 50px; */
    position: relative;
    overflow: hidden;
}

.cajas-plide {
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(rgb(67 22 22 / 94%), rgba(0, 0, 0, 0.5)), url(../../../../public/slider/biblioteca_fondo.png);
    background-size: cover;
    background-position: center;
    /* box-shadow: 0 0 12px rgb(0 0 0 / 70%); */
    /* border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px; */
    padding: 15px 0;
}

.splide_container {
    perspective: 2000px;
    position: relative;
    height: 345px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: hidden;
}

.splide {
    position: relative;
    width: 100%;
    /* height: 100%; */
}

.splide__track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.splide__list {
    position: relative;
    width: 100%;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splide__slide {
    position: absolute;
    width: 200px;
    height: 260px;
    background: white;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splide__slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    z-index: 2;
}

.splide__slide img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    display: block;
}

/* Posiciones de las slides - Ajustadas proporcionalmente */
.splide__slide.active {
    transform: translate(-50%, -50%) translateZ(80px) scale(1.1);
    opacity: 1;
    z-index: 5;
    filter: brightness(1.1);
}

.splide__slide.prev-1 {
    transform: translate(-50%, -50%) translateX(-280px) translateZ(-100px) rotateY(30deg) scale(0.9);
    opacity: 0.8;
    z-index: 3;
}

.splide__slide.next-1 {
    transform: translate(-50%, -50%) translateX(280px) translateZ(-100px) rotateY(-30deg) scale(0.9);
    opacity: 0.8;
    z-index: 3;
}

.splide__slide.prev-2 {
    transform: translate(-50%, -50%) translateX(-480px) translateZ(-300px) rotateY(40deg) scale(0.75);
    opacity: 0.5;
    z-index: 1;
}

.splide__slide.next-2 {
    transform: translate(-50%, -50%) translateX(480px) translateZ(-300px) rotateY(-40deg) scale(0.75);
    opacity: 0.5;
    z-index: 1;
}

.splide__slide.prev-3 {
    transform: translate(-50%, -50%) translateX(-630px) translateZ(-450px) rotateY(45deg) scale(0.65);
    opacity: 0.3;
    z-index: 0;
}

.splide__slide.next-3 {
    transform: translate(-50%, -50%) translateX(630px) translateZ(-450px) rotateY(-45deg) scale(0.65);
    opacity: 0.3;
    z-index: 0;
}

.splide__slide.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(1000px) translateZ(-600px) scale(0.5);
    z-index: 0;
    pointer-events: none;
}

/* Botones de navegación */
.splide-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: #ffffffa1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
}

.splide-nav-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    background-color: white;
}

.splide-nav-button.prev {
    left: 20px;
}

.splide-nav-button.next {
    right: 20px;
}

/* Indicadores */
.splide-indicators {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.splide-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.splide-indicator.active {
    background: white;
    width: 32px;
    border-radius: 5px;
}

/* Responsive para tablet */
@media (max-width: 1024px) {
    .splide_container {
        height: 280px;
    }

    .splide__slide {
        width: 160px;
        height: 216px;
    }

    .splide__slide.prev-2 {
        transform: translate(-50%, -50%) translateX(-380px) translateZ(-250px) rotateY(40deg) scale(0.7);
    }

    .splide__slide.prev-1 {
        transform: translate(-50%, -50%) translateX(-220px) translateZ(-80px) rotateY(30deg) scale(0.85);
    }

    .splide__slide.next-1 {
        transform: translate(-50%, -50%) translateX(220px) translateZ(-80px) rotateY(-30deg) scale(0.85);
    }

    .splide__slide.next-2 {
        transform: translate(-50%, -50%) translateX(380px) translateZ(-250px) rotateY(-40deg) scale(0.7);
    }
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .splide-fondo {
        /* padding: 0 30px 10px; */
        min-height: 320px;
    }

    .splide_container {
        /* height: 256px; */
        perspective: 1200px;
    }

    .splide__slide {
        width: 160px;
        height: 224px;
    }

    .splide__slide.active {
        transform: translate(-50%, -50%) translateZ(80px) scale(1.1);
    }

    .splide__slide.prev-1 {
        transform: translate(-50%, -50%) translateX(-192px) translateZ(-60px) rotateY(35deg) scale(0.8);
        opacity: 0.7;
    }

    .splide__slide.next-1 {
        transform: translate(-50%, -50%) translateX(192px) translateZ(-60px) rotateY(-35deg) scale(0.8);
        opacity: 0.7;
    }

    .splide__slide.prev-2,
    .splide__slide.next-2 {
        opacity: 0;
        transform: translate(-50%, -50%) translateX(-800px) translateZ(-400px) scale(0.5);
        pointer-events: none;
    }

    .splide-nav-button {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .splide-nav-button.prev {
        left: 10px;
    }

    .splide-nav-button.next {
        right: 10px;
    }
}