/* ============================================================
   testimonios.css — Sección de Testimonios de Pacientes
   Disfruta Saludable Juchitán
   ============================================================ */

/* ===== SECTION WRAPPER ===== */
.testimonios {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(46, 125, 50, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(76, 175, 80, 0.07) 0%, transparent 50%),
        linear-gradient(160deg, #f0f9f0 0%, #e8f5e9 50%, #f4faf4 100%);
    padding: 7rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.testimonios::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 120px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 0%);
}

/* Decoración de puntos */
.testimonios::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(46, 125, 50, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

.testimonios::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 120px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 0%);
}

/* ===== HEADER ===== */
.testimonios .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 1;
}

.testimonios .section-subtitle {
    display: inline-block;
    background: rgba(46, 125, 50, 0.12);
    color: #1b5e20;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.testimonios .section-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #0a3d0a;
    margin-bottom: 0.8rem;
    line-height: 1.25;
    font-weight: 800;
}

.testimonios .section-description {
    font-size: 1.05rem;
    color: #0a3d0a;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 600;
}

.testimonios .section-description strong {
    color: #0a3d0a;
    font-weight: 800;
}


/* ===== SLIDER WRAPPER ===== */
.testimonios-slider-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow: hidden;
}

.testimonios-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ===== TARJETA TESTIMONIO ===== */
.testimonio-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(46, 125, 50, 0.10);
    overflow: hidden;
    flex: 0 0 calc(33.333% - 1rem);
    min-width: calc(33.333% - 1rem);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.testimonio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 50px rgba(46, 125, 50, 0.18);
}

/* ===== ANTES / DESPUÉS ===== */
.antes-despues {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
}

.antes-despues-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

.antes-panel,
.despues-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0.8rem;
    position: relative;
    overflow: hidden;
}

.antes-panel {
    background: linear-gradient(to bottom, #e0e0e0, #bdbdbd);
}

.despues-panel {
    background: linear-gradient(to bottom, #c8e6c9, #81c784);
}

.antes-panel img,
.despues-panel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.panel-label {
    position: relative;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: #fff;
    backdrop-filter: blur(4px);
}

.antes-panel .panel-label {
    background: rgba(0, 0, 0, 0.55);
}

.despues-panel .panel-label {
    background: rgba(46, 125, 50, 0.85);
}

.despues-divider {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: #fff;
    z-index: 3;
}

.despues-divider::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: var(--primary-color, #2e7d32);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Resultado badge */
.resultado-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #2e7d32;
    color: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    z-index: 4;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}

/* ===== CARD BODY ===== */
.testimonio-body {
    padding: 1.6rem 1.6rem 2rem;
}

.testimonio-stars {
    color: #f5a623;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 0.7rem;
}

.testimonio-texto {
    font-size: 0.97rem;
    color: #444;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 1.2rem;
    min-height: 4.5rem;
}

.testimonio-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid #e8f5e9;
    padding-top: 1rem;
}

.testimonio-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5d6a7, #2e7d32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.testimonio-nombre {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--text-color, #1a1a1a);
}

.testimonio-meta {
    font-size: 0.82rem;
    color: var(--primary-color, #2e7d32);
    font-weight: 600;
}

/* ===== CONTROLES DEL CARRUSEL ===== */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-color, #2e7d32);
    background: #fff;
    color: var(--primary-color, #2e7d32);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: var(--primary-color, #2e7d32);
    color: #fff;
    transform: scale(1.08);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8e6c9;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.slider-dot.active {
    background: var(--primary-color, #2e7d32);
    transform: scale(1.3);
}

/* ===== CTA FINAL REDISEÑADO ===== */
.testimonios-cta-wrap {
    margin-top: 4rem;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    /* La clase .reveal es gestionada por el JS de IntersectionObserver */
}

.testimonios-cta {
    text-align: center;
    padding: 4rem 2.5rem 3.5rem;
    background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 55%, #388e3c 100%);
    border-radius: 32px;
    color: #fff;
    box-shadow:
        0 30px 80px rgba(46, 125, 50, 0.30),
        0 6px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

/* Decoración sutil de fondo */
.testimonios-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.testimonios-cta::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -50px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.cta-deco-top {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.85;
    animation: ctaFloat 3s ease-in-out infinite;
}

@keyframes ctaFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.testimonios-cta h3 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.testimonios-cta>p:not(.cta-subtext) {
    opacity: 0.88;
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ===== BOTÓN PRINCIPAL ===== */
.btn-testimonio-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #25D366;
    color: #fff;
    padding: 1.15rem 2.8rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
    position: relative;
    z-index: 1;
}

.btn-testimonio-cta:hover {
    background: #1da851;
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 16px 44px rgba(37, 211, 102, 0.55);
}

.btn-testimonio-cta svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-testimonio-cta:hover svg {
    transform: scale(1.15);
}

.cta-subtext {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    opacity: 0.70;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .testimonio-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: calc(50% - 0.75rem);
    }
}

@media (max-width: 600px) {
    .testimonios {
        padding: 5rem 0 4rem;
    }

    .testimonio-card {
        flex: 0 0 calc(90vw);
        min-width: calc(90vw);
    }

    .testimonios-slider-wrapper {
        padding: 0 1rem;
    }

    .testimonios-cta {
        border-radius: 24px;
        padding: 3rem 1.5rem 2.5rem;
    }

}

/* ============================================================
   NUEVO DISEÑO PREMIUM DE TARJETAS DE TESTIMONIO
   .t-card-nuevo — Sin nombres, máxima legibilidad
   ============================================================ */

.t-card-nuevo {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.2), box-shadow 0.35s ease;
    border: none;
    flex: 0 0 340px;
    min-width: 340px;
    max-width: 340px;
    cursor: default;
}

.t-card-nuevo:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Header de color --- */
.tcn-header {
    position: relative;
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.tcn-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.tcn-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.3rem;
}

.tcn-rol {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.tcn-tiempo {
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.82rem;
    font-weight: 500;
}

/* --- Cuerpo blanco --- */
.tcn-body {
    padding: 1.6rem 1.6rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.tcn-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 2px;
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.4));
}

.tcn-quote {
    font-family: Georgia, serif;
    font-size: 4rem;
    line-height: 1;
    color: #e8f5e9;
    position: absolute;
    top: 1rem;
    left: 1.2rem;
    pointer-events: none;
    user-select: none;
}

.tcn-texto {
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a1a;
    font-style: italic;
    margin: 0;
    padding-top: 1.2rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .t-card-nuevo {
        flex: 0 0 88vw;
        min-width: 88vw;
        max-width: 88vw;
    }
}

/* ============================================================
   DISEÑO PREMIUM ELEGANTE — .t-card-premium
   Tarjetas con fotos antes/después, texto nítido, fondo oscuro
   ============================================================ */

/* Colores del header de sección sobre fondo oscuro */
.testimonios .section-subtitle {
    background: rgba(255, 255, 255, 0.12);
    color: #a5d6a7;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.testimonios .section-title {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.testimonios .section-description {
    color: rgba(255, 255, 255, 0.7);
}

/* --- Tarjeta Premium --- */
.t-card-premium {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 16px 48px rgba(0, 0, 0, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    flex: 0 0 340px;
    min-width: 340px;
    max-width: 340px;
    transition: transform 0.4s cubic-bezier(.22, .68, 0, 1.15), box-shadow 0.4s ease;
    cursor: default;
}

.t-card-premium:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.08),
        0 30px 70px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.10);
}

/* --- Panel fotos ANTES / DESPUÉS --- */
.tcp-fotos {
    display: flex;
    height: 200px;
    position: relative;
    flex-shrink: 0;
}

.tcp-foto {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.tcp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s ease;
}

.t-card-premium:hover .tcp-img {
    transform: scale(1.04);
}

/* Placeholder para fotos pendientes */
.tcp-foto-placeholder {
    background: linear-gradient(160deg, #d7e9d8, #b2d5b5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcp-foto-despues-bg {
    background: linear-gradient(160deg, #a5d6a7, #43a047);
}

.tcp-placeholder-inner {
    text-align: center;
    font-size: 1.8rem;
    color: rgba(0, 0, 0, 0.35);
    line-height: 1.5;
}

.tcp-placeholder-inner small {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 0.2rem;
}

/* Divisor central con flecha */
.tcp-divider {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    border: 2px solid #e8f5e9;
}

.tcp-flecha {
    font-size: 1rem;
    color: #2e7d32;
    font-weight: 900;
}

/* Etiquetas ANTES / DESPUÉS */
.tcp-label {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    white-space: nowrap;
}

.tcp-antes {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    backdrop-filter: blur(4px);
}

.tcp-despues {
    background: rgba(46, 125, 50, 0.85);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Badge de resultado flotante */
.tcp-resultado-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 20;
    background: #2e7d32;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

/* --- Cuerpo de la tarjeta --- */
.tcp-body {
    padding: 1.4rem 1.6rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.tcp-stars {
    color: #f59e0b;
    font-size: 1rem;
    letter-spacing: 2px;
    filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.5));
}

.tcp-texto {
    font-size: 0.97rem;
    line-height: 1.75;
    color: #0a3d0a !important;
    font-style: italic;
    margin: 0;
    font-weight: 600;
}

.tcp-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.4rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e8f5e9;
}

.tcp-rol {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0a3d0a;
}

.tcp-tiempo {
    font-size: 0.78rem;
    color: #2e5a2e;
    font-weight: 600;
}



/* --- Responsive --- */
@media (max-width: 600px) {
    .t-card-premium {
        flex: 0 0 88vw;
        min-width: 88vw;
        max-width: 88vw;
    }

    .tcp-fotos {
        height: 175px;
    }
}