/*
* Soludigi - Casos de Éxito / Testimonios
* Archivo: css/testimonios.css
* Versión: 1.1
*/

/* ===== AJUSTE DE ESPACIADO ENTRE SECCIONES ===== */
#casos-exito {
    padding-top: 60px; /* Reducir el padding superior */
}

/* Reducir espacio entre título y subtítulo */
#casos-exito .section-title {
    margin-bottom: 25px; /* Reducido de 50px default */
}

#casos-exito .section-title::after {
    margin: 10px auto 0; /* Reducido de 15px */
}

#casos-exito p.text-center.mb-5 {
    margin-bottom: 1.5rem !important; /* Reducido aún más de 2rem a 1.5rem */
}

/* Reducir padding superior del carrusel */
.testimonios-carousel {
    padding-top: 10px; /* Reducido de 20px */
}

@media (max-width: 768px) {
    #casos-exito {
        padding-top: 40px; /* Aún menos en móviles */
    }
    
    #casos-exito .section-title {
        margin-bottom: 20px;
    }
    
    #casos-exito p.text-center.mb-5 {
        margin-bottom: 1rem !important; /* Más compacto en móvil */
    }
    
    .testimonios-carousel {
        padding-top: 5px; /* Mínimo en móvil */
    }
}

/* ===== CONFIGURACIÓN BASE ===== */
.testimonios-carousel {
    position: relative;
    padding: 10px 0; /* Reducido de 20px a 10px */
}

/* ===== TARJETA DE TESTIMONIO ===== */
.testimonio-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    margin: 0 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* ===== HEADER DEL TESTIMONIO ===== */
.testimonio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.cliente-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Reducido de 20px a 15px */
}

.cliente-foto {
    flex-shrink: 0;
}

.cliente-foto img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cliente-datos h4 {
    margin: 0 0 5px 0;
    color: #2A2A2A;
    font-size: 1.2rem;
    font-weight: 600;
}

.cliente-datos p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
}

/* ===== SISTEMA DE CALIFICACIÓN ===== */
.rating {
    color: #ffc107;
    font-size: 1rem;
}

.rating i {
    margin-right: 2px;
}

/* ===== ICONO DE CITA ===== */
.quote-icon {
    color: #921B1F;
    font-size: 2.5rem;
    opacity: 0.2;
}

/* ===== CONTENIDO DEL TESTIMONIO ===== */
.testimonio-content {
    margin-bottom: 20px;
}

.testimonio-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    font-style: italic;
    margin: 0;
    position: relative;
}

/* ===== FOOTER DEL TESTIMONIO ===== */
.testimonio-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.servicio-tag {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #921B1F, #a82125);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== INDICADORES DEL CARRUSEL ===== */
.testimonios-indicators {
    position: static;
    margin-top: 30px;
    margin-bottom: 0;
}

.testimonios-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    border: 2px solid #921B1F;
    opacity: 0.7;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.testimonios-indicators button.active {
    background-color: #921B1F;
    opacity: 1;
    width: 35px;
    border-radius: 6px;
}

/* ===== CONTROLES DEL CARRUSEL ===== */
.testimonios-control {
    width: 45px;
    height: 45px;
    background-color: rgba(146, 27, 31, 0.8);
    border-radius: 50%;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.testimonios-control:hover {
    background-color: rgba(146, 27, 31, 1);
    opacity: 1;
}

.carousel-control-prev {
    left: -60px;
}

.carousel-control-next {
    right: -60px;
}

/* Hacer los iconos más visibles */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: brightness(0) invert(1);
}

/* ===== LOGOS DE CLIENTES ===== */
.clientes-logos {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.clientes-logos p {
    color: #666;
    font-weight: 500;
    margin-bottom: 30px;
}

.logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.logo-cliente {
    flex: 0 0 auto;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.logo-cliente:hover {
    opacity: 1;
    transform: scale(1.1);
}

.logo-cliente img {
    height: 50px;
    width: auto;
    max-width: 150px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-cliente:hover img {
    filter: grayscale(0%);
}

/* ===== ANIMACIONES ===== */
/* Eliminamos la animación slideInUp para evitar parpadeos */
.carousel-item {
    transition: opacity 0.4s ease-in-out !important;
}

.carousel-item.active .testimonio-card {
    /* Sin animación de entrada */
    opacity: 1;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 991px) {
    .testimonio-card {
        padding: 30px;
        margin: 0 10px;
    }
    
    .cliente-foto img {
        width: 70px;
        height: 70px;
    }
    
    .quote-icon {
        font-size: 2rem;
    }
}

/* ===== RESPONSIVE - MÓVIL GRANDE ===== */
@media (max-width: 768px) {
    .testimonio-card {
        padding: 25px;
        margin: 0;
    }
    
    .testimonio-header {
        flex-direction: row; /* Mantener en fila en móvil */
        gap: 12px; /* Reducir gap */
    }
    
    .cliente-info {
        flex-direction: row; /* Mantener horizontal */
        text-align: left; /* Alinear a la izquierda */
        gap: 12px; /* Reducir espacio */
    }
    
    .cliente-datos {
        text-align: left; /* Mantener texto alineado a la izquierda */
    }
    
    .quote-icon {
        align-self: flex-end;
    }
    
    .testimonio-content p {
        font-size: 1rem;
    }
    
    /* Mantener controles visibles en móvil pero ajustados */
    .testimonios-control {
        display: block;
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
    
    .logos-grid {
        gap: 20px;
    }
    
    .logo-cliente img {
        height: 40px;
    }
}

/* ===== RESPONSIVE - MÓVIL PEQUEÑO ===== */
@media (max-width: 576px) {
    .testimonio-card {
        padding: 20px;
    }
    
    .testimonio-header {
        flex-direction: row; /* Mantener horizontal */
        gap: 10px; /* Reducir más el espacio */
    }
    
    .cliente-info {
        gap: 10px; /* Espacio más compacto */
    }
    
    .cliente-foto img {
        width: 60px;
        height: 60px;
    }
    
    .cliente-datos h4 {
        font-size: 1.1rem;
    }
    
    .cliente-datos p {
        font-size: 0.85rem; /* Ligeramente más pequeño */
    }
    
    .testimonio-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .servicio-tag {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

/* ===== OPTIMIZACIÓN PARA iOS ===== */
@supports (-webkit-touch-callout: none) {
    .testimonios-carousel {
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
    
    .testimonio-card {
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
}