/* Testimonials Carousel Pro - Estilos Optimizados Compactos */

.tcp-section {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.tcp-header {
    text-align: center;
    margin-bottom: 20px;
}

.tcp-tag {
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.tcp-title {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 900;
    line-height: 1.2;
}

.tcp-description {
    font-size: 0.95rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* WRAPPER PRINCIPAL */
.tcp-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* DISPLAY PRINCIPAL - MÁS COMPACTO */
.tcp-main-display {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-width: 100%;
    margin: 0 auto 20px;
    perspective: 1000px;
}

.tcp-display-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.tcp-main-display:hover .tcp-display-inner {
    transform: rotateY(180deg);
}

.tcp-display-front,
.tcp-display-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* FRONTAL - Imagen */
.tcp-display-front {
    background: #f3f4f6;
}

.tcp-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: opacity 0.3s ease;
}

.tcp-display-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
    padding: 25px 20px;
    color: white;
}

.tcp-display-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    transition: opacity 0.3s ease;
}

.tcp-display-role {
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

/* ESTRELLAS AMARILLAS */
.tcp-display-rating {
    display: flex;
    gap: 3px;
    font-size: 1rem;
    margin-top: 6px;
}

.tcp-star {
    color: #fbbf24;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.tcp-star.empty {
    color: rgba(255,255,255,0.25);
}

/* HINT A LA ALTURA DE LAS ESTRELLAS - No invasivo */
.tcp-hover-hint {
    position: absolute;
    bottom: 68px;
    right: 12px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: tcp-pulse 2s infinite;
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

@keyframes tcp-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* REVERSO - Testimonio con TUS COLORES DE MARCA */
.tcp-display-back {
    background: linear-gradient(135deg, #ff0000 0%, #33cc33 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 35px;
}

.tcp-testimony-content {
    color: white;
    text-align: center;
    max-width: 550px;
}

.tcp-quote-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 12px;
    line-height: 1;
}

.tcp-testimony-text {
    font-size: 1.15rem;
    line-height: 1.65;
    margin-bottom: 20px;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tcp-testimony-author {
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.95;
}

/* CARRUSEL HORIZONTAL INFERIOR - MÁS COMPACTO */
.tcp-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0;
}

.tcp-carousel-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px 3px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    flex: 1;
}

.tcp-carousel-track::-webkit-scrollbar {
    height: 5px;
}

.tcp-carousel-track::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

.tcp-carousel-track::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.tcp-carousel-track::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.tcp-thumbnail {
    min-width: 100px;
    width: 100px;
    aspect-ratio: 3/4;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.tcp-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tcp-thumbnail.tcp-active {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px #fbbf24, 0 4px 12px rgba(251, 191, 36, 0.5);
}

.tcp-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.tcp-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tcp-thumbnail:hover .tcp-thumbnail-overlay,
.tcp-thumbnail.tcp-active .tcp-thumbnail-overlay {
    opacity: 1;
}

.tcp-thumbnail-name {
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
}

.tcp-thumbnail-rating {
    display: flex;
    gap: 1px;
    font-size: 0.6rem;
    color: #fbbf24;
}

/* BOTONES DEL CARRUSEL */
.tcp-carousel-btn {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    line-height: 1;
}

.tcp-carousel-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.5);
}

.tcp-carousel-btn:active {
    transform: scale(0.95);
}

/* INSTRUCCIÓN - MÁS COMPACTA */
.tcp-instruction {
    text-align: center;
    color: #6b7280;
    font-size: 0.82rem;
    margin-top: 12px;
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .tcp-section {
        padding: 20px 20px;
    }

    .tcp-header {
        margin-bottom: 18px;
    }

    .tcp-title {
        font-size: 1.75rem;
    }

    .tcp-main-display {
        max-width: 500px;
        margin-bottom: 18px;
    }

    .tcp-display-name {
        font-size: 1.3rem;
    }

    .tcp-hover-hint {
        font-size: 0.7rem;
        padding: 7px 14px;
        bottom: 70px;
    }

    .tcp-testimony-text {
        font-size: 1.05rem;
    }

    .tcp-thumbnail {
        min-width: 90px;
        width: 90px;
    }

    .tcp-carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    /* En tablet/móvil: Tap para flip */
    .tcp-main-display:active .tcp-display-inner {
        transform: rotateY(180deg);
    }
}

@media (max-width: 640px) {
    .tcp-section {
        padding: 18px 18px;
    }

    .tcp-header {
        margin-bottom: 15px;
    }

    .tcp-title {
        font-size: 1.5rem;
    }

    .tcp-description {
        font-size: 0.9rem;
    }

    .tcp-main-display {
        margin-bottom: 15px;
    }

    .tcp-display-overlay {
        padding: 20px 18px;
    }

    .tcp-display-name {
        font-size: 1.2rem;
    }

    .tcp-display-rating {
        font-size: 0.9rem;
    }

    .tcp-testimony-text {
        font-size: 0.95rem;
    }

    .tcp-thumbnail {
        min-width: 80px;
        width: 80px;
    }

    .tcp-carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .tcp-hover-hint {
        bottom: 65px;
        padding: 6px 12px;
        font-size: 0.65rem;
    }

    .tcp-instruction {
        font-size: 0.78rem;
        margin-top: 10px;
    }

    .tcp-instruction::after {
        content: " (toca las imágenes)";
    }
}

/* ANIMACIONES DE ENTRADA */
@keyframes tcp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tcp-main-display {
    animation: tcp-fadeIn 0.5s ease;
}

.tcp-carousel-container {
    animation: tcp-fadeIn 0.5s ease 0.15s backwards;
}