/* TimeTech Animations - Shared Animation Styles */

/* ===== KEYFRAME ANIMATIONS ===== */

/* Gradient Shift Animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Enhanced Floating Animation */
@keyframes homeFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-20px) rotate(180deg) scale(1.1);
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-5px);
  }
  90% {
    transform: translateY(-2px);
  }
}

/* Slide Clients Animation */
@keyframes slideClients {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Wiggle Animation */
@keyframes wiggle {
  0%, 7% {
    transform: rotateZ(0);
  }
  15% {
    transform: rotateZ(-15deg);
  }
  20% {
    transform: rotateZ(10deg);
  }
  25% {
    transform: rotateZ(-10deg);
  }
  30% {
    transform: rotateZ(6deg);
  }
  35% {
    transform: rotateZ(-4deg);
  }
  40%, 100% {
    transform: rotateZ(0);
  }
}

/* ===== ANIMATION UTILITY CLASSES ===== */

/* Fade In Animations */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease both;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease both;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease both;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease both;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease both;
}

/* Delayed Animations */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

.animate-delay-5 {
  animation-delay: 0.5s;
}

/* Continuous Animations */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: float 8s ease-in-out infinite reverse;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

.animate-rotate {
  animation: rotate 2s linear infinite;
}

.animate-wiggle {
  animation: wiggle 1s ease-in-out;
}

/* Gradient Animations */
.animate-gradient {
  background: linear-gradient(135deg, #01898c 0%, #00b4d8 50%, #01898c 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.animate-gradient-slow {
  background: linear-gradient(135deg, #01898c 0%, #00b4d8 50%, #01898c 100%);
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

/* ===== PAGE-SPECIFIC ANIMATION CLASSES ===== */

/* Home Page Animations */
.home-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.home-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* About Page Animations */
.about-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.about-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* Biometric Page Animations */
.biometric-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.biometric-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* HRMS Page Animations */
.hrms-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.hrms-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* Queue Management Page Animations */
.queue-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.queue-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* RFID Page Animations */
.rfid-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.rfid-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* Contact Page Animations */
.contact-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.contact-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* Articles Page Animations */
.articles-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.articles-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* Become Partner Page Animations */
.partner-element {
  animation: homeFloat 6s ease-in-out infinite;
}

.partner-element:nth-child(2) {
  animation: homeFloat 8s ease-in-out infinite reverse;
}

/* ===== HOVER ANIMATIONS ===== */

/* Hover Scale */
.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Hover Lift */
.hover-lift:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

/* Hover Lift Strong */
.hover-lift-strong:hover {
  transform: translateY(-8px);
  transition: transform 0.3s ease;
}

/* Hover Rotate */
.hover-rotate:hover {
  transform: rotate(5deg);
  transition: transform 0.3s ease;
}

/* Hover Wiggle */
.hover-wiggle:hover {
  animation: wiggle 0.5s ease-in-out;
}

/* ===== LOADING ANIMATIONS ===== */

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(1, 137, 140, 0.1);
  border-left: 4px solid #01898c;
  border-radius: 50%;
  animation: rotate 1s linear infinite;
}

/* Loading Dots */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}

/* ===== SCROLL ANIMATIONS ===== */

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal from Left */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal from Right */
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.6s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Hardware acceleration for smooth animations */
.animate-fade-in-up,
.animate-fade-in-down,
.animate-fade-in-left,
.animate-fade-in-right,
.animate-scale-in,
.animate-float,
.animate-pulse,
.animate-bounce {
  will-change: transform, opacity;
  transform: translateZ(0);
}
