/* ============================================================
   COMPONENTE - TESTIMONIALS / TESTIMONIOS
   ============================================================ */

.testimonials {
    padding: clamp(1.5rem, 3vw, 4rem) 0 clamp(1.5rem, 3vw, 4rem);
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
}

.testimonials__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 1.5vw, 2rem);
}

/* Header */
.testimonials__header {
    text-align: center;
}

.testimonials__title {
    font-family: var(--font-family-primary);
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.15;
    color: var(--color-text-dark);
    text-align: center;
    margin: 0 0 0.25rem 0;
}

.testimonials__title-break {
    display: block;
    color: #7C3AED;
}

.testimonials__subtitle {
    display: none;
    font-family: var(--font-family-primary);
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}

/* Stats - oculto en móvil */
.testimonials__stats {
    display: none;
}

/* Carousel Wrapper */
.testimonials__carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Arrows - ocultos en móvil */
.testimonials__arrow {
    display: none;
}

/* Carousel */
.testimonials__carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.testimonials__track {
    display: flex;
    transition: transform 0.3s ease;
}

.testimonials__slide {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
}

/* Card */
.testimonials__card {
    background: #FFFFFF;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 280px;
    border: 1px solid #E2E8F0;
}

.testimonials__card--featured {
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Card Video */
.testimonials__card-video {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #000;
}

.testimonials__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Video overlay con nombre */
.testimonials__video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.75rem 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: #FFFFFF;
    font-family: var(--font-family-primary);
    font-size: 0.75rem;
    line-height: 1.3;
}

.testimonials__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.testimonials__play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.testimonials__play-btn svg {
    margin-left: 3px;
    color: #0F172A;
}

.testimonials__play-btn svg.spinner {
    margin-left: 0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.testimonials__video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #FFFFFF;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-medium);
}

/* Card Content */
.testimonials__card-content {
    padding: 1rem;
    background: #FFFFFF;
}

.testimonials__quote {
    font-family: var(--font-family-primary);
    font-size: 0.875rem;
    font-weight: var(--font-weight-regular);
    color: #0F172A;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.testimonials__quote::before {
    content: '';
}

.testimonials__quote::after {
    content: '';
}

.testimonials__author {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-bottom: 0.5rem;
}

.testimonials__author-name {
    font-family: var(--font-family-primary);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: #0F172A;
}

.testimonials__author-business {
    font-family: var(--font-family-primary);
    font-size: 0.75rem;
    color: #7C3AED;
    font-style: italic;
}

.testimonials__rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.testimonials__stars {
    color: #FBBF24;
    font-size: 0.875rem;
    letter-spacing: 2px;
}

.testimonials__rating-number {
    font-family: var(--font-family-primary);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    color: #64748B;
}

/* Dots */
.testimonials__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.testimonials__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #CBD5E1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.testimonials__dot:hover {
    background: #94A3B8;
}

.testimonials__dot--active {
    background: #0F172A;
    transform: scale(1.1);
}

/* ============================================================
   MÓVIL (hasta 480px) - Compacto para caber en viewport
   ============================================================ */
@media (max-width: 480px) {
    .testimonials {
        padding: 1rem 0;
    }

    .testimonials__container {
        padding: 0 0.5rem;
        gap: 0.5rem;
    }

    .testimonials__title {
        font-size: 1.1rem;
        margin-bottom: 0.15rem;
    }

    .testimonials__slide {
        padding: 0 0.5rem;
    }

    .testimonials__card {
        max-width: 260px;
    }

    .testimonials__card-video {
        aspect-ratio: 1/1;
    }

    .testimonials__card-content {
        padding: 0.6rem;
    }

    .testimonials__quote {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        line-height: 1.4;
    }

    .testimonials__author {
        margin-bottom: 0.25rem;
    }

    .testimonials__author-name {
        font-size: 0.75rem;
    }

    .testimonials__author-business {
        font-size: 0.65rem;
    }

    .testimonials__stars {
        font-size: 0.7rem;
    }

    .testimonials__rating-number {
        font-size: 0.65rem;
    }

    .testimonials__dots {
        margin-top: 0.5rem;
    }

    .testimonials__dot {
        width: 8px;
        height: 8px;
    }

    .testimonials__play-btn {
        width: 44px;
        height: 44px;
    }

    .testimonials__play-btn svg {
        width: 16px;
        height: 16px;
    }

    .testimonials__video-duration {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/* ============================================================
   MÓVIL MEDIANO (481px - 767px) - Espacio de seguridad
   ============================================================ */
@media (min-width: 481px) and (max-width: 767px) {
    .testimonials__container {
        padding: 0 1rem;
    }

    .testimonials__slide {
        padding: 0 1rem;
    }
}

/* ============================================================
   TABLET (768px+)
   ============================================================ */
@media (min-width: 768px) {
    .testimonials__subtitle {
        display: block;
    }

    .testimonials__title-break {
        display: inline;
    }

    /* Mostrar 1 card centrada en tablet */
    .testimonials__slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.75rem;
    }

    .testimonials__card {
        max-width: 350px;
    }

    .testimonials__carousel-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Stats en tablet */
    .testimonials__stats {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(1rem, 2vw, 2rem);
        padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1rem, 2vw, 2rem);
        background: #FFFFFF;
        border-radius: 1rem;
        border: 1px solid #E2E8F0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .testimonials__stat {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .testimonials__stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #EDE9FE;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #7C3AED;
    }

    .testimonials__stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .testimonials__stat-content {
        display: flex;
        flex-direction: column;
    }

    .testimonials__stat-number {
        font-family: var(--font-family-primary);
        font-size: 1rem;
        font-weight: var(--font-weight-bold);
        color: #0F172A;
        line-height: 1.2;
    }

    .testimonials__stat-label {
        font-family: var(--font-family-primary);
        font-size: 0.625rem;
        color: #64748B;
        line-height: 1.3;
    }

    .testimonials__stat-divider {
        width: 1px;
        height: 32px;
        background: #E2E8F0;
    }

    /* Arrows en tablet */
    .testimonials__arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #FFFFFF;
        border: 1px solid #E2E8F0;
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .testimonials__arrow:hover {
        background: #F8FAFC;
        border-color: #CBD5E1;
    }

    .testimonials__arrow svg {
        width: 20px;
        height: 20px;
        color: #0F172A;
    }

}

/* ============================================================
   DESKTOP (1025px+) - Mostrar 3 testimonios visibles
   ============================================================ */
@media (min-width: 1025px) {
    .testimonials {
        padding: clamp(3rem, 5vw, 5rem) 0;
    }

    .testimonials__container {
        gap: clamp(1.5rem, 2.5vw, 2.5rem);
    }

    /* Stats */
    .testimonials__stats {
        gap: clamp(1.5rem, 3vw, 3rem);
        padding: clamp(1rem, 2vw, 1.5rem) clamp(2rem, 4vw, 4rem);
    }

    .testimonials__stat {
        gap: 0.75rem;
    }

    .testimonials__stat-icon {
        width: 40px;
        height: 40px;
    }

    .testimonials__stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .testimonials__stat-number {
        font-size: 1.25rem;
    }

    .testimonials__stat-label {
        font-size: 0.75rem;
    }

    .testimonials__stat-divider {
        height: 40px;
    }

    /* Arrows */
    .testimonials__arrow {
        width: 48px;
        height: 48px;
    }

    .testimonials__arrow svg {
        width: 24px;
        height: 24px;
    }

    /* Carousel wrapper - más ancho para 3 cards */
    .testimonials__carousel-wrapper {
        max-width: 1200px;
    }

    /* Mostrar dots también en desktop */
    .testimonials__dots {
        display: flex;
        margin-top: 1.5rem;
    }

    .testimonials__dot {
        width: 12px;
        height: 12px;
    }

    /* Slides - mostrar 3 cards (33.333% cada una) */
    .testimonials__slide {
        flex: 0 0 33.333%;
        max-width: 33.333%;
        padding: 0 0.75rem;
    }

    .testimonials__card {
        max-width: 100%;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .testimonials__card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    }


    /* Card video desktop */
    .testimonials__card-video {
        aspect-ratio: 3/4;
    }

    .testimonials__play-btn {
        width: 64px;
        height: 64px;
    }

    .testimonials__play-btn svg {
        width: 24px;
        height: 24px;
    }

    .testimonials__card-content {
        padding: 1.25rem;
    }

    .testimonials__quote {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .testimonials__author-name {
        font-size: 0.9rem;
    }

    .testimonials__author-business {
        font-size: 0.8rem;
    }
}

/* ============================================================
   LARGE DESKTOP (1280px+)
   ============================================================ */
@media (min-width: 1280px) {
    .testimonials__carousel-wrapper {
        max-width: 1300px;
    }

    .testimonials__stat-number {
        font-size: 1.5rem;
    }

    .testimonials__stat-label {
        font-size: 0.8125rem;
    }

    .testimonials__slide {
        flex: 0 0 33.333%;
        max-width: 33.333%;
        padding: 0 1rem;
    }

    .testimonials__card {
        max-width: 100%;
    }
}

/* ============================================================
   EXTRA LARGE DESKTOP (1440px+)
   ============================================================ */
@media (min-width: 1440px) {
    .testimonials__carousel-wrapper {
        max-width: 1400px;
    }

    .testimonials__slide {
        padding: 0 1.25rem;
    }

    .testimonials__card {
        max-width: 100%;
    }
}

/* ============================================================
   DESKTOP GRANDE (1366px+) - Compensar barra de features del hero
   ============================================================ */
@media (min-width: 1366px) {
    .testimonials {
        padding-top: clamp(8rem, 12vw, 12rem);
    }
}
