.flutter-campaign {
  position: relative;
  display: block;
  height: 100svh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background-color: #e2e2e2;
  isolation: isolate;
}

/*
 * Full-bleed: largura 100% do miolo (shell sem padding lateral na home).
 * Evita translateX(50%) + 100vw — em mobile/WebKit pode gerar faixas laterais.
 */
body.template-home .flutter-campaign {
  width: 100%;
  max-width: none;
  position: relative;
  left: auto;
  right: auto;
  transform: none;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.flutter-campaign__media,
.flutter-campaign__picture {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/*
 * Imagem a preencher todo o media (sobrescreve reboot Bootstrap: max-width:100% + height:auto).
 */
.flutter-campaign__image {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center center;
}

.flutter-campaign__content {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  text-align: center;
  z-index: 10;
  isolation: isolate;
}

/*
 * Mesmo token do .pg-help-btn (“Posso ajudar?”): --pg-cta-coral / --pg-cta-coral-hover (style-colors).
 * !important: evita cor primária do painel e arte PNG a “misturar” no fundo do link.
 */
body.template-home .flutter-campaign a.flutter-campaign__cta,
.flutter-campaign__cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(190px, 22vw, 360px);
  min-height: clamp(44px, 3.2vw, 58px);
  border: 0;
  border-radius: clamp(10px, 1vw, 16px);
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--pg-cta-coral, #ff5537) !important;
  background-image: none !important;
  color: #fff !important;
  mix-blend-mode: normal;
  padding: 10px 24px;
  font-size: clamp(13px, 1.1vw, 18px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

body.template-home .flutter-campaign a.flutter-campaign__cta:hover,
body.template-home .flutter-campaign a.flutter-campaign__cta:focus,
.flutter-campaign__cta:hover,
.flutter-campaign__cta:focus {
  color: #fff !important;
  background-color: var(--pg-cta-coral-hover, #e04a2f) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

@media (max-width: 767px), (orientation: portrait) {
  /*
   * Mobile — cover + recorte: o PNG mobile-flutter-home-v2 inclui faixa clara/cantos no topo.
   * object-position + scale puxam a zona azul da arte para baixo do header; fundo azul cobre transparências.
   * !important no padding-top: sobrescreve CSS custom do admin / legacy.
   */
  body.template-home .flutter-campaign {
    z-index: 0;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    padding-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    /* Full-bleed viewport: remove margens cinzentas laterais do “cartão” no PNG */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    /* Harmoniza com o topo do banner (arte Flutter); evita cinza entre header e cartão arredondado */
    background-color: #2a4a78;
  }

  body.template-home .flutter-campaign .flutter-campaign__media,
  body.template-home .flutter-campaign .flutter-campaign__picture {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  /* Paginação Swiper injectada fora do slider (artefato visual entre header e hero) */
  body.template-home .pg-main-gradient-shell > .swiper-pagination {
    display: none !important;
  }

  body.template-home .flutter-campaign .flutter-campaign__image {
    position: absolute;
    left: 50%;
    top: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    object-fit: cover;
    /* Corta a margem clara embutida no PNG; % vertical ≈ “card” azul sob o header */
    object-position: 50% 14%;
    transform: translateX(-50%) scale(1.22);
    transform-origin: 50% 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  body.template-home .flutter-campaign .flutter-campaign__content {
    left: 50%;
    bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.5rem), 5%);
    transform: translateX(-50%);
    width: min(88vw, 520px);
    z-index: 10;
  }

  body.template-home .flutter-campaign a.flutter-campaign__cta,
  body.template-home .flutter-campaign .flutter-campaign__cta {
    width: clamp(220px, 70vw, 360px);
    min-height: clamp(46px, 11vw, 64px);
    border-radius: clamp(12px, 3vw, 20px);
    font-size: clamp(13px, 4.2vw, 18px);
    background-color: var(--pg-cta-coral, #ff5537) !important;
    background-image: none !important;
    color: #fff !important;
    mix-blend-mode: normal;
  }

  body.template-home .flutter-campaign a.flutter-campaign__cta:hover,
  body.template-home .flutter-campaign a.flutter-campaign__cta:focus,
  body.template-home .flutter-campaign .flutter-campaign__cta:hover,
  body.template-home .flutter-campaign .flutter-campaign__cta:focus {
    background-color: var(--pg-cta-coral-hover, #e04a2f) !important;
    color: #fff !important;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767px), (orientation: portrait) {
    body.template-home .flutter-campaign {
      height: 100dvh;
      min-height: 100dvh;
    }
  }
}

@supports not (height: 100svh) {
  .flutter-campaign {
    height: 100vh;
    min-height: 100vh;
  }
}
