/* ============================================================
   vm-layout.css — Header e Footer compartilhados (vmh-/vmf-)
   Incluído em: nova-home, product-tvplay, linha-vm, tabela-precos
   ============================================================ */

:root {
  --vmh-bg:           #06091a;
  --vmh-border:       rgba(255,255,255,0.08);
  --vmh-accent:       #6f4bf1;
  --vmh-text:         #f0f2ff;
  --vmh-text-muted:   rgba(240,242,255,0.65);
  --vmh-text-sub:     rgba(240,242,255,0.38);
  --vmh-surface:      #0d1230;
  --vmh-transition:   0.2s ease;
}

/* ── RESET MÍNIMO ────────────────────────────────────────── */
.vmh-header *, .vmf-footer * { box-sizing: border-box; }

/* ============================================================
   HEADER
   ============================================================ */
.vmh-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 68px;
  background: #071131;
  transition: box-shadow .35s ease;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.vmh-header.scrolled {
  background: #071131;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 1px 20px rgba(0,0,0,.5);
}

/* ── Logo swap ── */
.vmh-logo { position: relative; }
.vmh-logo-img { opacity: 1; }
.vmh-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 28px;
}
/* Especificidade reforçada (0,2,0) — sobrepõe resets globais como .nova-home-body * { padding:0 } */
.vmh-header .vmh-container        { margin-left: auto; margin-right: auto; padding: 0 28px; }
.vmh-header .vmh-phone             { padding: 7px 16px; }
.vmh-header .vmh-nav a             { padding: 6px 12px; }
.vmh-header .vmh-dropdown-trigger  { padding: 6px 12px; margin: 0; }
.vmh-header .vmh-dropdown-menu     { padding: 8px; padding-top: 12px; }
.vmh-header .vmh-dropdown-sep      { margin: 4px 0; }
.vmh-header .vmh-toggle            { padding: 4px; }
.vmh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}
.vmh-logo { display: flex; align-items: center; text-decoration: none; }
.vmh-logo-img { height: 48px; width: auto; display: block; }

/* Phone */
.vmh-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Mulish', system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: #a5c5fd;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  padding: 7px 16px;
  border-radius: 8px;
  transition: background var(--vmh-transition), color var(--vmh-transition);
}
.vmh-phone:hover { background: rgba(0,0,0,.06); color: #a5c5fd; }
.vmh-phone svg { flex-shrink: 0; opacity: .7; }

/* Nav */
.vmh-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vmh-nav a {
  color: #a5c5fd;
  font-family: 'Mulish', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color var(--vmh-transition), background var(--vmh-transition);
}
.vmh-nav a:hover { color: #a5c5fd; background: rgba(255,255,255,.08); }

/* ── Estado padrão (fundo claro): texto preto — somente desktop ── */
@media (min-width: 901px) {
  .vmh-header:not(.scrolled) .vmh-nav a,
  .vmh-header:not(.scrolled) .vmh-dropdown-trigger { color: #a5c5fd; }
  .vmh-header:not(.scrolled) .vmh-nav a:hover,
  .vmh-header:not(.scrolled) .vmh-dropdown-trigger:hover { color: #a5c5fd; background: rgba(0,0,0,.05); }
  .vmh-header:not(.scrolled) .vmh-phone { color: #a5c5fd; }
  .vmh-header:not(.scrolled) .vmh-chevron { stroke: #a5c5fd; }
  .vmh-header:not(.scrolled) .vmh-toggle span { background: #a5c5fd; }
  .vmh-header:not(.scrolled) .vmh-nav-cta { color: #a5c5fd !important; }
  .vmh-header:not(.scrolled) .vmh-nav-cta:hover { background: rgba(0,0,0,.06) !important; color: #a5c5fd !important; }
  .vmh-header:not(.scrolled) .vmh-dropdown-menu { background: #022c55 !important; border-color: rgba(255,255,255,.12) !important; box-shadow: 0 8px 32px rgba(0,0,0,.25) !important; }
  .vmh-header:not(.scrolled) .vmh-dropdown-menu a { color: #a5c5fd !important; }
  .vmh-header:not(.scrolled) .vmh-dropdown-menu a:hover { color: #a5c5fd !important; background: rgba(255,255,255,.12) !important; }
  .vmh-header:not(.scrolled) .vmh-dropdown-sep { background: rgba(0,0,0,.06) !important; }
  .vmh-header:not(.scrolled) .vmh-dropdown-group-title { color: rgba(255,255,255,.65) !important; }
}

/* ── Estado scrolled (fundo escuro): texto branco ── */
.vmh-header.scrolled .vmh-nav a,
.vmh-header.scrolled .vmh-dropdown-trigger { color: #a5c5fd; }
.vmh-header.scrolled .vmh-nav a:hover,
.vmh-header.scrolled .vmh-dropdown-trigger:hover { color: #a5c5fd; background: var(--vmh-surface); }
.vmh-header.scrolled .vmh-phone { color: #a5c5fd; background: transparent; }
.vmh-header.scrolled .vmh-phone:hover { background: rgba(255,255,255,.08); color: #a5c5fd; }
.vmh-header.scrolled .vmh-chevron { stroke: #a5c5fd; }
.vmh-header.scrolled .vmh-toggle span { background: #a5c5fd; }
.vmh-header.scrolled .vmh-nav-cta { color: #a5c5fd !important; }
.vmh-header.scrolled .vmh-nav-cta:hover { background: rgba(255,255,255,.08) !important; color: #a5c5fd !important; }
.vmh-header.scrolled .vmh-dropdown-menu { background: #022c55 !important; border-color: rgba(255,255,255,.12) !important; box-shadow: 0 16px 48px rgba(0,0,0,.5) !important; }
.vmh-header.scrolled .vmh-dropdown-menu a { color: #a5c5fd !important; }
.vmh-header.scrolled .vmh-dropdown-menu a:hover { color: #a5c5fd !important; background: rgba(255,255,255,.12) !important; }
.vmh-header.scrolled .vmh-dropdown-sep { background: rgba(255,255,255,.06) !important; }

.vmh-nav-cta {
  background: transparent !important;
  font-weight: 600 !important;
  padding: 7px 18px !important;
  border: none !important;
}

/* ── DROPDOWN ────────────────────────────────────────── */
.vmh-dropdown { position: relative; }

.vmh-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #a5c5fd;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Mulish', system-ui, sans-serif;
  padding: 6px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  /* Reset de browser defaults para <button> */
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  box-sizing: border-box;
  text-align: left;
  max-width: none;
  transition: color var(--vmh-transition), background var(--vmh-transition);
}
.vmh-dropdown-trigger:hover { color: #a5c5fd; background: rgba(0,0,0,.05); }

.vmh-chevron { transition: transform var(--vmh-transition); flex-shrink: 0; }
.vmh-dropdown:hover .vmh-chevron,
.vmh-dropdown.open  .vmh-chevron { transform: rotate(180deg); }

.vmh-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;          /* sem gap — bridge abaixo cobre a transição */
  left: 0;
  min-width: 220px;
  background: #022c55;
  border: 1px solid var(--vmh-border);
  border-radius: 10px;
  padding: 8px;
  padding-top: 12px;  /* espaço visual no lugar do antigo gap externo */
  z-index: 300;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  flex-direction: column;
}
.vmh-dropdown:hover .vmh-dropdown-menu { display: flex; }
.vmh-dropdown.open   .vmh-dropdown-menu { display: flex; }
/* --wide usa column-count (2 colunas) — precisa de display:block, flex anula column-count */
.vmh-dropdown:hover .vmh-dropdown-menu--wide,
.vmh-dropdown.open   .vmh-dropdown-menu--wide { display: block; }

/* Bridge invisível: evita zona morta ao mover o mouse para o menu */
.vmh-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.vmh-dropdown-menu a {
  color: #a5c5fd !important;
  font-size: .88rem !important;
  font-weight: 400 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color var(--vmh-transition), background var(--vmh-transition) !important;
  background: none !important;
}
.vmh-dropdown-menu a:hover { color: #a5c5fd !important; background: rgba(255,255,255,0.12) !important; }

.vmh-dropdown-sep { height: 1px; background: var(--vmh-border); margin: 4px 0; }

/* Dropdown largo (Linha VM) — 2 colunas em desktop */
.vmh-dropdown-menu--wide {
  min-width: 460px;
  column-count: 2;
  column-gap: 8px;
}
.vmh-dropdown-menu--wide .vmh-dropdown-all,
.vmh-dropdown-menu--wide .vmh-dropdown-sep,
.vmh-dropdown-menu--wide .vmh-dropdown-group-title {
  column-span: all;
}
.vmh-dropdown-all {
  display: block;
  color: #a5c5fd !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
}
.vmh-dropdown-all:hover { background: rgba(255,255,255,0.06) !important; }
.vmh-dropdown-group-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--vmh-text-sub);
  padding: 6px 12px 2px;
}

/* Toggle mobile */
.vmh-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.vmh-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform var(--vmh-transition), opacity var(--vmh-transition);
}

/* ── RESPONSIVE HEADER ───────────────────────────────────── */
@media (max-width: 900px) {
  .vmh-header .vmh-container { padding-left: 20px; padding-right: 20px; }
  .vmh-phone { display: none; }
  .vmh-toggle { display: flex; }
  .vmh-nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--vmh-bg);
    border-bottom: 1px solid var(--vmh-border);
    flex-direction: column;
    align-items: stretch;   /* sobrescreve o center do desktop — itens ocupam largura total */
    padding: 16px;
    gap: 4px;
    z-index: 199;
  }
  .vmh-nav.open { display: flex; }
  .vmh-nav a { width: 100%; padding: 10px 14px; }
  .vmh-header .vmh-nav          { padding: 16px; }
  .vmh-header .vmh-nav a        { padding: 10px 14px; }
  .vmh-header .vmh-dropdown-menu { padding: 4px 0 8px 12px; margin-left: 14px; margin-bottom: 4px; }
  .vmh-dropdown-menu--wide { min-width: 0; column-count: 1; }
  .vmh-dropdown-all { margin-bottom: 4px; }

  /* Dropdowns no mobile — expandem inline, iguais aos links do nav */
  .vmh-dropdown { width: 100% !important; display: block !important; }
  .vmh-dropdown-trigger {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    justify-content: space-between;
    padding: 10px 14px !important;
    color: #a5c5fd !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 8px;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .vmh-dropdown-trigger:hover { color: #a5c5fd; background: var(--vmh-surface); }
  /* Cancela hover no mobile (usa apenas .open via JS) */
  .vmh-dropdown:hover .vmh-dropdown-menu { display: none; }
  .vmh-dropdown.open  .vmh-dropdown-menu { display: flex; }
  .vmh-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 1px solid var(--vmh-border);
    border-radius: 0;
    background: transparent;
    padding: 4px 0 8px 12px;
    padding-top: 4px;   /* remove padding-top extra do desktop */
    min-width: unset;
    margin-left: 14px;
    margin-bottom: 4px;
  }
  .vmh-dropdown-menu::before { display: none; } /* bridge não precisa no mobile */
  .vmh-dropdown-menu a { white-space: normal; font-size: .9rem !important; }
  .vmh-dropdown-sep { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.vmf-footer {
  background: #040610;
  border-top: 1px solid var(--vmh-border);
}
/* Especificidade reforçada contra resets de cada template */
body .vmf-footer {
  margin-top: 80px;
}
.vmf-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 28px;
}
section.vmf-section.vm-blocks-content {
  padding: 80px 0;
}
.vm-blocks-content .vm-container,
.vm-page-content .vmf-container {
  max-width: 1200px;
}
.vm-blocks-content h1,
.vm-blocks-content h2,
.vm-blocks-content h3,
.vm-blocks-content h4,
.vm-blocks-content h5,
.vm-blocks-content h6,
.vm-page-content h1,
.vm-page-content h2,
.vm-page-content h3,
.vm-page-content h4,
.vm-page-content h5,
.vm-page-content h6 {
  color: #f8fafc;
}
.vm-blocks-content p,
.vm-blocks-content li,
.vm-page-content p,
.vm-page-content li {
  color: #cbd5e1;
}
.vm-blocks-content .wp-block-columns,
.vm-page-content .wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.vm-blocks-content .wp-block-column,
.vm-page-content .wp-block-column {
  flex: 1;
  min-width: min(100%, 280px);
}
.vmf-footer .vmf-container {
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}
.vmf-footer-inner {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
  padding: 64px 0 48px;
}
.vmf-footer .vmf-footer-inner {
  padding-top: 64px;
  padding-bottom: 48px;
}

/* Brand */
.vmf-footer-brand { flex: 0 0 200px; }
.vmf-footer-logo { height: 28px; width: auto; margin-bottom: 12px; display: block; }
.vmf-footer-brand p {
  font-size: .8rem;
  color: var(--vmh-text-sub);
  line-height: 1.6;
}
.vmf-footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.vmf-social-link {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  color: var(--vmh-text-muted);
  transition: background var(--vmh-transition), color var(--vmh-transition);
}
.vmf-social-link:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Link columns */
.vmf-footer-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  flex: 1;
}
.vmf-footer-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.vmf-footer-col-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--vmh-text-sub);
  margin-bottom: 6px;
}
.vmf-footer-col a {
  font-size: .9rem;
  color: var(--vmh-text-muted);
  text-decoration: none;
  transition: color var(--vmh-transition);
}
.vmf-footer-col a:hover { color: var(--vmh-text); }

/* Phone bar */
.vmf-footer-phone-bar {
  border-top: 1px solid rgba(111,75,241,0.3);
  border-bottom: 1px solid rgba(111,75,241,0.3);
  background: rgba(111,75,241,0.06);
  padding: 14px 0;
}
.vmf-footer-phone-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.vmf-footer-phone-icon { color: var(--vmh-accent); flex-shrink: 0; }
.vmf-footer-phone-label {
  font-size: .8rem;
  color: var(--vmh-text-muted);
  font-weight: 500;
}
.vmf-footer-phone-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--vmh-text);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color var(--vmh-transition);
}
.vmf-footer-phone-number:hover { color: var(--vmh-accent); }
.vmf-footer-phone-secondary { font-size: .9rem; font-weight: 600; }
.vmf-footer-phone-sep { color: var(--vmh-text-sub); }

/* Bottom bar */
.vmf-footer-bottom {
  padding: 16px 0;
  border-top: 1px solid var(--vmh-border);
}
.vmf-footer-bottom .vmf-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--vmh-text-sub);
}
.vmf-footer-bottom a {
  color: var(--vmh-text-sub);
  text-decoration: none;
  transition: color var(--vmh-transition);
}
.vmf-footer-bottom a:hover { color: var(--vmh-text); }

/* ── RESPONSIVE FOOTER ───────────────────────────────────── */
@media (max-width: 900px) {
  .vmf-footer-inner { gap: 32px; }
  .vmf-footer-links { gap: 28px; }
}
@media (max-width: 640px) {
  .vmf-footer-inner { flex-direction: column; padding: 36px 0; }
  .vmf-footer-links { flex-wrap: wrap; gap: 24px; }
  .vmf-footer-col { min-width: calc(50% - 12px); }
  .vmf-footer-bottom .vmf-container { flex-direction: column; text-align: center; }
}

/* ============================================================
   WHATSAPP FLUTUANTE
   ============================================================ */
#vmh-wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

/* Tooltip de contexto */
#vmh-wa-float-tooltip {
  background: #111827;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .82rem;
  color: #e2e8f0;
  max-width: 220px;
  text-align: right;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
#vmh-wa-float:hover #vmh-wa-float-tooltip,
#vmh-wa-float.tooltip-visible #vmh-wa-float-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Botão principal */
#vmh-wa-float-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  pointer-events: all;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
#vmh-wa-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,.6);
}

/* Indicador Online */
#vmh-wa-online {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0d1127;
  display: none;
}
#vmh-wa-online::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(74,222,128,.4);
  animation: vmh-pulse 1.8s ease-out infinite;
}
#vmh-wa-float-btn.is-online #vmh-wa-online { display: block; }

@keyframes vmh-pulse {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(2.2); opacity: 0;  }
}

/* ============================================================
   BARRA DE URGÊNCIA CONTEXTUAL
   ============================================================ */
#vmh-urgency-bar {
  position: fixed;
  top: 68px; /* altura do header */
  left: 0; right: 0;
  z-index: 190;
  background: linear-gradient(90deg, #0f1f5c 0%, #1e3a8a 50%, #0f1f5c 100%);
  border-bottom: 1px solid rgba(111,75,241,.35);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.22,.68,0,1.15);
}
#vmh-urgency-bar.is-visible { transform: translateY(0); }

.vmh-urgency-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(74,222,128,.25);
  animation: vmh-pulse 1.8s ease-out infinite;
}

.vmh-urgency-text {
  font-size: .82rem;
  color: rgba(240,242,255,.85);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vmh-urgency-text strong { color: #fff; font-weight: 700; }

.vmh-urgency-cta {
  flex-shrink: 0;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(111,75,241,.7);
  border: 1px solid rgba(111,75,241,.5);
  border-radius: 6px;
  padding: 4px 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.vmh-urgency-cta:hover { background: rgba(111,75,241,1); }

.vmh-urgency-close {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(240,242,255,.5);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .2s;
}
.vmh-urgency-close:hover { color: #fff; }

/* Empurra o conteúdo da página para baixo quando a barra está visível */
body.vmh-urgency-open { padding-top: 36px; }

@media (max-width: 640px) {
  #vmh-wa-float { bottom: 18px; right: 16px; }
  #vmh-wa-float-btn { width: 52px; height: 52px; }

  /* Mobile: barra vira 2 linhas, texto quebra */
  #vmh-urgency-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 40px 8px 12px; /* espaço para o X no canto direito */
  }
  .vmh-urgency-dot { display: none; } /* remove ponto — economiza espaço */
  .vmh-urgency-text {
    white-space: normal;
    font-size: .75rem;
    flex: 1 1 100%;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.4;
  }
  /* No mobile, o texto é substituído por versão curta via data-attr (JS) */
  .vmh-urgency-text[data-short]::before {
    content: attr(data-short);
  }
  .vmh-urgency-text[data-short] > * { display: none; }
  .vmh-urgency-cta { font-size: .75rem; padding: 4px 10px; }
  body.vmh-urgency-open { padding-top: 52px; }
}
