.swiper {
    /*background-color: #828281;*/
    max-width: 100%;
    /* overflow: visible; */
    /* position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%); */
    padding: 20px;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    /* height: 300px; */
    border-radius: 5%;
}

.swiper-slide::after {
    position: absolute;
    content: "";
    inset: 0;
    width: 100%;
    aspect-ratio: 1/1.2;
    border-radius: 5%;
    /* background: linear-gradient(to bottom right, #b8b8b88f, #ffffff5e); */
}

.swiper-slide-active::after {
    background: none;
    pointer-events: none;
}

/* .swiper-slide > div {
text-align: center;
display: none; 
opacity: 0;
} */


.swiper-slide-active div {
    /* display: block; */
    opacity: 1;
}

.swiper-slide h2 {
    color: #fff;
    font-size: 1.2rem;
    font-family: var(--texto-);
    position: relative;
    text-align: center;
}

.swiper-slide p {
    color: #fff;
    font-size: 10px;
    line-height: 1.3;
    font-family: var(--texto-);
    position: relative;
    margin: 0px;
    text-align: center;
}

@keyframes line {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.swiper-slide-text-overlay {
    position: absolute;
    /* top: 0; */
    bottom: 0;
    left: 0;
    width: 100%;
    /* height: 100%; */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    background: linear-gradient(90deg,
 rgb(110, 9, 9) 50%,
            /* Color sólido comienza más arriba */
            rgba(142, 21, 21, 0.1) 95%,
            /* Gradiente más suave */
            rgba(0, 0, 0, 0) 100%
            /* Totalmente transparente al final */
        );
    background: -webkit-linear-gradient(90deg,
 rgb(110, 9, 9) 50%,
            /* Color sólido comienza más arriba */
            rgba(142, 21, 21, 0.1) 95%,
            /* Gradiente más suave */
            rgba(0, 0, 0, 0) 100%
            /* Totalmente transparente al final */
        );
    color: #fff;
    /* Texto blanco */
    z-index: 10;
    /* Coloca el texto sobre la imagen */
    text-align: center;
    /* Centra el texto */
    border-radius: 5%;
    padding: 40px 16px 16px 16px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* Configuración inicial */
.swiper-slide-text-overlay h2 {
    transition: transform 0.5s ease, margin-bottom 0.5s ease;
    margin: 0px;
}

/* Cuando el slide no está activo */
.swiper-slide:not(.swiper-slide-active) .swiper-slide-text-overlay h2 {
    transform: translateY(20px);
    /* Baja el h2 */
}

/* Cuando el slide está activo */
.swiper-slide.swiper-slide-active .swiper-slide-text-overlay h2 {
    transform: translateY(0);
    /* Restaura la posición */
}

.swiper-slide-text-overlay svg {
    margin: 5px;
    height: 4px !important;
    width: 33px;
}

.swiper-slide-text-overlay svg rect {
    height: 100%;
    width: 100%;
}


/* Ocultar elementos no activos con transición */
.swiper-slide:not(.swiper-slide-active) .swiper-slide-text-overlay svg,
.swiper-slide:not(.swiper-slide-active) .swiper-slide-text-overlay p {
    opacity: 0;
    height: 0;
    /* Reduce la altura a 0 para que el espacio desaparezca */
    overflow: hidden;
    /* Asegura que no haya contenido visible */
    transform: translateY(20px);
    /* Desplaza hacia abajo */
    transition: opacity 0.5s ease, transform 0.5s ease, height 0.5s ease;
}

/* Mostrar elementos del slide activo */
.swiper-slide.swiper-slide-active .swiper-slide-text-overlay svg,
.swiper-slide.swiper-slide-active .swiper-slide-text-overlay p {
    opacity: 1;
    height: auto;
    /* Recupera la altura original */
    transform: translateY(0);
    /* Restaura la posición */
    transition: opacity 0.5s ease, transform 0.5s ease, height 0.5s ease;
}



.swiper-slide-active h2::after {
    animation: line 0.5s linear forwards;
}

.swiper-slide img {
    display: block;
    width: 100%;
    object-fit: cover;
    box-shadow: 0px 3px 17px rgb(0 0 0 / 25%);
    border-radius: 5%;
    aspect-ratio: 1/1.2;
}

.swiperGradient {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    /* Ancho del degradado */
    pointer-events: none;
    /* Para que no interfiera con la interacción del slider */
    z-index: 10;
    /* Asegura que esté por encima del slider */
}

.swiperGradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));
}

.swiperGradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));
}

.swiper-slide a {
    display: block;
    text-decoration: none;
    color: inherit;
    /* Mantiene el color del texto según el diseño */
}

.swiper-slide-active a {
    transition: transform 0.25s ease-out;
}

.swiper-slide-active a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    /* Amplía ligeramente el elemento */
}


@media (min-width: 576px) {
    .swiper-slide h2 {
        font-size: 1.5rem;
    }

    .swiper-slide p {
        font-size: 12px;
    }
}


@media (min-width: 768px) {}


@media (min-width: 992px) {
    .swiper-slide h2 {
        font-size: 2rem;
    }

    .swiper-slide p {
        font-size: 16px;
    }
}


@media (min-width: 1200px) {}


@media (min-width: 1400px) {}