/* =============================================================================
   VIVELEAD AI-POWERED SECTION
   Animated Dot Matrix + Floating AI Cards
   ============================================================================= */

/* Section Container */
.vl-ai-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    overflow: hidden;
    position: relative;
}

.vl-ai-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

/* =============================================================================
   LEFT: CONTENT AREA
   ============================================================================= */

.vl-ai-content {
    max-width: 540px;
}

/* Badge */
.vl-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(64, 81, 181, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(64, 81, 181, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4051B5;
    margin-bottom: 20px;
}

.vl-ai-badge__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Heading */
.vl-ai-heading {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.vl-ai-heading__accent {
    background: linear-gradient(135deg, #4051B5 0%, #6366f1 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Description */
.vl-ai-description {
    font-size: 1.125rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 32px 0;
}

/* Features List */
.vl-ai-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.vl-ai-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.vl-ai-feature__icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4051B5 0%, #6366f1 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vl-ai-feature__icon svg {
    color: #ffffff;
}

.vl-ai-feature__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 2px;
}

.vl-ai-feature__text strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.vl-ai-feature__text span {
    font-size: 0.875rem;
    color: #64748b;
}

/* CTA */
.vl-ai-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vl-ai-cta .vl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4051B5 0%, #5a67d8 100%);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(64, 81, 181, 0.3);
}

.vl-ai-cta .vl-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(64, 81, 181, 0.4);
}

.vl-ai-cta .vl-btn-primary svg {
    transition: transform 0.3s ease;
}

.vl-ai-cta .vl-btn-primary:hover svg {
    transform: translateX(4px);
}

.vl-ai-cta__note {
    font-size: 0.875rem;
    color: #64748b;
}

/* =============================================================================
   RIGHT: ANIMATED VISUAL AREA
   ============================================================================= */

.vl-ai-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-ai-canvas {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================================
   SCATTERED PIXEL ANIMATION - Futuristic Processing Effect
   ============================================================================= */

.vl-dot-matrix {
    position: absolute;
    inset: -50px;
    z-index: 1;
    overflow: hidden;
}

.vl-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    opacity: 0;
    animation: pixelProcess 4s ease-in-out infinite;
}

/* Pixel processing animation - fade in, glow, fade out */
@keyframes pixelProcess {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    10% {
        opacity: 0.95;
        transform: scale(1.1);
    }
    30% {
        opacity: 0.7;
        transform: scale(1);
    }
    70% {
        opacity: 0.5;
        transform: scale(0.9);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

/* =============================================================================
   FLOATING AI CARDS
   ============================================================================= */

.vl-ai-cards {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

/* Base Card Styles */
.vl-ai-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* User Question Card */
.vl-ai-card--user {
    width: 100%;
    max-width: 340px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #4051B5 0%, #5a67d8 100%);
    border: none;
    align-self: flex-end;
    margin-right: -20px;
    animation-delay: 0s;
}

.vl-ai-card__user-msg {
    font-size: 0.9375rem;
    color: #ffffff;
    line-height: 1.5;
    min-height: 1.5em;
}

.vl-ai-card--user .vl-typing-cursor {
    color: rgba(255, 255, 255, 0.7);
}

/* Primary Card (AI Response) */
.vl-ai-card--primary {
    width: 100%;
    max-width: 360px;
    padding: 0;
    animation-delay: 0.3s;
    align-self: flex-start;
    margin-left: -20px;
}

.vl-ai-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.vl-ai-card__icon {
    color: #1e293b;
}

.vl-ai-card__title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.vl-ai-card__badge {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.vl-ai-card__body {
    padding: 16px 18px 18px;
}

.vl-ai-card__typing {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
    min-height: 1.5em;
}

/* Typing Cursor */
.vl-typing-cursor {
    display: inline-block;
    animation: blink 0.8s infinite;
    color: #4051B5;
    font-weight: 300;
}

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

/* Alert Card */
.vl-ai-card--alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    width: 100%;
    max-width: 340px;
    border-left: 3px solid #f59e0b;
    animation-delay: 0.5s;
}

.vl-ai-card__icon--warning {
    color: #f59e0b;
    flex-shrink: 0;
}

.vl-ai-card__alert-text {
    font-size: 0.9375rem;
    color: #475569;
    flex: 1;
}

/* Metric Card */
.vl-ai-card--metric {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    animation-delay: 1s;
}

.vl-ai-card__metric-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-ai-card__metric-icon svg {
    color: #ffffff;
}

.vl-ai-card__metric-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vl-ai-card__metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #166534;
}

.vl-ai-card__metric-label {
    font-size: 0.8125rem;
    color: #15803d;
    font-weight: 500;
}

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

@media (max-width: 1024px) {
    .vl-ai-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .vl-ai-content {
        max-width: 100%;
        text-align: center;
    }

    .vl-ai-badge {
        justify-content: center;
    }

    .vl-ai-heading {
        font-size: 2.25rem;
    }

    .vl-ai-features {
        align-items: center;
    }

    .vl-ai-feature {
        text-align: left;
        max-width: 400px;
    }

    .vl-ai-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .vl-ai-visual {
        order: -1;
    }

    .vl-ai-canvas {
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    .vl-ai-section {
        padding: 70px 0;
    }

    .vl-ai-heading {
        font-size: 1.875rem;
    }

    .vl-ai-description {
        font-size: 1rem;
    }

    .vl-ai-canvas {
        max-width: 100%;
    }

    .vl-dot-matrix {
        grid-template-columns: repeat(18, 1fr);
        grid-template-rows: repeat(14, 1fr);
        gap: 6px;
    }

    .vl-ai-card--primary {
        max-width: 300px;
    }

    .vl-ai-card--alert {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .vl-ai-section {
        padding: 50px 0;
    }

    .vl-ai-heading {
        font-size: 1.625rem;
    }

    .vl-ai-feature__icon {
        width: 36px;
        height: 36px;
    }

    .vl-dot-matrix {
        grid-template-columns: repeat(14, 1fr);
        grid-template-rows: repeat(12, 1fr);
        gap: 5px;
    }

    .vl-dot {
        width: 5px;
        height: 5px;
    }

    .vl-ai-cards {
        padding: 20px;
        gap: 12px;
    }

    .vl-ai-card--primary {
        max-width: 260px;
    }

    .vl-ai-card__header {
        padding: 10px 14px;
    }

    .vl-ai-card__body {
        padding: 12px 14px 14px;
    }

    .vl-ai-card--alert {
        max-width: 240px;
        padding: 10px 14px;
    }

    .vl-ai-card--metric {
        padding: 12px 16px;
    }

    .vl-ai-card__metric-value {
        font-size: 1.25rem;
    }
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .vl-dot,
    .vl-ai-card,
    .vl-typing-cursor {
        animation: none;
    }

    .vl-dot {
        opacity: 0.4;
    }
}
