/* ===== ASISTENTE VIRTUAL INTEGRADO ===== */
.assistant-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
}

.assistant-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.assistant-container:hover {
    transform: translateY(-5px);
}

.assistant-header {
    background: linear-gradient(135deg, #0a0f1a 0%, #0f172a 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 3px solid #10b981;
}

.assistant-icon svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.assistant-title h3 {
    color: white;
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
}

.assistant-title p {
    color: #a0aec0;
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
}

/* Área de mensajes */
.chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Scroll personalizado */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 10px;
}

/* Mensajes */
.message {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 85%;
    padding: 1rem 1.2rem;
    border-radius: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.bot .message-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.25rem;
    color: #1a202c;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message.user .message-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Estilos para texto dentro del mensaje */
.message-content strong {
    color: #10b981;
    font-weight: 600;
}

.message.user .message-content strong {
    color: #ffffff;
}

.message-content em {
    font-style: italic;
}

/* Indicador de escritura */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    background: white;
    border-radius: 1.2rem;
    border-bottom-left-radius: 0.25rem;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Área de input */
.chat-input-area {
    padding: 1rem 1.5rem 1.5rem;
    background: white;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

#chatInput {
    flex: 1;
    padding: 0.85rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

#chatInput:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.send-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-button svg {
    width: 22px;
    height: 22px;
    color: white;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.send-button:active {
    transform: scale(0.98);
}

/* Footer del asistente */
.assistant-footer {
    background: #f1f5f9;
    padding: 0.75rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.assistant-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .assistant-section {
        padding: 2rem 1rem;
    }
    
    .assistant-header {
        padding: 1rem 1.25rem;
    }
    
    .assistant-title h3 {
        font-size: 1.1rem;
    }
    
    .chat-messages {
        height: 400px;
        padding: 1rem;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }
    
    .assistant-icon svg {
        width: 36px;
        height: 36px;
    }
}