/* CLIENTS SECTION - GRÚAS ROSANO - VERSIÓN INTERACTIVA */

/* Contenedor Principal */
.gr-clients-section {
    width: 100%;
    padding: 5rem 1rem;
    background-color: #f8f8f8;
    position: relative;
    overflow: hidden;
}

.gr-clients-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Encabezado */
.gr-clients-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gr-clients-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    color: #77519A;
    margin: 0 auto;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    display: block;
}

.gr-clients-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, #77519A, transparent);
    bottom: -10px;
    left: 25%;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.gr-clients-container:hover .gr-clients-title::after {
    transform: scaleX(1);
    transform-origin: left;
}

.gr-clients-subtitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.7);
    margin: 0 auto;
    max-width: 800px;
    transition: all 0.3s ease;
    text-align: center;
}

.gr-clients-subtitle:hover {
    color: #77519A;
    transform: translateY(-3px);
}

/* Logos de Clientes - Versión Interactiva */
.gr-clients-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 2rem 0;
    margin: 2rem 0;
    border-bottom: 1px solid rgba(119, 81, 154, 0.1);
    perspective: 1000px;
}

.logo-container {
    position: relative;
    transition: all 0.5s ease;
}

.logo-container::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background-color: #77519A;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.logo-container:hover::before {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    bottom: -35px;
}

.gr-clients-logos img {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%) contrast(0.8);
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.logo-container:hover img {
    filter: grayscale(0%) contrast(1);
    opacity: 1;
    transform: scale(1.1) rotateY(15deg);
    box-shadow: 0 10px 20px rgba(119, 81, 154, 0.2);
}

/* Efecto de flotación aleatoria */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gr-clients-logos:hover .logo-container:not(:hover) {
    animation: float 3s ease-in-out infinite;
}

.gr-clients-logos:hover .logo-container:nth-child(2n):not(:hover) {
    animation-delay: 0.3s;
}

.gr-clients-logos:hover .logo-container:nth-child(3n):not(:hover) {
    animation-delay: 0.6s;
}

/* Testimonios */
.gr-testimonials {
    position: absolute;
    width: 100%;
    height: 0;
}

.testimonial-bubble {
    position: absolute;
    background: white;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
    z-index: 5;
    width: 250px;
}

.testimonial-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent;
    transform: translateX(-50%);
}

.logo-container[data-tooltip="Intendencia de Montevideo"]:hover ~ .gr-testimonials [data-client="imm"] {
    opacity: 1;
    transform: scale(1);
}

/* Fondo de partículas interactivo */
.gr-clients-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><circle cx="20" cy="20" r="1" fill="%2377519A" opacity="0.1"/><circle cx="50" cy="30" r="1" fill="%2377519A" opacity="0.1"/><circle cx="80" cy="20" r="1" fill="%2377519A" opacity="0.1"/><circle cx="30" cy="70" r="1" fill="%2377519A" opacity="0.1"/><circle cx="70" cy="80" r="1" fill="%2377519A" opacity="0.1"/></svg>');
    background-size: 50px 50px;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 992px) {
    .gr-clients-section {
        padding: 4rem 1rem;
    }
    
    .gr-clients-logos {
        gap: 2rem;
    }
    
    .gr-clients-logos img {
        height: 50px;
        max-width: 150px;
    }
    
    .testimonial-bubble {
        display: none; /* Ocultamos testimonios en móvil */
    }
}

@media (max-width: 768px) {
    .gr-clients-section {
        padding: 3.5rem 1rem;
    }
    
    .gr-clients-logos {
        gap: 1.5rem;
    }
    
    .gr-clients-logos img {
        height: 40px;
        max-width: 120px;
    }
    
    .logo-container::before {
        font-size: 0.7rem;
        bottom: -30px;
    }
}

@media (max-width: 576px) {
    .gr-clients-section {
        padding: 3rem 1rem;
    }
    
    .gr-clients-logos {
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .gr-clients-logos img {
        height: 35px;
        max-width: 100px;
    }
    
    .logo-container::before {
        display: none; /* Ocultamos tooltips en móviles muy pequeños */
    }
}