/* ========================================
   SMILEY TESTIMONIALS PRO v3.0
   Layout 40% Anfitriona + 60% Testimonios
   ======================================== */

:root {
    --smiley-red: #ff0000;
    --smiley-green: #33cc33;
    --smiley-yellow: #fbbf24;
    --smiley-dark: #1a202c;
    --smiley-gray: #4a5568;
    --section-height: 850px;
}

/* CONTENEDOR PRINCIPAL 40/60 */
.stp-testimonials-wrapper {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 30px;
    max-width: 1400px;
    min-height: 850px;
    max-height: 850px;
    margin: 0 auto;
    padding: 0;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* ========================================
   40% IZQUIERDA - SECCIÓN ANFITRIONA
   ======================================== */

.stp-host-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Foto circular anfitriona */
.stp-host-photo {
    width: 130px;
    height: 130px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 4px solid var(--smiley-green);
}

.stp-host-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Identidad (emoji + nombre) */
.stp-host-identity {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    border: 2px solid var(--smiley-green);
}

.stp-host-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.stp-host-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--smiley-dark);
    margin: 0;
    letter-spacing: 0.5px;
}

/* Mensajes de agradecimiento */
.stp-host-thanks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stp-thank-item {
    font-size: 14px;
    color: var(--smiley-gray);
    line-height: 1.5;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid var(--smiley-green);
    margin: 0;
    transition: all 0.3s ease;
}

.stp-thank-item:hover {
    background: #f0fdf4;
    transform: translateX(4px);
}

/* Cita de despedida */
.stp-host-quote {
    padding: 16px;
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
    border-radius: 12px;
    border: 2px solid var(--smiley-yellow);
    text-align: center;
}

.stp-host-quote .stp-quote-icon {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.stp-quote-text {
    font-size: 15px;
    font-style: italic;
    color: var(--smiley-dark);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   60% DERECHA - TESTIMONIOS
   ======================================== */

.stp-testimonials-section {
    display: flex;
    flex-direction: column;
}

/* Display principal con flip */
.stp-main-display {
    position: relative;
    width: calc(100% - 20px);
    margin-left: 0;
    margin-right: auto;
    aspect-ratio: 3/4;
    max-height: 600px;
    perspective: 1000px;
    margin-bottom: 20px;
}

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

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

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

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

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

/* Bandera país (esquina superior derecha) */
.stp-country-flag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.stp-display-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 16px;
    align-items: end;
}

.stp-display-name {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--smiley-dark);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
}

.stp-display-role {
    font-size: 14px;
    margin: 0;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--smiley-gray);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    grid-column: 1;
    grid-row: 2;
    width: fit-content;
}

/* Estrellas - Inferior derecha */
.stp-display-rating {
    display: flex;
    gap: 3px;
    font-size: 18px;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 6px;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: end;
}

.stp-star {
    color: var(--smiley-yellow);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

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

/* Hint hover */
.stp-hover-hint {
    position: absolute;
    bottom: 70px;
    right: 12px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: stp-pulse 2s infinite;
    backdrop-filter: blur(10px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
    z-index: 5;
}

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

/* REVERSO - Testimonio con degradado Smiley */
.stp-display-back {
    background: linear-gradient(135deg, var(--smiley-red) 0%, var(--smiley-yellow) 50%, var(--smiley-green) 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
}

.stp-testimony-content {
    color: white;
    text-align: center;
    max-width: 90%;
}

.stp-quote-mark {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 10px;
    line-height: 1;
}

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

.stp-testimony-author {
    font-size: 16px;
    font-weight: 700;
    opacity: 0.95;
}

/* CARRUSEL */
.stp-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
}

.stp-carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--smiley-red) #f7fafc;
    flex: 1;
}

.stp-carousel-track::-webkit-scrollbar {
    height: 6px;
}

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

.stp-carousel-track::-webkit-scrollbar-thumb {
    background: var(--smiley-red);
    border-radius: 10px;
}

.stp-carousel-track::-webkit-scrollbar-thumb:hover {
    background: var(--smiley-green);
}

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

.stp-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(51, 204, 51, 0.4);
    border-color: var(--smiley-green);
}

.stp-thumbnail.stp-active {
    border-color: var(--smiley-red);
    box-shadow: 0 0 0 2px var(--smiley-red), 0 4px 12px rgba(255, 0, 0, 0.5);
}

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

/* Bandera en thumbnail */
.stp-thumb-flag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 4px;
    padding: 2px 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Botones carrusel */
.stp-carousel-btn {
    background: var(--smiley-red);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(255, 0, 0, 0.3);
    flex-shrink: 0;
    line-height: 1;
}

.stp-carousel-btn:hover {
    background: var(--smiley-green);
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(51, 204, 51, 0.5);
}

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

/* Instrucción */
.stp-instruction {
    text-align: center;
    color: var(--smiley-gray);
    font-size: 14px;
    margin-top: 12px;
    font-style: italic;
}

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

@media (max-width: 1024px) {
    .stp-testimonials-wrapper {
        grid-template-columns: 35% 65%;
        gap: 24px;
        padding: 24px;
    }
    
    .stp-host-photo {
        width: 120px;
        height: 120px;
    }
    
    .stp-host-name {
        font-size: 20px;
    }
    
    .stp-thank-item {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .stp-testimonials-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 24px;
    }
    
    .stp-host-section {
        gap: 16px;
    }
    
    .stp-host-photo {
        width: 100px;
        height: 100px;
    }
    
    .stp-host-name {
        font-size: 18px;
    }
    
    .stp-thank-item {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .stp-quote-text {
        font-size: 14px;
    }
    
    .stp-main-display {
        max-width: 500px;
        margin: 0 auto 20px;
    }
    
    .stp-country-flag {
        font-size: 22px;
        top: 10px;
        right: 10px;
        padding: 3px 6px;
    }
    
    .stp-display-overlay {
        padding: 16px;
        gap: 6px 12px;
    }
    
    .stp-display-name {
        font-size: 18px;
        padding: 5px 10px;
    }
    
    .stp-display-role {
        font-size: 13px;
        padding: 3px 8px;
    }
    
    .stp-display-rating {
        font-size: 16px;
        padding: 5px 8px;
    }
    
    .stp-testimony-text {
        font-size: 16px;
    }
    
    .stp-thumbnail {
        min-width: 90px;
        width: 90px;
    }
    
    /* Mobile: tap para flip */
    .stp-main-display:active .stp-display-inner {
        transform: rotateY(180deg);
    }
}

@media (max-width: 480px) {
    .stp-testimonials-wrapper {
        padding: 16px;
    }
    
    .stp-host-identity {
        padding: 12px 16px;
    }
    
    .stp-host-emoji {
        font-size: 28px;
    }
    
    .stp-host-name {
        font-size: 16px;
    }
    
    .stp-thank-item {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .stp-host-quote {
        padding: 16px;
    }
    
    .stp-quote-text {
        font-size: 13px;
    }
    
    .stp-country-flag {
        font-size: 20px;
        padding: 2px 5px;
    }
    
    .stp-display-overlay {
        padding: 12px;
        gap: 4px 8px;
    }
    
    .stp-display-name {
        font-size: 16px;
        padding: 4px 8px;
    }
    
    .stp-display-role {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .stp-display-rating {
        font-size: 14px;
        padding: 4px 6px;
        gap: 2px;
    }
    
    .stp-testimony-text {
        font-size: 15px;
    }
    
    .stp-thumbnail {
        min-width: 80px;
        width: 80px;
    }
    
    .stp-thumb-flag {
        font-size: 14px;
    }
    
    .stp-carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .stp-hover-hint {
        display: none;
    }
    
    .stp-instruction::after {
        content: " (toca las fotos)";
    }
}

/* Animaciones entrada */
@keyframes stp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stp-host-section {
    animation: stp-fadeIn 0.5s ease;
}

.stp-testimonials-section {
    animation: stp-fadeIn 0.5s ease 0.15s backwards;
}