/* Animation styles for autoprop.ai website */

/* Basic animations for AutoProp.ai website */

/* Fade In animation */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

.fade-in-slow {
  animation: fadeIn 2s ease-in-out;
}

.fade-in-fast {
  animation: fadeIn 0.5s ease-in-out;
}

/* Fade in with slight slide up */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 1s ease-out;
}

.fade-in-up-slow {
  animation: fadeInUp 1.5s ease-out;
}

.fade-in-up-fast {
  animation: fadeInUp 0.5s ease-out;
}

/* Floating animations */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

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

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

.float-fast {
  animation: float 3s ease-in-out infinite;
}

/* Floating animation with slight rotate */
@keyframes floatRotate {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.float-rotate {
  animation: floatRotate 5s ease-in-out infinite;
}

/* Twinkle animation for stars */
@keyframes twinkle {
  0% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
}

.twinkle {
  animation: twinkle 4s infinite;
}

.twinkle-slow {
  animation: twinkle 6s infinite;
}

.twinkle-fast {
  animation: twinkle 2s infinite;
}

/* Subtle pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

/* Delayed animations */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.delay-900 {
  animation-delay: 0.9s;
}

.delay-1000 {
  animation-delay: 1s;
}

/* Animation utilities */
.animate-once {
  animation-iteration-count: 1;
}

.animate-infinite {
  animation-iteration-count: infinite;
}

.animate-paused {
  animation-play-state: paused;
}

.animate-running {
  animation-play-state: running;
}

/* Rotate animation for loading indicators or icons */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 2s linear infinite;
}

/* Subtle highlight animation for feature cards */
@keyframes highlight {
  0% {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
  50% {
    box-shadow: 0 8px 25px rgba(255, 61, 139, 0.3);
  }
  100% {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
}

.highlight {
  animation: highlight 3s ease-in-out infinite;
}

/* Typewriter effect for headlines */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #FF3D8B }
}

.typewriter {
  overflow: hidden;
  border-right: .15em solid #FF3D8B;
  white-space: nowrap;
  letter-spacing: .05em;
  animation: 
    typing 3.5s steps(40, end),
    blink-caret .75s step-end infinite;
}

/* Background star twinkle animation */
@keyframes twinkle {
  0% {
    opacity: 0.2;
    transform: scale(0.5);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0.2;
    transform: scale(0.5);
  }
}

.twinkle {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: white;
  border-radius: 50%;
  opacity: 0.2;
  z-index: 0;
}

.twinkle:nth-child(1) { animation: twinkle 4s infinite; }
.twinkle:nth-child(2) { animation: twinkle 4s infinite 0.3s; }
.twinkle:nth-child(3) { animation: twinkle 4s infinite 0.6s; }
.twinkle:nth-child(4) { animation: twinkle 4s infinite 0.9s; }
.twinkle:nth-child(5) { animation: twinkle 4s infinite 1.2s; }
.twinkle:nth-child(6) { animation: twinkle 4s infinite 1.5s; }
.twinkle:nth-child(7) { animation: twinkle 4s infinite 1.8s; }
.twinkle:nth-child(8) { animation: twinkle 4s infinite 2.1s; }
.twinkle:nth-child(9) { animation: twinkle 4s infinite 2.4s; }
.twinkle:nth-child(10) { animation: twinkle 4s infinite 2.7s; }

/* Button hover animations */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover-effect:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  z-index: -2;
}

.btn-hover-effect:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: all .3s;
  border-radius: 25px;
  z-index: -1;
}

.btn-hover-effect:hover:before {
  width: 100%;
}

/* Scale up animation for elements on hover */
.scale-on-hover {
  transition: transform 0.3s ease;
}

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

/* Slide in animations for sections */
@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 1s ease-out;
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 1s ease-out;
}

/* Animated gradient background */
@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background: linear-gradient(180deg, #1C0E51, #2C1A7A, #411D9E);
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
}

/* Loading spinner */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #FF3D8B;
  animation: spin 1s linear infinite;
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.7s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.7s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.7s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.7s ease-out forwards;
}

.animate-float {
    animation: floatAnimation 4s ease-in-out infinite;
}

.animate-pulse {
    animation: pulseAnimation 3s ease-in-out infinite;
}

.animate-shine {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shineAnimation 3s linear infinite;
}

.animate-rotate {
    animation: rotateAnimation 10s linear infinite;
}

.animate-bounce {
    animation: bounceAnimation 2s ease-in-out infinite;
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 100%;
}

/* Page transition overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
}

.page-transition-active .page-transition-overlay {
    transform: translateY(0);
}

.page-transition-complete .page-transition-overlay {
    transform: translateY(-100%);
}

/* Enhanced hover effects */
.feature-item,
.benefit-item,
.value-card,
.team-member,
.solution-feature,
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover,
.benefit-item:hover,
.value-card:hover,
.team-member:hover,
.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.solution-feature:hover {
    transform: translateX(5px);
}

.feature-icon,
.benefit-icon,
.value-icon {
    transition: transform 0.5s ease, background-color 0.3s ease;
}

.feature-item:hover .feature-icon,
.benefit-item:hover .benefit-icon,
.value-card:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: rgba(67, 97, 238, 0.2);
}

/* Social icons hover effect */
.social-footer li a,
.team-social a,
.social-icon {
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-footer li a:hover,
.team-social a:hover,
.social-icon:hover {
    transform: translateY(-5px);
}

/* Header scroll animation */
header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

/* Timeline animations */
.timeline-dot {
    position: relative;
}

.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: pulseRing 2s ease-out infinite;
    z-index: -1;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }
    80%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Hero section animations */
.hero-image {
    overflow: hidden;
    position: relative;
}

.hero-image img {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Mobile menu toggle animation */
.mobile-menu-toggle span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Loading animation for buttons */
@keyframes gradientLoading {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.btn.loading {
    background: linear-gradient(270deg, var(--primary-color), var(--primary-dark), var(--primary-color));
    background-size: 200% 200%;
    animation: gradientLoading 2s ease infinite;
    color: white;
}

/* FAQ accordion animation */
.faq-item h3::after {
    transition: transform 0.3s ease;
}

.faq-item.active h3::after {
    transform: rotate(180deg);
}

.faq-item p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.faq-item.active p {
    display: block;
}

/* Form submission animation */
@keyframes formSuccess {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-success-message .success-icon,
.success-message .success-icon {
    animation: formSuccess 0.6s ease-out forwards;
}

/* Testimonial card hover effect */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Bounce effect for CTA buttons */
.cta-section .btn-primary {
    animation: bounceAnimation 3s ease-in-out infinite;
} 