/* Sección General */
.alianzas-seccion {
    background-color: #ffffff;
    padding: 80px 20px;
    overflow: hidden;
}

.alianzas-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Encabezado */
.alianzas-header {
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.alianzas-titulo {
    font-size: 2.2rem;
    color: #000033;
    margin-bottom: 18px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.alianzas-titulo::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #d4af37; /* Detalle dorado */
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

.alianzas-descripcion {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444444;
}

/* --- CARRUSEL INFINITO --- */
.alianzas-carrusel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 40px 0 60px 0;
    padding: 20px 0;
    /* Difuminado sutil en los extremos laterales del carrusel */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.alianzas-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollInfinito 30s linear infinite;
	/*background-color: #f9f9fc;*/
}

/* Pausar el movimiento al pasar el cursor encima */
.alianzas-carrusel-wrapper:hover .alianzas-track {
    animation-play-state: paused;
}

.marca-item {
    width: 200px;
    height:110px;
    margin: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background-color: #f9f9fc;*/
    border: 1px solid #eef0f5;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.marca-item:hover {
    transform: scale(1.08);
    border-color: #d4af37;
    box-shadow: 0 6px 18px rgba(0, 0, 51, 0.1);
}

.marca-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

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

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

/* Título de Gracias */
.alianzas-footer {
    margin-top: 20px;
}

.gracias-titulo {
    font-size: 1.8rem;
    color: #000033;
    font-weight: 700;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-block;
}

/* --- ANIMACIONES DE ENTRADA CON SCROLL --- */
.alianzas-header,
.alianzas-carrusel-wrapper,
.gracias-titulo {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.alianzas-header {
    transform: translateY(-30px);
}

.alianzas-carrusel-wrapper {
    transform: translateY(30px);
}

.gracias-titulo {
    transform: scale(0.9);
}

/* Clases activadas por JS */
.alianzas-seccion.animate .alianzas-header {
    opacity: 1;
    transform: translateY(0);
}

.alianzas-seccion.animate .alianzas-carrusel-wrapper {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.alianzas-seccion.animate .gracias-titulo {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.4s;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .alianzas-seccion {
        padding: 50px 15px;
    }

    .alianzas-titulo {
        font-size: 1.8rem;
    }

    .alianzas-descripcion {
        font-size: 0.95rem;
    }

    .marca-item {
        width: 130px;
        height: 75px;
        margin: 0 15px;
        padding: 10px;
    }

    .gracias-titulo {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
}