﻿/*** Testimonial Start ***/
:root {
    --primary: #87B638;
    --primary-light: #B6CF7D;
    --primary-dark: #6a9429;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Sección Testimonios */
.testimonial-section {
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
}

    .testimonial-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(135, 182, 56, 0.08) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

    .section-header h2 {
        font-size: 2.5rem;
        font-weight: 800;
        color: var(--text-dark);
        margin-bottom: 1rem;
        letter-spacing: -0.025em;
        position: relative;
        display: inline-block;
    }

        .section-header h2::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--primary-light));
            border-radius: 2px;
        }

    .section-header p {
        color: var(--text-gray);
        font-size: 1.125rem;
        max-width: 600px;
        margin: 1.5rem auto 0;
    }

/* Carrusel Container - CRÍTICO: Position relative para contener slides absolutos */
.testimonial-carousel-wrapper {
    position: relative;
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-carousel {
    position: relative;
    width: 100%;
    height: 450px; /* Altura fija para contener slides absolutos */
    overflow: hidden;
    border-radius: 24px;
}

/* Items del Carrusel - Todos absolutos para transiciones suaves */
.testimonial-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3rem;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(135, 182, 56, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Evitar clicks en slides inactivos */
}

    .testimonial-item.active {
        opacity: 1;
        transform: translateX(0);
        pointer-events: all; /* Permitir clicks en slide activo */
        z-index: 10;
    }

    .testimonial-item.prev {
        transform: translateX(-100%);
        opacity: 0;
    }

/* Header del Testimonio */
.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.testimonial-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.testimonial-inner-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 0 0 4px rgba(135, 182, 56, 0.2), var(--shadow-lg);
    transition: transform 0.3s ease;
}

.testimonial-item.active:hover .testimonial-inner-img {
    transform: scale(1.05);
}

.testimonial-inner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.testimonial-item.active:hover .testimonial-inner-img img {
    transform: scale(1.1);
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    border: 3px solid var(--white);
    box-shadow: var(--shadow);
}

.testimonial-author-info h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.testimonial-author-info p {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Contenido del Testimonio */
.testimonial-content {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(135, 182, 56, 0.03) 0%, rgba(182, 207, 125, 0.03) 100%);
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.quote-icon {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Rating Stars */
.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-start;
}

    .testimonial-rating i {
        color: #fbbf24;
        font-size: 1.125rem;
    }

/* Indicador de progreso */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
    width: 0%;
}

/* Controles de Navegación - VISIBLE Y FUNCIONAL */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 100;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 101;
    pointer-events: all;
}

    .carousel-btn:hover {
        background: var(--primary);
        color: var(--white);
        transform: scale(1.1);
    }

    .carousel-btn.prev:hover {
        transform: scale(1.1) translateX(-3px);
    }

    .carousel-btn.next:hover {
        transform: scale(1.1) translateX(3px);
    }

    .carousel-btn:active {
        transform: scale(0.95);
    }

/* Dots de navegación - VISIBLE Y CLICKEABLE */
.carousel-dots {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 100;
}

.carousel-dot {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    position: relative;
    z-index: 101;
    background: var(--white);
    box-shadow: var(--shadow);
    pointer-events: all;
    flex-shrink: 0;
}

    .carousel-dot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .carousel-dot.active {
        opacity: 1;
        border-color: var(--primary);
        transform: scale(1.2);
        box-shadow: 0 0 0 4px rgba(135, 182, 56, 0.2);
    }

    .carousel-dot:hover {
        opacity: 0.8;
        transform: scale(1.1);
    }

/* Responsive */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.875rem;
    }

    .testimonial-carousel {
        height: 550px; /* Más alto en móvil por el contenido vertical */
    }

    .testimonial-item {
        padding: 2rem 1.5rem;
    }

    .testimonial-header {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-inner-img {
        width: 80px;
        height: 80px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .carousel-dot {
        width: 40px;
        height: 40px;
    }

    .testimonial-content {
        padding: 1.5rem;
    }

    .carousel-controls {
        gap: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-carousel {
        height: 600px;
    }

    .carousel-dots {
        gap: 0.5rem;
    }

    .carousel-dot {
        width: 35px;
        height: 35px;
    }
}