/* ==========================================
   SECCIÓN TESTIMONIOS - MOVIMIENTO EXACTO
   ========================================== */
.testimonios-section {
    background-color: #000000;
    padding: 60px 0 100px 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.testimonios-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.testimonios-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.testimonios-header {
    text-align: left;
}

.testimonios-subtitle {
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2222FF;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 12px;
}

.testimonios-title {
    font-family: 'Arial Black', 'Impact', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    color: #ffffff;
    margin: 0;
    letter-spacing: -2px;
}

/* --- Botones de Flechas --- */
.testimonios-nav {
    display: flex;
    gap: 15px;
}

.testimonio-nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonio-nav-btn:hover {
    border-color: #2222FF;
    background-color: #2222FF;
}

/* --- Mecánica del Carrusel por Bloques --- */
.testimonios-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 40px;
    box-sizing: border-box;
}

.testimonios-track {
    display: flex;
    width: 100%;
    will-change: transform;
}

.testimonios-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
}

/* --- Tarjeta con Textura de Fondo y Capa Protectora Oscura --- */
.testimonio-card {
    flex-shrink: 0;
    width: calc(33.3333% - 20px); 
    margin-right: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    min-height: 360px;
    padding: 35px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    
    /* MODIFICACIÓN: Textura de imagen + Capa oscura de legibilidad (75% de opacidad) */
    background-image: linear-gradient(rgba(17, 17, 17, 0.75), rgba(17, 17, 17, 0.75)), url('../images/fondo-testimonio.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    transition: border-color 0.4s ease, background-image 0.4s ease, transform 0.4s ease;
}

/* --- Marca de agua Isotipo --- */
.testimonio-isotipo {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    background-color: rgba(255, 255, 255, 0.015); 
    -webkit-mask-image: url('../images/favicon.webp');
    mask-image: url('../images/favicon.webp');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    z-index: 1;
    transition: background-color 0.4s ease, transform 0.4s ease;
}

.testimonio-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

/* --- Texto de la Opinión (Blanco Nítido Protegido) --- */
.testimonio-quote {
    font-family: 'Arial', sans-serif;
    font-size: 1.35rem; 
    line-height: 1.4;
    color: #e2e2e8; /* Un tono ligeramente más claro para romper con el fondo texturizado */
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
    transition: color 0.4s ease;
}

/* --- Autor, Rol y Foto --- */
.testimonio-footer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonio-avatar-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #2222FF;
}

.testimonio-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonio-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonio-author {
    font-family: 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: 1.05rem;
    color: #ffffff;
}

.testimonio-role {
    font-family: 'Arial', sans-serif;
    font-size: 0.8rem;
    color: #808095; /* Mayor claridad para resaltar sobre la textura */
    transition: color 0.4s ease;
}

/* --- Hover --- */
.testimonio-card:hover {
    border-color: #2222FF;
    transform: translateY(-5px);
    /* En hover abrimos sutilmente la opacidad de la capa negra (65%) para apreciar mejor la textura */
    background-image: linear-gradient(rgba(20, 20, 36, 0.65), rgba(20, 20, 36, 0.65)), url('../images/fondo-testimonio.webp');
}

.testimonio-card:hover .testimonio-quote {
    color: #ffffff;
}

.testimonio-card:hover .testimonio-role {
    color: #2222FF;
}

.testimonio-card:hover .testimonio-isotipo {
    background-color: rgba(34, 34, 255, 0.04);
    transform: scale(1.05) rotate(-5deg);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1199px) {
    .testimonio-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 767px) {
    .testimonios-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 0 25px;
    }
    
    .testimonios-title {
        font-size: 2.2rem;
    }
    
    .testimonios-carousel-wrapper {
        padding: 20px 0; 
    }
    
    .testimonios-group {
        gap: 0;
    }
    
    .testimonio-card {
        width: 100vw !important; 
        margin-right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: 320px;
        padding: 25px 35px;
        /* En móviles la textura se adapta exactamente al ancho de pantalla */
        background-size: cover; 
    }
    
    .testimonio-quote {
        font-size: 1.2rem;
    }
    
    .testimonio-nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .testimonios-nav {
        padding-left: 25px;
    }
}