/* Additional Animations for Website */

/* Floating Elements Animation */
@keyframes floatUpDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

.float-element {
  animation: floatUpDown 6s ease-in-out infinite;
}

.float-element-1 {
  animation-delay: 0s;
}

.float-element-2 {
  animation-delay: 1s;
}

.float-element-3 {
  animation-delay: 2s;
}

.float-element-4 {
  animation-delay: 3s;
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse-element {
  animation: pulse 4s ease-in-out infinite;
}

/* Rotating Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-slow {
  animation: rotate 20s linear infinite;
}

.rotate-medium {
  animation: rotate 12s linear infinite;
}

.rotate-fast {
  animation: rotate 6s linear infinite;
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-element {
  opacity: 0;
}

.fade-in-element.visible {
  animation: fadeInUp 0.8s ease forwards;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-effect {
  background: linear-gradient(90deg, 
    rgba(16, 185, 129, 0.1) 25%, 
    rgba(16, 185, 129, 0.2) 50%, 
    rgba(16, 185, 129, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Typing Animation */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

.typing-animation {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--color-primary);
  animation: 
    typing 3.5s steps(40, end),
    blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--color-primary) }
}

/* Hover Effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Particle Background */
.particles-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Moving Gradient Background */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, 
    rgba(16, 185, 129, 0.1), 
    rgba(6, 95, 70, 0.1), 
    rgba(16, 185, 129, 0.05), 
    rgba(6, 95, 70, 0.05));
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
}

/* Glitch Effect */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.glitch-effect {
  position: relative;
}

.glitch-effect:hover {
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.glitch-effect:hover::before,
.glitch-effect:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-effect:hover::before {
  color: rgba(255, 0, 0, 0.7);
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
  animation-delay: -0.2s;
}

.glitch-effect:hover::after {
  color: rgba(0, 255, 255, 0.7);
  animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) reverse both infinite;
  animation-delay: -0.1s;
}

/* Floating Dots */
.floating-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 0;
}

.dot {
  position: absolute;
  background-color: var(--color-primary);
  border-radius: 50%;
  opacity: 0.3;
}

/* Animated Border */
@keyframes borderAnimation {
  0% {
    border-color: rgba(16, 185, 129, 0.3);
  }
  50% {
    border-color: rgba(16, 185, 129, 0.7);
  }
  100% {
    border-color: rgba(16, 185, 129, 0.3);
  }
}

.animated-border {
  border: 2px solid rgba(16, 185, 129, 0.3);
  animation: borderAnimation 3s infinite;
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.3);
  animation: ripple 2s linear infinite;
}

.ripple-effect-1 {
  animation-delay: 0s;
}

.ripple-effect-2 {
  animation-delay: 0.5s;
}

.ripple-effect-3 {
  animation-delay: 1s;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  border: 2px solid var(--color-primary);
  border-radius: 15px;
}

.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: scrollAnimation 2s infinite;
}

@keyframes scrollAnimation {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* Parallax Effect */
.parallax-container {
  perspective: 1px;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.parallax-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.parallax-layer-back {
  transform: translateZ(-1px) scale(2);
}

.parallax-layer-base {
  transform: translateZ(0);
}

/* Animated Number Counter */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated-counter {
  animation: countUp 1s ease forwards;
}

/* Animated Underline */
.animated-underline {
  position: relative;
  display: inline-block;
}

.animated-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-primary);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.animated-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Animated Cursor */
.cursor-dot-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-primary);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
}

.cursor-dot-outline,
.cursor-dot {
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot-outline {
  transition: width 0.2s ease-in-out,
              height 0.2s ease-in-out,
              border-color 0.2s ease-in-out;
}

.cursor-dot {
  transition: width 0.2s ease-in-out,
              height 0.2s ease-in-out,
              background-color 0.2s ease-in-out;
}

/* Animated SVG Path */
@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

.animated-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 3s linear forwards;
}

/* Animated Dots Loading */
@keyframes dotAnimation {
  0%, 80%, 100% { 
    transform: scale(0);
  }
  40% { 
    transform: scale(1.0);
  }
}

.loading-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
  margin: 0 3px;
}

.loading-dots span:nth-child(1) {
  animation: dotAnimation 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(2) {
  animation: dotAnimation 1.4s infinite ease-in-out both;
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation: dotAnimation 1.4s infinite ease-in-out both;
  animation-delay: 0.32s;
}
