/* ==== SECCIÓN ALIADOS ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.aliados {
    background: linear-gradient(135deg, #F9F9FF 0%, #F0F4FF 100%);
    min-height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.aliados-container {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    text-align: center;
    position: relative;
}

.aliados-container h2 {
    color: #192335;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -1.5px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.aliados-logos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.aliado-logo {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(163, 220, 53, 0.1);
}

.aliado-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.aliado-logo:hover::before {
    opacity: 0;
}

.aliado-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    text-decoration: none;
    background: white;
}

.aliado-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: normal;
    background: white;
}

/* LOGO DEL MEDIO CON FONDO OSCURO */
.aliado-logo.dark-bg {
    background: #04001f;
    border-color: rgba(163, 220, 53, 0.2);
}

.aliado-logo.dark-bg a {
    background: #04001f;
}

.aliado-logo.dark-bg img {
    background: transparent;
}

.aliado-logo.dark-bg:hover {
    background: #06002a;
    box-shadow: 0 12px 40px rgba(163, 220, 53, 0.25),
    0 6px 20px rgba(0, 0, 0, 0.2);
}

.aliado-logo:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 165, 81, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(163, 220, 53, 0.4);
}

.aliado-logo:hover img {
    filter: brightness(1.05);
    transform: scale(1.08);
}

.aliados-scrollup {
    position: fixed;
    right: 2.5rem;
    bottom: 2.5rem;
    background: white;
    border: 2.5px solid #00a551;
    border-radius: 50%;
    padding: 0.6rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 165, 81, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.aliados-scrollup:hover {
    background: #d4f5e2;
    box-shadow: 0 6px 24px rgba(0, 165, 81, 0.3);
    transform: translateY(-4px) scale(1.05);
    border-color: #a3dc35;
}

.aliados-scrollup:active {
    transform: translateY(-2px) scale(1);
}

/* Tablets medianas */
@media (max-width: 1100px) {
    .aliados-logos {
        gap: 1.5rem;
    }

    .aliado-logo a {
        padding: 1.2rem;
    }
}

/* Tablets */
@media (max-width: 900px) {
    .aliados {
        padding: 3rem 1rem;
    }

    .aliados-logos {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .aliado-logo a {
        padding: 1.5rem;
    }

    .aliados-container h2 {
        margin-bottom: 2.5rem;
    }

    .aliados-scrollup {
        right: 2rem;
        bottom: 2rem;
        width: 46px;
        height: 46px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .aliados {
        padding: 2.5rem 0.5rem;
        min-height: 40vh;
    }

    .aliados-container h2 {
        margin-bottom: 2rem;
        font-size: 1.75rem;
    }

    .aliados-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .aliado-logo {
        border-radius: 16px;
        aspect-ratio: 4 / 3;
    }

    .aliado-logo a {
        padding: 1rem;
    }

    .aliados-scrollup {
        right: 1.25rem;
        bottom: 1.25rem;
        width: 42px;
        height: 42px;
        padding: 0.5rem;
    }

    .aliados-scrollup svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile pequeño */
@media (max-width: 400px) {
    .aliados-logos {
        gap: 0.75rem;
    }

    .aliado-logo a {
        padding: 0.8rem;
    }

    .aliados-container h2 {
        font-size: 1.5rem;
    }
}