/* Ajuste global WebView iOS/Android - topo, rodapé e responsividade */
:root {
  --wv-safe-top: env(safe-area-inset-top, 0px);
  --wv-safe-bottom: env(safe-area-inset-bottom, 0px);
  --wv-top-extra: 6px;
  --wv-bottom-extra: 20px;
  --wv-page-x: 16px;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  min-height: 100%;
  background: #ffffff;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas, iframe {
  max-width: 100%;
}

img { height: auto; }

a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea, button {
  max-width: 100%;
}

.table-responsive, .responsive-table, .dataTables_wrapper {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Evita que a assistente gere área branca no fim da página */
body.assistente-ativa,
body.has-assistente,
body.lumi-ativa {
  padding-bottom: 0 !important;
}

/* Topo seguro para WebView com notch/status bar */
@media (max-width: 767px) {
  html, body {
    width: 100%;
    min-height: 100dvh;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  body {
    padding-top: max(6px, calc(var(--wv-safe-top) + 2px)) !important;
  }

  /* Primeiro bloco da página nunca fica colado na barra do celular */
  body > .container:first-of-type,
  body > .container-fluid:first-of-type,
  body > main:first-of-type,
  body > section:first-of-type,
  body > .main-shell:first-of-type,
  body > .login-container:first-of-type,
  body > .register-container:first-of-type,
  body > .card:first-of-type,
  body > .wrapper:first-of-type,
  body > .page-wrapper:first-of-type {
    margin-top: 2px !important;
  }

  .container.mt-3:first-of-type,
  .container.mt-4:first-of-type,
  .container-fluid.mt-3:first-of-type,
  .container-fluid.mt-4:first-of-type {
    margin-top: 4px !important;
  }

  .imepi-topbar,
  .hero-area,
  .topbar,
  .navbar,
  header:first-of-type {
    padding-top: max(6px, calc(var(--wv-safe-top) + 2px)) !important;
  }

  .container,
  .container-fluid,
  main,
  .main-shell,
  .content,
  .page-content {
    max-width: 100% !important;
  }

  .container,
  .container-fluid {
    padding-left: var(--wv-page-x) !important;
    padding-right: var(--wv-page-x) !important;
  }

  .row {
    margin-left: calc(var(--wv-page-x) * -0.5) !important;
    margin-right: calc(var(--wv-page-x) * -0.5) !important;
  }

  [class*="col-"] {
    min-width: 0;
  }

  .card,
  .service-card,
  .process-card,
  .form-card,
  .login-card,
  .register-card,
  .shadow,
  .shadow-sm {
    max-width: 100%;
    border-radius: 18px;
  }

  .service-card,
  .process-card,
  .manifestacao-card,
  .btn-card,
  .card-servico {
    width: 100% !important;
  }

  .btn,
  button,
  .btn-acessar,
  .botao-acessar,
  .service-button {
    white-space: normal;
  }

  footer,
  .site-footer {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    margin-top: 18px !important;
    padding-bottom: max(34px, calc(var(--wv-safe-bottom) + var(--wv-bottom-extra))) !important;
    overflow: visible !important;
  }

  .site-footer .footer-brand-row,
  footer .footer-brand-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
    flex-wrap: nowrap !important;
  }

  .site-footer .footer-brand,
  footer .footer-brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .site-footer .footer-logo,
  footer .footer-logo,
  .site-footer .footer-brand img,
  footer .footer-brand img {
    display: block !important;
    width: auto !important;
    max-width: min(52vw, 210px) !important;
    max-height: 76px !important;
    object-fit: contain !important;
  }

  .site-footer .footer-social,
  footer .footer-social {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
  }

  .site-footer .footer-social a,
  footer .footer-social a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .site-footer .footer-social img,
  footer .footer-social img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain !important;
  }

  .site-footer .footer-info,
  footer .footer-info {
    max-width: 100% !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

@media (max-width: 520px) {
  :root {
    --wv-top-extra: 6px;
    --wv-bottom-extra: 22px;
    --wv-page-x: 14px;
  }

  body {
    padding-top: max(6px, calc(var(--wv-safe-top) + 2px)) !important;
  }

  .card,
  .service-card,
  .process-card,
  .form-card,
  .login-card,
  .register-card {
    border-radius: 16px !important;
  }

  .service-card,
  .process-card,
  .manifestacao-card,
  .btn-card,
  .card-servico {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 18px 14px !important;
  }

  .service-card h1,
  .service-card h2,
  .service-card h3,
  .service-card h4,
  .process-card h1,
  .process-card h2,
  .process-card h3,
  .process-card h4,
  .card-servico h1,
  .card-servico h2,
  .card-servico h3,
  .card-servico h4 {
    font-size: clamp(0.88rem, 4.2vw, 1.02rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }

  .service-card p,
  .process-card p,
  .card-servico p {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0 !important;
  }

  .btn,
  button,
  .btn-acessar,
  .botao-acessar,
  .service-button {
    min-height: 42px;
    border-radius: 12px;
    padding-left: 14px;
    padding-right: 14px;
  }

  footer,
  .site-footer {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .site-footer .footer-brand-row,
  footer .footer-brand-row {
    align-items: center !important;
    gap: 10px !important;
  }

  .site-footer .footer-logo,
  footer .footer-logo,
  .site-footer .footer-brand img,
  footer .footer-brand img {
    max-width: min(58vw, 184px) !important;
    max-height: 66px !important;
  }

  .site-footer .footer-social,
  footer .footer-social {
    gap: 9px !important;
  }

  .site-footer .footer-social a,
  footer .footer-social a {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
  }

  .site-footer .footer-social img,
  footer .footer-social img {
    width: 27px !important;
    height: 27px !important;
  }

  .site-footer .footer-info,
  footer .footer-info {
    font-size: 0.74rem !important;
    line-height: 1.38 !important;
  }
}

@media (max-width: 360px) {
  :root { --wv-page-x: 12px; }

  .site-footer .footer-brand-row,
  footer .footer-brand-row {
    flex-wrap: wrap !important;
  }

  .site-footer .footer-social,
  footer .footer-social {
    justify-content: flex-start !important;
  }
}


/* Fala Consumidor - ajuste fino WebView v5
   Menos afastamento no topo, textos menores no mobile e rodapé protegido quando a Lumi estiver ativa. */
@media (max-width: 767px) {
  body,
  body.fc-webview-safe {
    padding-top: max(6px, calc(env(safe-area-inset-top, 0px) + 2px)) !important;
    padding-bottom: 0 !important;
  }

  .page-wrapper {
    padding-top: max(4px, env(safe-area-inset-top, 0px)) !important;
  }

  .hero-area,
  header.hero-area {
    padding-top: 8px !important;
    padding-bottom: 6px !important;
  }

  .logo-fala {
    width: min(300px, 78vw) !important;
    max-width: 300px !important;
    max-height: 118px !important;
    object-fit: contain !important;
  }

  .services-area {
    padding-top: 4px !important;
  }

  .service-card {
    min-height: auto !important;
    padding: 13px 14px !important;
    gap: 10px !important;
  }

  .service-title,
  .service-card h1,
  .service-card h2,
  .service-card h3,
  .service-card h4,
  .process-card h1,
  .process-card h2,
  .process-card h3,
  .process-card h4,
  .card-servico h1,
  .card-servico h2,
  .card-servico h3,
  .card-servico h4 {
    font-size: clamp(0.88rem, 4vw, 1rem) !important;
    line-height: 1.16 !important;
    letter-spacing: .01em !important;
  }

  .service-description,
  .service-card p,
  .process-card p,
  .card-servico p {
    font-size: 0.68rem !important;
    line-height: 1.28 !important;
  }

  .service-action,
  .btn-acessar,
  .botao-acessar,
  .service-button {
    min-width: 72px !important;
    min-height: 36px !important;
    padding: 8px 9px !important;
    font-size: .74rem !important;
    border-radius: 10px !important;
  }

  .termos-box small,
  .termos-box a {
    font-size: .68rem !important;
  }

  footer,
  .site-footer {
    margin-top: 14px !important;
    padding-top: 16px !important;
    padding-bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
  }

  body.lumi-a11y-enabled footer,
  body.lumi-a11y-enabled .site-footer,
  body:has(#lumiA11yRoot) footer,
  body:has(#lumiA11yRoot) .site-footer {
    padding-bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 96px)) !important;
  }

  .site-footer .footer-info,
  footer .footer-info {
    font-size: .72rem !important;
    line-height: 1.32 !important;
  }

  .site-footer .footer-logo,
  footer .footer-logo,
  .site-footer .footer-brand img,
  footer .footer-brand img {
    max-width: min(48vw, 172px) !important;
    max-height: 58px !important;
  }

  .site-footer .footer-social a,
  footer .footer-social a {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .site-footer .footer-social img,
  footer .footer-social img {
    width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 390px) {
  .logo-fala { width: min(300px, 78vw) !important; max-width: 300px !important; max-height: 118px !important; }
  .service-title,
  .service-card h1,
  .service-card h2,
  .service-card h3,
  .service-card h4 { font-size: .88rem !important; }
  .service-action,
  .btn-acessar,
  .botao-acessar,
  .service-button { font-size: .7rem !important; min-width: 68px !important; }
  .site-footer .footer-info,
  footer .footer-info { font-size: .68rem !important; }
}


/* Logo Fala Consumidor mobile 300px override */
@media (max-width: 520px) {
  .hero-area .logo-fala,
  header.hero-area .logo-fala,
  img.logo-fala {
    width: min(300px, 78vw) !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: 118px !important;
    object-fit: contain !important;
  }
}

@media (max-width: 360px) {
  .hero-area .logo-fala,
  header.hero-area .logo-fala,
  img.logo-fala {
    width: min(285px, 82vw) !important;
    max-width: 285px !important;
  }
}


/* Rodapé padrão global IMEPI - igual ao index.php - v7 */
:root {
  --fc-footer-bg: #0054a6;
  --fc-footer-text: #ffffff;
}

.site-footer,
footer.site-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 18px !important;
  background: var(--footer-bg, var(--imepi-blue, var(--fc-footer-bg))) !important;
  color: var(--footer-text, var(--fc-footer-text)) !important;
  padding: 22px 18px max(44px, calc(env(safe-area-inset-bottom, 0px) + 30px)) !important;
  overflow: visible !important;
}

.site-footer .footer-brand-row,
footer.site-footer .footer-brand-row {
  width: 100% !important;
  max-width: 1050px !important;
  margin: 0 auto 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

.site-footer .footer-brand,
footer.site-footer .footer-brand {
  line-height: 1.08 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.site-footer .footer-brand.small,
footer.site-footer .footer-brand.small {
  display: flex !important;
  align-items: center !important;
  max-width: 360px !important;
  min-width: 230px !important;
  flex: 0 1 360px !important;
}

.site-footer .footer-brand.small img,
.site-footer .footer-logo,
footer.site-footer .footer-brand.small img,
footer.site-footer .footer-logo {
  display: block !important;
  width: min(340px, 100%) !important;
  max-width: 340px !important;
  max-height: 104px !important;
  height: auto !important;
  object-fit: contain !important;
}

.site-footer .footer-social,
footer.site-footer .footer-social {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
}

.site-footer .footer-social a,
footer.site-footer .footer-social a {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  opacity: .96 !important;
  transition: transform .2s ease, opacity .2s ease !important;
}

.site-footer .footer-social a:hover,
footer.site-footer .footer-social a:hover {
  transform: translateY(-2px) !important;
  opacity: 1 !important;
}

.site-footer .footer-social img,
footer.site-footer .footer-social img {
  width: 38px !important;
  height: 38px !important;
  display: block !important;
  object-fit: contain !important;
}

.site-footer .footer-info,
footer.site-footer .footer-info {
  width: 100% !important;
  max-width: 1050px !important;
  margin: 0 auto !important;
  font-size: .9rem !important;
  line-height: 1.55 !important;
  color: #fff !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.site-footer .footer-info a,
footer.site-footer .footer-info a {
  color: #fff !important;
}

@media (max-width: 520px) {
  .site-footer,
  footer.site-footer {
    margin-top: 14px !important;
    padding: 18px 14px calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row {
    align-items: center !important;
    gap: 10px !important;
  }
}

@media (max-width: 430px) {
  .site-footer .footer-info,
  footer.site-footer .footer-info {
    font-size: .72rem !important;
    line-height: 1.42 !important;
  }

  .site-footer .footer-brand.small,
  footer.site-footer .footer-brand.small {
    min-width: 0 !important;
    max-width: 210px !important;
    flex: 1 1 210px !important;
  }

  .site-footer .footer-brand.small img,
  .site-footer .footer-logo,
  footer.site-footer .footer-brand.small img,
  footer.site-footer .footer-logo {
    width: min(210px, 100%) !important;
    max-width: 210px !important;
    max-height: 70px !important;
  }

  .site-footer .footer-social,
  footer.site-footer .footer-social {
    gap: 12px !important;
  }

  .site-footer .footer-social a,
  footer.site-footer .footer-social a {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .site-footer .footer-social img,
  footer.site-footer .footer-social img {
    width: 30px !important;
    height: 30px !important;
  }
}

@media (max-width: 390px) {
  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row {
    flex-wrap: wrap !important;
  }

  .site-footer .footer-brand.small,
  footer.site-footer .footer-brand.small {
    flex: 1 1 100% !important;
    justify-content: center !important;
    max-width: none !important;
  }

  .site-footer .footer-brand.small img,
  .site-footer .footer-logo,
  footer.site-footer .footer-brand.small img,
  footer.site-footer .footer-logo {
    width: min(300px, 92%) !important;
    max-width: 300px !important;
    max-height: 96px !important;
  }

  .site-footer .footer-social,
  footer.site-footer .footer-social {
    width: 100% !important;
    justify-content: center !important;
    gap: 16px !important;
  }

  .site-footer .footer-social a,
  footer.site-footer .footer-social a {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  .site-footer .footer-social img,
  footer.site-footer .footer-social img {
    width: 34px !important;
    height: 34px !important;
  }
}

@media (max-width: 360px) {
  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row { gap: 8px !important; }
  .site-footer .footer-social,
  footer.site-footer .footer-social { gap: 13px !important; }
  .site-footer .footer-social a,
  footer.site-footer .footer-social a { width: 40px !important; height: 40px !important; min-width: 40px !important; }
  .site-footer .footer-social img,
  footer.site-footer .footer-social img { width: 31px !important; height: 31px !important; }
}

/* Quando a assistente estiver ativa, só aumenta a área inferior do próprio rodapé,
   evitando espaço branco extra e evitando que a barra da Lumi cubra o endereço. */
@media (max-width: 767px) {
  body.lumi-a11y-enabled,
  body:has(#lumiA11yRoot) {
    padding-bottom: 0 !important;
  }

  body.lumi-a11y-enabled .site-footer,
  body:has(#lumiA11yRoot) .site-footer {
    padding-bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 96px)) !important;
  }
}

/* Rodapé padrão mobile - igual ao index.php - v8
   Mantém o mesmo formato do rodapé em todas as páginas no WebView iOS/Android. */
@media (max-width: 520px) {
  .site-footer,
  footer.site-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 14px !important;
    padding: 18px 14px calc(34px + env(safe-area-inset-bottom, 0px)) !important;
    background: var(--footer-bg, var(--imepi-blue, var(--fc-footer-bg))) !important;
    color: var(--footer-text, var(--fc-footer-text)) !important;
  }

  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row {
    width: 100% !important;
    max-width: 1050px !important;
    margin: 0 auto 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }

  .site-footer .footer-brand.small,
  footer.site-footer .footer-brand.small {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    max-width: 210px !important;
    flex: 1 1 210px !important;
  }

  .site-footer .footer-brand.small img,
  .site-footer .footer-logo,
  footer.site-footer .footer-brand.small img,
  footer.site-footer .footer-logo {
    display: block !important;
    width: min(210px, 100%) !important;
    max-width: 210px !important;
    max-height: 70px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .site-footer .footer-social,
  footer.site-footer .footer-social {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;
  }

  .site-footer .footer-social a,
  footer.site-footer .footer-social a {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  .site-footer .footer-social img,
  footer.site-footer .footer-social img {
    width: 30px !important;
    height: 30px !important;
    display: block !important;
    object-fit: contain !important;
  }

  .site-footer .footer-info,
  footer.site-footer .footer-info {
    width: 100% !important;
    max-width: 1050px !important;
    margin: 0 auto !important;
    font-size: 0.72rem !important;
    line-height: 1.42 !important;
    color: #fff !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

@media (max-width: 390px) {
  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row {
    flex-wrap: wrap !important;
  }

  .site-footer .footer-brand.small,
  footer.site-footer .footer-brand.small {
    flex: 1 1 100% !important;
    justify-content: center !important;
    max-width: none !important;
  }

  .site-footer .footer-brand.small img,
  .site-footer .footer-logo,
  footer.site-footer .footer-brand.small img,
  footer.site-footer .footer-logo {
    width: min(300px, 92%) !important;
    max-width: 300px !important;
    max-height: 96px !important;
  }

  .site-footer .footer-social,
  footer.site-footer .footer-social {
    width: 100% !important;
    justify-content: center !important;
    gap: 16px !important;
  }

  .site-footer .footer-social a,
  footer.site-footer .footer-social a {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  .site-footer .footer-social img,
  footer.site-footer .footer-social img {
    width: 34px !important;
    height: 34px !important;
  }
}

@media (max-width: 360px) {
  .site-footer .footer-brand-row,
  footer.site-footer .footer-brand-row {
    gap: 8px !important;
  }

  .site-footer .footer-social,
  footer.site-footer .footer-social {
    gap: 13px !important;
  }

  .site-footer .footer-social a,
  footer.site-footer .footer-social a {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .site-footer .footer-social img,
  footer.site-footer .footer-social img {
    width: 31px !important;
    height: 31px !important;
  }
}

/* Com acessibilidade ativa: o rodapé reserva espaço para a barra da Lumi sem criar faixa branca. */
@media (max-width: 767px) {
  body.lumi-a11y-enabled .site-footer,
  body.has-assistente .site-footer,
  body.assistente-ativa .site-footer,
  body:has(#lumiA11yRoot) .site-footer,
  body.lumi-a11y-enabled footer.site-footer,
  body.has-assistente footer.site-footer,
  body.assistente-ativa footer.site-footer,
  body:has(#lumiA11yRoot) footer.site-footer {
    padding-bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 96px)) !important;
  }
}

/* Rodapé padrão mobile final - v9
   Garante nas páginas internas o mesmo formato do index.php. */
@media (max-width: 520px) {
  .site-footer.fc-footer-padrao,
  footer.site-footer.fc-footer-padrao {
    padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .site-footer.fc-footer-padrao .footer-brand-row,
  footer.site-footer.fc-footer-padrao .footer-brand-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;
    margin-bottom: 10px !important;
  }

  .site-footer.fc-footer-padrao .footer-brand.small,
  footer.site-footer.fc-footer-padrao .footer-brand.small {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 190px !important;
    justify-content: flex-start !important;
  }

  .site-footer.fc-footer-padrao .footer-logo,
  .site-footer.fc-footer-padrao .footer-brand.small img,
  footer.site-footer.fc-footer-padrao .footer-logo,
  footer.site-footer.fc-footer-padrao .footer-brand.small img {
    width: min(188px, 100%) !important;
    max-width: 188px !important;
    max-height: 58px !important;
  }

  .site-footer.fc-footer-padrao .footer-social,
  footer.site-footer.fc-footer-padrao .footer-social {
    width: auto !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
  }

  .site-footer.fc-footer-padrao .footer-social a,
  footer.site-footer.fc-footer-padrao .footer-social a {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .site-footer.fc-footer-padrao .footer-social img,
  footer.site-footer.fc-footer-padrao .footer-social img {
    width: 25px !important;
    height: 25px !important;
  }

  .site-footer.fc-footer-padrao .footer-info,
  footer.site-footer.fc-footer-padrao .footer-info {
    font-size: .72rem !important;
    line-height: 1.36 !important;
    text-align: left !important;
  }
}

@media (max-width: 380px) {
  .site-footer.fc-footer-padrao .footer-brand.small,
  footer.site-footer.fc-footer-padrao .footer-brand.small {
    max-width: 170px !important;
  }

  .site-footer.fc-footer-padrao .footer-logo,
  .site-footer.fc-footer-padrao .footer-brand.small img,
  footer.site-footer.fc-footer-padrao .footer-logo,
  footer.site-footer.fc-footer-padrao .footer-brand.small img {
    width: min(168px, 100%) !important;
    max-width: 168px !important;
    max-height: 54px !important;
  }

  .site-footer.fc-footer-padrao .footer-social,
  footer.site-footer.fc-footer-padrao .footer-social {
    gap: 8px !important;
  }

  .site-footer.fc-footer-padrao .footer-social a,
  footer.site-footer.fc-footer-padrao .footer-social a {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .site-footer.fc-footer-padrao .footer-social img,
  footer.site-footer.fc-footer-padrao .footer-social img {
    width: 23px !important;
    height: 23px !important;
  }
}


/* v11 - Index com topo/rodapé sempre visíveis e rolagem somente no miolo */
@media (max-width: 767px) {
  body:has(.page-wrapper .services-area) {
    overflow: hidden !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body:has(.page-wrapper .services-area) .page-wrapper {
    height: var(--wv-visual-height, 100dvh) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: max(4px, env(safe-area-inset-top, 0px)) !important;
  }

  body:has(.page-wrapper .services-area) .hero-area {
    flex: 0 0 auto !important;
    padding-top: 6px !important;
    padding-bottom: 4px !important;
  }

  body:has(.page-wrapper .services-area) .services-area {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-top: 3px !important;
    padding-bottom: 12px !important;
  }

  body:has(.page-wrapper .services-area) .site-footer {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
    padding-top: 12px !important;
    padding-bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px)) !important;
  }

  body.lumi-a11y-enabled:has(.page-wrapper .services-area) .site-footer,
  body:has(#lumiA11yRoot):has(.page-wrapper .services-area) .site-footer {
    padding-bottom: max(96px, calc(env(safe-area-inset-bottom, 0px) + 84px)) !important;
  }
}



@media (max-width: 767px) {
/* ==========================================================
   Ajuste fluxo WebView: topo/logo e rodape sempre visiveis
   Mantem scroll somente na area principal do fluxo.
   iOS/Android safe-area + compatibilidade com Lumi/acessibilidade.
   ========================================================== */
html.fc-flow-fixed-page,
html.fc-flow-fixed-page body.fc-flow-fixed {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background: #ffffff !important;
}
body.fc-flow-fixed {
  height: 100dvh !important;
  min-height: 100svh !important;
  max-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}
body.fc-flow-fixed > .imepi-topbar {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 60 !important;
  margin: 0 !important;
  padding-top: max(8px, calc(env(safe-area-inset-top, 0px) + 6px)) !important;
  padding-bottom: 10px !important;
  box-shadow: 0 10px 24px rgba(0, 63, 130, .12) !important;
}
body.fc-flow-fixed > .imepi-topbar .imepi-header-inner {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
  max-width: 42px !important;
  max-height: 42px !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-text small {
  font-size: .72rem !important;
  line-height: 1.1 !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-text strong {
  font-size: 1rem !important;
  line-height: 1.15 !important;
}
body.fc-flow-fixed > .main-shell,
body.fc-flow-fixed > .container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: clamp(12px, 2.4vw, 22px) !important;
  padding-bottom: 16px !important;
}
body.fc-flow-fixed > .container {
  width: min(100% - 20px, 1120px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.fc-flow-fixed > .container > h2:first-child {
  position: sticky !important;
  top: 0 !important;
  z-index: 45 !important;
  background: #ffffff !important;
  margin: -6px -4px 14px !important;
  padding: 10px 8px 12px !important;
  border-bottom: 1px solid rgba(13, 110, 253, .08) !important;
  font-size: clamp(1.08rem, 4.4vw, 1.45rem) !important;
}
body.fc-flow-fixed > .container > h2:first-child img {
  width: 44px !important;
  height: auto !important;
}
body.fc-flow-fixed > .site-footer,
body.fc-flow-fixed > footer.site-footer {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 70 !important;
  width: 100% !important;
  margin: 0 !important;
  padding-top: 10px !important;
  padding-bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 8px)) !important;
  box-shadow: 0 -10px 28px rgba(0, 63, 130, .10) !important;
}
body.fc-flow-fixed.lumi-a11y-enabled > .site-footer,
body.fc-flow-fixed.lumi-a11y-enabled > footer.site-footer,
body.fc-flow-fixed:has(#lumiA11yRoot) > .site-footer,
body.fc-flow-fixed:has(#lumiA11yRoot) > footer.site-footer {
  padding-bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 72px)) !important;
}
@media (max-width: 768px) {
  body.fc-flow-fixed > .imepi-topbar {
    padding-top: max(7px, calc(env(safe-area-inset-top, 0px) + 5px)) !important;
    padding-bottom: 8px !important;
  }
  body.fc-flow-fixed > .imepi-topbar .imepi-navline {
    gap: 8px !important;
    align-items: center !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-wrap {
    gap: 8px !important;
    min-width: 0 !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 14px !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
    max-width: 36px !important;
    max-height: 36px !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-text small {
    display: none !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-text strong {
    font-size: .94rem !important;
    white-space: normal !important;
  }
  body.fc-flow-fixed > .imepi-topbar .back-home-btn {
    padding: 8px 10px !important;
    font-size: .76rem !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }
  body.fc-flow-fixed > .main-shell,
  body.fc-flow-fixed > .container {
    padding-top: 10px !important;
    padding-bottom: 12px !important;
  }
  body.fc-flow-fixed .progress-panel,
  body.fc-flow-fixed .content-card {
    border-radius: 16px !important;
  }
  body.fc-flow-fixed .section-heading h3,
  body.fc-flow-fixed .step-title,
  body.fc-flow-fixed h4 {
    font-size: 1.02rem !important;
  }
  body.fc-flow-fixed .process-title,
  body.fc-flow-fixed .card-title {
    font-size: 1rem !important;
  }
  body.fc-flow-fixed .process-description,
  body.fc-flow-fixed p,
  body.fc-flow-fixed .form-label,
  body.fc-flow-fixed .form-control,
  body.fc-flow-fixed .form-select {
    font-size: .9rem !important;
  }
  body.fc-flow-fixed > .site-footer,
  body.fc-flow-fixed > footer.site-footer {
    padding-top: 8px !important;
    padding-bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) + 7px)) !important;
  }
  body.fc-flow-fixed.lumi-a11y-enabled > .site-footer,
  body.fc-flow-fixed.lumi-a11y-enabled > footer.site-footer,
  body.fc-flow-fixed:has(#lumiA11yRoot) > .site-footer,
  body.fc-flow-fixed:has(#lumiA11yRoot) > footer.site-footer {
    padding-bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 68px)) !important;
  }
}

}

/* r13: topo/rodape fixos somente no mobile; desktop permanece com rolagem normal. */


/* v14 - Desktop/PC normal: topo e rodapé não ficam fixos; scroll volta para a página inteira.
   O modo fixo fica restrito ao mobile até 767px. */
@media (min-width: 768px) {
  html, body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.fc-webview-safe,
  body.fc-flow-fixed,
  body:has(.page-wrapper .services-area) {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .page-wrapper,
  body.fc-flow-fixed > .main-shell,
  body.fc-flow-fixed > main,
  body.fc-flow-fixed > .container,
  body.fc-flow-fixed > .container-fluid {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .hero-area,
  .imepi-topbar,
  .site-footer,
  footer.site-footer {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    flex: initial !important;
  }

  .services-area,
  .main-shell,
  main {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
}


/* Ajuste 20260616r15: logo centralizada 200px nos fluxos, sem texto institucional */
body.fc-flow-fixed > .imepi-topbar .imepi-navline {
  justify-content: center !important;
  position: relative !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-wrap {
  width: 100% !important;
  justify-content: center !important;
  gap: 0 !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
  width: 200px !important;
  max-width: 72vw !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
  width: 100% !important;
  max-width: 200px !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-text {
  display: none !important;
}
@media (max-width: 767px) {
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
    width: 200px !important;
    max-width: 72vw !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
    max-width: 200px !important;
  }
}


/* Ajuste 20260616r16: logo maior nos fluxos e botão Página inicial sem sobrepor */
body.fc-flow-fixed > .imepi-topbar .imepi-navline {
  justify-content: center !important;
  align-items: center !important;
  position: relative !important;
  gap: 14px !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-wrap {
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
  width: 260px !important;
  max-width: 68vw !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
  width: 100% !important;
  max-width: 260px !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-text {
  display: none !important;
}
body.fc-flow-fixed > .imepi-topbar .back-home-btn {
  z-index: 5 !important;
}
@media (max-width: 767px) {
  body.fc-flow-fixed > .imepi-topbar .imepi-header-inner {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  body.fc-flow-fixed > .imepi-topbar .imepi-navline {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-wrap {
    width: 100% !important;
    justify-content: center !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
    width: 250px !important;
    max-width: 82vw !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
    max-width: 250px !important;
  }
  body.fc-flow-fixed > .imepi-topbar .back-home-btn {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: 92vw !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 8px 14px !important;
    font-size: .82rem !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }
}
@media (max-width: 380px) {
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
    width: 230px !important;
    max-width: 84vw !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
    max-width: 230px !important;
  }
}


/* Ajuste 20260616r17: logo dos fluxos com tamanho fixo de 150px */
body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
  width: 150px !important;
  max-width: 62vw !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
  width: 100% !important;
  max-width: 150px !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block !important;
}
@media (max-width: 767px) {
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box {
    width: 150px !important;
    max-width: 62vw !important;
  }
  body.fc-flow-fixed > .imepi-topbar .brand-logo-box img {
    max-width: 150px !important;
  }
}
