/* =============================================
   SIEMETRAFO — HERO MOBILE IMPACT v1
   Efeitos visuais poderosos para telas < 768px
   Objetivo: WOW factor quando o usuário abre no celular
============================================= */

/* ══════════════════════════════════════════
   BARRA DE URGÊNCIA MOBILE (fixa no topo)
══════════════════════════════════════════ */
#mobile-urgency-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 50%, #dc2626 100%);
  background-size: 200% 100%;
  animation: urgency-slide 3s linear infinite;
  padding: 7px 16px;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  gap: 8px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.5);
}

@keyframes urgency-slide {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@media (max-width: 768px) {
  #mobile-urgency-bar { display: flex; }
  
  /* Empurra o header pra baixo quando a barra aparece */
  body.has-urgency-bar #site-header {
    top: 34px !important;
  }

  /* Compensa a barra no scroll inicial */
  body.has-urgency-bar {
    scroll-padding-top: 34px;
  }
}

.urgency-dot {
  width: 7px; height: 7px;
  background: #fef08a;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ══════════════════════════════════════════
   HERO MOBILE — IMPACTO VISUAL MÁXIMO
══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Background animado com ondas de luz */
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
      radial-gradient(ellipse 70% 50% at 50% -10%, rgba(59,130,246,0.35) 0%, transparent 65%),
      radial-gradient(ellipse 50% 40% at 80% 80%, rgba(220,38,38,0.2) 0%, transparent 60%);
    animation: hero-glow 6s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
  }

  @keyframes hero-glow {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.08); }
  }

  /* Partículas de fundo (pontos brilhantes) */
  .hero-stripe {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: 
      radial-gradient(1.5px 1.5px at 15% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
      radial-gradient(1px 1px at 75% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
      radial-gradient(2px 2px at 50% 60%, rgba(59,130,246,0.6) 0%, transparent 100%),
      radial-gradient(1px 1px at 25% 80%, rgba(255,255,255,0.35) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 90% 55%, rgba(255,255,255,0.45) 0%, transparent 100%),
      radial-gradient(1px 1px at 40% 40%, rgba(251,191,36,0.5) 0%, transparent 100%),
      radial-gradient(2px 2px at 65% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
      radial-gradient(1px 1px at 8% 65%, rgba(59,130,246,0.4) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 88% 30%, rgba(251,191,36,0.4) 0%, transparent 100%);
    animation: particles-move 12s ease-in-out infinite alternate;
  }

  @keyframes particles-move {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-8px) translateX(4px); }
  }

  /* Conteúdo do hero mobile — animação de entrada */
  .hero-content {
    animation: hero-enter 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  @keyframes hero-enter {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Eyebrow badge animado */
  .hero-eyebrow {
    animation: hero-enter 0.5s 0.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  /* Título principal — animação de entrada (tamanho controlado pelo inline CSS) */
  .hero-title {
    animation: hero-enter 0.6s 0.15s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  /* Destaque vermelho — brilho no nome da marca */
  .hero-brand-name {
    text-shadow: 0 0 30px rgba(220,38,38,0.5);
    animation: name-glow 3s ease-in-out infinite alternate;
  }

  @keyframes name-glow {
    0% { text-shadow: 0 0 20px rgba(220,38,38,0.4); }
    100% { text-shadow: 0 0 40px rgba(220,38,38,0.8), 0 0 80px rgba(220,38,38,0.3); }
  }

  /* Descrição */
  .hero-desc {
    animation: hero-enter 0.6s 0.25s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    font-size: .88rem !important;
  }

  /* Bloco de urgência (raio) */
  .hero-content > div[style*="inline-flex"] {
    animation: hero-enter 0.6s 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    width: 100%;
    justify-content: center !important;
    box-sizing: border-box;
    margin-bottom: 16px !important;
  }

  /* Botões — MOBILE IMPACT */
  .hero-actions {
    animation: hero-enter 0.6s 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 16px 20px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    letter-spacing: .01em;
  }

  /* Botão Catálogo — destaque máximo */
  .hero-actions .btn-red {
    background: linear-gradient(135deg, #e11d48, #dc2626, #b91c1c) !important;
    box-shadow: 0 6px 24px rgba(220,38,38,0.5), 0 2px 8px rgba(0,0,0,0.3) !important;
    animation: btn-red-pulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
  }

  .hero-actions .btn-red::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: btn-shine 2.5s ease-in-out infinite;
  }

  @keyframes btn-shine {
    0% { left: -100%; }
    40%, 100% { left: 150%; }
  }

  @keyframes btn-red-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(220,38,38,0.5), 0 2px 8px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 8px 32px rgba(220,38,38,0.7), 0 2px 8px rgba(0,0,0,0.3); }
  }

  /* Botão Configurador — estilo clean mas chamativo */
  .hero-actions a:not(.btn-red) {
    background: rgba(255,255,255,0.1) !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    color: #fff !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
  }

  /* Badges de certificação */
  .hero-badge-row {
    animation: hero-enter 0.6s 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .hero-badge {
    font-size: .7rem !important;
    padding: 5px 10px !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 20px !important;
    color: rgba(255,255,255,0.8) !important;
  }

  /* Stats */
  .hero-stats {
    animation: hero-enter 0.6s 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  /* ══ CARD DE ORÇAMENTO RÁPIDO MOBILE ══ */
  #mobile-quick-quote {
    display: block;
    margin: 0 16px 24px;
    background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    animation: hero-enter 0.7s 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
}

/* ══════════════════════════════════════════
   MOBILE HERO — CONTADOR DE VISITANTES
══════════════════════════════════════════ */
#mobile-visitor-bar {
  display: none;
}

@media (max-width: 768px) {
  #mobile-visitor-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 16px;
    font-size: .72rem;
    color: rgba(255,255,255,0.7);
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    text-align: center;
    margin: -2px 0;
  }

  #mobile-visitor-bar .vbar-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  #mobile-visitor-bar .vbar-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 1.2s ease-in-out infinite;
    display: inline-block;
  }

  #mobile-visitor-bar .vbar-sep {
    color: rgba(255,255,255,0.2);
  }
}



/* ══════════════════════════════════════════
   ANIMAÇÃO DO HERO — LINHA DE ENERGIA
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-energy-line {
    display: block;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
      transparent 0%, 
      #3b82f6 20%, 
      #fbbf24 50%, 
      #dc2626 80%, 
      transparent 100%
    );
    background-size: 200% 100%;
    animation: energy-flow 2.5s linear infinite;
    z-index: 10;
  }
}

@keyframes energy-flow {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ══════════════════════════════════════════
   POPUP DE BOAS-VINDAS MOBILE (primeira visita)
══════════════════════════════════════════ */
#mobile-welcome-toast {
  display: none;
}

@media (max-width: 768px) {
  #mobile-welcome-toast {
    display: block;
    position: fixed;
    bottom: 100px;
    left: 16px;
    right: 70px;
    z-index: 998;
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toast-bounce 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  #mobile-welcome-toast.show {
    opacity: 1;
    pointer-events: auto;
  }

  @keyframes toast-bounce {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
  }

  .welcome-toast-title {
    font-size: .82rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .welcome-toast-desc {
    font-size: .72rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
  }

  .welcome-toast-close {
    position: absolute;
    top: 8px; right: 10px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: .9rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
  }
}

/* ══════════════════════════════════════════
   HERO — ÍCONE PRODUTO MOBILE ANIMADO
══════════════════════════════════════════ */
#mobile-product-visual {
  display: none;
}

@media (max-width: 768px) {
  #mobile-product-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 0 4px;
    animation: hero-enter 0.7s 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    position: relative;
    z-index: 2;
  }

  .mpv-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
  }

  .mpv-icon-wrap {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
  }

  .mpv-item:active .mpv-icon-wrap {
    background: rgba(255,255,255,0.15);
    transform: scale(0.95);
  }

  .mpv-label {
    font-size: .6rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: center;
    line-height: 1.2;
  }

  /* Item ativo/destaque */
  .mpv-item.active .mpv-icon-wrap {
    background: rgba(220,38,38,0.2);
    border-color: rgba(220,38,38,0.5);
    box-shadow: 0 0 20px rgba(220,38,38,0.3);
  }
}

/* ══════════════════════════════════════════
   HERO — LINHA SEPARADORA ENERGIA MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-divider-mobile {
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #dc2626, #fbbf24);
    border-radius: 2px;
    margin: 12px auto;
    animation: hero-enter 0.5s 0.2s both;
  }
}

/* ══════════════════════════════════════════
   HERO — BLOCO DE ORÇAMENTO (raio) MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Transforma o bloco inline-flex de urgência num card cheio */
  .hero-content > div[style*="inline-flex"][style*="rgba(245,158,11"] {
    display: flex !important;
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin-bottom: 12px !important;
    background: linear-gradient(90deg, rgba(245,158,11,.18), rgba(234,88,12,.14)) !important;
    border-color: rgba(245,158,11,.5) !important;
  }

  /* Fonte maior na mensagem de urgência */
  .hero-content > div[style*="inline-flex"][style*="rgba(245,158,11"] span {
    font-size: .85rem !important;
  }
}

/* ══════════════════════════════════════════
   HERO — BADGE ROW MAIS PROEMINENTE MOBILE
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero-badge-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 16px !important;
  }
  .hero-badge {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 8px !important;
    font-size: .72rem !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
  }
}
