/* Animações gerais */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 80, 255, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }
}

/* Classes de animação */
.animate {
  animation-duration: 0.8s;
  animation-fill-mode: both;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.fade-in {
  animation-name: fadeIn;
}

.slide-up {
  animation-name: slideInUp;
}

.slide-left {
  animation-name: slideInLeft;
}

.slide-right {
  animation-name: slideInRight;
}

.pulse {
  animation-name: pulse;
  animation-iteration-count: infinite;
  animation-duration: 2s;
}

/* Aplicação de animações específicas */
.service-card.animate {
  animation-name: slideInUp;
  animation-delay: calc(0.1s * var(--i, 0));
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card.animate {
  animation-name: fadeIn;
  animation-delay: calc(0.15s * var(--i, 0));
  height: 100%;
  display: flex;
  flex-direction: column;
}

.about-image.animate {
  animation-name: slideInLeft;
}

.about-content.animate {
  animation-name: slideInRight;
}

/* Animação do header ao rolar */
header {
  transition: background-color 0.3s, box-shadow 0.3s, height 0.3s;
  will-change: height, background-color, box-shadow;
}

header.scrolled {
  height: 70px;
  background-color: rgba(26, 26, 26, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

header * {
  transition: all 0.3s ease;
}

/* Animação do botão CTA */
.btn-primary:hover {
  animation: pulse 1s infinite;
}

/* Animação de entrada para os elementos da página inicial */
.hero h1,
.hero p,
.hero .hero-buttons {
  opacity: 0;
  animation: slideInUp 1s forwards;
  position: relative;
  z-index: 2; /* Acima dos efeitos de luz */
}

.hero h1 {
  animation-delay: 0.2s;
}

.hero p {
  animation-delay: 0.4s;
}

.hero .hero-buttons {
  animation-delay: 0.6s;
}

/* Animação específica para os botões do hero */
.hero-buttons .btn {
  transform: scale(1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  will-change: transform, box-shadow;
}

.hero-buttons .btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.hero-buttons .btn:active {
  transform: translateY(-1px) scale(0.98);
}

.hero-image {
  opacity: 0;
  animation: fadeIn 1s forwards;
  animation-delay: 0.8s;
}

/* Animações de iluminação para o hero */
@keyframes glow {
  0% {
    filter: brightness(1) blur(80px);
  }
  50% {
    filter: brightness(1.2) blur(70px);
  }
  100% {
    filter: brightness(1) blur(80px);
  }
}

@keyframes floatingLight {
  0% {
    transform: translateY(0) translateX(0);
  }
  33% {
    transform: translateY(-20px) translateX(15px);
  }
  66% {
    transform: translateY(15px) translateX(-10px);
  }
  100% {
    transform: translateY(0) translateX(0);
  }
}

/* Animação para a barra de luz no topo da seção de projetos */
@keyframes lightBarGlow {
  0% {
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 
                0 0 20px rgba(100, 165, 255, 0.2);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 
                0 0 30px rgba(100, 165, 255, 0.4);
  }
  100% {
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 
                0 0 20px rgba(100, 165, 255, 0.2);
  }
}

/* Partículas de luz flutuantes */
.light-particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  opacity: 0.4;
  animation: floatingLight 6s infinite ease-in-out, glow 4s infinite alternate;
}

.light-particle:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.light-particle:nth-child(2) {
  width: 100px;
  height: 100px;
  top: 60%;
  right: 15%;
  animation-delay: 1s;
}

.light-particle:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 30%;
  left: 30%;
  animation-delay: 2s;
}

.light-particle:nth-child(4) {
  width: 120px;
  height: 120px;
  top: 40%;
  right: 25%;
  animation-delay: 3s;
}

/* Animação para os ícones dos cards de serviços */
@keyframes iconPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.service-icon i {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
  animation: iconPulse 1.5s infinite ease-in-out;
}

/* Animação para os cards de serviços ao entrar na viewport */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) {
  transition-delay: 0.1s;
}

.service-card:nth-child(2) {
  transition-delay: 0.2s;
}

.service-card:nth-child(3) {
  transition-delay: 0.3s;
}

.service-card:nth-child(4) {
  transition-delay: 0.4s;
}

.service-card:nth-child(5) {
  transition-delay: 0.5s;
}

.service-card:nth-child(6) {
  transition-delay: 0.6s;
}

/* Animação para o botão centralizado da seção de serviços */
.services-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.8s;
}

.services-cta.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Animação de pulso para o card de SaaS */
.pulse-animation {
  animation: pulse 1.5s ease-in-out;
}

.saas-highlight {
  position: relative;
}

/* Animação para os cards de princípios */
.principle-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(var(--i) * 0.1s);
}

.principle-card.animate-in {
  opacity: 1;
  transform: translateY(0);
} 