/* ========================================
   PREMIUM HERO SECTION ANIMATION
   Interactive parallax animation with floating gradient orbs
   ======================================== */

/* Animation Canvas Container */
#heroAnimationCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Ensure hero content stays above animation */
.frame-2147224081 {
  position: relative;
  z-index: 2;
}

.frame-2147224291,
.frame-2147224294 {
  position: relative;
  z-index: 3;
}

/* Floating Gradient Orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: float-in 2s ease-out forwards;
  will-change: transform;
  pointer-events: none;
}

/* Primary Blue Orb - Large */
.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(60, 156, 198, 0.4) 0%,
    rgba(60, 156, 198, 0.1) 50%,
    transparent 100%
  );
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

/* Secondary Blue Orb - Medium */
.orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(14, 84, 124, 0.35) 0%,
    rgba(14, 84, 124, 0.1) 50%,
    transparent 100%
  );
  top: 40%;
  right: -5%;
  animation-delay: 0.3s;
}

/* Accent Cyan Orb - Small */
.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(60, 200, 230, 0.3) 0%,
    rgba(60, 200, 230, 0.08) 50%,
    transparent 100%
  );
  bottom: 20%;
  left: 10%;
  animation-delay: 0.6s;
}

/* Additional Small Accent Orbs */
.orb-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(60, 156, 198, 0.25) 0%,
    rgba(60, 156, 198, 0.05) 50%,
    transparent 100%
  );
  top: 60%;
  right: 15%;
  animation-delay: 0.9s;
}

.orb-5 {
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(14, 84, 124, 0.3) 0%,
    rgba(14, 84, 124, 0.08) 50%,
    transparent 100%
  );
  top: 25%;
  left: 40%;
  animation-delay: 1.2s;
}

/* Floating Particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(60, 156, 198, 0.6);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float 8s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Generate varied particle animations */
.particle:nth-child(odd) {
  background: rgba(60, 200, 230, 0.5);
  animation-duration: 10s;
}

.particle:nth-child(3n) {
  width: 3px;
  height: 3px;
  animation-duration: 12s;
}

.particle:nth-child(4n) {
  width: 5px;
  height: 5px;
  background: rgba(14, 84, 124, 0.4);
  animation-duration: 9s;
}

/* Animated Grid Lines */
.grid-line {
  position: absolute;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(60, 156, 198, 0.15) 50%,
    transparent 100%
  );
  opacity: 0;
  animation: grid-pulse 4s ease-in-out infinite;
}

.grid-line.horizontal {
  width: 100%;
  height: 1px;
  left: 0;
}

.grid-line.vertical {
  width: 1px;
  height: 100%;
  top: 0;
}

.grid-line:nth-child(1) {
  top: 20%;
  animation-delay: 0s;
}

.grid-line:nth-child(2) {
  top: 50%;
  animation-delay: 1s;
}

.grid-line:nth-child(3) {
  top: 80%;
  animation-delay: 2s;
}

.grid-line:nth-child(4) {
  left: 25%;
  animation-delay: 0.5s;
}

.grid-line:nth-child(5) {
  left: 75%;
  animation-delay: 1.5s;
}

/* Glowing Dots - Enhanced with more variations */
.glow-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(60, 156, 198, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(60, 156, 198, 0.6), 0 0 40px rgba(60, 156, 198, 0.3);
  opacity: 0;
  animation: glow-pulse 3s ease-in-out infinite;
}

.glow-dot:nth-child(2n) {
  background: rgba(60, 200, 230, 0.7);
  box-shadow: 0 0 20px rgba(60, 200, 230, 0.5), 0 0 40px rgba(60, 200, 230, 0.2);
  animation-delay: 0.5s;
}

.glow-dot:nth-child(3n) {
  width: 6px;
  height: 6px;
  background: rgba(14, 84, 124, 0.9);
  box-shadow: 0 0 15px rgba(14, 84, 124, 0.7), 0 0 30px rgba(14, 84, 124, 0.4);
  animation-delay: 1s;
  animation-duration: 2.5s;
}

.glow-dot:nth-child(4n) {
  width: 10px;
  height: 10px;
  background: rgba(60, 180, 220, 0.6);
  box-shadow: 0 0 25px rgba(60, 180, 220, 0.5), 0 0 50px rgba(60, 180, 220, 0.2);
  animation-delay: 1.5s;
  animation-duration: 3.5s;
}

/* Floating Educational Icons */
.floating-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0;
  animation: icon-float 12s ease-in-out infinite;
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 12px rgba(60, 156, 198, 0.3));
}

.floating-icon svg {
  width: 100%;
  height: 100%;
  fill: rgba(60, 156, 198, 0.6);
}

.floating-icon:nth-child(2n) svg {
  fill: rgba(60, 200, 230, 0.5);
}

.floating-icon:nth-child(3n) svg {
  fill: rgba(14, 84, 124, 0.7);
}

.floating-icon.small {
  width: 32px;
  height: 32px;
}

.floating-icon.large {
  width: 48px;
  height: 48px;
}

/* Keyframe Animations */
@keyframes float-in {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(1);
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
    transform: translateY(-100px) translateX(30px) scale(1.2);
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) translateX(-20px) scale(0.8);
  }
}

@keyframes grid-pulse {
  0%,
  100% {
    opacity: 0;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 0.4;
    transform: scaleX(1);
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
    box-shadow: 0 0 10px rgba(60, 156, 198, 0.4),
      0 0 20px rgba(60, 156, 198, 0.2);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
    box-shadow: 0 0 30px rgba(60, 156, 198, 0.8),
      0 0 60px rgba(60, 156, 198, 0.4);
  }
}

@keyframes icon-float {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) rotate(0deg) scale(0.8);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
    transform: translateY(-120px) translateX(40px) rotate(15deg) scale(1);
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-240px) translateX(-30px) rotate(-10deg) scale(0.9);
  }
}

/* Ambient Background Glow */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(60, 156, 198, 0.08) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  opacity: 0.5;
  animation: ambient-breathe 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ambient-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.6;
  }
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .floating-orb {
    filter: blur(40px);
  }

  .orb-1 {
    width: 300px;
    height: 300px;
  }

  .orb-2 {
    width: 250px;
    height: 250px;
  }

  .orb-3 {
    width: 200px;
    height: 200px;
  }

  .orb-4,
  .orb-5 {
    width: 150px;
    height: 150px;
  }

  .ambient-glow {
    width: 400px;
    height: 400px;
  }

  .floating-icon {
    width: 32px;
    height: 32px;
  }

  .floating-icon.large {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 767px) {
  /* Simplified animation for mobile */
  .particle,
  .grid-line {
    display: none;
  }

  .floating-icon {
    width: 28px;
    height: 28px;
  }

  .floating-icon.large {
    width: 36px;
    height: 36px;
  }

  .glow-dot {
    width: 6px;
    height: 6px;
  }

  .floating-orb {
    filter: blur(30px);
  }

  .orb-1 {
    width: 250px;
    height: 250px;
  }

  .orb-2 {
    width: 200px;
    height: 200px;
  }

  .orb-3,
  .orb-4,
  .orb-5 {
    width: 150px;
    height: 150px;
  }

  .ambient-glow {
    width: 300px;
    height: 300px;
    filter: blur(60px);
  }
}

@media (max-width: 575px) {
  .orb-4,
  .orb-5 {
    display: none;
  }

  .floating-icon.small {
    display: none;
  }

  .floating-orb {
    filter: blur(25px);
  }
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
  .floating-orb,
  .particle,
  .grid-line,
  .glow-dot,
  .ambient-glow {
    animation: none;
    opacity: 0.3;
  }
}
