/**
 * Configurações Customizadas para Animações
 * Melhorias do Canvas Template
 */

/* Classes de controle de animação */
.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.animated.faster {
  animation-duration: 0.5s;
}

.animated.fast {
  animation-duration: 0.8s;
}

.animated.slow {
  animation-duration: 2s;
}

.animated.slower {
  animation-duration: 3s;
}

/* Delays incrementais para sequências */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Animações ao scroll - elementos aparecem quando visíveis */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
}

/* Hover suave em cards/boxes */
.hover-float {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-float:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Animação de fade-in-up personalizada para conteúdo */
@keyframes fadeInUpSmooth {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fadeInUpSmooth {
  animation-name: fadeInUpSmooth;
}

/* Animação para menu items */
.menu-item-animate {
  transition: all 0.3s ease;
}

.menu-item-animate:hover {
  transform: translateX(5px);
}

/* Pulse suave para call-to-action */
@keyframes pulseSoft {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

.pulse-soft {
  animation: pulseSoft 2s infinite;
}

/* Fade in para imagens carregadas */
img {
  transition: opacity 0.3s ease;
}

img.lazy-loaded {
  animation: fadeIn 0.5s ease;
}

/* Animação para títulos de página */
.page-title-animate {
  animation: fadeInDown 0.8s ease;
}

/* Animação para cards de serviço/features */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Botões com animação suave */
.btn-animate {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.btn-animate:hover::before {
  width: 300px;
  height: 300px;
}

/* Underline animado para links */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* Fade para sidebars e widgets */
.sidebar-widget {
  animation: fadeInRight 0.6s ease;
}

/* Zoom suave em imagens */
.zoom-hover {
  overflow: hidden;
}

.zoom-hover img {
  transition: transform 0.4s ease;
}

.zoom-hover:hover img {
  transform: scale(1.1);
}

/* Contador animado */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter-animate {
  animation: countUp 0.8s ease;
}

/* Slide in para modais */
@keyframes slideInModal {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  animation: slideInModal 0.4s ease;
}

/* Loading spinner suave */
@keyframes spinSoft {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner-soft {
  animation: spinSoft 1s linear infinite;
}

/* Desabilitar animações em dispositivos com preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
