/* V18 FINAL — padronização definitiva das Heros internas
   Referência visual: Home principal. Carregado por último para neutralizar CSS legado. */
:root{
  --v18-hero-min: 520px;
  --v18-hero-top: 28px;
  --v18-hero-bottom: 30px;
  --v18-copy-max: 620px;
}

/* Base: Hero começa imediatamente abaixo do cabeçalho sticky e conteúdo fica alto na dobra */
body.gm-v18-page .gm-v18-hero{
  position:relative!important;
  min-height:var(--v18-hero-min)!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#02173D!important;
  isolation:isolate!important;
}
body.gm-v18-page .gm-v18-hero::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  pointer-events:none!important;
  background:
    radial-gradient(circle at 77% 48%,rgba(255,125,0,.12),transparent 27%),
    linear-gradient(90deg,#02173D 0%,#02173D 40%,rgba(2,23,61,.94) 53%,rgba(2,23,61,.78) 68%,rgba(2,23,61,.40) 84%,rgba(2,23,61,.06) 100%)!important;
}
body.gm-v18-page .gm-v18-hero::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:96px;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(to bottom,transparent,#02173D 96%);
}

/* Abrange todos os wrappers usados no site */
body.gm-v18-page .gm-v18-hero > .container,
body.gm-v18-page .gm-v18-hero > .gm-container,
body.gm-v18-page .gm-v18-hero > .mp-wrap,
body.gm-v18-page .gm-v18-hero > .sp-wrap,
body.gm-v18-page .gm-v18-hero > .pv-wrap,
body.gm-v18-page .gm-v18-hero .hero-grid,
body.gm-v18-page .gm-v18-hero .hero-grid-system{
  position:relative!important;
  z-index:3!important;
  width:min(1240px,calc(100% - 64px))!important;
  margin-inline:auto!important;
  min-height:var(--v18-hero-min)!important;
  padding:var(--v18-hero-top) 0 var(--v18-hero-bottom)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr)!important;
  gap:34px!important;
  align-items:start!important;
}
/* Evita grid duplicado quando hero-grid é também wrapper direto */
body.gm-v18-page .gm-v18-hero > .container.hero-grid,
body.gm-v18-page .gm-v18-hero > .gm-container.hero-grid,
body.gm-v18-page .gm-v18-hero > .container.hero-grid-system,
body.gm-v18-page .gm-v18-hero > .gm-container.hero-grid-system{
  width:min(1240px,calc(100% - 64px))!important;
}

body.gm-v18-page .gm-v18-hero-copy{
  position:relative!important;
  z-index:5!important;
  width:100%!important;
  max-width:var(--v18-copy-max)!important;
  padding:0!important;
  margin:0!important;
  align-self:start!important;
  transform:none!important;
}
body.gm-v18-page .gm-v18-hero-copy .kicker,
body.gm-v18-page .gm-v18-hero-copy .eyebrow,
body.gm-v18-page .gm-v18-hero-copy .mp-kicker,
body.gm-v18-page .gm-v18-hero-copy .sp-k{
  display:block!important;
  margin:0!important;
  color:#FF7D00!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.35!important;
  letter-spacing:.14em!important;
  text-transform:uppercase!important;
}
body.gm-v18-page .gm-v18-hero h1{
  margin:18px 0 0!important;
  max-width:12.8ch!important;
  color:#fff!important;
  font-size:clamp(43px,4.45vw,62px)!important;
  line-height:1.00!important;
  letter-spacing:-.045em!important;
  text-wrap:balance!important;
}
body.gm-v18-page .gm-v18-hero h1 span{color:#FF7D00!important}
body.gm-v18-page .gm-v18-hero-copy p,
body.gm-v18-page .gm-v18-hero-copy .mp-lead{
  margin:22px 0 0!important;
  max-width:610px!important;
  color:#D1DBE8!important;
  font-size:17px!important;
  line-height:1.58!important;
}
body.gm-v18-page .gm-v18-hero-copy p strong{color:#fff!important}
body.gm-v18-page .gm-v18-hero .hero-actions,
body.gm-v18-page .gm-v18-hero .mp-actions{
  margin-top:26px!important;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:12px!important;
}
body.gm-v18-page .gm-v18-hero .hero-badges,
body.gm-v18-page .gm-v18-hero .hero-proof,
body.gm-v18-page .gm-v18-hero .ciot-proof{
  margin-top:20px!important;
}

/* Arte sempre sobe, fica inteira e visualmente integrada ao navy */
body.gm-v18-page .gm-v18-hero-art,
body.gm-v18-page .gm-v18-hero .hero-visual,
body.gm-v18-page .gm-v18-hero .hero-image-shell{
  position:relative!important;
  z-index:4!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:flex-end!important;
  width:100%!important;
  min-width:0!important;
  min-height:410px!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  align-self:start!important;
}
body.gm-v18-page .gm-v18-hero-art::before,
body.gm-v18-page .gm-v18-hero .hero-image-shell::before{
  content:"";
  position:absolute;
  inset:10% 3% 7% 8%;
  z-index:-1;
  background:radial-gradient(ellipse at 58% 50%,rgba(255,125,0,.16),rgba(19,65,118,.12) 44%,transparent 72%);
  filter:blur(24px);
}
body.gm-v18-page .gm-v18-hero-image,
body.gm-v18-page .gm-v18-hero .hero-image-integrated,
body.gm-v18-page .gm-v18-hero-art > img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:min(48vw,650px)!important;
  max-height:405px!important;
  object-fit:contain!important;
  object-position:right top!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  filter:drop-shadow(0 24px 38px rgba(0,0,0,.30)) saturate(.94) contrast(1.03)!important;
}
/* Fotos retangulares/sem alpha: máscara elimina o efeito de imagem 'colada'. */
body.page-diagnostico .gm-v18-hero-image,
body.page-kit-ferramentas .gm-v18-hero-image,
body.page-cockpit .gm-v18-hero-image,
body.page-desperdicios-ocultos .gm-v18-hero-image,
body.page-ferramenta-margem .gm-v18-hero-image,
body.page-precificacao .gm-v18-hero-image,
body.page-radar-tributario .gm-v18-hero-image,
body.page-reforma-tributaria .gm-v18-hero-image,
body.page-simulador-frota .gm-v18-hero-image{
  width:min(48vw,650px)!important;
  aspect-ratio:1.45/1!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:0!important;
  -webkit-mask-image:radial-gradient(ellipse 88% 90% at 57% 48%,#000 0 56%,rgba(0,0,0,.96) 66%,rgba(0,0,0,.66) 79%,rgba(0,0,0,.18) 91%,transparent 100%)!important;
  mask-image:radial-gradient(ellipse 88% 90% at 57% 48%,#000 0 56%,rgba(0,0,0,.96) 66%,rgba(0,0,0,.66) 79%,rgba(0,0,0,.18) 91%,transparent 100%)!important;
}
/* Páginas com arte recortada: maior presença, sem corte */
body.page-course-abrir .gm-v18-hero-image,
body.page-course-estruturar .gm-v18-hero-image,
body.page-framework .gm-v18-hero-image,
body.page-para-voce .gm-v18-hero-image{max-height:415px!important}
body.page-associacoes .gm-v18-hero-image{max-height:390px!important;max-width:min(42vw,560px)!important}
body.page-conseguir-clientes .gm-v18-hero-image{max-height:390px!important;max-width:min(48vw,650px)!important}
body.page-embarcadores .gm-v18-hero-image{max-height:400px!important;max-width:min(48vw,650px)!important}
body.page-palestras .gm-v18-hero-image,
body.page-treinamentos .gm-v18-hero-image,
body.page-consultoria .gm-v18-hero-image,
body.page-mentoria .gm-v18-hero-image,
body.page-patrocinio .gm-v18-hero-image{max-height:430px!important}
body.page-sobre .gm-v18-hero-image{max-height:410px!important;max-width:min(46vw,620px)!important}
body.page-artigos .gm-v18-hero-image{max-height:400px!important;max-width:min(47vw,640px)!important}
body.page-para-transportadoras .gm-v18-hero-image{max-height:400px!important}

/* Termômetro já possui visual próprio: sobe e fica integralmente na dobra */
body.page-termometro .gm-v18-hero .termometro-hero-card{
  display:block!important;
  align-self:start!important;
  justify-self:end!important;
  width:min(100%,520px)!important;
  margin:0!important;
  transform:none!important;
  position:relative!important;
  z-index:4!important;
}

/* CIOT: neutraliza regras antigas que empurravam arte/texto para baixo */
body.page-ciot .gm-v18-hero .hero-grid,
body.page-ciot .gm-v18-hero .hero-grid-system{
  grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr)!important;
  min-height:var(--v18-hero-min)!important;
  padding:var(--v18-hero-top) 0 var(--v18-hero-bottom)!important;
}
body.page-ciot .gm-v18-hero .hero-visual{
  position:relative!important;
  inset:auto!important;
  opacity:1!important;
  display:flex!important;
  min-height:410px!important;
}
body.page-ciot .gm-v18-hero .hero-visual img{
  position:relative!important;
  inset:auto!important;
  width:auto!important;
  max-width:min(46vw,620px)!important;
  max-height:410px!important;
  object-fit:contain!important;
  opacity:1!important;
}

/* Animação premium: 2.2–2.8s, sem esconder conteúdo se JS falhar */
@keyframes gmV18Rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes gmV18Art{from{opacity:0;transform:translateX(26px) scale(.985)}to{opacity:1;transform:none}}
body.gm-v18-page .gm-v18-hero-copy > *{animation:gmV18Rise 2.2s cubic-bezier(.2,.7,.2,1) both}
body.gm-v18-page .gm-v18-hero-copy > *:nth-child(2){animation-delay:.10s}
body.gm-v18-page .gm-v18-hero-copy > *:nth-child(3){animation-delay:.20s}
body.gm-v18-page .gm-v18-hero-copy > *:nth-child(4){animation-delay:.30s}
body.gm-v18-page .gm-v18-hero-art,
body.gm-v18-page .gm-v18-hero .hero-image-shell,
body.gm-v18-page .gm-v18-hero .termometro-hero-card{animation:gmV18Art 2.6s cubic-bezier(.2,.7,.2,1) .15s both}

/* Tablet/mobile: texto primeiro, imagem inteira logo abaixo, sem 260px de espaço legado */
@media(max-width:980px){
  :root{--v18-hero-top:32px;--v18-hero-bottom:28px}
  body.gm-v18-page .gm-v18-hero{min-height:auto!important}
  body.gm-v18-page .gm-v18-hero > .container,
  body.gm-v18-page .gm-v18-hero > .gm-container,
  body.gm-v18-page .gm-v18-hero > .mp-wrap,
  body.gm-v18-page .gm-v18-hero > .sp-wrap,
  body.gm-v18-page .gm-v18-hero > .pv-wrap,
  body.gm-v18-page .gm-v18-hero .hero-grid,
  body.gm-v18-page .gm-v18-hero .hero-grid-system,
  body.page-ciot .gm-v18-hero .hero-grid,
  body.page-ciot .gm-v18-hero .hero-grid-system{
    width:min(100% - 32px,760px)!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
    min-height:auto!important;
    padding:var(--v18-hero-top) 0 var(--v18-hero-bottom)!important;
  }
  body.gm-v18-page .gm-v18-hero-copy{max-width:100%!important}
  body.gm-v18-page .gm-v18-hero h1{font-size:clamp(38px,9vw,52px)!important;max-width:16ch!important}
  body.gm-v18-page .gm-v18-hero-copy p,
  body.gm-v18-page .gm-v18-hero-copy .mp-lead{font-size:16px!important;line-height:1.55!important}
  body.gm-v18-page .gm-v18-hero-art,
  body.gm-v18-page .gm-v18-hero .hero-visual,
  body.gm-v18-page .gm-v18-hero .hero-image-shell{min-height:220px!important;justify-content:center!important;align-items:flex-start!important}
  body.gm-v18-page .gm-v18-hero-image,
  body.gm-v18-page .gm-v18-hero .hero-image-integrated,
  body.gm-v18-page .gm-v18-hero-art > img,
  body.page-ciot .gm-v18-hero .hero-visual img{
    width:auto!important;
    max-width:min(92vw,620px)!important;
    max-height:330px!important;
    object-position:center top!important;
    margin-inline:auto!important;
  }
  body.page-diagnostico .gm-v18-hero-image,
  body.page-kit-ferramentas .gm-v18-hero-image,
  body.page-cockpit .gm-v18-hero-image,
  body.page-desperdicios-ocultos .gm-v18-hero-image,
  body.page-ferramenta-margem .gm-v18-hero-image,
  body.page-precificacao .gm-v18-hero-image,
  body.page-radar-tributario .gm-v18-hero-image,
  body.page-reforma-tributaria .gm-v18-hero-image,
  body.page-simulador-frota .gm-v18-hero-image{width:min(92vw,620px)!important}
  body.page-termometro .gm-v18-hero .termometro-hero-card{justify-self:center!important;width:min(100%,520px)!important}
}
@media(max-width:560px){
  :root{--v18-hero-top:24px;--v18-hero-bottom:24px}
  body.gm-v18-page .gm-v18-hero h1{font-size:clamp(35px,11vw,46px)!important}
  body.gm-v18-page .gm-v18-hero .hero-actions,
  body.gm-v18-page .gm-v18-hero .mp-actions{flex-direction:column!important;align-items:stretch!important}
  body.gm-v18-page .gm-v18-hero .hero-actions a,
  body.gm-v18-page .gm-v18-hero .mp-actions a,
  body.gm-v18-page .gm-v18-hero-copy > a{width:100%!important;text-align:center!important;justify-content:center!important}
  body.gm-v18-page .gm-v18-hero-art,
  body.gm-v18-page .gm-v18-hero .hero-visual,
  body.gm-v18-page .gm-v18-hero .hero-image-shell{min-height:180px!important}
  body.gm-v18-page .gm-v18-hero-image,
  body.gm-v18-page .gm-v18-hero .hero-image-integrated,
  body.gm-v18-page .gm-v18-hero-art > img{max-height:260px!important}
}
@media(prefers-reduced-motion:reduce){
  body.gm-v18-page .gm-v18-hero-copy > *,
  body.gm-v18-page .gm-v18-hero-art,
  body.gm-v18-page .gm-v18-hero .hero-image-shell,
  body.gm-v18-page .gm-v18-hero .termometro-hero-card{animation:none!important}
}
