/* ===================================================================================== */
/* SECCIÓN DE TESTIMONIOS - CARRUSEL 3D COVERFLOW                                        */
/* ===================================================================================== */

/* ---- Wrapper del carrusel ---- */
.carousel-3d-wrapper {
    position: relative;
    margin-top: 3rem;
    padding: 2rem 0 3rem;
    user-select: none;
}

/* Viewport con perspectiva */
.carousel-3d-viewport {
    perspective: 1200px;
    overflow: hidden;
    padding: 3rem 0;
    position: relative;
}

/* Track: contiene todas las slides */
.carousel-3d-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 420px;
    transform-style: preserve-3d;
}

/* ---- Cada slide ---- */
.carousel-3d-slide {
    position: absolute;
    width: 380px;
    max-width: 85vw;
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    cursor: pointer;
}

/* ---- Posiciones 3D ---- */

/* Slide activa (centro) */
.carousel-3d-slide[data-position="0"] {
    transform: translateX(-50%) translateZ(80px) rotateY(0deg);
    left: 50%;
    z-index: 10;
    opacity: 1;
    filter: brightness(1);
}

/* Slide a la derecha inmediata */
.carousel-3d-slide[data-position="1"] {
    transform: translateX(10%) translateZ(-60px) rotateY(-25deg);
    left: 50%;
    z-index: 8;
    opacity: 0.85;
    filter: brightness(0.7);
}

/* Slide a la izquierda inmediata */
.carousel-3d-slide[data-position="-1"] {
    transform: translateX(-110%) translateZ(-60px) rotateY(25deg);
    left: 50%;
    z-index: 8;
    opacity: 0.85;
    filter: brightness(0.7);
}

/* Slide dos posiciones a la derecha */
.carousel-3d-slide[data-position="2"] {
    transform: translateX(55%) translateZ(-180px) rotateY(-40deg);
    left: 50%;
    z-index: 5;
    opacity: 0.45;
    filter: brightness(0.5);
}

/* Slide dos posiciones a la izquierda */
.carousel-3d-slide[data-position="-2"] {
    transform: translateX(-155%) translateZ(-180px) rotateY(40deg);
    left: 50%;
    z-index: 5;
    opacity: 0.45;
    filter: brightness(0.5);
}

/* Slides fuera de rango: ocultas */
.carousel-3d-slide[data-position="hidden"] {
    transform: translateX(-50%) translateZ(-300px) rotateY(0deg);
    left: 50%;
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

/* ---- Reflexión en la base (efecto piso) ---- */
.carousel-3d-viewport::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0, 212, 255, 0.04), transparent);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

/* ---- Cards de Testimonios ---- */
.testimonial-card {
    background: rgba(18, 24, 33, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Borde luminoso en slide activa */
.carousel-3d-slide[data-position="0"] .testimonial-card {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 212, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Línea superior luminosa */
.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rse-cyan, #00d4ff), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.carousel-3d-slide[data-position="0"] .testimonial-card::before {
    opacity: 1;
}

/* Card Destacado */
.featured-testimonial {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(10, 30, 45, 0.97);
}

.featured-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    background: linear-gradient(135deg, #00d4ff, #17a2b8);
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.featured-badge i {
    font-size: 0.8rem;
}

/* Icono de Comillas */
.testimonial-quote-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00d4ff, #17a2b8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

/* Rating */
.testimonial-rating {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.testimonial-rating i {
    color: #ffd700;
    font-size: 0.95rem;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

/* Texto del Testimonio */
.testimonial-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-style: italic;
}

/* Autor del Testimonio */
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4ff, #17a2b8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.author-info {
    flex: 1;
}

.author-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.author-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.author-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--rse-cyan, #00d4ff);
    font-size: 0.8rem;
}

.author-location i {
    font-size: 0.7rem;
}

/* ---- Botones de navegación ---- */
.carousel-3d-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(10, 14, 20, 0.8);
    color: var(--rse-cyan, #00d4ff);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(8px);
}

.carousel-3d-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--rse-cyan, #00d4ff);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.carousel-3d-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.carousel-3d-prev {
    left: 0;
}

.carousel-3d-next {
    right: 0;
}

/* ---- Dots indicadores ---- */
.carousel-3d-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-3d-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-3d-dot.active {
    background: var(--rse-cyan, #00d4ff);
    border-color: var(--rse-cyan, #00d4ff);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    transform: scale(1.2);
}

.carousel-3d-dot:hover:not(.active) {
    background: rgba(0, 212, 255, 0.3);
}

/* ---- Estadísticas de Satisfacción ---- */
.satisfaction-stats {
    margin-top: 4rem;
    padding: 2.5rem;
    background: rgba(0, 212, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.satisfaction-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    pointer-events: none;
}

.stat-box {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(0, 212, 255, 0.08);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.1);
}

.stat-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #00d4ff, #17a2b8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin: 0 auto 0.8rem;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.25);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #17a2b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===================================================================================== */
/* RESPONSIVE                                                                              */
/* ===================================================================================== */

@media (max-width: 992px) {
    .carousel-3d-track {
        height: 400px;
    }

    .carousel-3d-slide {
        width: 340px;
    }

    .testimonial-card {
        padding: 1.75rem;
    }

    .carousel-3d-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .satisfaction-stats {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-3d-viewport {
        perspective: 900px;
        padding: 2rem 0;
    }

    .carousel-3d-track {
        height: 420px;
    }

    .carousel-3d-slide {
        width: 300px;
    }

    /* En mobile reducir profundidad para que no se corte */
    .carousel-3d-slide[data-position="1"] {
        transform: translateX(15%) translateZ(-40px) rotateY(-20deg);
        opacity: 0.6;
    }

    .carousel-3d-slide[data-position="-1"] {
        transform: translateX(-115%) translateZ(-40px) rotateY(20deg);
        opacity: 0.6;
    }

    .carousel-3d-slide[data-position="2"],
    .carousel-3d-slide[data-position="-2"] {
        opacity: 0;
        pointer-events: none;
    }

    .carousel-3d-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .satisfaction-stats {
        margin-top: 3rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .carousel-3d-viewport {
        perspective: 700px;
    }

    .carousel-3d-track {
        height: 440px;
    }

    .carousel-3d-slide {
        width: 280px;
        max-width: 82vw;
    }

    /* En mobile pequeño, ocultar laterales casi por completo */
    .carousel-3d-slide[data-position="1"],
    .carousel-3d-slide[data-position="-1"] {
        opacity: 0.35;
        filter: brightness(0.45);
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-text {
        font-size: 0.9rem;
    }

    .author-avatar {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .carousel-3d-prev {
        left: -4px;
    }

    .carousel-3d-next {
        right: -4px;
    }

    .satisfaction-stats {
        padding: 1.5rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}
