/* ============================================================
   JOLY IA — LANDING PAGE SHOWCASE (ESTILO SAAS LIGHT)
   Integración armónica con el diseño blanco de Clinent
   ============================================================ */

.joly-section {
    position: relative;
    z-index: 10;
    background: #ffffff;
    color: #0f172a;
    padding: 90px 24px;
    overflow: hidden;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Luces suaves y sutiles de fondo en modo claro */
.joly-ambient-glow-1 {
    position: absolute;
    top: -60px;
    left: 15%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.07) 0%, rgba(139, 92, 246, 0) 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.joly-ambient-glow-2 {
    position: absolute;
    bottom: -60px;
    right: 10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0) 70%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 1;
}

/* Malla sutil en tonos claros */
.joly-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

.joly-container {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Encabezado */
.joly-header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 55px auto;
}

.joly-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #6d28d9;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(109, 40, 217, 0.06);
}

.joly-badge-pill .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: joly-pulse 2s infinite;
}

@keyframes joly-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.joly-badge-tag {
    background: linear-gradient(135deg, #8b5cf6, #0ea5e9);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.joly-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin-bottom: 18px;
}

.joly-gradient-text {
    background: linear-gradient(135deg, #7c3aed 0%, #0284c7 60%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.joly-subtitle {
    font-size: 16.5px;
    color: #64748b;
    line-height: 1.65;
    font-weight: 450;
    max-width: 760px;
    margin: 0 auto;
}

/* Layout Grid Bento */
.joly-showcase-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.98fr;
    gap: 32px;
    align-items: stretch;
    margin-bottom: 45px;
}

/* Columna Izquierda: Tarjetas de Capacidades */
.joly-features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.joly-feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 18px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.joly-feature-card:hover {
    transform: translateY(-3px);
    background: #ffffff;
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 14px 30px -8px rgba(14, 165, 233, 0.12);
}

.joly-f-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.joly-f-icon-box.voice {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
}

.joly-f-icon-box.finance {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0284c7;
}

.joly-f-icon-box.briefing {
    background: #fefce8;
    border: 1px solid #fef08a;
    color: #d97706;
}

.joly-f-icon-box.reports {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #9333ea;
}

.joly-f-content {
    flex: 1;
    min-width: 0;
}

.joly-f-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.joly-f-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin: 0;
}

.joly-f-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.joly-f-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

.joly-f-quote {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-left: 3px solid #0ea5e9;
    border-top: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 6px;
    font-size: 12.5px;
    color: #0369a1;
    font-weight: 500;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Columna Derecha: Simulador Interactivo de Joly */
.joly-interactive-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 45px -12px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.02);
    position: relative;
}

.joly-panel-topbar {
    padding: 15px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.joly-panel-dots {
    display: flex;
    gap: 6px;
}

.joly-panel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.joly-panel-dot.red { background: #ef4444; }
.joly-panel-dot.yellow { background: #f59e0b; }
.joly-panel-dot.green { background: #10b981; }

.joly-panel-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.joly-avatar-glow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
    color: #ffffff;
}

.joly-panel-info h4 {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.joly-panel-info span {
    font-size: 11px;
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.joly-panel-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.joly-mode-tag {
    font-size: 10px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Barra de onda de audio interactiva */
.joly-voice-wave-bar {
    padding: 10px 18px;
    background: #fdf2f8;
    border-bottom: 1px solid #fce7f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.joly-wave-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: #e11d48;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 0;
    overflow: hidden;
}

.joly-wave-label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.joly-soundwave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
}

.joly-soundwave-bar {
    width: 3px;
    background: linear-gradient(180deg, #f43f5e, #8b5cf6);
    border-radius: 3px;
    animation: soundwave-anim 1.2s ease-in-out infinite;
}

.joly-soundwave-bar:nth-child(1) { height: 5px; animation-delay: 0.1s; }
.joly-soundwave-bar:nth-child(2) { height: 13px; animation-delay: 0.25s; }
.joly-soundwave-bar:nth-child(3) { height: 8px; animation-delay: 0.4s; }
.joly-soundwave-bar:nth-child(4) { height: 16px; animation-delay: 0.15s; }
.joly-soundwave-bar:nth-child(5) { height: 11px; animation-delay: 0.3s; }
.joly-soundwave-bar:nth-child(6) { height: 15px; animation-delay: 0.45s; }
.joly-soundwave-bar:nth-child(7) { height: 7px; animation-delay: 0.2s; }
.joly-soundwave-bar:nth-child(8) { height: 13px; animation-delay: 0.35s; }

@keyframes soundwave-anim {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1.2); }
}

/* Contenido de la conversación interactiva */
.joly-chat-window {
    padding: 20px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 290px;
    justify-content: flex-start;
    background: #ffffff;
}

.joly-msg-row {
    display: flex;
    gap: 10px;
    max-width: 92%;
}

.joly-msg-row.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.joly-msg-bubble {
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
}

.joly-msg-row.user .joly-msg-bubble {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    border-bottom-right-radius: 3px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.22);
    font-weight: 500;
}

.joly-msg-row.ai .joly-msg-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 3px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    min-height: 48px;
    transition: all 0.25s ease;
}

/* Animación de entrada suave de mensajes */
.joly-msg-row.animate-in {
    animation: jolySlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes jolySlideUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Indicador de escribiendo / pensando en tiempo real */
.joly-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0284c7;
    font-weight: 600;
    font-size: 12.5px;
    padding: 4px 0;
}

.joly-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 3.5px;
}

.joly-typing-dots span {
    width: 6px;
    height: 6px;
    background: #0ea5e9;
    border-radius: 50%;
    display: inline-block;
    animation: jolyDotPulse 1.4s infinite ease-in-out both;
}

.joly-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.joly-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes jolyDotPulse {
    0%, 80%, 100% {
        transform: scale(0.3);
        opacity: 0.35;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Cursor parpadeante durante el dictado/escritura en vivo */
.joly-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: #0ea5e9;
    margin-left: 3px;
    vertical-align: middle;
    animation: jolyCursorBlink 0.75s infinite;
}

@keyframes jolyCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.joly-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #059669;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
    margin-bottom: 8px;
    animation: jolyPillPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes jolyPillPop {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.joly-sim-card-data {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 11px;
    margin-top: 8px;
    font-size: 12px;
    animation: jolyCardFadeUp 0.4s ease-out forwards;
}

@keyframes jolyCardFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.joly-sim-card-data .row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dashed #e2e8f0;
    color: #475569;
}

.joly-sim-card-data .row:last-child {
    border-bottom: none;
    padding-top: 4px;
    font-weight: 700;
    color: #0284c7;
}

.joly-sim-footer-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    animation: jolyCardFadeUp 0.3s ease-out forwards;
}

/* Chips interactivos para probar preguntas en layout 2x2 simétrico */
.joly-interactive-chips-wrap {
    padding: 14px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.joly-chips-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.joly-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

.joly-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.joly-chip-btn svg {
    flex-shrink: 0;
    color: #0284c7;
    transition: transform 0.2s ease, color 0.2s ease;
}

.joly-chip-btn:hover, .joly-chip-btn.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.joly-chip-btn:hover svg, .joly-chip-btn.active svg {
    color: #ffffff;
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .joly-chips-grid {
        grid-template-columns: 1fr;
    }
}

/* Barra de Estadísticas de Impacto */
.joly-impact-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 26px 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    text-align: center;
}

.joly-stat-box h3 {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.joly-stat-box p {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Botones CTA dentro de la sección */
.joly-cta-wrap {
    margin-top: 36px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-joly-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #ffffff;
    padding: 15px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
}

.btn-joly-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.4);
    color: #ffffff;
}

.btn-joly-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 15px 26px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
}

.btn-joly-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

/* Responsividad */
@media (max-width: 1024px) {
    .joly-showcase-grid {
        grid-template-columns: 1fr;
    }
    .joly-impact-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .joly-section {
        padding: 60px 16px;
    }
    .joly-feature-card {
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }
    .joly-impact-stats {
        grid-template-columns: 1fr;
        padding: 20px 16px;
    }
    .btn-joly-primary, .btn-joly-secondary {
        width: 100%;
        justify-content: center;
    }
}
