* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#container-slider {
    position: relative;
    width: 100%;
    z-index: -100; /* Para asegurarse de que no se superponga */
    margin-top: 130px;
}

#slider {
    position: relative;
    width: 100%;
    height: clamp(514px, 60vh, 500px);
    overflow: hidden;
}

#slider li {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1s ease, transform 1s ease, filter 1s ease;
    opacity: 0;
    pointer-events: none;
    transform: scale(1);
    filter: blur(0);
    visibility: hidden;
    z-index: 0;
}

/* Imagen activa */
#slider li.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
    transform: scale(1);
    filter: blur(0);
}

/* Imagen con fade-out */
#slider li.fade-out {
    opacity: 0;
    visibility: hidden;
    z-index: -1;
    transform: scale(0.95);
    filter: blur(2px);
    pointer-events: none;
}

/* Flechas */
.arrowPrev,
.arrowNext {
    font-size: 2.5rem;
    color: rgba(204, 204, 204, 0.65);
    cursor: pointer;
    position: absolute;
    top: 50%;
    z-index: 10; /* Aseguramos que las flechas estén en el nivel superior */
    transform: translateY(-50%);
    user-select: none;
    transition: color 0.3s ease;
    pointer-events: all; /* Habilitamos la interacción con las flechas */
}

.arrowPrev:hover,
.arrowNext:hover {
    color: #fff;
}

.arrowPrev {
    left: 80px;
}

.arrowNext {
    right: 80px;
}

/* Indicadores tipo línea */
.listslider {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 50%;
    bottom: 5%;
    transform: translateX(-50%);
    list-style: none;
    z-index: 2;
}

.listslider li {
    border-radius: 0;
    width: 30px;
    height: 4px;
    margin: 0 5px;
    overflow: hidden;
}

.listslider li a {
    background: #ccc;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0;
    transition: background 0.3s ease;
    cursor: pointer;
}

.listslider li a.item-select-slid {
    background: #fff !important;
}

.content_slider {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

hr.gradient {
  height: 3px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #214655 0%,
    #214655 11%,
    #145b87 31%,
    #3a9656 100%
  );
}


/* ---------------------------------------------------- */
/* ESTILOS RESPONSIVOS PARA CARRUSEL (max-width: 768px) */
/* ---------------------------------------------------- */

@media (max-width: 768px) {

    /* Contenedor principal del carrusel */
    #container-slider {
        margin-top: 73px; /* Reduce el margen superior para evitar superposiciones */
        z-index: -100px;
    }

    /* Slider (imágenes) */
    #slider {
        /*
          Ajusta la altura del slider para que sea proporcional.
          '150px' es la altura mínima.
          '40vw' es una altura que se ajusta al 40% del ancho de la vista (viewport width),
          asegurando que sea responsiva.
          '350px' es la altura máxima.
        */
        height: clamp(170px, 40vw, 350px);
    }
    
    /* Imágenes dentro del carrusel */
    .content_slider {
        object-fit: cover; /* Asegura que la imagen cubra el espacio sin distorsionarse */
    }

    /* Flechas de navegación */
    .arrowPrev,
    .arrowNext {
        font-size: 2rem;
        color: rgba(204, 204, 204, 0.8);
        text-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
        pointer-events: auto; /* Mantenemos la interactividad */
        transition: color 0.3s ease;
    }

    .arrowPrev {
        left: 10px; /* Acercamos las flechas a los bordes */
    }

    .arrowNext {
        right: 10px; /* Acercamos las flechas a los bordes */
    }

    /* Indicadores del slider */
    .listslider {
        bottom: 5%; /* Mantenemos la posición relativa al fondo del carrusel */
        gap: 8px;
    }

    .listslider li {
        width: 25px; /* Aumentamos ligeramente el tamaño de los indicadores */
        height: 3px;
        margin: 0;
    }

    /* Líneas horizontales */
    hr.gradient {
        display: none; /* Oculta las líneas horizontales */
    }
}