/* ==========================================
   MTECHLO WEBSITE - ANIMATIONS & TRANSITIONS
   ========================================== */

/* Keyframe Animations */
@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 slideInUp {
    from {
      opacity: 0;
      transform: translateY(50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideInDown {
    from {
      opacity: 0;
      transform: translateY(-50px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideInLeft {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes zoomIn {
    from {
      opacity: 0;
      transform: scale(0.8);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  @keyframes zoomOut {
    from {
      opacity: 0;
      transform: scale(1.2);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  @keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
      transform: translateY(0) translateX(-50%);
    }
    40%, 43% {
      transform: translateY(-15px) translateX(-50%);
    }
    70% {
      transform: translateY(-10px) translateX(-50%);
    }
    90% {
      transform: translateY(-2px) translateX(-50%);
    }
  }
  
  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes shake {
    0%, 100% {
      transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
      transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
      transform: translateX(5px);
    }
  }
  
  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes float {
    0%, 100% {
      transform: translateY(0px);
    }
    50% {
      transform: translateY(-20px);
    }
  }
  
  @keyframes wave {
    0%, 100% {
      transform: rotate(-3deg);
    }
    50% {
      transform: rotate(3deg);
    }
  }
  
  @keyframes shimmer {
    0% {
      left: -100%;
    }
    100% {
      left: 100%;
    }
  }
  
  @keyframes typewriter {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }
  
  @keyframes blink {
    0%, 50% {
      opacity: 1;
    }
    51%, 100% {
      opacity: 0;
    }
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes slideDown {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes flipInX {
    from {
      transform: perspective(400px) rotateX(90deg);
      opacity: 0;
    }
    40% {
      transform: perspective(400px) rotateX(-20deg);
    }
    60% {
      transform: perspective(400px) rotateX(10deg);
      opacity: 1;
    }
    80% {
      transform: perspective(400px) rotateX(-5deg);
    }
    to {
      transform: perspective(400px) rotateX(0deg);
      opacity: 1;
    }
  }
  
  @keyframes flipInY {
    from {
      transform: perspective(400px) rotateY(90deg);
      opacity: 0;
    }
    40% {
      transform: perspective(400px) rotateY(-20deg);
    }
    60% {
      transform: perspective(400px) rotateY(10deg);
      opacity: 1;
    }
    80% {
      transform: perspective(400px) rotateY(-5deg);
    }
    to {
      transform: perspective(400px) rotateY(0deg);
      opacity: 1;
    }
  }
  
  @keyframes rubberBand {
    from {
      transform: scale3d(1, 1, 1);
    }
    30% {
      transform: scale3d(1.25, 0.75, 1);
    }
    40% {
      transform: scale3d(0.75, 1.25, 1);
    }
    50% {
      transform: scale3d(1.15, 0.85, 1);
    }
    65% {
      transform: scale3d(0.95, 1.05, 1);
    }
    75% {
      transform: scale3d(1.05, 0.95, 1);
    }
    to {
      transform: scale3d(1, 1, 1);
    }
  }
  
  @keyframes swing {
    20% {
      transform: rotate3d(0, 0, 1, 15deg);
    }
    40% {
      transform: rotate3d(0, 0, 1, -10deg);
    }
    60% {
      transform: rotate3d(0, 0, 1, 5deg);
    }
    80% {
      transform: rotate3d(0, 0, 1, -5deg);
    }
    to {
      transform: rotate3d(0, 0, 1, 0deg);
    }
  }
  
  @keyframes heartbeat {
    0% {
      transform: scale(1);
    }
    14% {
      transform: scale(1.3);
    }
    28% {
      transform: scale(1);
    }
    42% {
      transform: scale(1.3);
    }
    70% {
      transform: scale(1);
    }
  }
  
  @keyframes glow {
    0%, 100% {
      box-shadow: 0 0 5px rgba(43, 124, 232, 0.3);
    }
    50% {
      box-shadow: 0 0 20px rgba(43, 124, 232, 0.6);
    }
  }
  
  @keyframes morphing {
    0%, 100% {
      border-radius: 50% 20% / 10% 40%;
    }
    34% {
      border-radius: 70% 40% / 10% 40%;
    }
    67% {
      border-radius: 100% 60% / 10% 40%;
    }
  }
  
  @keyframes gradient-shift {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  @keyframes particle-float {
    0%, 100% {
      transform: translateY(0px) rotate(0deg);
      opacity: 1;
    }
    50% {
      transform: translateY(-100px) rotate(180deg);
      opacity: 0.5;
    }
  }
  
  @keyframes ripple {
    to {
      transform: scale(4);
      opacity: 0;
    }
  }
  
  @keyframes slideInFromLeft {
    from {
      transform: translateX(-100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideInFromRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes fadeInScale {
    from {
      transform: scale(0.8);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  @keyframes rotateInScale {
    from {
      transform: rotate(-10deg) scale(0.9);
      opacity: 0;
    }
    to {
      transform: rotate(0deg) scale(1);
      opacity: 1;
    }
  }
  
  @keyframes loading-dots {
    0%, 20% {
      content: '.';
    }
    40% {
      content: '..';
    }
    60% {
      content: '...';
    }
    80%, 100% {
      content: '';
    }
  }
  
  /* Animation Classes */
  .animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
  }
  
  .animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
  }
  
  .animate-fadeInDown {
    animation: fadeInDown 0.8s ease forwards;
  }
  
  .animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease forwards;
  }
  
  .animate-fadeInRight {
    animation: fadeInRight 0.8s ease forwards;
  }
  
  .animate-slideInUp {
    animation: slideInUp 0.6s ease forwards;
  }
  
  .animate-slideInDown {
    animation: slideInDown 0.6s ease forwards;
  }
  
  .animate-slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
  }
  
  .animate-slideInRight {
    animation: slideInRight 0.6s ease forwards;
  }
  
  .animate-zoomIn {
    animation: zoomIn 0.6s ease forwards;
  }
  
  .animate-zoomOut {
    animation: zoomOut 0.6s ease forwards;
  }
  
  .animate-bounce {
    animation: bounce 2s infinite;
  }
  
  .animate-pulse {
    animation: pulse 2s ease-in-out infinite;
  }
  
  .animate-shake {
    animation: shake 0.5s ease-in-out;
  }
  
  .animate-rotate {
    animation: rotate 2s linear infinite;
  }
  
  .animate-spin {
    animation: spin 1s linear infinite;
  }
  
  .animate-float {
    animation: float 6s ease-in-out infinite;
  }
  
  .animate-wave {
    animation: wave 2s ease-in-out infinite;
  }
  
  .animate-flipInX {
    animation: flipInX 0.6s ease forwards;
  }
  
  .animate-flipInY {
    animation: flipInY 0.6s ease forwards;
  }
  
  .animate-rubberBand {
    animation: rubberBand 0.8s ease forwards;
  }
  
  .animate-swing {
    animation: swing 1s ease forwards;
  }
  
  .animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
  }
  
  .animate-glow {
    animation: glow 2s ease-in-out infinite;
  }
  
  .animate-morphing {
    animation: morphing 8s ease-in-out infinite;
  }
  
  /* Delay Classes */
  .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;
  }
  
  /* Duration Classes */
  .animate-duration-fast {
    animation-duration: 0.3s;
  }
  
  .animate-duration-normal {
    animation-duration: 0.6s;
  }
  
  .animate-duration-slow {
    animation-duration: 1s;
  }
  
  /* Intersection Observer Animations */
  .observe-fadeIn {
    opacity: 0;
    transition: opacity 0.6s ease;
  }
  
  .observe-fadeIn.in-view {
    opacity: 1;
  }
  
  .observe-slideUp {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
  }
  
  .observe-slideUp.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  
  .observe-slideLeft {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
  }
  
  .observe-slideLeft.in-view {
    opacity: 1;
    transform: translateX(0);
  }
  
  .observe-slideRight {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
  }
  
  .observe-slideRight.in-view {
    opacity: 1;
    transform: translateX(0);
  }
  
  .observe-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
  }
  
  .observe-scale.in-view {
    opacity: 1;
    transform: scale(1);
  }
  
  /* Card Animation Effects */
  .card-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
  }
  
  .card-animate.in-view {
    opacity: 1;
    transform: translateY(0);
  }
  
  .card-animate:nth-child(1) { transition-delay: 0.1s; }
  .card-animate:nth-child(2) { transition-delay: 0.2s; }
  .card-animate:nth-child(3) { transition-delay: 0.3s; }
  .card-animate:nth-child(4) { transition-delay: 0.4s; }
  
  /* Hover Effects */
  .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  }
  
  .hover-grow {
    transition: transform 0.3s ease;
  }
  
  .hover-grow:hover {
    transform: scale(1.05);
  }
  
  .hover-shrink {
    transition: transform 0.3s ease;
  }
  
  .hover-shrink:hover {
    transform: scale(0.95);
  }
  
  .hover-rotate {
    transition: transform 0.3s ease;
  }
  
  .hover-rotate:hover {
    transform: rotate(5deg);
  }
  
  .hover-skew {
    transition: transform 0.3s ease;
  }
  
  .hover-skew:hover {
    transform: skew(-5deg, -2deg);
  }
  
  /* Text Effects */
  .text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
  }
  
  .text-typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.5s step-end infinite;
  }
  
  .text-shadow-glow {
    text-shadow: 0 0 10px rgba(43, 124, 232, 0.5);
  }
  
  /* Background Effects */
  .bg-gradient-animated {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    background-size: 300% 300%;
    animation: gradient-shift 6s ease infinite;
  }
  
  /* Particle System */
  .particle-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
  }
  
  .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: particle-float 8s linear infinite;
  }
  
  .particle:nth-child(1) { left: 10%; animation-delay: 0s; }
  .particle:nth-child(2) { left: 20%; animation-delay: 1s; }
  .particle:nth-child(3) { left: 30%; animation-delay: 2s; }
  .particle:nth-child(4) { left: 40%; animation-delay: 3s; }
  .particle:nth-child(5) { left: 50%; animation-delay: 4s; }
  .particle:nth-child(6) { left: 60%; animation-delay: 5s; }
  .particle:nth-child(7) { left: 70%; animation-delay: 6s; }
  .particle:nth-child(8) { left: 80%; animation-delay: 7s; }
  .particle:nth-child(9) { left: 90%; animation-delay: 8s; }
  
  /* Loading Animations */
  .loading-dots {
    display: inline-block;
  }
  
  .loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
  }
  
  .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(43, 124, 232, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
  }
  
  /* Progress Bar Animation */
  .progress-bar {
    position: relative;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
  }
  
  .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    width: var(--progress, 0%);
    transition: width 0.3s ease;
  }
  
  /* Scroll Animations */
  .scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Page Transition Effects */
  .page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
  }
  
  .page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
  }
  
  .page-transition-exit {
    opacity: 1;
    transform: translateY(0);
  }
  
  .page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
  }
  
  /* Mobile Optimized Animations */
  @media (max-width: 768px) {
    .animate-fadeInUp,
    .animate-fadeInDown,
    .animate-fadeInLeft,
    .animate-fadeInRight,
    .animate-slideInUp,
    .animate-slideInDown,
    .animate-slideInLeft,
    .animate-slideInRight {
      animation-duration: 0.4s;
    }
    
    .hover-lift:hover,
    .hover-grow:hover,
    .hover-shrink:hover,
    .hover-rotate:hover,
    .hover-skew:hover {
      transform: none;
    }
  }
  
  /* Reduced Motion Support */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    
    .animate-bounce,
    .animate-pulse,
    .animate-rotate,
    .animate-spin,
    .animate-float,
    .animate-wave,
    .animate-heartbeat,
    .animate-glow,
    .animate-morphing {
      animation: none;
    }
  }