/* ==========================================
   ASISTENTE WEB - ULTRA MODERN DESIGN
   Mismo estilo que GalaxIA Index
   ========================================== */

/* Stats Bar - Debajo del Hero */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #ffffff;
    opacity: 0.8;
    font-weight: 500;
}

/* ==========================================
   USE CASES SECTION
   ========================================== */
.use-cases-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.use-case-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.use-case-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.use-case-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.use-case-card:hover::before {
    opacity: 1;
}

.use-case-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glow);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.use-case-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.use-case-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.use-case-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.use-case-item i {
    color: var(--success);
    font-size: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ==========================================
   CONVERSATION EXAMPLES SECTION
   ========================================== */
.conversation-section {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
}

.conversation-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.conversation-card {
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 600px;
    font-family: var(--font-primary);
}

.conversation-header {
    background: #8B5CF6; /* Purple color matching screenshot */
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.conversation-header i {
    font-size: 1.25rem;
    color: white;
}

.conversation-header span {
    font-weight: 600;
    font-size: 1rem;
}

.conversation-messages {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #f8f9fa;
    flex: 1;
    overflow-y: auto;
}

.message-bot,
.message-user {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    position: relative;
}

.message-bot {
    align-self: flex-start;
}

.message-user {
    align-self: flex-end;
    align-items: flex-end;
}

.message-content {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.message-bot .message-content {
    background: #ffffff;
    color: #4a5568;
    border-top-left-radius: 0;
    border: 1px solid #e2e8f0;
}

.message-user .message-content {
    background: #8B5CF6;
    color: #ffffff;
    border-top-right-radius: 0;
}

.message-avatar {
    display: none; /* Removed based on new design */
}

/* Input Area Fake */
.conversation-input-area {
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fake-input {
    flex: 1;
    background: #f1f5f9;
    padding: 0.75rem 1rem;
    border-radius: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: #8B5CF6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

/* Probar Overlay Button */
.conversation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 10, 31, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.conversation-card:hover .conversation-overlay {
    opacity: 1;
}

.btn-probar {
    background: #8B5CF6;
    color: white;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.conversation-card:hover .btn-probar {
    transform: translateY(0);
}

.btn-probar:hover {
    background: #7C3AED;
    transform: scale(1.05);
}

/* ==========================================
   HERO CHAT WIDGET STYLES
   ========================================== */
.hero-chat-window {
    width: 380px; /* Reduced to match standard widget width */
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* Stronger shadow */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    transform: translateY(0);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-chat-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 auto; /* Center the container */
    width: fit-content; /* Wrap the content tightly so the glow follows the shape */
    height: fit-content;
    z-index: 5;
}

/* Constellation / Galaxy Glow Effect */
.hero-chat-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 390px; /* Slightly larger than chat window (380px) */
    height: 610px; /* Slightly larger than chat window (600px) */
    border-radius: 20px;
    z-index: -1;
    background: transparent;
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.6), /* Purple primary glow */
        0 0 60px rgba(124, 58, 237, 0.4), /* Violet secondary glow */
        0 0 100px rgba(79, 70, 229, 0.3); /* Deep blue outer spread */
}

/* Constellation "Stars" - Dots around the border */
.hero-chat-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 440px;
    height: 660px;
    z-index: -2;
    background-image: 
        radial-gradient(1.5px 1.5px at 10% 10%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 90% 10%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 10% 90%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 90% 90%, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 50% 5%, rgba(167, 139, 250, 0.8), transparent),
        radial-gradient(2px 2px at 5% 50%, rgba(167, 139, 250, 0.8), transparent),
        radial-gradient(2px 2px at 95% 50%, rgba(167, 139, 250, 0.8), transparent),
        radial-gradient(2px 2px at 50% 95%, rgba(167, 139, 250, 0.8), transparent),
        radial-gradient(1px 1px at 25% 25%, white, transparent),
        radial-gradient(1px 1px at 75% 75%, white, transparent),
        radial-gradient(1px 1px at 25% 75%, white, transparent),
        radial-gradient(1px 1px at 75% 25%, white, transparent);
    background-size: 100% 100%;
    pointer-events: none;
    opacity: 0.8;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #0066ff, #0052cc);
    padding: 20px;
    color: white;
    position: relative;
    text-align: left; /* Reset alignment */
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.team-avatars {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar.bot {
    background: linear-gradient(135deg, #4169ff, #6b46c1);
    color: white;
    font-size: 18px;
}

.header-text h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: white;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.9);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f7f8fa;
    text-align: left;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4169ff, #6b46c1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.message-bubble {
    background: #0066ff;
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 280px;
    word-wrap: break-word;
}

.message.user {
    flex-direction: row-reverse;
}

.message.user .message-bubble {
    background: white;
    color: #333;
    border-top-right-radius: 4px;
    border-top-left-radius: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Chat Input */
.chat-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e8e9ed;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f8fa;
    border-radius: 24px;
    padding: 10px 16px;
}

.input-icons-left {
    display: flex;
    gap: 10px;
}

.input-icon {
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.powered-by {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.powered-by strong {
    color: #0066ff;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   RESPONSIVE PARA NUEVAS SECCIONES
   ========================================== */
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .conversation-examples {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .use-case-card {
        padding: 2rem 1.5rem;
    }
    
    .conversation-messages {
        padding: 1rem;
    }
}