/* Contenedor principal */
.containerP {
    padding: 20px 0;
    overflow: hidden;
}

/* Título */
.seguros-titulo {
    color: white;
    text-align: center;
    font-size: 1.8rem;
    font-family: Raleway, sans-serif;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Wrapper con overflow oculto */
.carrusel-wrapper {
    position: relative;
    overflow: hidden;
}

/* Gradiente izquierdo */
.fade-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, #ffffff, transparent);
    z-index: 2;
    pointer-events: none;
}

/* Gradiente derecho */
.fade-right {
    position: absolute;
    right: 0;
    top: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to left, #ffffff, transparent);
    z-index: 2;
    pointer-events: none;
}

/* Track animado */
.carrusel-track {
    display: flex;
    gap: 40px;
    align-items: center;
    width: max-content;
    animation: scrollSeguros 30s linear infinite;
}

/* Pausa al hover */
.carrusel-wrapper:hover .carrusel-track {
    animation-play-state: paused;
}

/* Tarjeta de cada seguro */
.seguro-item {
    flex-shrink: 0;
    background-color: white;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 160px;
}

/* Imagen del seguro */
.seguro-item img {
    height: 200px;
    width: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.seguro-item img:hover {
    filter: grayscale(0%);
}

/* Animación */
@keyframes scrollSeguros {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Móviles */
@media (max-width: 768px) {
    .seguro-item {
        height: 200px;
        width: auto;
        padding: 8px 12px;
    }

    .seguro-item img {
        height: 75px;
    }

    .fade-left,
    .fade-right {
        width: 50px;
    }
}
