/*
  ExultarOne Home V2 — PATCH V34
  Estabilização cirúrgica de layout.

  IMPORTANTE:
  - Não altera regras globais da Home.
  - Não redefine .home-v2 .container-xxl globalmente.
  - Não altera Fragmentação, Solução, Produtos, Capacidades, Ecossistema,
    Métodos/Academy/Suporte, Clientes, Conteúdos, Contato ou Footer.
  - Escopo restrito a Hero, Hiperautomação, Jornada de Maturidade e modal.
*/

/* =========================================================
   1) HERO — restaura a geometria aprovada no desktop
   ========================================================= */
@media (min-width: 1200px) {
  .hero-v2 > .container-xxl {
    width: 100%;
    max-width: none;
    padding-left: 36px;
    padding-right: 36px;
  }

  .hero-v2-grid {
    grid-template-columns: minmax(650px, .92fr) minmax(660px, 1.08fr);
    gap: 2.25rem;
  }

  .hero-v2-copy {
    max-width: 700px;
  }

  .hero-v2-copy h1 {
    font-size: clamp(3.35rem, 3.65vw, 4rem);
    line-height: 1.015;
  }

  .hero-v2-lead {
    max-width: 650px;
  }

  .hero-v2 .home-v2-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: .78rem;
  }

  .hero-v2 .home-v2-actions .btn {
    min-width: 335px;
    text-align: center;
  }
}

@media (min-width: 1200px) and (max-width: 1439.98px) {
  .hero-v2-grid {
    grid-template-columns: minmax(570px, .9fr) minmax(570px, 1.1fr);
  }

  .hero-v2-copy {
    max-width: 660px;
  }

  .hero-v2-copy h1 {
    font-size: 3.35rem;
  }
}

/* =========================================================
   2) HIPERAUTOMAÇÃO — fundo destacado full-bleed
   ========================================================= */
.automation-demo-v2 {
  background:
    radial-gradient(circle at 7% 14%, rgba(255,107,26,.075), transparent 22%),
    radial-gradient(circle at 94% 18%, rgba(255,107,26,.055), transparent 24%),
    linear-gradient(180deg,#fff1e6 0%,#fff7f0 48%,#fff0e3 100%);
  border-top: 1px solid #f4dfcf;
  border-bottom: 1px solid #f1d8c6;
}

/* =========================================================
   3) JORNADA DE MATURIDADE — superfície de ponta a ponta
      sem alterar a paleta ou a geometria interna do conteúdo
   ========================================================= */
.maturity-v2 {
  padding: 2.15rem 0 2.35rem;
}

.maturity-v2 > .container-xxl {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.maturity-v2-shell {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: max(28px, calc((100vw - 1320px) / 2 + 28px));
  padding-right: max(28px, calc((100vw - 1320px) / 2 + 28px));
}

/* =========================================================
   4) MODAL — navegação na linha do título e sem rolagem
   ========================================================= */
.automation-demo-modal {
  padding: 1rem;
}

.automation-demo-modal-dialog {
  width: min(1180px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.automation-demo-modal-header {
  padding-right: 0;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex: 0 0 auto;
}

.automation-demo-modal-titleblock {
  min-width: 0;
}

.automation-demo-modal-titleblock > span {
  display: block;
  margin-bottom: .2rem;
}

.automation-demo-modal-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.automation-demo-modal-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  flex: 0 0 auto;
}

.automation-demo-modal-counter {
  min-width: 62px;
  text-align: center;
  color: rgba(255,255,255,.82);
  font-size: .8rem;
  font-weight: 850;
  white-space: nowrap;
}

.automation-demo-modal-close {
  position: static;
  flex: 0 0 38px;
}

.automation-demo-modal-nav {
  justify-self: auto;
  padding: .58rem .8rem;
  white-space: nowrap;
}

.automation-demo-modal-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 8.4rem);
  flex: 1 1 auto;
}

.automation-demo-modal-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  .automation-demo-modal-header {
    gap: .7rem;
  }

  .automation-demo-modal-header h2 {
    font-size: 1.35rem;
  }

  .automation-demo-modal-nav {
    padding: .5rem .62rem;
    font-size: .72rem;
  }
}

@media (max-width: 767.98px) {
  .maturity-v2-shell {
    padding-left: 22px;
    padding-right: 22px;
  }

  .automation-demo-modal {
    padding: .45rem;
  }

  .automation-demo-modal-dialog {
    width: 100%;
    max-height: calc(100vh - .9rem);
    padding: .8rem;
  }

  .automation-demo-modal-header {
    align-items: flex-start;
    gap: .55rem;
  }

  .automation-demo-modal-header h2 {
    max-width: 42vw;
    font-size: 1.05rem;
  }

  .automation-demo-modal-titleblock > span {
    font-size: .62rem;
  }

  .automation-demo-modal-controls {
    gap: .35rem;
  }

  .automation-demo-modal-nav {
    width: 34px;
    height: 34px;
    padding: 0;
    overflow: hidden;
    text-indent: -9999px;
    position: relative;
  }

  .automation-demo-modal-nav::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-indent: 0;
    font-size: 1.15rem;
    line-height: 1;
  }

  .automation-demo-modal-nav[data-automation-prev]::after {
    content: "←";
  }

  .automation-demo-modal-nav[data-automation-next]::after {
    content: "→";
  }

  .automation-demo-modal-counter {
    min-width: 44px;
    font-size: .7rem;
  }

  .automation-demo-modal-close {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .automation-demo-modal-player {
    max-height: calc(100vh - 6.4rem);
  }
}
