/* animations.css - Animaciones específicas para SerakDep MS */

/* Animación de carga */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Animaciones de entrada para elementos */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(
      0
    ); /* CORREGIDO: cambiado de translateY(0) a translateX(0) */
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animaciones de escala */
@keyframes scaleIn {
  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);
  }
}

/* Animaciones especiales */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Clases de utilidad para animaciones */
.animate-fadeIn {
  animation: fadeIn 1s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 1s ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 1s ease-out forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 1s ease-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 1s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-wave {
  animation: wave 2s infinite;
  transform-origin: 70% 70%;
}

/* Efectos de aparición con retrasos */
.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;
}

/* Animaciones para elementos específicos */
.hero-title {
  opacity: 0;
  animation: fadeInDown 1s ease-out 0.5s forwards;
}

.hero-description {
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-buttons {
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.1s forwards;
}

.service-card {
  opacity: 0;
  transform: translateY(30px);
}

.service-card.animate {
  animation: fadeInUp 0.8s ease-out forwards;
}

.project-card {
  opacity: 0;
  transform: translateY(30px);
}

.project-card.animate {
  animation: fadeInUp 0.8s ease-out forwards;
}

.stat-number {
  opacity: 0;
}

.stat-number.animate {
  animation: fadeInUp 1s ease-out forwards;
}

/* Efectos de hover mejorados */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Animación para partículas de fondo */
.particles-js-canvas-el {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: fadeIn 1.5s ease-out forwards;
}

/* Animación para el formulario de contacto */
.form-group input,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

/* Animación para las tarjetas al hacer hover */
.service-card,
.project-card {
  transition: all 0.4s ease;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Animación para el contador de estadísticas */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counting {
  animation: countUp 0.5s ease-out forwards;
}

/* Efectos de hover para botones secundarios */
.btn-secondary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.7s ease;
  z-index: -1;
}

.btn-secondary:hover::before {
  left: 100%;
}

/* Animación para iconos de servicios */
.service-icon {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Animación sutil para el footer */
.footer-link {
  position: relative;
  transition: all 0.3s ease;
}

.footer-link:hover {
  transform: translateX(5px);
}

/* Animación para el logo */
.nav-logo {
  transition: all 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

/* Efecto de pulso para elementos importantes */
.important-pulse {
  animation: pulse 2s infinite;
}

/* Animación de rebote suave */
@keyframes bounceSoft {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce-soft {
  animation: bounceSoft 2s infinite;
}

/* Animación de rotación continua */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-continuous {
  animation: rotate 4s linear infinite;
}

/* Animación de brillo intermitente */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
  }
}

.glow-effect {
  animation: glow 2s ease-in-out infinite;
}
