/* ==========================================================
   HEADER NOVO (mesmo da home) para as páginas de serviço.
   Variáveis definidas no próprio header pra não mexer no style.css antigo.
   Medidas em px de propósito: o style.css antigo usa html { font-size: 18px },
   então rem aqui ficaria 12,5% maior que na home. Quando as páginas de serviço
   migrarem pro CSS novo, isto pode voltar a rem.
   ========================================================== */
.nh {
  --gutter: clamp(16px, 2.4vw, 32px);
  --side: max(var(--gutter), calc(50% - 576px)); /* alinha com o .container (1152px) destas páginas */
  --navy-deep: #020a2e;
  --orange: #F24F13;
  --orange-hi: #ff6a33;
  --line-dark: rgba(255,255,255,0.18);
  --font-head: 'Montserrat', system-ui, sans-serif;

  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, transform 0.35s ease;
}
.nh a { text-decoration: none; }
.nh :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.nh__bar {
  margin: 0 var(--side);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line-dark);
  transition: height 0.3s ease, border-color 0.3s ease;
}
.nh__logo img { display: block; width: 176px; height: auto; }
.nh__nav { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 40px); }
.nh__nav a {
  font-family: var(--font-head);
  font-size: 12.8px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}
.nh__nav .nh__cta { display: none; }
.nh--solid { background: var(--navy-deep); }
.nh--solid .nh__bar { height: 68px; border-color: transparent; }
.nh--hidden { transform: translateY(-100%); }

/* Grifado "de passagem" (igual ao da home): entra pela esquerda, sai pela direita */
.nh__nav > a:not(.nh__cta) {
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1px;
  transition: color 0.25s ease, background-size 0.55s cubic-bezier(0.77, 0, 0.18, 1);
}
.nh__nav > a:not(.nh__cta):hover,
.nh__nav > a:not(.nh__cta):focus-visible {
  color: var(--orange-hi);
  background-position: 0 100%;
  background-size: 100% 1px;
}

/* Botão contornado com seta (usado no painel do celular) */
.nh .btn-line {
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,106,51,0.8);
  color: var(--orange-hi);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nh .btn-line::after {
  content: '';
  border-left: 6px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.nh .btn-line:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Hambúrguer */
.nh__toggle {
  display: none;
  width: 40px; height: 40px;
  background: none; border: 0; cursor: pointer;
  position: relative; z-index: 2;
}
.nh__toggle span {
  position: absolute; left: 9px; right: 9px; height: 1.5px; background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nh__toggle span:nth-child(1) { top: 14px; }
.nh__toggle span:nth-child(2) { top: 20px; }
.nh__toggle span:nth-child(3) { top: 26px; }
.nh__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nh__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nh__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* O header novo fica por cima do conteúdo (não empurra mais): compensa no topo da página */
.sv-hero { padding-top: 236px; } /* 96px do header antigo + 140px que já existiam */

@media (max-width: 1024px) {
  .nh__bar { height: 68px; }
  .nh__logo img { width: 140px; }
  .nh__toggle { display: block; }
  /* Menu do celular: painel suspenso à direita, só da altura do conteúdo */
  .nh__nav {
    position: fixed;
    top: 76px;
    right: var(--side);
    width: min(288px, calc(100% - 2 * var(--side)));
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--navy-deep);
    border: 1px solid var(--line-dark);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nh__nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 0.2s ease, transform 0.2s ease; }
  .nh__nav a { font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nh__nav > a:not(.nh__cta) { background-image: none; }
  .nh__nav .nh__cta {
    display: inline-flex; justify-content: center; margin-top: 20px;
    font-size: 12.5px; padding: 14px 16px;
  }
  .nh__logo { position: relative; z-index: 2; }
  .sv-hero { padding-top: 170px; } /* 60px do header antigo + 110px */
}

@media (prefers-reduced-motion: reduce) {
  .nh, .nh__bar, .nh__nav, .nh__nav > a:not(.nh__cta) { transition: none; }
}
