/* ==========================================
   AI AGENTS COMMUNICATION NETWORK STYLES
   ========================================== */

/* AI Swarm Container */
.ai-swarm-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile AI Agents - initially hidden */
.mobile-ai-agents {
  display: none;
}

/* Network Grid Background - Logo Colors */
.ai-network-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: network-pulse 4s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes network-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.4; }
}

/* Central Orchestrator - Logo Colors */
.central-orchestrator-main {
  position: absolute;
  top: 50%;
  left: 20%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.orchestrator-core {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00e5ff, #2196f3, #673ab7);
  border-radius: 50%;
  box-shadow: 
    0 0 30px rgba(0, 229, 255, 0.4),
    0 0 60px rgba(33, 150, 243, 0.2);
  animation: orchestrator-float 6s ease-in-out infinite;
}

.orchestrator-pulse {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 50%;
  animation: orchestrator-pulse 2s ease-in-out infinite;
}

.orchestrator-pulse::before,
.orchestrator-pulse::after {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 50%;
  animation: orchestrator-pulse 2s ease-in-out infinite 0.5s;
}

.orchestrator-pulse::after {
  top: -25px;
  left: -25px;
  right: -25px;
  bottom: -25px;
  animation-delay: 1s;
}

@keyframes orchestrator-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

@keyframes orchestrator-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.orchestrator-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  animation: icon-glow 3s ease-in-out infinite;
  color: white;
}

.orchestrator-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.orchestrator-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes icon-glow {
  0%, 100% { 
    filter: brightness(1);
    transform: scale(1);
  }
  50% { 
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255,255,255,0.5));
    transform: scale(1.1);
  }
}

/* AI Agent Swarm */
.ai-agent-swarm {
  position: absolute;
  z-index: 15;
}

.agent-core {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: agent-float 4s ease-in-out infinite;
}

.agent-pulse {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  animation: agent-pulse 3s ease-in-out infinite;
}

@keyframes agent-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

@keyframes agent-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

.agent-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  animation: agent-icon-pulse 2s ease-in-out infinite;
  color: white;
}

.agent-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.agent-label {
  font-size: 0.6rem;
  font-weight: 500;
  color: white;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

@keyframes agent-icon-pulse {
  0%, 100% { 
    transform: scale(1);
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.2);
    filter: brightness(1.2) drop-shadow(0 0 5px rgba(255,255,255,0.3));
  }
}

/* Agent Positioning - Seitlich um den Hero-Text verteilt */
.agent-1 {
  top: 25%;
  left: 8%;
  animation-delay: 0s;
}

.agent-1 .agent-core {
  background: linear-gradient(135deg, #00e5ff, #2196f3);
  animation-delay: 0s;
}

.agent-2 {
  top: 15%;
  right: 8%;
  animation-delay: 0.5s;
}

.agent-2 .agent-core {
  background: linear-gradient(135deg, #2196f3, #673ab7);
  animation-delay: 0.5s;
}

.agent-3 {
  top: 45%;
  left: 5%;
  animation-delay: 1s;
}

.agent-3 .agent-core {
  background: linear-gradient(135deg, #673ab7, #e91e63);
  animation-delay: 1s;
}

.agent-4 {
  top: 35%;
  right: 5%;
  animation-delay: 1.5s;
}

.agent-4 .agent-core {
  background: linear-gradient(135deg, #e91e63, #00ff88);
  animation-delay: 1.5s;
}

.agent-5 {
  top: 65%;
  left: 12%;
  animation-delay: 2s;
}

.agent-5 .agent-core {
  background: linear-gradient(135deg, #00ff88, #00e5ff);
  animation-delay: 2s;
}

.agent-6 {
  top: 55%;
  right: 12%;
  animation-delay: 2.5s;
}

.agent-6 .agent-core {
  background: linear-gradient(135deg, #00e5ff, #673ab7);
  animation-delay: 2.5s;
}

.agent-7 {
  top: 75%;
  left: 18%;
  animation-delay: 3s;
}

.agent-7 .agent-core {
  background: linear-gradient(135deg, #00ff88, #00e5ff);
  animation-delay: 3s;
}

.agent-8 {
  top: 75%;
  right: 18%;
  animation-delay: 3.5s;
}

.agent-8 .agent-core {
  background: linear-gradient(135deg, #673ab7, #00ff88);
  animation-delay: 3.5s;
}

/* Communication Lines */
.communication-line {
  position: absolute;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(6, 182, 212, 0.6), 
    rgba(139, 92, 246, 0.6), 
    transparent
  );
  height: 2px;
  transform-origin: center;
  animation: data-flow 4s ease-in-out infinite;
  opacity: 0;
}

@keyframes data-flow {
  0%, 20% { opacity: 0; transform: scaleX(0); }
  30%, 70% { opacity: 1; transform: scaleX(1); }
  80%, 100% { opacity: 0; transform: scaleX(0); }
}

/* Line Positioning and Timing - Angepasst für seitliche Verteilung */
.line-1 {
  top: 50%;
  left: 20%;
  width: 25%;
  transform: rotate(-25deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 0s;
}

.line-2 {
  top: 50%;
  left: 20%;
  width: 55%;
  transform: rotate(-35deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 0.5s;
}

.line-3 {
  top: 50%;
  left: 20%;
  width: 20%;
  transform: rotate(-5deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 1s;
}

.line-4 {
  top: 50%;
  left: 20%;
  width: 55%;
  transform: rotate(-15deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 1.5s;
}

.line-5 {
  top: 50%;
  left: 20%;
  width: 30%;
  transform: rotate(15deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 2s;
}

.line-6 {
  top: 50%;
  left: 20%;
  width: 50%;
  transform: rotate(5deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 2.5s;
}

.line-7 {
  top: 50%;
  left: 20%;
  width: 35%;
  transform: rotate(25deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 3s;
}

.line-8 {
  top: 50%;
  left: 20%;
  width: 55%;
  transform: rotate(25deg) translateY(-50%);
  transform-origin: left center;
  animation-delay: 3.5s;
}

/* Data Flow Particles - Logo Colors */
.data-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #00e5ff, #673ab7);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  animation: particle-flow 6s linear infinite;
  opacity: 0;
}

@keyframes particle-flow {
  0% { 
    opacity: 0; 
    transform: scale(0.5);
  }
  10% { 
    opacity: 1; 
    transform: scale(1);
  }
  90% { 
    opacity: 1; 
    transform: scale(1);
  }
  100% { 
    opacity: 0; 
    transform: scale(0.5);
  }
}

/* Particle Paths - Angepasst für seitliche Verteilung um Hero-Text */
.particle-1 {
  top: 50%;
  left: 20%;
  animation: particle-path-1 6s linear infinite;
  animation-delay: 0s;
}

@keyframes particle-path-1 {
  0% { top: 50%; left: 20%; }
  100% { top: 25%; left: 8%; }
}

.particle-2 {
  top: 50%;
  left: 20%;
  animation: particle-path-2 6s linear infinite;
  animation-delay: 1s;
}

@keyframes particle-path-2 {
  0% { top: 50%; left: 20%; }
  100% { top: 15%; right: 8%; }
}

.particle-3 {
  top: 50%;
  left: 20%;
  animation: particle-path-3 6s linear infinite;
  animation-delay: 2s;
}

@keyframes particle-path-3 {
  0% { top: 50%; left: 20%; }
  100% { top: 45%; left: 5%; }
}

.particle-4 {
  top: 50%;
  left: 20%;
  animation: particle-path-4 6s linear infinite;
  animation-delay: 3s;
}

@keyframes particle-path-4 {
  0% { top: 50%; left: 20%; }
  100% { top: 35%; right: 5%; }
}

.particle-5 {
  top: 50%;
  left: 20%;
  animation: particle-path-5 6s linear infinite;
  animation-delay: 4s;
}

@keyframes particle-path-5 {
  0% { top: 50%; left: 20%; }
  100% { top: 65%; left: 12%; }
}

.particle-6 {
  top: 50%;
  left: 20%;
  animation: particle-path-6 6s linear infinite;
  animation-delay: 5s;
}

@keyframes particle-path-6 {
  0% { top: 50%; left: 20%; }
  100% { top: 55%; right: 12%; }
}

.particle-7 {
  top: 50%;
  left: 20%;
  animation: particle-path-7 6s linear infinite;
  animation-delay: 1.5s;
}

@keyframes particle-path-7 {
  0% { top: 50%; left: 20%; }
  100% { top: 75%; left: 18%; }
}

.particle-8 {
  top: 50%;
  left: 20%;
  animation: particle-path-8 6s linear infinite;
  animation-delay: 2.5s;
}

@keyframes particle-path-8 {
  0% { top: 50%; left: 20%; }
  100% { top: 75%; right: 18%; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-swarm-container {
    display: none !important;
  }
  
  .central-orchestrator-main {
    display: none !important;
  }
  
  .ai-agent-swarm {
    display: none !important;
  }
  
  .communication-line {
    display: none !important;
  }
  
  .data-particle {
    display: none !important;
  }
  
  .ai-network-background {
    display: none !important;
  }
}

/* ==========================================
   MOBILE OPTIMIZATION - Agents Below Content
   ========================================== */

/* Mobile - Hide AI Animation in Hero */
@media (max-width: 768px) {
  .ai-swarm-container {
    display: none !important;
  }
  
  /* Show simplified mobile AI animation at bottom */
  .mobile-ai-agents {
    display: block !important;
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 5;
    pointer-events: none;
  }
  
  .mobile-agent {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(139, 92, 246, 0.4));
    border-radius: 50%;
    animation: mobile-float 4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
    opacity: 0.6;
  }
  
  .mobile-agent:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
  }
  
  .mobile-agent:nth-child(2) {
    left: 30%;
    animation-delay: 0.5s;
  }
  
  .mobile-agent:nth-child(3) {
    left: 50%;
    animation-delay: 1s;
  }
  
  .mobile-agent:nth-child(4) {
    left: 70%;
    animation-delay: 1.5s;
  }
  
  .mobile-agent:nth-child(5) {
    left: 90%;
    animation-delay: 2s;
  }
  
  @keyframes mobile-float {
    0%, 100% {
      transform: translateY(0px);
      opacity: 0.4;
    }
    50% {
      transform: translateY(-15px);
      opacity: 0.7;
    }
  }
}

/* Desktop - Show full AI animation */
@media (min-width: 769px) {
  .mobile-ai-agents {
    display: none !important;
  }
  
  .ai-swarm-container {
    display: flex !important;
  }
}

/* Tablet optimization */
@media (max-width: 1024px) and (min-width: 769px) {
  .central-orchestrator-main {
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .ai-agent-swarm.agent-1 { top: 10%; left: 30%; }
  .ai-agent-swarm.agent-2 { top: 20%; right: 20%; }
  .ai-agent-swarm.agent-3 { top: 40%; right: 10%; }
  .ai-agent-swarm.agent-4 { bottom: 20%; right: 20%; }
  .ai-agent-swarm.agent-5 { bottom: 10%; left: 30%; }
  .ai-agent-swarm.agent-6 { top: 40%; left: 10%; }
  .ai-agent-swarm.agent-7 { top: 60%; left: 20%; }
  .ai-agent-swarm.agent-8 { top: 60%; right: 30%; }
}
