.cms-home-hero {
  padding: 100px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.cms-home-hero .cms-home-hero__logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

.cms-home-hero .cms-home-hero__title {
  color: #111827;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin: 0 0 1rem;
}

.cms-home-hero .cms-home-hero__subtitle {
  color: #536a8a;
  line-height: 1.45;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 42rem;
  text-align: center;
}

.cms-home-hero .cms-home-hero__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 3rem;
}

.cms-home-hero .cms-home-hero__btn {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 500;
  justify-content: center;
  min-height: 3rem;
  min-width: 10.5rem;
  padding: 0.72rem 2rem;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cms-home-hero .cms-home-hero__btn--primary {
  background: #1d293d;
  border: 1px solid #1d293d;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
  color: #fff;
}

.cms-home-hero .cms-home-hero__btn--primary:hover {
  background: #26364f;
  border-color: #26364f;
  color: #fff;
  transform: translateY(-1px);
}

.cms-home-hero .cms-home-hero__btn--secondary {
  background: transparent;
  border: 1.5px solid #111827;
  box-shadow: none;
  color: #111827;
}

.cms-home-hero .cms-home-hero__btn--secondary:hover {
  background: rgba(17, 24, 39, 0.06);
  border-color: #111827;
  color: #111827;
  transform: translateY(-1px);
}

@media (max-width: 576px) {
  .cms-home-hero .cms-home-hero__btn {
    width: min(100%, 18rem);
  }
}

/* —— Variante portal (template Banco) + pesquisa —— */
:root {
  --bp-cnmp-red: #b01e3e;
  --bp-cnmp-red-dark: #8e1832;
  --bp-cnmp-hero-bg: #2b2b2b;
}

.cms-home-hero--portal {
  --cms-hero-offset-scale: 1;
  --cms-hero-brand-max: 27rem;
  --cms-hero-brand-safe-zone: clamp(15rem, 18vw, 21rem);
  --cms-hero-brand-pad-x: 1.05rem;
  --cms-hero-brand-pad-top: 0.85rem;
  --cms-hero-brand-pad-bottom: 0.95rem;
  --cms-hero-actions-max: 100%;
  --cms-hero-btn-min-h: 0;
  --cms-hero-btn-pad-y: 0.55rem;
  --cms-hero-btn-pad-x: 1.15rem;
  --cms-hero-btn-font: 0.85rem;
  position: relative;
  background: var(--bp-cnmp-hero-bg);
  color: #fff;
  padding: 0 1.5rem 3.25rem;
  overflow: hidden;
  text-align: left;
  border-bottom: none;
}

.cms-home-hero--portal .cms-home-hero__accent {
  position: absolute;
  width: 28%;
  max-width: 220px;
  height: 120%;
  top: -10%;
  background: var(--bp-cnmp-red);
  transform: skewX(-12deg);
  opacity: 0.92;
  pointer-events: none;
}

.cms-home-hero--portal .cms-home-hero__accent--left {
  left: -4%;
}

.cms-home-hero--portal .cms-home-hero__accent--right {
  right: -4%;
}

.cms-home-hero__portal-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 0 0;
  display: grid;
  gap: 1.5rem 2rem;
  align-items: center;
}

.cms-home-hero__portal-inner--search-right {
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 420px) auto;
}

.cms-home-hero__portal-inner--search-center {
  grid-template-columns: minmax(160px, 1fr) minmax(260px, 420px) minmax(160px, 1fr);
}

.cms-home-hero__portal-inner--search-center .cms-home-hero__brand {
  justify-self: start;
}

.cms-home-hero__portal-inner--search-center .cms-home-hero__search-col--center {
  justify-self: center;
  width: 100%;
  max-width: 420px;
}

.cms-home-hero__portal-inner--search-center .cms-home-hero__visual {
  justify-self: end;
}

.cms-home-hero__portal-inner--search-left {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.cms-home-hero--portal .cms-home-hero__kicker {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--hero-title-color, var(--bp-cnmp-red));
  line-height: 1.1;
}

.cms-home-hero--portal .cms-home-hero__title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.2rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--hero-title-color, var(--bp-cnmp-red));
  text-transform: uppercase;
}

.cms-home-hero--portal .cms-home-hero__tagline {
  margin: 0.85rem 0 0;
  font-size: clamp(0.58rem, 1.4vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--hero-subtitle-color, rgba(255, 255, 255, 0.92));
  max-width: 22rem;
}

.cms-home-hero__search-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.cms-home-hero__search-slot {
  min-height: 5.25rem;
}

.cms-home-hero__search {
  display: flex;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.cms-home-hero__search--inline {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.cms-home-hero__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: #1e293b;
  background: #fff;
}

.cms-home-hero__search-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(176, 30, 62, 0.35);
}

.cms-home-hero__search-btn {
  border: none;
  background: var(--bp-cnmp-red);
  color: #fff;
  width: 3.25rem;
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cms-home-hero__search-btn:hover {
  background: var(--bp-cnmp-red-dark);
}

.cms-home-hero__advanced {
  align-self: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.15rem 0.35rem;
}

.cms-home-hero--portal .cms-home-hero__advanced {
  color: rgba(255, 255, 255, 0.92);
}

.cms-home-hero__search-inline + .cms-home-hero__actions {
  margin-top: 1.5rem;
}

.cms-home-hero__visual {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  color: var(--bp-cnmp-red);
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  justify-self: end;
}

.cms-home-hero__portal-logo-wrap {
  justify-self: end;
  display: flex;
  align-items: center;
}

.cms-home-hero__portal-logo {
  display: block;
  max-width: min(100%, 420px);
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.28));
}

.cms-home-hero__portal-inner--no-search {
  grid-template-columns: minmax(200px, 1fr) auto;
}

.cms-home-hero--search-left .cms-home-hero__search-col--inline .cms-home-hero__search {
  margin: 0;
}

.cms-home-hero--search-left .cms-home-hero__advanced {
  align-self: flex-start;
}

.cms-home-hero__search-col--inline {
  margin-top: 1.25rem;
  max-width: 420px;
}

.cms-home-hero__portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.cms-home-hero__portal-actions-slot {
  min-height: 3.5rem;
}

/* Botões do banner Banco — escopo exclusivo do template portal */
.cms-home-hero--portal .cms-home-hero__portal-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--cms-hero-btn-pad-y) var(--cms-hero-btn-pad-x);
  font-size: var(--cms-hero-btn-font);
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  letter-spacing: 0.02em;
  min-width: 0;
  min-height: var(--cms-hero-btn-min-h);
  box-shadow: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cms-home-hero--portal .cms-home-hero__portal-actions .cms-home-hero__btn--portal-primary {
  background: var(--hero-primary-btn-bg, var(--bp-cnmp-red));
  color: #fff;
  border: 2px solid var(--hero-primary-btn-border, var(--bp-cnmp-red));
}

.cms-home-hero--portal .cms-home-hero__portal-actions .cms-home-hero__btn--portal-primary:hover {
  background: var(--hero-primary-btn-border, var(--bp-cnmp-red-dark));
  border-color: var(--hero-primary-btn-border, var(--bp-cnmp-red-dark));
  color: #fff;
  box-shadow: 0 0 0 2px var(--hero-primary-btn-border, var(--bp-cnmp-red-dark)), 0 14px 24px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
}

.cms-home-hero--portal .cms-home-hero__portal-actions .cms-home-hero__btn--portal-secondary {
  background: var(--hero-secondary-btn-bg, rgba(255, 255, 255, 0.08));
  color: #fff;
  border: 2px solid var(--hero-secondary-btn-border, #fff);
}

.cms-home-hero--portal .cms-home-hero__portal-actions .cms-home-hero__btn--portal-secondary:hover {
  background: var(--hero-secondary-btn-border, #fff);
  border-color: var(--hero-secondary-btn-border, #fff);
  color: #111827;
  box-shadow: 0 0 0 2px var(--hero-secondary-btn-border, #fff), 0 14px 24px rgba(15, 23, 42, 0.22);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .cms-home-hero__portal-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cms-home-hero--portal .cms-home-hero__tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .cms-home-hero__visual {
    display: none;
  }
}

/* —— Custom Banner para Banco de Boas Práticas —— */
.cms-home-hero--banco {
  background-color: var(--bp-cnmp-hero-bg);
  background-position: center;
  background-repeat: no-repeat;
  min-height: 280px;
  display: flex;
  align-items: center;
}

.cms-home-hero--banco .cms-home-hero__accent,
.cms-home-hero--banco-alt .cms-home-hero__accent {
  display: none !important; /* Esconde os acentos CSS pois já estão na imagem */
}

.cms-home-hero--banco .cms-home-hero__visual,
.cms-home-hero--banco-alt .cms-home-hero__visual {
  opacity: 0; /* Esconde o ícone padrão para não sobrepor o cérebro da imagem */
  pointer-events: none;
}

/* Opção alternativa (Gerada pela IA) */
.cms-home-hero--banco-alt {
  background-color: var(--bp-cnmp-hero-bg);
  background-position: center;
  background-repeat: no-repeat;
  min-height: 280px;
  display: flex;
  align-items: center;
}

.cms-home-hero--banco .cms-home-hero__portal-logo-wrap,
.cms-home-hero--banco-alt .cms-home-hero__portal-logo-wrap,
.cms-home-hero--banco .cms-home-hero__logo,
.cms-home-hero--banco-alt .cms-home-hero__logo {
  display: none !important;
}

.cms-home-hero__brand {
  position: relative;
  left: 0;
  top: 0;
  transform: translate(
    calc(var(--brand-offset-x, 0px) * var(--cms-hero-offset-scale)),
    calc((var(--brand-offset-y, 0px) * var(--cms-hero-offset-scale)) + 5px)
  );
}

.cms-home-hero--banco .cms-home-hero__brand,
.cms-home-hero--banco-alt .cms-home-hero__brand {
  max-width: min(100%, var(--cms-hero-brand-max));
  padding: var(--cms-hero-brand-pad-top) var(--cms-hero-brand-pad-x) var(--cms-hero-brand-pad-bottom);
  border-radius: 8px;
}

.cms-home-hero--banco .cms-home-hero__portal-actions,
.cms-home-hero--banco-alt .cms-home-hero__portal-actions {
  max-width: var(--cms-hero-actions-max);
}

.cms-home-hero--banco .cms-home-hero__portal-inner--no-search,
.cms-home-hero--banco-alt .cms-home-hero__portal-inner--no-search {
  max-width: none;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: minmax(var(--cms-hero-brand-safe-zone), var(--cms-hero-brand-safe-zone)) minmax(18rem, max-content);
  justify-content: start;
}

.cms-home-hero--banco .cms-home-hero__portal-inner--no-search .cms-home-hero__brand,
.cms-home-hero--banco-alt .cms-home-hero__portal-inner--no-search .cms-home-hero__brand {
  grid-column: 2;
  justify-self: start;
  margin-right: auto;
}

@media (max-width: 1400px) {
  .cms-home-hero--banco:not([data-banner-fit]),
  .cms-home-hero--banco[data-banner-fit="cover"],
  .cms-home-hero--banco-alt:not([data-banner-fit]),
  .cms-home-hero--banco-alt[data-banner-fit="cover"] {
    background-size: cover !important;
    background-position: center center !important;
  }

  .cms-home-hero--portal .cms-home-hero__kicker {
    font-size: clamp(0.92rem, 1.4vw, 1.08rem);
  }

  .cms-home-hero--portal .cms-home-hero__title {
    font-size: clamp(1.85rem, 2.6vw, 2.4rem);
  }

  .cms-home-hero--portal .cms-home-hero__tagline {
    font-size: clamp(0.68rem, 1vw, 0.76rem);
  }
}

@media (max-width: 1199px) {
  .cms-home-hero--portal {
    --cms-hero-offset-scale: 0.78;
    --cms-hero-brand-max: 22rem;
    --cms-hero-brand-safe-zone: clamp(12.5rem, 17vw, 17rem);
    --cms-hero-brand-pad-x: 0.9rem;
    --cms-hero-brand-pad-top: 0.75rem;
    --cms-hero-brand-pad-bottom: 0.85rem;
    --cms-hero-btn-pad-y: 0.5rem;
    --cms-hero-btn-pad-x: 0.95rem;
    --cms-hero-btn-font: 0.78rem;
  }

  .cms-home-hero--banco .cms-home-hero__brand,
  .cms-home-hero--banco-alt .cms-home-hero__brand {
    max-width: min(100%, var(--cms-hero-brand-max));
  }

  .cms-home-hero--portal .cms-home-hero__title {
    font-size: clamp(1.55rem, 4vw, 2.2rem);
  }

  .cms-home-hero--portal .cms-home-hero__tagline {
    max-width: 18rem;
    font-size: clamp(0.62rem, 1.15vw, 0.72rem);
  }

  .cms-home-hero--portal .cms-home-hero__portal-actions a {
    padding: var(--cms-hero-btn-pad-y) var(--cms-hero-btn-pad-x);
    font-size: var(--cms-hero-btn-font);
  }
}

@media (max-width: 992px) {
  .cms-home-hero--portal {
    --cms-hero-offset-scale: 0.62;
    --cms-hero-brand-max: 19rem;
    --cms-hero-brand-safe-zone: clamp(9rem, 15vw, 12rem);
  }

  .cms-home-hero--banco,
  .cms-home-hero--banco-alt {
    aspect-ratio: 2172 / 375;
    min-height: 0;
  }

  .cms-home-hero--portal .cms-home-hero__brand {
    margin-left: auto;
    margin-right: auto;
  }

  .cms-home-hero--portal .cms-home-hero__portal-actions {
    margin-left: auto;
    margin-right: auto;
  }

  .cms-home-hero--banco .cms-home-hero__brand,
  .cms-home-hero--banco-alt .cms-home-hero__brand {
    max-width: min(100%, var(--cms-hero-brand-max));
  }

  .cms-home-hero--portal .cms-home-hero__kicker {
    font-size: 0.9rem;
  }

  .cms-home-hero--portal .cms-home-hero__title {
    font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  }

  .cms-home-hero--portal .cms-home-hero__tagline {
    max-width: 15.5rem;
    line-height: 1.35;
  }
}

@media (max-width: 768px) {
  .cms-home-hero--portal {
    --cms-hero-offset-scale: 0.34;
    --cms-hero-brand-max: min(100%, 22rem);
    --cms-hero-brand-safe-zone: 0rem;
    --cms-hero-brand-pad-x: 0.55rem;
    --cms-hero-brand-pad-top: 0.35rem;
    --cms-hero-brand-pad-bottom: 0.55rem;
    --cms-hero-actions-max: min(100%, 14.5rem);
    --cms-hero-btn-min-h: 2.45rem;
    --cms-hero-btn-pad-y: 0.5rem;
    --cms-hero-btn-pad-x: 0.85rem;
    --cms-hero-btn-font: 0.78rem;
  }

  .cms-home-hero--banco:not([data-banner-fit]),
  .cms-home-hero--banco[data-banner-fit="cover"],
  .cms-home-hero--banco-alt:not([data-banner-fit]),
  .cms-home-hero--banco-alt[data-banner-fit="cover"] {
    aspect-ratio: auto;
    min-height: 250px;
    background-size: cover !important;
    background-position: center center !important;
  }

  .cms-home-hero--portal .cms-home-hero__portal-inner {
    justify-items: center;
    text-align: center;
    padding-top: 0.85rem;
  }

  .cms-home-hero--portal .cms-home-hero__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
    width: min(100%, var(--cms-hero-brand-max));
  }

  .cms-home-hero--portal .cms-home-hero__portal-actions {
    width: 100%;
    max-width: var(--cms-hero-actions-max);
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
  }

  .cms-home-hero--portal .cms-home-hero__portal-actions a {
    width: 100%;
  }

  .cms-home-hero--portal .cms-home-hero__kicker,
  .cms-home-hero--portal .cms-home-hero__title,
  .cms-home-hero--portal .cms-home-hero__tagline {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .cms-home-hero--portal .cms-home-hero__kicker {
    font-size: clamp(0.86rem, 3.1vw, 0.95rem);
    white-space: nowrap;
  }

  .cms-home-hero--portal .cms-home-hero__title {
    font-size: clamp(1.5rem, 6.2vw, 1.95rem);
    line-height: 1;
    white-space: nowrap;
  }

  .cms-home-hero--portal .cms-home-hero__tagline {
    max-width: 100%;
    font-size: clamp(0.62rem, 2.7vw, 0.72rem);
    white-space: nowrap;
  }

  .cms-home-hero--portal .cms-home-hero__brand {
    width: min(100%, var(--cms-hero-brand-max));
    transform: translate(0, calc((var(--brand-offset-y, 0px) * var(--cms-hero-offset-scale)) + 5px));
  }

  .cms-home-hero--banco .cms-home-hero__portal-inner--no-search .cms-home-hero__brand,
  .cms-home-hero--banco-alt .cms-home-hero__portal-inner--no-search .cms-home-hero__brand {
    grid-column: 1;
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
  }
}
