/* =================================================================
   HUBSPOT CUSTOM MODULE - CSS PANEL
   Palette: #00754A | #80BAA5 | #EF8943 | #33916e | #17392F
   ================================================================= */

:root {
  --hs-green-dark: #17392F;
  --hs-green-primary: #00754A;
  --hs-green-mid: #33916e;
  --hs-green-light: #80BAA5;
  --hs-orange-cta: #EF8943;
  --hs-white: #FFFFFF;
  --hs-text-muted: rgba(255, 255, 255, 0.82);
}

.hs-whatsapp-hero {
  position: relative;
  background-color: var(--hs-green-dark);
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(51, 145, 110, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(0, 117, 74, 0.4) 0%, transparent 50%),
    linear-gradient(160deg, #17392F 0%, #0c211b 100%);
  padding: 100px 24px 120px;
  overflow: hidden;
  color: var(--hs-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.hs-whatsapp-hero * {
  box-sizing: border-box;
}

/* Background Canvas & Glare Effects */
.hero-bg-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: var(--hs-green-light);
  top: -100px;
  right: -50px;
}

.glow-2 {
  width: 350px;
  height: 350px;
  background: var(--hs-green-primary);
  bottom: -50px;
  left: -50px;
}

/* Balões Flutuantes de WhatsApp no Fundo */
.floating-bubble {
  position: absolute;
  background: rgba(23, 57, 47, 0.65);
  border: 1px solid rgba(128, 186, 165, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: floatAnim 7s ease-in-out infinite alternate;
}

.bubble-avatar {
  width: 28px;
  height: 28px;
  background: var(--hs-green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bubble-text span {
  display: block;
  font-size: 11px;
  color: var(--hs-green-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.bubble-text strong {
  font-size: 13px;
  color: var(--hs-white);
  font-weight: 500;
}

.bubble-1 { top: 12%; left: 4%; animation-delay: 0s; }
.bubble-2 { bottom: 15%; left: 6%; animation-delay: 2s; }
.bubble-3 { top: 18%; right: 4%; animation-delay: 1s; }
.bubble-4 { bottom: 12%; right: 7%; animation-delay: 3s; }

@keyframes floatAnim {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-18px); }
}

/* Structural Wrapper */
.hero-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Coluna Esquerda - Copy */
.hero-copy-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Tag de Urgência */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 137, 67, 0.15);
  border: 1px solid rgba(239, 137, 67, 0.45);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge-pulse {
  width: 9px;
  height: 9px;
  background-color: var(--hs-orange-cta);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239, 137, 67, 0.7);
  animation: pulseOrange 1.8s infinite;
}

@keyframes pulseOrange {
  0% { box-shadow: 0 0 0 0 rgba(239, 137, 67, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 137, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 137, 67, 0); }
}

.badge-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFB380;
  letter-spacing: -0.1px;
}

/* H1 */
.hero-h1 {
  font-size: 46px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px 0;
  color: var(--hs-white);
}

.text-accent {
  color: var(--hs-green-light);
  background: linear-gradient(120deg, #80BAA5 0%, #B8E4D5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subtítulo */
.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--hs-text-muted);
  margin: 0 0 36px 0;
  max-width: 610px;
  font-weight: 400;
}

/* CTAs */
.cta-action-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  line-height: 1;
}

.btn-primary {
  background-color: var(--hs-orange-cta);
  color: var(--hs-white);
  box-shadow: 0 10px 25px rgba(239, 137, 67, 0.35);
}

.btn-primary:hover {
  background-color: #f09555;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(239, 137, 67, 0.48);
}

.btn-primary .btn-icon {
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--hs-white);
  border: 1.5px solid rgba(128, 186, 165, 0.4);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: rgba(128, 186, 165, 0.15);
  border-color: var(--hs-green-light);
  transform: translateY(-3px);
  color: var(--hs-white);
}

.microcopy-support {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--hs-green-light);
  opacity: 0.9;
}

/* Coluna Direita - Phone Mockup */
.hero-mockup-column {
  display: flex;
  justify-content: center;
  position: relative;
  perspective: 1000px;
}

.phone-frame-container {
  position: relative;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

.phone-device {
  width: 325px;
  height: 580px;
  background: #0B141B;
  border-radius: 44px;
  border: 10px solid #222d34;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-notch {
  width: 90px;
  height: 20px;
  background: #222d34;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.speaker-bar {
  width: 35px;
  height: 4px;
  background: #111b21;
  border-radius: 4px;
}

.camera-dot {
  width: 6px;
  height: 6px;
  background: #111b21;
  border-radius: 50%;
}

/* WhatsApp App UI */
.whatsapp-screen {
  flex: 1;
  background: #0b141a;
  background-image: radial-gradient(#111b21 1px, transparent 1px);
  background-size: 12px 12px;
  display: flex;
  flex-direction: column;
  padding-top: 22px;
}

.wa-header {
  background: #202c33;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wa-avatar {
  width: 34px;
  height: 34px;
  background: var(--hs-green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-contact-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.wa-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #e9edef;
}

.wa-status {
  font-size: 10px;
  color: #8696a0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-dot {
  width: 6px;
  height: 6px;
  background: #00a884;
  border-radius: 50%;
}

.wa-verified-badge {
  font-size: 10px;
  background: #00a884;
  color: #0b141a;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.wa-chat-body {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.chat-date-divider {
  align-self: center;
  background: #182229;
  color: #8696a0;
  font-size: 9px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.chat-msg {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.msg-in {
  align-self: flex-start;
  background: #eaeaea;
  color: #e9edef;
  border-top-left-radius: 0;
}

.msg-out {
  align-self: flex-end;
  background: #005c4b;
  color: #eaeaea;
  border-top-right-radius: 0;
}

.bot-tag {
  font-size: 8.5px;
  background: rgba(128, 186, 165, 0.2);
  color: var(--hs-green-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 5px;
  display: inline-block;
}

.chat-file-card {
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-icon { font-size: 16px; }

.file-details strong {
  display: block;
  font-size: 10px;
  color: #e9edef;
}

.file-details span {
  font-size: 8px;
  color: #8696a0;
}

.msg-meta {
  display: block;
  font-size: 8.5px;
  color: #8696a0;
  text-align: right;
  margin-top: 4px;
}

.checks { color: #53bdeb; }

/* Impact Card inside Phone */
.chat-impact-card {
  margin-top: auto;
  background: linear-gradient(135deg, rgba(0, 117, 74, 0.9) 0%, rgba(23, 57, 47, 0.95) 100%);
  border: 1px solid var(--hs-green-light);
  border-radius: 10px;
  padding: 10px;
  color: white;
}

.impact-badge {
  background: var(--hs-orange-cta);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.impact-desc strong {
  display: block;
  font-size: 11px;
  color: var(--hs-white);
}

.impact-desc span {
  font-size: 9.5px;
  color: var(--hs-green-light);
  line-height: 1.2;
  display: block;
}

/* Floating Badges around phone */
.mockup-floating-tag {
  position: absolute;
  background: rgba(23, 57, 47, 0.85);
  border: 1px solid rgba(128, 186, 165, 0.35);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 5;
}

.tag-cost {
  top: 15%;
  left: -40px;
}

.tag-speed {
  bottom: 18%;
  right: -30px;
}

.tag-icon { font-size: 18px; }

.tag-content small {
  display: block;
  font-size: 10px;
  color: var(--hs-green-light);
}

.tag-content strong {
  font-size: 12px;
  color: var(--hs-white);
}

/* Responsividade */
@media (max-width: 991px) {
  .hs-whatsapp-hero {
    padding: 70px 20px 80px;
  }
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }
  .hero-copy-column {
    align-items: center;
  }
  .hero-h1 {
    font-size: 34px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .cta-action-group {
    justify-content: center;
    width: 100%;
  }
  .btn-hero {
    width: 100%;
    max-width: 380px;
  }
  .floating-bubble {
    display: none; /* Oculta balões para otimizar leitura mobile */
  }
  .tag-cost, .tag-speed {
    display: none;
  }
}
/* =================================================================
   HUBSPOT CUSTOM MODULE - JS PANEL
   Efeitos Interativos: Parallax nos Balões e 3D Tilt no Mockup
   ================================================================= */

document.addEventListener("DOMContentLoaded", function () {
  const heroSection = document.querySelector(".hs-whatsapp-hero");
  const phoneTilt = document.getElementById("phoneTilt");
  const parallaxBubbles = document.querySelectorAll("[data-parallax-speed]");

  if (!heroSection) return;

  // 1. Efeito Parallax nos Balões com movimento do mouse
  heroSection.addEventListener("mousemove", function (e) {
    const { clientX, clientY } = e;
    const centerX = window.innerWidth / 2;
    const centerY = window.innerHeight / 2;

    const moveX = clientX - centerX;
    const moveY = clientY - centerY;

    // Move os balões de fundo levemente
    parallaxBubbles.forEach((bubble) => {
      const speed = parseFloat(bubble.getAttribute("data-parallax-speed")) || 0.03;
      const x = moveX * speed;
      const y = moveY * speed;
      bubble.style.transform = `translate3d(${x}px, ${y}px, 0px)`;
    });

    // 2. Efeito 3D Tilt suave no Mockup do Celular
    if (phoneTilt && window.innerWidth > 991) {
      const rect = phoneTilt.getBoundingClientRect();
      const phoneCenterX = rect.left + rect.width / 2;
      const phoneCenterY = rect.top + rect.height / 2;

      const tiltX = (e.clientY - phoneCenterY) / 25;
      const tiltY = (e.clientX - phoneCenterX) / -25;

      phoneTilt.style.transform = `rotateX(${tiltX}deg) rotateY(${tiltY}deg)`;
    }
  });

  // Reseta a inclinação do celular quando o mouse sai da seção
  heroSection.addEventListener("mouseleave", function () {
    if (phoneTilt) {
      phoneTilt.style.transform = `rotateX(0deg) rotateY(0deg)`;
      phoneTilt.style.transition = "transform 0.5s ease";
    }

    parallaxBubbles.forEach((bubble) => {
      bubble.style.transform = `translate3d(0px, 0px, 0px)`;
      bubble.style.transition = "transform 0.5s ease";
    });
  });

  // Remove transição quando o mouse entra para garantir fluidez
  heroSection.addEventListener("mouseenter", function () {
    if (phoneTilt) {
      phoneTilt.style.transition = "none";
    }
    parallaxBubbles.forEach((bubble) => {
      bubble.style.transition = "none";
    });
  });
});