/* Header mobile compartilhado pela home e pelas paginas internas. */
@media only screen and (max-width: 989px) {
  #top:is(.home, .gr-internal-page) {
    --gr-mobile-topbar-height: clamp(46px, 11vw, 58px);
    --gr-mobile-logo-band-height: clamp(82px, 20vw, 112px);
    --gr-mobile-logo-gap: clamp(14px, 4vw, 28px);
    --gr-mobile-brand-logo-width: min(160px, calc(50vw - 42px));
    --gr-mobile-logo-vertical-shift: clamp(-8px, -1.6vw, -5px);
    --gr-mobile-topbar-lift: 1px;
  }

  #top:is(.home, .gr-internal-page) #wrap_all,
  #top:is(.home, .gr-internal-page) #header,
  #top:is(.home, .gr-internal-page) #header_main {
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
  }

  #top:is(.home, .gr-internal-page) #header_meta {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  #top:is(.home, .gr-internal-page) #header {
    position: relative !important;
    top: 0 !important;
    border-top: 0 !important;
    background: #ffffff;
    box-shadow: none;
  }

  #top:is(.home, .gr-internal-page) #header_main {
    border-bottom: 0;
    background: #ffffff;
  }

  #top:is(.home, .gr-internal-page) #header_main .container {
    width: 100% !important;
    max-width: none !important;
    height: auto;
    padding: 0 !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .inner-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: calc(var(--gr-mobile-topbar-height) + var(--gr-mobile-logo-band-height));
    margin-top: calc(-1 * var(--gr-mobile-topbar-lift)) !important;
    padding: 0 !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .main_menu {
    order: -1;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    z-index: 30;
    display: flex !important;
    align-items: stretch;
    float: none;
    width: 100vw !important;
    height: var(--gr-mobile-topbar-height) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    margin: 0 calc(50% - 50vw) 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: #043b69 !important;
    box-shadow: 0 2px 8px rgba(3, 33, 63, 0.16);
  }

  #top:is(.home, .gr-internal-page) #header_main .main_menu::after {
    content: none;
  }

  #top:is(.home, .gr-internal-page) #header_main .main_menu .avia-menu,
  #top:is(.home, .gr-internal-page) #header_main .main_menu .av-main-nav-wrap,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    height: var(--gr-mobile-topbar-height) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    margin: 0;
    padding: 0;
  }

  #top:is(.home, .gr-internal-page) #header_main .main_menu .av-main-nav-wrap {
    order: 2;
    flex: 0 0 clamp(54px, 14vw, 72px) !important;
    min-width: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.38);
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu {
    justify-content: center;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.menu-item:not(.menu-item-avia-special),
  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li#menu-item-search {
    display: none !important;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main {
    display: flex !important;
    position: static;
    flex: 0 0 clamp(54px, 14vw, 72px);
    width: clamp(54px, 14vw, 72px);
    height: var(--gr-mobile-topbar-height) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    border: 0;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: var(--gr-mobile-topbar-height) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: #ffffff;
    line-height: 1;
    white-space: normal;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main > a::before {
    content: none !important;
    display: none !important;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: clamp(30px, 8vw, 42px);
    height: clamp(30px, 8vw, 42px);
    padding: 0;
    transform: none;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-box {
    width: clamp(25px, 6.8vw, 34px);
    height: clamp(18px, 5vw, 24px);
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::before,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::after {
    width: clamp(25px, 6.8vw, 34px);
    height: 3px;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::before {
    top: -8px;
  }

  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::after {
    bottom: -8px;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social {
    order: 1;
    display: flex !important;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: center;
    position: static !important;
    width: auto;
    min-height: var(--gr-mobile-topbar-height);
    padding: 0;
    border: 0;
    background: transparent;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks {
    display: flex !important;
    position: static;
    top: auto;
    float: none;
    clear: none;
    align-items: center;
    justify-content: space-between !important;
    width: 100%;
    height: var(--gr-mobile-topbar-height) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    margin: 0;
    gap: clamp(9px, 3vw, 22px);
    padding: 0 clamp(22px, 6vw, 48px) !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    width: clamp(18px, 5.2vw, 28px) !important;
    max-width: none !important;
    height: var(--gr-mobile-topbar-height) !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: clamp(18px, 5.2vw, 28px) !important;
    min-height: var(--gr-mobile-topbar-height) !important;
    height: var(--gr-mobile-topbar-height) !important;
    margin: 0;
    color: #ffffff;
    font-size: clamp(14px, 4.2vw, 20px) !important;
    line-height: 1;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-search-field {
    display: none !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .logo {
    position: relative !important;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center !important;
    box-sizing: border-box;
    width: 50% !important;
    max-width: 50% !important;
    height: var(--gr-mobile-logo-band-height) !important;
    min-height: var(--gr-mobile-logo-band-height) !important;
    padding: 0 !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center !important;
    width: var(--gr-mobile-brand-logo-width) !important;
    max-width: var(--gr-mobile-brand-logo-width) !important;
    height: 100% !important;
    transform: translateY(var(--gr-mobile-logo-vertical-shift));
  }

  #top:is(.home, .gr-internal-page) #header_main .logo img {
    display: block;
    width: var(--gr-mobile-brand-logo-width) !important;
    max-width: var(--gr-mobile-brand-logo-width) !important;
    max-height: clamp(44px, 11vw, 64px) !important;
    height: auto !important;
    object-fit: contain;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-home-gov-brand img {
    display: block;
    width: var(--gr-mobile-brand-logo-width) !important;
    max-width: var(--gr-mobile-brand-logo-width) !important;
    max-height: clamp(38px, 10vw, 54px) !important;
    height: auto !important;
    transform: translateY(0);
    object-fit: contain;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-home-gov-brand {
    position: absolute !important;
    top: var(--gr-mobile-topbar-height) !important;
    right: 0 !important;
    z-index: 3;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50% !important;
    height: var(--gr-mobile-logo-band-height) !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-home-gov-brand::before {
    position: absolute !important;
    left: 0 !important;
    content: "";
    display: block;
    width: 1px;
    height: clamp(46px, 12vw, 70px) !important;
    margin: 0 !important;
    background: #9aa1ad;
  }
}

@media only screen and (max-width: 430px) {
  #top:is(.home, .gr-internal-page) #header_main .logo {
    height: 76px !important;
    min-height: 76px !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .logo img {
    max-height: 46px !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-home-gov-brand {
    height: 76px !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .gr-home-gov-brand::before {
    height: 50px !important;
  }

  #top:is(.home, .gr-internal-page) #header_main .main_menu,
  #top:is(.home, .gr-internal-page) #header_main .main_menu .avia-menu,
  #top:is(.home, .gr-internal-page) #header_main .main_menu .av-main-nav-wrap,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main,
  #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main > a,
  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social,
  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks,
  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li,
  #top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li a {
    height: 54px !important;
    min-height: 54px !important;
  }
}

/* Footer desktop acessivel: logo em duas linhas e contatos em dois blocos verticais. */
@media only screen and (min-width: 990px) {
  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-contacts,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-contacts{
    grid-template-columns: minmax(220px, 0.95fr) minmax(280px, 1.05fr) minmax(340px, 1.2fr);
    grid-template-rows: repeat(2, minmax(74px, auto));
    grid-template-areas:
      "brand email phone"
      "brand cnpj address";
    column-gap: clamp(28px, 4vw, 56px);
    row-gap: 22px;
    align-items: center;
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-brand,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-brand{
    grid-area: brand;
    align-self: stretch;
    justify-content: flex-start;
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-logo,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-logo{
    width: min(100%, 360px);
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-contact-phone,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-contact-phone{
    grid-area: phone;
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-contact-mail,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-contact-mail{
    grid-area: email;
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-contact-pin,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-contact-pin{
    grid-area: address;
  }

  #top.gr-home-header-a11y-expanded #socket .gr-site-footer-contact-doc-text,
#top.gr-internal-a11y-normalized #socket .gr-site-footer-contact-doc-text{
    grid-area: cnpj;
  }
}

/* Ally atual: o plugin injeta este style no <head> e nao publica mais as classes pojo-a11y-*. */
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a {
  color: inherit !important;
  border-color: currentColor !important;
  background: transparent !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a.active,
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a:hover,
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a:focus-visible {
  color: inherit !important;
  border-color: currentColor !important;
  background: currentColor !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows a {
  background: transparent !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows a::after {
  border-top-color: currentColor !important;
  border-right-color: currentColor !important;
}

html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-mobile-menu-search-toggle,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-main-menu-search-submit {
  color: inherit !important;
}

html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a svg path,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-mobile-menu-search-toggle svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-mobile-menu-search-toggle svg path,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-main-menu-search-submit svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-main-menu-search-submit svg path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

html:has(#ea11y-widget-contrast-styles) #top #socket .gr-site-footer-brand,
html:has(#ea11y-widget-contrast-styles) #top #socket .gr-site-footer-logo {
  background-color: transparent !important;
}

/* O Ally usa o mesmo style para os três modos. O script global traduz o CSS
   injetado em classes semânticas para que imagens não recebam o filtro errado. */
html:is(.gr-ally-contrast-dark, .gr-ally-contrast-high) #top #header_main .logo img,
html:is(.gr-ally-contrast-dark, .gr-ally-contrast-high) #top #header_main .gr-home-gov-brand img {
  background-color: transparent !important;
  filter: brightness(0) invert(1) !important;
}

html.gr-ally-contrast-light #top #header_main .logo img,
html.gr-ally-contrast-light #top #header_main .gr-home-gov-brand img {
  background-color: transparent !important;
  filter: none !important;
}

html:is(.gr-ally-contrast-dark, .gr-ally-contrast-high, .gr-ally-contrast-light) #top #socket .gr-site-footer-brand,
html:is(.gr-ally-contrast-dark, .gr-ally-contrast-high, .gr-ally-contrast-light) #top #socket .gr-site-footer-logo {
  background-color: transparent !important;
}

html:is(.gr-ally-contrast-dark, .gr-ally-contrast-high) #top #socket .gr-site-footer-logo {
  filter: none !important;
}

html.gr-ally-contrast-light #top #socket .gr-site-footer-logo {
  filter: brightness(0) !important;
}

/* No contraste claro, a busca da home deixa de ficar sobre o cabecalho azul.
   Reaplica uma superficie clara e texto escuro para preservar o contraste. */
html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-wrapper {
  border-color: #9aaabd !important;
  background: #ffffff !important;
}

html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-wrapper::after {
  filter: none !important;
}

html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-input {
  background: #ffffff !important;
  color: #1f2a37 !important;
  caret-color: #1f2a37 !important;
}

html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-input::placeholder {
  color: #5c6978 !important;
  opacity: 1 !important;
}

html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-submit {
  color: #043b69 !important;
}

html.gr-ally-contrast-light #top.home #header_main .gr-main-menu-search-form:focus-within {
  box-shadow: 0 0 0 2px rgba(4, 59, 105, 0.42) !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .avia-content-slider + .avia-button-wrap .avia-button.gr-home-news-more-link {
  border: 2px solid currentColor !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .avia-content-slider + .avia-button-wrap .avia-button.gr-home-news-more-link::after,
html:has(#ea11y-widget-contrast-styles) #top.home .avia-content-slider + .avia-button-wrap .avia-button.gr-home-news-more-link > * {
  color: inherit !important;
  background: transparent !important;
}

html:has(#ea11y-widget-contrast-styles) #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner,
html:has(#ea11y-widget-contrast-styles) #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::before,
html:has(#ea11y-widget-contrast-styles) #top:is(.home, .gr-internal-page) #header_main #avia-menu > li.av-burger-menu-main .av-hamburger-inner::after {
  background-color: currentColor !important;
}

html:has(#ea11y-widget-contrast-styles) #top #scroll-top-link {
  border: 2px solid currentColor !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

html:has(#ea11y-widget-contrast-styles) #top #scroll-top-link svg,
html:has(#ea11y-widget-contrast-styles) #top #scroll-top-link svg path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Ally/Pojo: mantem os controles do banner acima da camada de contraste. */
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots{
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 60 !important;
  overflow: visible !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots::before{
  z-index: 0 !important;
  display: block !important;
  opacity: 1 !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a{
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  visibility: visible !important;
  min-width: 18px;
  min-height: 7px;
  opacity: 1 !important;
  box-shadow: 0 0 0 1px #000000, 0 0 0 2px #ffffff !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-dots a.active{
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 2px #000000 !important;
}

/* A lupa interna precisa continuar sendo um SVG visivel mesmo quando o
   contraste do Ally altera as cores globais dos links. */
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a{
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a svg path{
  display: block !important;
  visibility: visible !important;
  width: 25px !important;
  height: 32px !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  opacity: 1 !important;
}

/* O Enfold posiciona o SVG da busca com z-index negativo. No contraste, o
   cabecalho pode ficar sobre o desenho mesmo quando o link continua visivel. */
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-mobile-menu-search-toggle svg,
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page .gr-main-menu-search-submit svg{
  position: relative !important;
  z-index: 1 !important;
  width: 18px !important;
  height: 23px !important;
  max-width: 18px !important;
  max-height: 23px !important;
  flex: 0 0 18px !important;
}

/* As setas ficam em uma camada propria: a barra dos indicadores ocupa toda a
   largura do slider e nao pode encobrir os controles laterais. */
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows{
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 70 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows::before,
html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows::after{
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows a{
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2 !important;
  color: inherit !important;
}

html:has(#ea11y-widget-contrast-styles) #top.home .gr-home-banner .avia-slideshow-arrows a::after{
  content: "" !important;
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  z-index: 3 !important;
  width: 12px !important;
  height: 12px !important;
  border-top: 3px solid currentColor !important;
  border-right: 3px solid currentColor !important;
  background: transparent !important;
  opacity: 1 !important;
}

/* Dimensao final da lupa no header interno: evita escala herdada do Ally,
   transformacao do link e corte na coluna reservada ao item de busca. */
@media only screen and (min-width: 990px) {
html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search{
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  overflow: visible !important;
}

html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  padding: 0 !important;
  overflow: visible !important;
  font-size: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}

html:has(#ea11y-widget-contrast-styles) #top.gr-internal-page #menu-item-search > a > svg{
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  width: 18px !important;
  height: 23px !important;
  min-width: 18px !important;
  min-height: 23px !important;
  max-width: 18px !important;
  max-height: 23px !important;
  margin: 0 !important;
  transform: none !important;
  flex: 0 0 18px !important;
}
}

/* Ajustes finais mobile: alinha o logo interno e mantem o burger acessivel com wp-admin ativo. */
@media only screen and (max-width: 989px) {
  body#top.gr-internal-page #header_main .logo a {
    transform: translateY(var(--gr-mobile-logo-vertical-shift)) !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay {
    top: var(--wp-admin--admin-bar--height, 0px) !important;
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)) !important;
    height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)) !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-bg {
    top: var(--wp-admin--admin-bar--height, 0px) !important;
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)) !important;
    height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)) !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-scroll {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(86vw, 430px) !important;
    max-width: calc(100vw - 40px) !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html.av-burger-overlay-active #top.home #header_main .av-burger-overlay-scroll {
    right: 0 !important;
    left: auto !important;
    transform: translateX(100%) !important;
  }

  html.av-burger-overlay-active.av-burger-overlay-active-delayed #top.home #header_main .av-burger-overlay-scroll {
    transform: translateX(0) !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-inner {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: visible !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-inner .gr-mobile-burger-tools {
    position: sticky !important;
    top: 0 !important;
    right: auto !important;
    left: auto !important;
    z-index: 100001 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    width: 100% !important;
    min-width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    margin: 0 !important;
    padding: 4px 12px !important;
    gap: 8px !important;
    border-bottom: 1px solid #e5e9ee;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 35, 52, 0.08);
    box-sizing: border-box;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-inner .gr-mobile-burger-close,
  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay-inner .gr-mobile-menu-search-toggle {
    flex: 0 0 42px !important;
    width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    margin: 0 !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page) #header_main .av-burger-overlay #av-burger-menu-ul {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.av-burger-overlay-active #top:is(.home, .gr-internal-page).gr-mobile-menu-search-open #header_main .av-burger-overlay-inner > .gr-main-menu-search-field {
    position: sticky !important;
    top: 50px !important;
    z-index: 100000 !important;
    margin: 0 !important;
  }
}


/* Links institucionais: preserva o layout dos logos e explicita o foco. */
#top #header_main .gr-home-gov-brand-link,
#top #socket .gr-site-footer-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  color: inherit;
  line-height: 0;
  text-decoration: none;
}

#top #header_main .gr-home-gov-brand-link:focus-visible,
#top #socket .gr-site-footer-brand-link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

/* Redes sociais: mesma transicao e mesma area ativa, com a cor de cada marca. */
#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li {
  --gr-social-hover-bg: #1f4168;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-facebook {
  --gr-social-hover-bg: #37589b;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-instagram {
  --gr-social-hover-bg: #a67658;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-twitter,
#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-square-x-twitter {
  --gr-social-hover-bg: #000000;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-youtube {
  --gr-social-hover-bg: #a72b1d;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-whatsapp {
  --gr-social-hover-bg: #00e676;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-mail {
  --gr-social-hover-bg: #9fae37;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li.av-social-link-transparenciaPE {
  --gr-social-hover-bg: #21557f;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li > a {
  transition: background-color 0.18s ease, color 0.18s ease !important;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li:hover > a,
#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li:focus-within > a,
#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li > a:hover,
#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li > a:focus {
  background-color: var(--gr-social-hover-bg) !important;
  color: #ffffff !important;
}

#top:is(.home, .gr-internal-page) #header_main .gr-main-menu-social .social_bookmarks li > a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -3px;
}
