/* ============================================================
   SENSORA-OS NEURAL NETWORK GRAPHICS
   Add these styles to your existing CSS for homepage effects
   ============================================================ */

/* ==================== NEURAL NETWORK BACKGROUND ==================== */

/* Add this class to your hero-section in index.html: 
   <section class="hero-section neural-hero"> */

.neural-hero {
    position: relative;
}

/* Animated Neural Network Canvas */
.neural-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Connection Lines */
        linear-gradient(45deg, transparent 48%, rgba(74, 144, 226, 0.15) 49%, rgba(74, 144, 226, 0.15) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(0, 212, 255, 0.12) 49%, rgba(0, 212, 255, 0.12) 51%, transparent 52%),
        /* Nodes */
        radial-gradient(circle at 15% 25%, rgba(74, 144, 226, 0.3) 0%, transparent 2%),
        radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.25) 0%, transparent 2%),
        radial-gradient(circle at 25% 65%, rgba(139, 92, 246, 0.2) 0%, transparent 2%),
        radial-gradient(circle at 75% 70%, rgba(74, 144, 226, 0.25) 0%, transparent 2%),
        radial-gradient(circle at 50% 45%, rgba(0, 212, 255, 0.2) 0%, transparent 2%),
        radial-gradient(circle at 40% 85%, rgba(74, 144, 226, 0.2) 0%, transparent 2%),
        radial-gradient(circle at 90% 75%, rgba(139, 92, 246, 0.2) 0%, transparent 2%);
    background-size:
        300px 300px,
        350px 350px,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%,
        100% 100%;
    animation: neuralPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes neuralPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* ==================== LOGO INTEGRATION WITH NEURAL EFFECT ==================== */

/* Add this wrapper around your hero content */
.neural-logo-container {
    position: relative;
    display: inline-block;
    margin: 2rem auto;
}

.neural-logo {
    width: 120px;
    height: 120px;
    position: relative;
    display: block;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 8px 25px rgba(74, 144, 226, 0.4));
    animation: logoFloat 6s ease-in-out infinite;
    z-index: 2;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

/* Neural Connections emanating from logo */
.neural-logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-image:
        radial-gradient(circle at 50% 50%, transparent 45%, rgba(74, 144, 226, 0.1) 46%, transparent 47%),
        radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 212, 255, 0.08) 61%, transparent 62%),
        radial-gradient(circle at 50% 50%, transparent 75%, rgba(139, 92, 246, 0.06) 76%, transparent 77%);
    animation: neuralRings 4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes neuralRings {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Synaptic Nodes around logo */
.neural-logo-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background-image:
        /* Nodes in circular pattern */
        radial-gradient(circle at 50% 10%, rgba(74, 144, 226, 0.4) 0%, transparent 3%),
        radial-gradient(circle at 85% 25%, rgba(0, 212, 255, 0.35) 0%, transparent 3%),
        radial-gradient(circle at 95% 50%, rgba(139, 92, 246, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 85% 75%, rgba(74, 144, 226, 0.35) 0%, transparent 3%),
        radial-gradient(circle at 50% 90%, rgba(0, 212, 255, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 15% 75%, rgba(139, 92, 246, 0.35) 0%, transparent 3%),
        radial-gradient(circle at 5% 50%, rgba(74, 144, 226, 0.3) 0%, transparent 3%),
        radial-gradient(circle at 15% 25%, rgba(0, 212, 255, 0.35) 0%, transparent 3%);
    animation: synapticPulse 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes synapticPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(45deg);
    }
}

/* ==================== BRAIN SYNAPSES DECORATION ==================== */

/* Optional: Add to intro-section for continued effect */
.intro-section.neural-intro::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background-image:
        /* Synaptic connections */
        radial-gradient(circle at 30% 30%, rgba(74, 144, 226, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.06) 0%, transparent 35%),
        /* Neural pathways */
        linear-gradient(45deg, transparent 48%, rgba(74, 144, 226, 0.05) 49%, transparent 51%),
        linear-gradient(-45deg, transparent 48%, rgba(0, 212, 255, 0.04) 49%, transparent 51%);
    background-size: 100% 100%, 100% 100%, 150px 150px, 180px 180px;
    transform: translate(20%, -20%) rotate(15deg);
    animation: brainPathways 15s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes brainPathways {
    0% {
        background-position: 0% 0%, 0% 0%, 0 0, 0 0;
    }

    100% {
        background-position: 0% 0%, 0% 0%, 150px 150px, -180px 180px;
    }
}

/* ==================== PULSING NEURONS (Alternative Style) ==================== */

/* Create actual node elements - Add to HTML for more control:
   <div class="neuron-node" style="top: 20%; left: 15%;"></div>
   Repeat with different positions */

.neuron-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle,
            rgba(74, 144, 226, 0.8) 0%,
            rgba(74, 144, 226, 0.3) 50%,
            transparent 100%);
    border-radius: 50%;
    animation: neuronPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.neuron-node:nth-child(2) {
    animation-delay: 0.5s;
}

.neuron-node:nth-child(3) {
    animation-delay: 1s;
}

.neuron-node:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes neuronPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE ADJUSTMENTS ==================== */

@media (max-width: 768px) {
    .neural-logo {
        width: 90px;
        height: 90px;
    }

    .neural-logo-container::before {
        width: 180px;
        height: 180px;
    }

    .neural-logo-container::after {
        width: 220px;
        height: 220px;
    }

    .intro-section.neural-intro::before {
        width: 400px;
        height: 400px;
    }
}