/* CSS Personalizado com Animações Estratégicas */

/* Animações personalizadas */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@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 slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulseSubtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

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

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

/* Classes de animação */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-slide-in-up {
  animation: slideInUp 0.8s ease-out forwards;
}

.animate-pulse-subtle {
  animation: pulseSubtle 2s ease-in-out infinite;
}

.floating-image {
  animation: float 3s ease-in-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* Gradientes e efeitos especiais */
.hero-gradient {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #1C4293 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Botões com efeitos */
.cta-button {
  position: relative;
  overflow: hidden;
}

.cta-button::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.5s;
}

.cta-button:hover::before {
  left: 100%;
}

/* Cards com animação de entrada */
.testimonial-card {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
}

.testimonials-grid .testimonial-card:nth-child(1) {
  animation-delay: 0.1s;
}

.testimonials-grid .testimonial-card:nth-child(2) {
  animation-delay: 0.3s;
}

.testimonials-grid .testimonial-card:nth-child(3) {
  animation-delay: 0.5s;
}

/* Formulário com efeitos */
.form-container {
  position: relative;
}

.form-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #1C4293, #3B82F6, #1C4293);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.3;
  animation: float 4s ease-in-out infinite;
}

/* Responsividade das animações */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Hover effects para cards */
.hover\:scale-105:hover {
  transform: scale(1.05);
}

/* Efeitos especiais para estrelas */
.star-filled {
  color: #fbbf24;
  fill: currentColor;
}

/* Transições suaves */
.transition-all {
  transition: all 0.3s ease;
}

.transition-colors {
  transition: color 0.3s ease, background-color 0.3s ease;
}

.transition-transform {
  transition: transform 0.3s ease;
}

/* Efeitos de hover personalizados */
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animações de entrada escalonadas */
.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

/* Efeitos de loading */
.loading-dots::after {
  content: '';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Efeitos de foco melhorados */
input:focus, textarea:focus, button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 66, 147, 0.1);
}

/* Animações de micro-interações */
.micro-bounce:hover {
  animation: micro-bounce 0.3s ease;
}

@keyframes micro-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Efeitos de gradiente animado */
.animated-gradient {
  background: linear-gradient(-45deg, #1C4293, #3B82F6, #1C4293, #2563eb);
  background-size: 400% 400%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Efeitos de texto digitando */
.typing-effect {
  overflow: hidden;
  border-right: 2px solid #1C4293;
  white-space: nowrap;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #1C4293; }
}

/* Melhorias visuais para FAQ */
.faq-icon.rotated {
  transform: rotate(180deg);
}

/* Efeitos de parallax sutil */
.parallax-element {
  transform: translateZ(0);
  will-change: transform;
}

/* Otimizações de performance */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Efeitos de sombra dinâmica */
.dynamic-shadow {
  transition: box-shadow 0.3s ease;
}

.dynamic-shadow:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Animações de entrada para seções */
.section-enter {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-enter.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Efeitos especiais para botões CTA */
.cta-special {
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, #1C4293, #3B82F6);
  background-size: 200% 200%;
  animation: gradient-shift 2s ease infinite;
}

.cta-special::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.cta-special:hover::before {
  left: 100%;
}

/* Responsividade aprimorada */
@media (max-width: 768px) {
  .floating-image {
    animation: none;
  }
  
  .animate-slide-in-left,
  .animate-fade-in-right {
    animation: fadeInUp 0.8s ease-out forwards;
  }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .floating-image,
  .animate-pulse-subtle,
  .animated-gradient {
    animation: none;
  }
}

/* Melhorias de contraste */
.high-contrast {
  filter: contrast(1.2);
}

/* Efeitos de loading state */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Estilo do overlay do popup */
#form-popup-overlay {
  backdrop-filter: blur(4px);
}