html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Fade-in on scroll */
.fade-in-element {
  opacity: 0.1;
  transform: translateY(5px);
  transition: opacity 0.6s ease-out 0.1s, transform 0.6s ease-out 1s;
}

.fade-in-element.visible {
  opacity: 1;
  transform: none;
}

/* Animações específicas para SVGs dos cards */

/* Automations & Workflows - Heartbeat */
@keyframes heartbeat {
  0%, 20%, 40%, 60%, 80%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.4); }
}

.automation-icon {
  animation: heartbeat 2s infinite;
}

/* Agentes Inteligentes - Pontos piscando mais rápido */
@keyframes dot-blink-1 {
  0%, 20%, 100% { opacity: 0.1; }
  10% { opacity: 1; }
}

@keyframes dot-blink-2 {
  0%, 10%, 30%, 100% { opacity: 0.1; }
  20% { opacity: 1; }
}

@keyframes dot-blink-3 {
  0%, 20%, 40%, 100% { opacity: 0.1; }
  30% { opacity: 1; }
}

.agents-icon circle:nth-child(1) {
  animation: dot-blink-1 3s infinite;
}

.agents-icon circle:nth-child(2) {
  animation: dot-blink-2 3s infinite;
}

.agents-icon circle:nth-child(3) {
  animation: dot-blink-3 3s infinite;
}

/* Smart Integrations - Bars filling sequentially */
@keyframes bar-fill-1 {
  0%, 25%, 100% { fill: none; }
  12.5% { fill: currentColor; }
}

@keyframes bar-fill-2 {
  0%, 12.5%, 37.5%, 100% { fill: none; }
  25% { fill: currentColor; }
}

@keyframes bar-fill-3 {
  0%, 25%, 50%, 100% { fill: none; }
  37.5% { fill: currentColor; }
}

.integrations-icon rect:nth-child(1) {
  animation: bar-fill-1 4s infinite;
}

.integrations-icon rect:nth-child(2) {
  animation: bar-fill-2 4s infinite;
}

.integrations-icon rect:nth-child(3) {
  animation: bar-fill-3 4s infinite;
}

/* Reports & Decision Intelligence - Spinning */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.reports-icon {
  animation: spin 4s linear infinite;
}

/* Trained Chatbots - Floating up and down */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.chatbots-icon {
  animation: float 3s ease-in-out infinite;
}

/* Custom AI Solutions - Scale up and down */
@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

.custom-icon {
  animation: pulse-scale 2.5s ease-in-out infinite;
}

/* Animação de destaque de palavras estilo TikTok */
.word-highlight {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.word-highlight.active {
  color: #FFD700;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

.word-highlight.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FECA57);
  border-radius: 2px;
  animation: rainbow-underline 0.8s ease-in-out;
}

@keyframes rainbow-underline {
  0% { 
    width: 0%; 
    opacity: 0;
  }
  50% { 
    width: 100%; 
    opacity: 1;
  }
  100% { 
    width: 100%; 
    opacity: 0.8;
  }
}

/* Efeito de brilho adicional */
.word-highlight.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  right: -5px;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  border-radius: 4px;
  animation: shine 0.8s ease-in-out;
  z-index: -1;
}

@keyframes shine {
  0% { opacity: 0; transform: translateX(-100%); }
  50% { opacity: 1; transform: translateX(0%); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* Animação de telefone tocando para o ícone do WhatsApp */
@keyframes phone-ring {
  0% { transform: rotate(0deg) scale(1); }
  10% { transform: rotate(-15deg) scale(1.1); }
  20% { transform: rotate(15deg) scale(1.1); }
  30% { transform: rotate(-10deg) scale(1.1); }
  40% { transform: rotate(10deg) scale(1.1); }
  50% { transform: rotate(-5deg) scale(1.1); }
  60% { transform: rotate(5deg) scale(1.1); }
  70% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(0deg) scale(1); }
}

.whatsapp-animate {
  animation: phone-ring 1.2s infinite cubic-bezier(.36,.07,.19,.97);
  transform-origin: 50% 60%;
  display: inline-block;
}

/* Animação de fluxo de luz entre os steps do processo */
.process-step {
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  transition: box-shadow 0.3s ease;
}

.process-step.active {
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

/* Desktop - Conectores horizontais */
.process-connector {
  position: absolute;
  top: 40px;
  right: -50%;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #444, transparent);
  z-index: 1;
  overflow: hidden;
}

.process-connector::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent,
    rgba(255, 215, 0, 0.8) 30%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 215, 0, 0.8) 70%,
    transparent
  );
  animation: light-flow 3s ease-in-out infinite;
}

/* Mobile - Conectores verticais */
@media (max-width: 991.98px) {
  .process-connector {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 60px;
    right: auto;
    background: linear-gradient(180deg, transparent, #444, transparent);
  }
  
  .process-connector::after {
    background: linear-gradient(180deg, 
      transparent,
      rgba(255, 215, 0, 0.8) 30%,
      rgba(255, 255, 255, 1) 50%,
      rgba(255, 215, 0, 0.8) 70%,
      transparent
    );
    animation: light-flow-vertical 3s ease-in-out infinite;
    left: 0;
    top: -100%;
  }
  
  /* Remove conector do último step no mobile */
  .col-lg-4:last-child .process-connector {
    display: none !important;
  }
}

@keyframes light-flow {
  0% {
    left: -100%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes light-flow-vertical {
  0% {
    top: -100%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Animação sequencial dos steps */
@keyframes step-glow {
  0%, 90%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
  45% {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
  }
}

.process-step:nth-child(1) .rounded-circle {
  animation: step-glow 9s infinite;
  animation-delay: 0s;
}

.process-step:nth-child(1) .rounded-circle {
  animation: step-glow 9s infinite;
  animation-delay: 3s;
}

.process-step:nth-child(1) .rounded-circle {
  animation: step-glow 9s infinite;
  animation-delay: 6s;
}