/* 
* Animations CSS File for Vaveti Website
* Author: Manus AI
* Version: 1.0
*/

/* ======================================
   Table of Contents:
   1. Animation Keyframes
   2. Page Load Animations
   3. Scroll Animations
   4. Hover Animations
   5. Micro-interactions
   6. Reduced Motion Settings
   ====================================== */

/* ======================================
   1. Animation Keyframes
   ====================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    max-height: 500px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

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

@keyframes countUp {
  from {
    content: "0";
  }
  to {
    content: attr(data-count);
  }
}

/* ======================================
   2. Page Load Animations
   ====================================== */
.animate-on-load {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.animate-on-load.delay-1 {
  animation-delay: 0.2s;
}

.animate-on-load.delay-2 {
  animation-delay: 0.4s;
}

.animate-on-load.delay-3 {
  animation-delay: 0.6s;
}

.animate-on-load.delay-4 {
  animation-delay: 0.8s;
}

.animate-on-load.delay-5 {
  animation-delay: 1s;
}

/* Hero section specific animations */
.hero-section h1.animate-on-load {
  animation: fadeInDown 1s ease forwards;
}

.hero-section h3.animate-on-load {
  animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-section .btn.animate-on-load {
  animation: fadeInUp 1s ease 0.6s forwards;
}

/* ======================================
   3. Scroll Animations
   ====================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 {
  transition-delay: 0.2s;
}

.animate-on-scroll.delay-2 {
  transition-delay: 0.4s;
}

.animate-on-scroll.delay-3 {
  transition-delay: 0.6s;
}

.animate-on-scroll.delay-4 {
  transition-delay: 0.8s;
}

.animate-on-scroll.delay-5 {
  transition-delay: 1s;
}

/* Different scroll animation types */
.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

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

/* Parallax effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Counter animation */
.counter-value {
  display: inline-block;
  position: relative;
}

.counter-value.visible::after {
  content: attr(data-count);
  animation: countUp 2s forwards;
}

/* ======================================
   4. Hover Animations
   ====================================== */
/* Button hover effects */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

/* Card hover effects */
.service-card,
.feature-card,
.news-card,
.achievement-card,
.value-card,
.solution-card,
.news-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.feature-card:hover,
.news-card:hover,
.achievement-card:hover,
.value-card:hover,
.solution-card:hover,
.news-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Icon hover effects */
.service-icon,
.achievement-icon,
.value-icon,
.solution-icon {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-card:hover .service-icon,
.achievement-card:hover .achievement-icon,
.value-card:hover .value-icon,
.solution-card:hover .solution-icon {
  transform: scale(1.1);
  background-color: rgba(74, 144, 226, 0.2);
}

/* Navigation hover effects */
.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #4A90E2;
  transition: width 0.3s ease;
}

.nav-list li a:hover::after,
.nav-list li.active a::after {
  width: 100%;
}

/* Social icons hover */
.social-icons a {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.2);
}

/* Partner logo hover */
.partner-logo img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-logo:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ======================================
   5. Micro-interactions
   ====================================== */
/* Form field focus effects */
.form-group input,
.form-group textarea,
.form-group select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Button click effect */
.btn:active {
  transform: scale(0.98);
}

/* FAQ toggle animation */
.faq-toggle {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
}

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

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

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

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

/* Back to top button animation */
.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* Loading spinner animation */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(74, 144, 226, 0.1);
  border-radius: 50%;
  border-top-color: #4A90E2;
  animation: spin 1s linear infinite;
}

/* Form submit button loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spin 1s linear infinite;
}

/* Notification animation */
.notification {
  transform: translateY(-100%);
  transition: transform 0.5s ease;
}

.notification.show {
  transform: translateY(0);
}

/* ======================================
   6. Reduced Motion Settings
   ====================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  
  .animate-on-load,
  .animate-on-scroll,
  .fade-in-left,
  .fade-in-right,
  .zoom-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .parallax {
    background-attachment: scroll;
  }
}
