/* Advanced Animation Styles */

/* Text reveal animation */
.text-reveal {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: revealText 0.8s forwards;
}

@keyframes revealText {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Create a staggered delay for each character */
.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.15s; }
.text-reveal span:nth-child(3) { animation-delay: 0.2s; }
.text-reveal span:nth-child(4) { animation-delay: 0.25s; }
.text-reveal span:nth-child(5) { animation-delay: 0.3s; }
.text-reveal span:nth-child(6) { animation-delay: 0.35s; }
.text-reveal span:nth-child(7) { animation-delay: 0.4s; }
.text-reveal span:nth-child(8) { animation-delay: 0.45s; }
.text-reveal span:nth-child(9) { animation-delay: 0.5s; }
.text-reveal span:nth-child(10) { animation-delay: 0.55s; }
.text-reveal span:nth-child(11) { animation-delay: 0.6s; }
.text-reveal span:nth-child(12) { animation-delay: 0.65s; }
.text-reveal span:nth-child(13) { animation-delay: 0.7s; }
.text-reveal span:nth-child(14) { animation-delay: 0.75s; }
.text-reveal span:nth-child(15) { animation-delay: 0.8s; }
.text-reveal span:nth-child(16) { animation-delay: 0.85s; }
.text-reveal span:nth-child(17) { animation-delay: 0.9s; }
.text-reveal span:nth-child(18) { animation-delay: 0.95s; }
.text-reveal span:nth-child(19) { animation-delay: 1s; }
.text-reveal span:nth-child(20) { animation-delay: 1.05s; }

/* Scrolling animations */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered animations for multiple elements */
.stagger-fade-up > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-fade-up > *:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-fade-up > *:nth-child(2) {
  transition-delay: 0.2s;
}

.stagger-fade-up > *:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-fade-up > *:nth-child(4) {
  transition-delay: 0.4s;
}

.stagger-fade-up > *:nth-child(5) {
  transition-delay: 0.5s;
}

.stagger-fade-up > *:nth-child(6) {
  transition-delay: 0.6s;
}

.stagger-fade-up.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Advanced hover effects */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-lift:hover {
  transform: translateY(-10px);
}

.hover-scale {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.hover-rotate {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Button animations */
.btn-pulse {
  position: relative;
}

.btn-pulse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: inherit;
  opacity: 0.5;
  z-index: -1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* New animated background effect */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.animated-bg-item {
  position: absolute;
  display: block;
  background: var(--primary-color);
  opacity: 0.05;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(30px);
}

.animated-bg-item:nth-child(1) {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  animation: float-slow 20s linear infinite;
}

.animated-bg-item:nth-child(2) {
  background: var(--secondary-color);
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -50px;
  animation: float-slow 25s linear infinite reverse;
}

.animated-bg-item:nth-child(3) {
  background: var(--accent-color);
  width: 300px;
  height: 300px;
  top: 40%;
  left: 30%;
  animation: float-slow 18s linear infinite;
}

@keyframes float-slow {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  25% {
    transform: rotate(90deg) translate(50px, 50px);
  }
  50% {
    transform: rotate(180deg) translate(0, 100px);
  }
  75% {
    transform: rotate(270deg) translate(-50px, 50px);
  }
  100% {
    transform: rotate(360deg) translate(0, 0);
  }
}

/* Enhanced notification animation */
@keyframes notification-slide-in {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notification-slide-out {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification-animation {
  animation: notification-slide-in 0.5s forwards cubic-bezier(0.23, 1, 0.32, 1);
}

.notification-closing {
  animation: notification-slide-out 0.5s forwards cubic-bezier(0.23, 1, 0.32, 1);
}
