/* --- SECCIÓN DE TESTIMONIOS CON IMÁGENES --- */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.testimonio-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(255, 0, 110, 0.2),
        inset 0 0 30px rgba(131, 56, 236, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.15);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    animation: cardFadeIn 0.6s ease-out backwards;
}

@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonio-card:nth-child(1) { animation-delay: 0.1s; }
.testimonio-card:nth-child(2) { animation-delay: 0.2s; }
.testimonio-card:nth-child(3) { animation-delay: 0.3s; }
.testimonio-card:nth-child(4) { animation-delay: 0.4s; }

.testimonio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 190, 11, 0.15) 0%, transparent 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonio-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 0, 110, 0.5);
    box-shadow: 
        0 20px 60px rgba(255, 0, 110, 0.35),
        inset 0 0 40px rgba(131, 56, 236, 0.2);
}

.testimonio-card:hover::before {
    opacity: 1;
}

.testimonio-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    animation: imgSlideIn 0.7s ease-out backwards;
    position: relative;
}

.testimonio-img::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: testimonioShimmer 4s infinite;
    pointer-events: none;
}

@keyframes imgSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes testimonioShimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.testimonio-card:nth-child(1) .testimonio-img { animation-delay: 0.1s; }
.testimonio-card:nth-child(2) .testimonio-img { animation-delay: 0.2s; }
.testimonio-card:nth-child(3) .testimonio-img { animation-delay: 0.3s; }
.testimonio-card:nth-child(4) .testimonio-img { animation-delay: 0.4s; }

.testimonio-card:hover .testimonio-img {
    transform: scale(1.08) rotate(-1deg);
    filter: brightness(1.12) saturate(1.1);
}

/* --- RESPONSIVE PARA MOBILE --- */
@media (max-width: 1024px) {
    .testimonios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .testimonios-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 20px;
    }

    .testimonio-card {
        max-width: 100%;
        animation: cardSlideUp 0.5s ease-out backwards;
    }

    @keyframes cardSlideUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .testimonio-card:nth-child(1) { animation-delay: 0.05s; }
    .testimonio-card:nth-child(2) { animation-delay: 0.1s; }
    .testimonio-card:nth-child(3) { animation-delay: 0.15s; }
    .testimonio-card:nth-child(4) { animation-delay: 0.2s; }

    .testimonio-img {
        max-height: 600px;
        will-change: transform, filter;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease-out;
    }

    /* Touch-friendly active state for mobile */
    .testimonio-card:active .testimonio-img {
        transform: scale(1.05) rotate(-0.5deg);
        filter: brightness(1.08) saturate(1.05);
    }
}

@media (max-width: 480px) {
    .testimonios-grid {
        gap: 12px;
    }

    .testimonio-card {
        border-radius: 12px;
    }

    .testimonio-img {
        max-height: 500px;
    }
}

/* Reduced motion accessibility support */
@media (prefers-reduced-motion: reduce) {
    .testimonio-img,
    .testimonio-card {
        animation: none !important;
        transition: none !important;
        will-change: auto !important;
    }

    .testimonio-card:hover .testimonio-img,
    .testimonio-card:active .testimonio-img {
        transform: none !important;
        filter: none !important;
    }
}
