/* ==========================================================================
   Guardia - Estilos Globais
   ========================================================================== */

/* Fontes e Base */
body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Cores e Variáveis
   ========================================================================== */
:root {
  --guardia-blue: #0071e3;
  --guardia-blue-dark: #0051a3;
  --guardia-blue-darker: #003d7a;
  --guardia-black: #000000;
  --guardia-gray-900: #111111;
  --guardia-gray-800: #1a1a1a;
  --guardia-gray-700: #2a2a2a;
  --guardia-gray-400: #9ca3af;
  --guardia-white: #ffffff;

  /* Variáveis para Mesh Background */
  --mesh-blur: 40px;
  --mesh-scale: 1.2;
  --mesh-rotation: 0deg;
  --mesh-animation-duration: 20s;
  --mesh-particles-count: 9;
  --mesh-particle-size: 4px;
  --mesh-particle-animation-duration: 15s;
}

/* Classes de cores */
.apple-blue {
  background-color: var(--guardia-blue);
}

.apple-blue-text {
  color: var(--guardia-blue);
}

/* ==========================================================================
   Navbar e Navegação
   ========================================================================== */
.nav-blur {
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* ==========================================================================
   Botões
   ========================================================================== */
.apple-button {
  border-radius: 30px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.apple-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Efeito shine para botões (opcional) */
.shine-button {
  position: relative;
  overflow: hidden;
}

.shine-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(45deg) translateX(-100%);
  transition: all 0.6s;
}

.shine-button:hover::after {
  transform: rotate(45deg) translateX(100%);
}

/* ==========================================================================
   Cards e Containers
   ========================================================================== */

/* Card base */
.feature-card {
  transition: all 0.5s ease;
}

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

/* Efeito Ripple (opcional) */
.ripple-effect {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.ripple-effect::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.ripple-effect:hover::before {
  width: 300%;
  height: 300%;
}

.ripple-effect > * {
  position: relative;
  z-index: 1;
}

/* Apple Intelligence Ripple Effect */
.apple-intelligence-ripple {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
}

.apple-intelligence-ripple::before,
.apple-intelligence-ripple::after {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.apple-intelligence-ripple::before {
  width: 0;
  height: 0;
  background: radial-gradient(
    circle at center,
    rgba(147, 51, 234, 0.3) 0%,
    rgba(79, 70, 229, 0.3) 25%,
    rgba(59, 130, 246, 0.2) 50%,
    rgba(147, 197, 253, 0.1) 75%,
    transparent 100%
  );
  filter: blur(4px);
  z-index: -2;
}

.apple-intelligence-ripple::after {
  width: 0;
  height: 0;
  background: radial-gradient(
    circle at center,
    rgba(167, 139, 250, 0.4) 0%,
    rgba(139, 92, 246, 0.3) 20%,
    rgba(124, 58, 237, 0.2) 40%,
    rgba(109, 40, 217, 0.1) 60%,
    transparent 100%
  );
  filter: blur(8px);
  z-index: -1;
  animation-delay: 0.1s;
}

.apple-intelligence-ripple:hover::before {
  animation: appleRippleExpand 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.apple-intelligence-ripple:hover::after {
  animation: appleRippleExpand 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s forwards;
}

@keyframes appleRippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }
  20% {
    width: 100px;
    height: 100px;
    opacity: 1;
  }
  100% {
    width: 600px;
    height: 600px;
    opacity: 0;
  }
}

/* Adicionar um terceiro layer para mais profundidade */
.apple-intelligence-ripple .ripple-layer {
  content: '';
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(236, 72, 153, 0.3) 0%,
    rgba(232, 121, 249, 0.2) 30%,
    rgba(168, 85, 247, 0.1) 60%,
    transparent 100%
  );
  filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: -3;
}

.apple-intelligence-ripple:hover .ripple-layer {
  animation: appleRippleExpand 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

/* Garantir que o conteúdo fique acima dos efeitos */
.apple-intelligence-ripple > *:not(.ripple-layer) {
  position: relative;
  z-index: 1;
}

/* Hover lift effect (opcional) */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 113, 227, 0.3);
}

/* ==========================================================================
   Ícones e Elementos Gráficos
   ========================================================================== */

/* Efeito shine para ícones/imagens (independente) */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  opacity: 0;
  transition: all 0.6s;
}

/* Ativa o shine no hover do próprio elemento */
.shine-effect:hover::after {
  animation: shineAnimation 0.6s ease-in-out;
}

/* Ativa o shine quando o pai tem hover */
.shine-on-parent-hover .shine-effect::after {
  opacity: 0;
}

.shine-on-parent-hover:hover .shine-effect::after {
  animation: shineAnimation 0.6s ease-in-out;
}

@keyframes shineAnimation {
  0% {
    transform: rotate(45deg) translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotate(45deg) translateX(100%);
    opacity: 0;
  }
}

/* ==========================================================================
   Imagens da seção Guardia+Segurança Pública
   ========================================================================== */
.security-icon {
  width: 128px;
  height: 128px;
  min-width: 128px;
  min-height: 128px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .security-icon {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
  }
}

/* ==========================================================================
   Seções com Gradiente Animado
   ========================================================================== */
.gradient-animated-bg {
  background: linear-gradient(45deg, var(--guardia-blue), var(--guardia-blue-dark), var(--guardia-blue-darker), var(--guardia-blue));
  background-size: 300% 300%;
  animation: gradientShift 15s ease infinite;
  position: relative;
  overflow: hidden;
}

.gradient-animated-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 8s infinite;
}

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

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* Motion.dev Style Background */
.motion-mesh-bg {
  position: relative;
  background: #000000;
  overflow: hidden;
  min-height: 400px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  perspective: 1000;
}

.motion-mesh-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 70, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(70, 120, 255, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(200, 70, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 90% 70%, rgba(70, 200, 255, 0.2) 0%, transparent 50%);
  filter: blur(var(--mesh-blur));
  animation: meshFloat var(--mesh-animation-duration) ease-in-out infinite;
  transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  -webkit-animation: meshFloat var(--mesh-animation-duration) ease-in-out infinite;
  -webkit-will-change: transform;
}

.motion-mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.01) 35px, rgba(255, 255, 255, 0.01) 70px),
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@-webkit-keyframes meshFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
    -webkit-transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  }
  33% {
    transform: translate3d(-30px, -30px, 0) scale(calc(var(--mesh-scale) * 1.1)) rotate(calc(var(--mesh-rotation) + 1deg));
    -webkit-transform: translate3d(-30px, -30px, 0) scale(calc(var(--mesh-scale) * 1.1)) rotate(calc(var(--mesh-rotation) + 1deg));
  }
  66% {
    transform: translate3d(30px, -20px, 0) scale(calc(var(--mesh-scale) * 0.95)) rotate(calc(var(--mesh-rotation) - 1deg));
    -webkit-transform: translate3d(30px, -20px, 0) scale(calc(var(--mesh-scale) * 0.95)) rotate(calc(var(--mesh-rotation) - 1deg));
  }
}

@keyframes meshFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
    -webkit-transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  }
  33% {
    transform: translate3d(-30px, -30px, 0) scale(calc(var(--mesh-scale) * 1.1)) rotate(calc(var(--mesh-rotation) + 1deg));
    -webkit-transform: translate3d(-30px, -30px, 0) scale(calc(var(--mesh-scale) * 1.1)) rotate(calc(var(--mesh-rotation) + 1deg));
  }
  66% {
    transform: translate3d(30px, -20px, 0) scale(calc(var(--mesh-scale) * 0.95)) rotate(calc(var(--mesh-rotation) - 1deg));
    -webkit-transform: translate3d(30px, -20px, 0) scale(calc(var(--mesh-scale) * 0.95)) rotate(calc(var(--mesh-rotation) - 1deg));
  }
}

/* Ajustes para dispositivos móveis */
@media (max-width: 768px) {
  .motion-mesh-bg {
    min-height: 300px;
    --mesh-blur: 20px;
    --mesh-scale: 1;
    --mesh-animation-duration: 30s;
  }
  
  .motion-mesh-bg::before {
    background: 
      radial-gradient(circle at 20% 80%, rgba(120, 70, 255, 0.4) 0%, transparent 40%),
      radial-gradient(circle at 80% 20%, rgba(70, 120, 255, 0.4) 0%, transparent 40%),
      radial-gradient(circle at 40% 40%, rgba(200, 70, 255, 0.3) 0%, transparent 40%);
    animation-duration: calc(var(--mesh-animation-duration) * 1.5);
    -webkit-animation-duration: calc(var(--mesh-animation-duration) * 1.5);
  }
  
  .motion-mesh-bg::after {
    opacity: 0.3;
  }
}

/* Ajustes para dispositivos muito pequenos */
@media (max-width: 480px) {
  .motion-mesh-bg {
    min-height: 250px;
    --mesh-blur: 15px;
    --mesh-scale: 0.9;
  }
  
  .motion-mesh-bg::before {
    background: 
      radial-gradient(circle at 20% 80%, rgba(120, 70, 255, 0.5) 0%, transparent 30%),
      radial-gradient(circle at 80% 20%, rgba(70, 120, 255, 0.5) 0%, transparent 30%);
  }
}

/* Ajustes para dispositivos com tela de alta densidade */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .motion-mesh-bg::before {
    --mesh-blur: 30px;
  }
}

/* Ajustes para dispositivos com baixo poder de processamento */
@media (prefers-reduced-motion: reduce) {
  .motion-mesh-bg::before {
    animation: none;
    -webkit-animation: none;
  }
}

/* Ajustes para modo escuro */
@media (prefers-color-scheme: dark) {
  .motion-mesh-bg::before {
    background: 
      radial-gradient(circle at 20% 80%, rgba(120, 70, 255, 0.4) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(70, 120, 255, 0.4) 0%, transparent 50%),
      radial-gradient(circle at 40% 40%, rgba(200, 70, 255, 0.3) 0%, transparent 50%);
  }
}

/* Ajustes para dispositivos com suporte a hover */
@media (hover: hover) {
  .motion-mesh-bg::before {
    transition: transform 0.3s ease;
  }
}

/* Ajustes para dispositivos touch */
@media (hover: none) {
  .motion-mesh-bg::before {
    animation-duration: calc(var(--mesh-animation-duration) * 1.2);
    -webkit-animation-duration: calc(var(--mesh-animation-duration) * 1.2);
  }
}

/* Versão alternativa com cores Guardia */
.guardia-mesh-bg {
  position: relative;
  background: #0a0a0a;
  overflow: hidden;
  min-height: 400px;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  perspective: 1000;
}

.guardia-mesh-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(0, 113, 227, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(0, 81, 163, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 61, 122, 0.2) 0%, transparent 50%);
  filter: blur(calc(var(--mesh-blur) * 1.5));
  animation: meshFloat var(--mesh-animation-duration) ease-in-out infinite;
  transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  will-change: transform;
  -webkit-transform: translate3d(0, 0, 0) scale(var(--mesh-scale)) rotate(var(--mesh-rotation));
  -webkit-animation: meshFloat var(--mesh-animation-duration) ease-in-out infinite;
  -webkit-will-change: transform;
}

.guardia-mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.65' numOctaves='4' /%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Ajustes para dispositivos móveis */
@media (max-width: 768px) {
  .guardia-mesh-bg::before {
    --mesh-blur: 30px;
    --mesh-scale: 1.1;
    animation-duration: calc(var(--mesh-animation-duration) * 1.5);
    -webkit-animation-duration: calc(var(--mesh-animation-duration) * 1.5);
  }
  
  .guardia-mesh-bg {
    min-height: 300px;
  }
}

/* Animação de partículas flutuantes */
.floating-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: floatUp var(--mesh-particle-animation-duration) infinite;
  width: var(--mesh-particle-size);
  height: var(--mesh-particle-size);
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.2;
    transform: translateY(50vh) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(0.3);
  }
}

/* ==========================================================================
   Animações
   ========================================================================== */
.fade-in {
  /* Valores iniciais para animação - será sobrescrito pelo GSAP */
  opacity: 1;
  transform: translateY(0);
}

/* Hero text animation */
.hero-text {
  opacity: 0;
  transform: translateY(30px);
}

/* Hero background */
.hero-bg {
  background-size: cover;
  background-position: center;
  transition: background-position 0.1s ease-out;
}

@media (max-width: 768px) {
  .hero-bg {
    animation: heroPan 30s infinite alternate ease-in-out;
  }
}

@keyframes heroPan {
  0% { background-position: 0% center; }
  100% { background-position: 100% center; }
}

/* ==========================================================================
   Componentes Específicos
   ========================================================================== */

/* Cards de contato */
.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Cards de clientes */
.client-card {
  transition: all 0.5s ease;
}

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

/* Cards da equipe */
.team-card {
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.team-member-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
  background-color: #ffffff;
  border: 4px solid #1a1a1a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.team-card:hover .team-member-photo {
  transform: scale(1.05);
  border-color: var(--guardia-blue);
}

.photo-container {
  background: radial-gradient(circle, #2a2a2a 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  position: relative;
  flex-shrink: 0;
}

.photo-container::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg at 50% 50%, var(--guardia-blue) 0deg, transparent 60deg, transparent 300deg, var(--guardia-blue) 360deg);
  animation: rotate 20s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.team-card:hover .photo-container::before {
  opacity: 0.2;
}

.team-member-photo {
  position: relative;
  z-index: 2;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Formulários
   ========================================================================== */
.contact-input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  transition: all 0.3s ease;
}

.contact-input:focus {
  border-color: var(--guardia-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.3);
}

.contact-button {
  background-color: var(--guardia-blue);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background-color: #0058b0;
}

.contact-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background-color: var(--guardia-blue);
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--guardia-blue);
  border: 4px solid #000;
}

/* ==========================================================================
   Seções Específicas
   ========================================================================== */
.solution-section {
  scroll-margin-top: 80px;
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.form-response {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  display: none;
}

.form-response.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-response.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-loader {
  display: none;
  margin-left: 10px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.field-error {
  border-color: #dc3545 !important;
}

.error-message {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 5px;
  display: none;
} 