/* ==========================================================================
   CORREIA SOLUÇÕES — EXPERIÊNCIA PREMIUM MOBILE & DESKTOP (ALTA CONVERSÃO)
   Design refinado para conversão máxima de leads em Pernambuco
   ========================================================================== */

/* 1. Reset Global & Suavidade de Rolagem */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  -webkit-tap-highlight-color: transparent;
}

/* Scrollbar customizada moderna no Desktop */
@media (min-width: 769px) {
  ::-webkit-scrollbar {
    width: 10px;
  }
  ::-webkit-scrollbar-track {
    background: #061A35;
  }
  ::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 9999px;
    border: 2px solid #061A35;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
  }
}

/* Previne zoom involuntário no Safari iOS ao focar campos */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* 2. BOTÃO OFICIAL DO WHATSAPP FLUTUANTE — DESIGN DE ALTA CONVERSÃO */
a[aria-label*="WhatsApp"].fixed,
a.fixed.bottom-5.right-5 {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 99999 !important;
  animation: none !important;
  background: #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 24px rgba(34, 197, 94, 0.45) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)) !important;
  right: calc(1.25rem + env(safe-area-inset-right, 0px)) !important;
}

a[aria-label*="WhatsApp"].fixed svg,
a.fixed.bottom-5.right-5 svg {
  fill: #ffffff !important;
  color: #ffffff !important;
}

/* Efeito de radar pulsante de atenção (Breath Effect) */
a[aria-label*="WhatsApp"].fixed::before,
a.fixed.bottom-5.right-5::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: #22c55e;
  opacity: 0.5;
  z-index: -1;
  animation: waPulse 2.6s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes waPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
    opacity: 0;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

/* Resposta tátil ao toque no celular */
a[aria-label*="WhatsApp"].fixed:active,
a.fixed.bottom-5.right-5:active {
  transform: scale(0.92) !important;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3) !important;
}

/* Efeito suave ao passar o mouse no Desktop */
@media (hover: hover) and (min-width: 769px) {
  a[aria-label*="WhatsApp"].fixed:hover,
  a.fixed.bottom-5.right-5:hover {
    transform: translateY(-4px) scale(1.06) !important;
    box-shadow: 0 10px 32px rgba(34, 197, 94, 0.6) !important;
  }
}

/* 3. ELIMINAÇÃO TOTAL DE FLICKER ("BOTÕES QUE PISCAM OU SOMEM") */
.anim-rise {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* 4. OTIMIZAÇÕES DO SIMULADOR SOLAR NO CELULAR E NO DESKTOP */
#simulador {
  scroll-margin-top: 5rem;
}

#simulador input[type="range"] {
  height: 8px;
  border-radius: 9999px;
  outline: none;
  background: #1e293b;
  accent-color: #fbbf24;
}

#simulador input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fbbf24;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.65);
  cursor: pointer;
  -webkit-appearance: none;
  transition: transform 0.15s ease;
}

#simulador input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

#simulador input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fbbf24;
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.65);
  cursor: pointer;
  transition: transform 0.15s ease;
}

/* Ajustes finos de espaçamento no Mobile (360px+) */
@media (max-width: 640px) {
  #simulador {
    padding-top: 1.75rem !important;
    padding-bottom: 2.75rem !important;
  }
  #simulador .shadow-card {
    border-radius: 1.25rem !important;
    padding: 1rem !important;
  }
}

/* Feedback tátil nos botões de CTA */
button:active, a.rounded-full:active, a.rounded-2xl:active {
  transform: scale(0.97);
}
