/* Estilos Gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* Loading Screen */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid #1e40af;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #1e40af);
  border-radius: 4px;
}

/* WhatsApp Button Animations */
@keyframes pulse-slow {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

#whatsapp-btn:hover #whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Form Focus States */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Contact Form Enhancement */
#contactForm input:valid,
#contactForm select:valid,
#contactForm textarea:valid {
  border-color: #10b981;
}

#contactForm input:invalid:not(:placeholder-shown),
#contactForm select:invalid:not(:placeholder-shown),
#contactForm textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

/* Button Loading State */
.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

/* Hero Background Animation */
.hero-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(59, 130, 246, 0.05) 10px,
    rgba(59, 130, 246, 0.05) 20px
  );
  animation: slide 20s linear infinite;
}

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* Disable float animation on mobile */
@media (max-width: 768px) {
  .float-animation {
    animation: none;
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card Hover Effects */
.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Disable hover transform on touch devices */
@media (hover: none) {
  .service-card:hover {
    transform: none;
  }
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Glowing Button */
.glow-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.glow-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.glow-button:hover::before {
  width: 300px;
  height: 300px;
}

/* Navigation Effects */
.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

/* Stats Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.counter {
  animation: countUp 1s ease-out;
}

/* Image Overlay Effect */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::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.5s;
}

.image-overlay:hover::before {
  left: 100%;
}

/* Mobile Menu Animation */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
  background-color: #1f2937 !important; /* Fundo sólido cinza escuro */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Melhorar contraste dos links do menu mobile */
.mobile-menu a {
  color: #f9fafb !important; /* Texto branco */
  font-weight: 500;
  padding: 0.75rem 0 !important;
  border-bottom: 1px solid rgba(75, 85, 99, 0.3);
  transition: all 0.2s ease;
}

.mobile-menu a:hover {
  color: #60a5fa !important; /* Azul claro no hover */
  background-color: rgba(59, 130, 246, 0.1);
  padding-left: 0.5rem !important;
}

/* Estilo para o cabeçalho do menu */
.mobile-menu .p-4 {
  background-color: rgba(15, 23, 42, 0.9);
  border-bottom: 2px solid #3b82f6;
}

/* Overlay escuro quando menu mobile está ativo */
.mobile-menu::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-menu.active::before {
  opacity: 1;
  pointer-events: auto;
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  a,
  button,
  input,
  textarea,
  select {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Improved focus states for accessibility */
*:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Safe area padding for newer phones */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* Animações */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}
