/* MartinsCode Header Premium v36
   Correção definitiva do cabeçalho: remove estilos antigos acumulados e cria uma navegação de agência digital. */

/* =========================
   DESKTOP
   ========================= */
#header,
#header.compact{
  position:sticky!important;
  top:0!important;
  z-index:1000!important;
  width:100%!important;
  padding:0 24px!important;
  border:0!important;
  border-bottom:1px solid rgba(255,255,255,.09)!important;
  border-radius:0!important;
  background:rgba(6,7,12,.88)!important;
  box-shadow:0 12px 40px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(22px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(22px) saturate(135%)!important;
  transition:height .25s ease,background .25s ease,box-shadow .25s ease!important;
}
#header{height:92px!important;min-height:92px!important}
#header.compact{height:78px!important;min-height:78px!important;background:rgba(6,7,12,.96)!important;box-shadow:0 14px 38px rgba(0,0,0,.3)!important}
html[data-theme="light"] #header,
html[data-theme="light"] #header.compact{
  border-bottom-color:rgba(28,22,48,.10)!important;
  background:rgba(250,250,253,.93)!important;
  box-shadow:0 12px 34px rgba(35,25,65,.07)!important;
}

#header .header-shell,
#header.compact .header-shell{
  position:relative!important;
  display:grid!important;
  grid-template-columns:230px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:34px!important;
  width:min(1440px,100%)!important;
  max-width:1440px!important;
  height:100%!important;
  margin:0 auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}

#header .header-brand-block{
  display:flex!important;
  align-items:center!important;
  width:230px!important;
  min-width:230px!important;
  height:100%!important;
  gap:0!important;
  padding:0!important;
}
#header .header-brand-block::after{display:none!important}
#header .header-signature{display:none!important}
#header .header-shell .brand-logo,
#header.compact .header-shell .brand-logo{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  flex:0 0 220px!important;
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  height:54px!important;
  margin:0!important;
  overflow:visible!important;
}
#header .header-shell .brand-logo img,
#header.compact .header-shell .brand-logo img{
  position:static!important;
  display:block!important;
  width:auto!important;
  height:35px!important;
  max-width:220px!important;
  margin:0!important;
  transform:none!important;
  object-fit:contain!important;
}

/* Remove totalmente o antigo bloco/painel atrás da navegação. */
#header nav,
#header.compact nav{
  position:static!important;
  inset:auto!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:center!important;
  justify-self:center!important;
  align-self:stretch!important;
  flex:0 1 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  gap:4px!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-image:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  overflow:visible!important;
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
}
#header nav>a,
#header.compact nav>a{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:auto!important;
  min-height:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0 16px!important;
  gap:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#aaa9b8!important;
  font-family:"DM Sans",sans-serif!important;
  font-size:14px!important;
  font-weight:650!important;
  line-height:1!important;
  letter-spacing:-.01em!important;
  text-transform:none!important;
  white-space:nowrap!important;
  transition:color .2s ease!important;
}
html[data-theme="light"] #header nav>a{color:#666270!important}
#header nav>a::before{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:19px!important;
  width:4px!important;
  height:4px!important;
  margin:0!important;
  border-radius:50%!important;
  background:#8d68ff!important;
  opacity:0!important;
  transform:translate(-50%,-4px)!important;
  transition:opacity .2s ease,transform .2s ease!important;
}
#header nav>a::after{
  content:""!important;
  position:absolute!important;
  left:16px!important;
  right:16px!important;
  bottom:-1px!important;
  width:auto!important;
  height:2px!important;
  border:0!important;
  border-radius:3px 3px 0 0!important;
  background:linear-gradient(90deg,#9a66ff 0%,#5c73ff 52%,#2d96ff 100%)!important;
  box-shadow:0 -3px 14px rgba(104,91,255,.42)!important;
  opacity:0!important;
  transform:scaleX(.25)!important;
  transform-origin:center!important;
  transition:opacity .2s ease,transform .22s ease!important;
}
#header nav>a:hover,
#header nav>a.active{
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#fff!important;
}
html[data-theme="light"] #header nav>a:hover,
html[data-theme="light"] #header nav>a.active{color:#17131f!important}
#header nav>a:hover::before,
#header nav>a.active::before{opacity:1!important;transform:translate(-50%,0)!important}
#header nav>a:hover::after,
#header nav>a.active::after{opacity:1!important;transform:scaleX(1)!important}

#header .header-tools{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:12px!important;
  min-width:max-content!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
}
#header .theme-toggle{
  display:grid!important;
  place-items:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.035)!important;
  color:#eeeaf8!important;
  box-shadow:none!important;
  transition:.2s ease!important;
}
html[data-theme="light"] #header .theme-toggle{border-color:rgba(30,24,52,.13)!important;background:#fff!important;color:#18141f!important}
#header .theme-toggle:hover{border-color:rgba(133,99,255,.55)!important;background:rgba(133,99,255,.08)!important;transform:translateY(-1px)!important}

#header .header-contact{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:14px!important;
  min-width:168px!important;
  min-height:46px!important;
  height:46px!important;
  margin:0!important;
  padding:0 9px 0 18px!important;
  border:1px solid rgba(126,103,255,.72)!important;
  border-radius:12px!important;
  background:linear-gradient(115deg,#8d60ff 0%,#586fff 52%,#338dff 100%)!important;
  color:#fff!important;
  box-shadow:0 10px 28px rgba(71,73,255,.22),inset 0 1px rgba(255,255,255,.22)!important;
  font-size:13px!important;
  font-weight:750!important;
  letter-spacing:-.01em!important;
  overflow:hidden!important;
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease!important;
}
#header .header-contact::before{display:none!important}
#header .header-contact span{position:relative!important;z-index:1!important;white-space:nowrap!important}
#header .header-contact b{
  position:relative!important;
  z-index:1!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 29px!important;
  width:29px!important;
  height:29px!important;
  border:1px solid rgba(255,255,255,.22)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  font-size:14px!important;
  box-shadow:none!important;
}
#header .header-contact:hover{
  background:linear-gradient(115deg,#9568ff 0%,#6078ff 52%,#3798ff 100%)!important;
  color:#fff!important;
  filter:saturate(1.08)!important;
  transform:translateY(-2px)!important;
  box-shadow:0 15px 35px rgba(71,73,255,.32),inset 0 1px rgba(255,255,255,.25)!important;
}

#header .menu{display:none!important}
#header .nav-mobile-intro,
#header .nav-mobile-footer{display:none!important}

/* =========================
   NOTEBOOK / TABLET
   ========================= */
@media (max-width:1240px) and (min-width:1121px){
  #header,#header.compact{padding-inline:20px!important}
  #header .header-shell,#header.compact .header-shell{grid-template-columns:205px minmax(0,1fr) auto!important;gap:20px!important}
  #header .header-brand-block{width:205px!important;min-width:205px!important}
  #header .header-shell .brand-logo,#header.compact .header-shell .brand-logo{flex-basis:200px!important;width:200px!important;min-width:200px!important;max-width:200px!important}
  #header .header-shell .brand-logo img,#header.compact .header-shell .brand-logo img{height:32px!important;max-width:200px!important}
  #header nav>a,#header.compact nav>a{padding-inline:11px!important;font-size:12.5px!important}
  #header nav>a::after{left:11px!important;right:11px!important}
  #header .header-contact{min-width:154px!important;padding-left:14px!important;font-size:12px!important}
}

/* =========================
   MENU MOBILE
   ========================= */
@media (max-width:1120px){
  body.nav-open{overflow:hidden!important}
  #header,#header.compact{
    height:74px!important;
    min-height:74px!important;
    padding:0 18px!important;
    background:rgba(6,7,12,.97)!important;
  }
  html[data-theme="light"] #header,
  html[data-theme="light"] #header.compact{background:rgba(250,250,253,.98)!important}
  #header .header-shell,#header.compact .header-shell{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:10px!important;
    width:100%!important;
    max-width:1440px!important;
    height:74px!important;
  }
  #header .header-brand-block{grid-column:1!important;width:auto!important;min-width:0!important}
  #header .header-shell .brand-logo,#header.compact .header-shell .brand-logo{
    flex-basis:190px!important;width:190px!important;min-width:150px!important;max-width:190px!important;height:52px!important;
  }
  #header .header-shell .brand-logo img,#header.compact .header-shell .brand-logo img{height:31px!important;max-width:190px!important}
  #header .header-tools{grid-column:2!important;display:flex!important;min-width:auto!important}
  #header .header-contact{display:none!important}
  #header .theme-toggle{width:42px!important;height:42px!important;flex-basis:42px!important;border-radius:11px!important}
  #header .menu{
    grid-column:3!important;
    position:relative!important;
    z-index:1002!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    width:auto!important;
    min-width:48px!important;
    height:42px!important;
    margin:0!important;
    padding:0 11px!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.035)!important;
    color:#fff!important;
    box-shadow:none!important;
  }
  html[data-theme="light"] #header .menu{border-color:rgba(30,24,52,.13)!important;background:#fff!important;color:#18141f!important}
  #header .menu-word{display:none!important}
  #header .menu-lines{position:relative!important;display:block!important;width:20px!important;height:14px!important}
  #header .menu-lines b{
    position:absolute!important;right:0!important;display:block!important;width:20px!important;height:1.5px!important;margin:0!important;border-radius:8px!important;background:currentColor!important;transition:.24s ease!important;
  }
  #header .menu-lines b:first-child{top:3px!important}
  #header .menu-lines b:last-child{bottom:3px!important;width:14px!important}
  #header .menu.active .menu-lines b:first-child{top:6px!important;transform:rotate(45deg)!important}
  #header .menu.active .menu-lines b:last-child{bottom:6px!important;width:20px!important;transform:rotate(-45deg)!important}

  #header nav,
  #header.compact nav{
    position:fixed!important;
    z-index:1001!important;
    inset:74px 0 0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    width:100%!important;
    max-width:none!important;
    height:calc(100dvh - 74px)!important;
    margin:0!important;
    padding:28px 22px 24px!important;
    gap:0!important;
    border:0!important;
    border-top:1px solid rgba(255,255,255,.09)!important;
    border-radius:0!important;
    background:rgba(7,7,13,.99)!important;
    box-shadow:0 25px 70px rgba(0,0,0,.45)!important;
    backdrop-filter:blur(24px)!important;
    overflow-y:auto!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(-10px)!important;
    pointer-events:none!important;
    transition:opacity .24s ease,visibility .24s ease,transform .24s ease!important;
  }
  html[data-theme="light"] #header nav{border-top-color:rgba(30,24,52,.10)!important;background:rgba(250,250,253,.995)!important}
  #header nav.open{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    pointer-events:auto!important;
  }
  #header .nav-mobile-intro{
    display:block!important;
    padding:0 2px 22px!important;
    border-bottom:1px solid rgba(255,255,255,.10)!important;
  }
  html[data-theme="light"] #header .nav-mobile-intro{border-color:rgba(30,24,52,.10)!important}
  #header .nav-mobile-intro small{display:block!important;color:#9572ff!important;font-size:9px!important;font-weight:800!important;letter-spacing:.16em!important}
  #header .nav-mobile-intro strong{display:block!important;margin-top:8px!important;color:var(--mc-ink)!important;font-size:20px!important;letter-spacing:-.035em!important}
  #header nav>a,#header.compact nav>a{
    position:relative!important;
    display:grid!important;
    grid-template-columns:38px 1fr auto!important;
    justify-content:stretch!important;
    align-items:center!important;
    width:100%!important;
    min-height:62px!important;
    height:auto!important;
    padding:0 2px!important;
    border:0!important;
    border-bottom:1px solid rgba(255,255,255,.09)!important;
    border-radius:0!important;
    background:none!important;
    color:#c4c1ce!important;
    font-size:23px!important;
    font-weight:650!important;
    letter-spacing:-.035em!important;
  }
  html[data-theme="light"] #header nav>a{border-bottom-color:rgba(30,24,52,.09)!important;color:#5b5765!important}
  #header nav>a::before{
    content:attr(data-index)!important;
    position:static!important;
    display:block!important;
    width:auto!important;height:auto!important;margin:0!important;
    border-radius:0!important;background:none!important;
    color:#8f6cff!important;
    font:750 9px/1 "Space Grotesk",sans-serif!important;
    letter-spacing:.08em!important;
    opacity:1!important;
    transform:none!important;
  }
  #header nav>a::after{
    content:"↗"!important;
    position:static!important;
    display:block!important;
    width:auto!important;height:auto!important;margin:0!important;
    border-radius:0!important;background:none!important;box-shadow:none!important;
    color:#676273!important;
    font-size:14px!important;
    opacity:1!important;
    transform:none!important;
  }
  #header nav>a:hover,#header nav>a.active{
    padding-left:2px!important;
    border-left:0!important;
    background:none!important;
    color:#fff!important;
  }
  html[data-theme="light"] #header nav>a:hover,
  html[data-theme="light"] #header nav>a.active{color:#17131f!important}
  #header nav>a.active span{color:inherit!important}
  #header nav>a.active::after{color:#9672ff!important}
  #header .nav-mobile-footer{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:20px!important;
    margin-top:auto!important;
    padding:26px 0 0!important;
  }
  #header .nav-mobile-footer>span{max-width:260px!important;color:#777383!important;font-size:10px!important;line-height:1.55!important}
  #header .nav-mobile-footer>a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:16px!important;
    min-height:44px!important;
    padding:0 15px!important;
    border-radius:11px!important;
    background:linear-gradient(115deg,#8d60ff,#586fff 55%,#338dff)!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:800!important;
    box-shadow:0 12px 30px rgba(71,73,255,.22)!important;
  }
}

@media (max-width:560px){
  #header,#header.compact{padding-inline:14px!important}
  #header .header-shell .brand-logo,#header.compact .header-shell .brand-logo{width:166px!important;min-width:140px!important;max-width:166px!important}
  #header .header-shell .brand-logo img,#header.compact .header-shell .brand-logo img{height:28px!important;max-width:166px!important}
  #header .theme-toggle{display:none!important}
  #header .header-shell,#header.compact .header-shell{grid-template-columns:minmax(0,1fr) auto!important}
  #header .menu{grid-column:2!important}
  #header nav,#header.compact nav{padding:24px 18px 20px!important}
  #header nav>a,#header.compact nav>a{min-height:59px!important;font-size:21px!important}
  #header .nav-mobile-footer{grid-template-columns:1fr!important}
  #header .nav-mobile-footer>a{width:100%!important;justify-content:space-between!important}
}

/* Regras de especificidade para neutralizar a antiga camada site-stability. */
@media (min-width:1121px){
  html[data-theme="dark"] body #header .header-shell > nav,
  html[data-theme="light"] body #header .header-shell > nav{
    border:0!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] body #header .header-shell > nav > a:hover,
  html[data-theme="dark"] body #header .header-shell > nav > a.active,
  html[data-theme="light"] body #header .header-shell > nav > a:hover,
  html[data-theme="light"] body #header .header-shell > nav > a.active{
    border:0!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
  }
}
@media (max-width:1120px){
  html[data-theme="dark"] body #header .header-shell > nav{
    border-top:1px solid rgba(255,255,255,.09)!important;
    background:rgba(7,7,13,.99)!important;
    background-color:rgba(7,7,13,.99)!important;
    box-shadow:0 25px 70px rgba(0,0,0,.45)!important;
  }
  html[data-theme="light"] body #header .header-shell > nav{
    border-top:1px solid rgba(30,24,52,.10)!important;
    background:rgba(250,250,253,.995)!important;
    background-color:rgba(250,250,253,.995)!important;
    box-shadow:0 25px 70px rgba(35,25,65,.13)!important;
  }
  html[data-theme] body #header .header-shell > nav > a:hover,
  html[data-theme] body #header .header-shell > nav > a.active{
    border-left:0!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
  }
}

@media (max-width:1120px){
  html[data-theme] body #header .header-shell > nav,
  html[data-theme] body #header .header-shell > nav.open{
    position:fixed!important;
    top:74px!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    inset:74px 0 0!important;
    width:100%!important;
    height:calc(100dvh - 74px)!important;
  }
  html[data-theme] body #header .header-shell > .menu{
    width:46px!important;
    min-width:46px!important;
    padding:0!important;
  }
  html[data-theme] body #header .header-shell > .menu .menu-word{
    display:none!important;
    width:0!important;
    height:0!important;
    overflow:hidden!important;
    opacity:0!important;
  }
}

@media (max-width:1120px){
  html[data-theme] body #header .header-shell > nav,
  html[data-theme] body #header .header-shell > nav.open{
    position:absolute!important;
    top:74px!important;
    right:calc(50% - 50vw)!important;
    bottom:auto!important;
    left:calc(50% - 50vw)!important;
    inset:auto calc(50% - 50vw) auto calc(50% - 50vw)!important;
    width:100vw!important;
    height:calc(100dvh - 74px)!important;
  }
}
@media (max-width:1120px){
  html[data-theme] body #header .header-shell > nav,
  html[data-theme] body #header .header-shell > nav.open{
    inset:74px calc(50% - 50vw) auto calc(50% - 50vw)!important;
  }
}
