html.institucional-standalone {
  scroll-behavior: smooth;
  --anc-page-width: 1280px;
  --anc-page-gutter: clamp(16px, 2vw, 28px);
}

/* O conteúdo exportado do Elementor não pode encolher até a largura
   intrínseca do widget: cada página usa seu próprio limite legível. */
.nv-single-page-wrap,
.nv-content-wrap,
.nv-content-wrap > .elementor,
.nv-content-wrap > .elementor > .e-con,
.nv-content-wrap > .elementor > .e-con > .e-con-inner,
.nv-content-wrap .elementor-widget-html,
.nv-content-wrap .elementor-widget-html > .elementor-widget-container {
  box-sizing: border-box;
  min-width: 0;
  width: 100% !important;
}

.nv-content-wrap .elementor-widget-html,
.nv-content-wrap .elementor-widget-html > .elementor-widget-container {
  max-width: 100% !important;
}

/* Padrão único: fundos e heróis ocupam toda a largura; o conteúdo útil fica
   centralizado e limitado a 1280px, como nos portais públicos mais legíveis. */
main.neve-main,
main.neve-main > .elementor,
main.neve-main > .elementor > .e-con,
main.neve-main > .elementor > .e-con > .e-con-inner,
main.neve-main > .elementor .elementor-widget-html,
main.neve-main > .elementor .elementor-widget-html > .elementor-widget-container,
.container-fluid.single-page-container,
.container-fluid.single-page-container > .row,
.container-fluid.single-page-container .nv-single-page-wrap,
.container-fluid.single-page-container .nv-content-wrap {
  box-sizing: border-box;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
}

main.neve-main > .elementor > .e-con > .e-con-inner,
.container-fluid.single-page-container,
.container-fluid.single-page-container > .row {
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

@media (min-width: 1100px) {
  .home-services-grid,
  .home-destaques-grid,
  .home-noticias-grid,
  .sec-grid,
  .hist-content,
  .faq-body,
  .bms-grid,
  .inst-sobre-inner,
  .inst-mvv-grid,
  .inst-estrutura-grid,
  .inst-secs-grid,
  .inst-contato-grid,
  .sau-body,
  .car-body,
  .dia-body,
  .edu-body,
  .em-body,
  .gd-body,
  #esic-content,
  .lgpd-wrap,
  .obr-body,
  #ouv-page,
  .bp-wrap,
  .bp-grid,
  .da-nav-inner,
  .da-main,
  .orc-main {
    max-width: var(--anc-page-width) !important;
  }
}

.sec-grid,
.hist-content,
.faq-body {
  box-sizing: border-box;
  width: min(var(--anc-page-width), calc(100% - (2 * var(--anc-page-gutter)))) !important;
  margin-inline: auto !important;
}

.sec-hero-inner,
.hist-hero > div:first-child,
.faq-hero > div:first-child {
  box-sizing: border-box;
  width: min(900px, calc(100% - (2 * var(--anc-page-gutter))));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .sec-grid,
  .home-services-grid,
  .home-destaques-grid,
  .home-noticias-grid,
  .bms-grid,
  .faq-body,
  .inst-secs-grid,
  .inst-mvv-grid,
  .inst-estrutura-grid,
  .sau-body,
  .edu-body,
  .obr-body,
  .orc-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.hfe-nav-menu__toggle:focus-visible,
.hfe-has-submenu-container:focus-visible,
#scroll-to-top:focus-visible,
#pojo-a11y-toolbar a:focus-visible {
  outline: 3px solid #f5b700 !important;
  outline-offset: 3px;
}

.hfe-has-submenu-container .hfe-menu-toggle::before {
  content: none;
}

.hfe-has-submenu-container .hfe-menu-toggle .fa::before {
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.hfe-has-submenu-container .hfe-menu-toggle {
  transition: transform .2s ease;
}

.hfe-has-submenu.institucional-submenu-open > .hfe-has-submenu-container .hfe-menu-toggle::before {
  transform: rotate(180deg);
}

#scroll-to-top,
.hfe-scroll-to-top-wrap {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

#scroll-to-top.institucional-scroll-visible,
.hfe-scroll-to-top-wrap.institucional-scroll-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

@media (max-width: 1180px) {
  .hfe-nav-menu__breakpoint-tablet.hfe-layout-horizontal {
    align-items: stretch !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__toggle {
    align-items: center !important;
    align-self: center !important;
    color: #fff !important;
    display: flex !important;
    justify-content: center !important;
    min-height: 52px !important;
    min-width: 52px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__toggle:not(.hfe-active-menu) + nav {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__toggle.hfe-active-menu + nav {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    opacity: 1 !important;
    padding: 0 !important;
    visibility: visible !important;
    width: 100%;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu {
    align-items: stretch !important;
    flex-direction: column !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu > li {
    display: block !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__layout-horizontal a.hfe-menu-item,
  .hfe-nav-menu__breakpoint-tablet .hfe-nav-menu__layout-horizontal .hfe-has-submenu-container {
    justify-content: space-between !important;
    white-space: normal !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet li.hfe-has-submenu {
    display: block !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet .hfe-has-submenu > .hfe-has-submenu-container {
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet li.hfe-has-submenu > .sub-menu {
    display: none !important;
    height: auto !important;
    left: auto !important;
    min-width: 0 !important;
    opacity: 1 !important;
    position: static !important;
    top: auto !important;
    transform: none !important;
    visibility: visible !important;
    width: 100% !important;
  }

  .hfe-nav-menu__breakpoint-tablet li.hfe-has-submenu.institucional-submenu-open > .sub-menu {
    display: block !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.institucional-standalone {
    scroll-behavior: auto;
  }

  #scroll-to-top,
  .hfe-scroll-to-top-wrap,
  #pojo-a11y-toolbar {
    transition: none !important;
  }
}

html.institucional-standalone body :is(
  .sec-hero,.hist-hero,.faq-hero,.car-hero,.gd-hero,.em-hero,.edu-hero,
  .dia-hero,.sau-hero,.obr-hero,.bms-hero,.inst-hero,.tp-hero,.da-hero,
  .bp-hero,.orc-hero,.lgpd-hero,#esic-hero,#ouv-hero
) {
  box-sizing: border-box;
  width: min(calc(100% - 32px), var(--anc-page-width)) !important;
  min-height: 0 !important;
  margin: 16px auto 20px !important;
  padding: var(--anc-hero-pad-block) var(--anc-hero-pad-inline) !important;
  border-radius: 14px !important;
}

html.institucional-standalone body :is(
  .sec-hero,.hist-hero,.faq-hero,.car-hero,.gd-hero,.em-hero,.edu-hero,
  .dia-hero,.sau-hero,.obr-hero,.bms-hero,.inst-hero,.tp-hero,.da-hero,
  .bp-hero,.orc-hero,.lgpd-hero,#esic-hero,#ouv-hero
) :is(h1,h2) {
  font-size: clamp(1.65rem, 3vw, 2.25rem) !important;
  line-height: 1.15 !important;
  margin-block: 0 8px !important;
}

html.institucional-standalone body :is(
  .sec-hero,.hist-hero,.faq-hero,.car-hero,.gd-hero,.em-hero,.edu-hero,
  .dia-hero,.sau-hero,.obr-hero,.bms-hero,.inst-hero,.tp-hero,.da-hero,
  .bp-hero,.orc-hero,.lgpd-hero,#esic-hero,#ouv-hero
) p {
  line-height: 1.45 !important;
  margin-block: 0 12px !important;
}

html.institucional-standalone #ouv-hero > div:first-child,
html.institucional-standalone #esic-hero > .esic-icon {
  font-size: 2.25rem !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
}

html.institucional-standalone #ouv-hero .ouv-badges {
  gap: 8px !important;
  margin-bottom: 14px !important;
}

html.institucional-standalone #ouv-hero .ouv-badge {
  padding: 5px 13px !important;
}

html.institucional-standalone #ouv-hero .ouv-cta,
html.institucional-standalone #esic-hero .esic-cta-btn {
  margin-top: 8px !important;
  padding: 10px 22px !important;
}

html.institucional-standalone #ouv-banner {
  display: block !important;
  width: min(100%, 210px) !important;
  max-width: 210px !important;
  max-height: 210px !important;
  margin: 0 auto 20px !important;
  object-fit: contain !important;
}

html.institucional-standalone .esic-img-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 260px)) !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

html.institucional-standalone .esic-img-box {
  min-width: 0;
  margin: 0 !important;
}

html.institucional-standalone .esic-img-box > a {
  display: flex !important;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  max-width: none !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
}

html.institucional-standalone .esic-img-box img {
  width: auto !important;
  max-width: 100% !important;
  height: clamp(96px, 10vw, 125px) !important;
  margin: 0 auto 8px !important;
  object-fit: contain;
}

html.institucional-standalone .esic-img-box span {
  font-size: .95rem !important;
  line-height: 1.35;
}

@media (max-width: 600px) {
  html.institucional-standalone body :is(
    .sec-hero,.hist-hero,.faq-hero,.car-hero,.gd-hero,.em-hero,.edu-hero,
    .dia-hero,.sau-hero,.obr-hero,.bms-hero,.inst-hero,.tp-hero,.da-hero,
    .bp-hero,.orc-hero,.lgpd-hero,#esic-hero,#ouv-hero
  ) {
    width: min(calc(100% - 20px), var(--anc-page-width)) !important;
    margin-block: 10px 16px !important;
  }

  html.institucional-standalone .esic-img-row {
    grid-template-columns: minmax(0, 280px) !important;
  }

  html.institucional-standalone #ouv-banner {
    width: min(100%, 170px) !important;
    max-width: 170px !important;
    max-height: 170px !important;
  }
}
