/* Landing B2B — hero empresas + secções específicas */

:root {
  --empresas-blue: #4292d1;
  --empresas-blue-dark: #2d7ab8;
  /* Altura da pilha fixa (ícones sociais + barra de preço) — igual ao critical CSS */
  --empresas-sticky-stack-h: calc(45px + 0.65rem + 5.75rem + env(safe-area-inset-bottom, 0px));
}

/* ─── HERO EMPRESAS ─── */
body.page-empresas .hero.hero-empresas {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  min-height: var(--v5-hero-desktop-slide-h);
  align-items: stretch;
}

body.page-empresas .hero-empresas-slide {
  width: 100%;
  min-height: inherit;
}

body.page-empresas .hero-empresas-desktop {
  display: block;
}

body.page-empresas .hero-empresas-mobile {
  display: none;
}

body.page-empresas .hero-empresas-desktop .hero-desktop-stack {
  position: relative;
  width: 100%;
  height: var(--v5-hero-desktop-slide-h);
  min-height: 420px;
  overflow: hidden;
}

body.page-empresas .hero-empresas-desktop .hero-desktop-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

body.page-empresas .hero-empresas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 min(2rem, 4vw) 2rem min(2rem, 4vw);
  box-sizing: border-box;
  pointer-events: none;
}

body.page-empresas .hero-empresas-overlay > * {
  pointer-events: auto;
}

body.page-empresas .hero-empresas-card {
  background: var(--empresas-blue);
  margin-right: 6rem;
  color: #fff;
  border-radius: 0 0 22px 22px;
  padding: 4rem 2rem;
  max-width: min(360px, 42vw);
  width: 100%;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.22),
    0 18px 36px rgba(0, 0, 0, 0.28),
    0 32px 56px rgba(0, 0, 0, 0.18);
}

body.page-empresas .hero-empresas-card .hero-empresas-headline {
  margin: 0 0 1.25rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: left;
  color: #fff !important;
}

body.page-empresas .hero-empresas-card .hero-empresas-headline strong {
  font-weight: 700;
  color: #fff !important;
}

body.page-empresas .hero-empresas-bullets {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body.page-empresas .hero-empresas-bullets li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

body.page-empresas .hero-empresas-bullets li::before {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

body.page-empresas .hero-empresas-tagline {
  margin: 0;
  font-size: clamp(0.88rem, 1.3vw, 1rem);
  font-weight: 500;
  line-height: 1.55;
  opacity: 0.95;
  color: #fff;
}

body.page-empresas .hero-empresas-tagline strong {
  font-weight: 800;
  color: #fff;
}

/* Mobile hero — card sobre a imagem */
@media (max-width: 900px) {
  /*
   * Evita 100dvh: no mobile o dvh muda ao rolar (barra do browser) e o cover
   * recorta a foto de fundo de forma diferente. Altura = proporção da imagem (720×1280).
   */
  body.page-empresas .hero.hero-empresas {
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  body.page-empresas .hero-empresas-slide {
    min-height: 0;
  }

  body.page-empresas .hero-empresas-desktop {
    display: none !important;
  }

  body.page-empresas .hero-empresas-mobile {
    display: block !important;
    width: 100%;
  }

  body.page-empresas .hero-empresas-mobile-stack {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 720 / 1280;
    max-height: calc(100svh - var(--v5-navbar-h) - var(--v5-sticky-stack-h));
    overflow: hidden;
    background: #e8eef4;
    contain: layout style paint;
  }

  body.page-empresas .hero-empresas-mobile .hero-mobile-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    display: block;
    transform: translateZ(0);
  }

  body.page-empresas .hero-empresas-overlay-mobile {
    position: absolute;
    top: 0;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    pointer-events: none;
    padding: 0rem 1rem ;
  }

  body.page-empresas .hero-empresas-overlay-mobile > * {
    pointer-events: auto;
  }

  body.page-empresas .hero-empresas-card--top {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0 0 22px 22px;
    padding: 1rem 1rem 2rem 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }

  body.page-empresas .hero-empresas-card--top .hero-empresas-headline {
    font-size: 1.35rem;
    text-align: left;
    margin-bottom: 1rem;
  }

  body.page-empresas .hero-empresas-card--top .hero-empresas-bullets {
    margin-bottom: 1rem;
  }

  body.page-empresas .hero-empresas-card--top .hero-empresas-bullets li {
    font-size: 0.95rem;
  }

  body.page-empresas .hero-empresas-card--top .hero-empresas-tagline {
    text-align: left;
    margin-bottom: 0;
    font-size: 0.9rem;
  }
}

/* Grid benefícios 4 colunas */
.empresas-benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.7rem;
}

@media (max-width: 1024px) {
  .empresas-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .empresas-benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* RH section */
.empresas-rh-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.empresas-rh-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(10, 30, 54, 0.12);
}

.empresas-rh-visual img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* Desktop: foto com a mesma altura do bloco de texto */
@media (min-width: 901px) {
  .empresas-rh-wrap {
    display: flex;
    align-items: stretch;
    gap: 3rem;
  }

  .empresas-rh-visual,
  .empresas-rh-content {
    flex: 1 1 0;
    min-width: 0;
  }

  .empresas-rh-visual {
    position: relative;
    min-height: 0;
  }

  .empresas-rh-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
}

.empresas-rh-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.empresas-rh-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.empresas-rh-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.empresas-rh-check svg {
  width: 14px;
  height: 14px;
  stroke: var(--green-dark);
  stroke-width: 3;
  fill: none;
}

.empresas-rh-list h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--blue-dark);
  margin: 0 0 0.35rem;
}

.empresas-rh-list p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
}

/* Formulário orçamento */
.empresas-orcamento {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 5rem 1.5rem 5.5rem;
  position: relative;
  overflow: visible;
  scroll-margin-bottom: 7rem;
}

.empresas-orcamento-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.empresas-form-card {
  display: grid;
  grid-template-columns: 2fr 3fr;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.empresas-form-aside {
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 100%);
  color: #fff;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: stretch;
  min-height: min-content;
  overflow: visible;
}

.empresas-form-aside h3 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 1rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.empresas-form-aside > p {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
  opacity: 0.92;
  margin: 0 0 1.5rem;
}

.empresas-form-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.empresas-form-perks li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.empresas-form-perks li::before {
  content: '✓';
  font-weight: 800;
}

.empresas-form-body {
  padding: 2rem;
  width: 94%;
}

.empresas-form-body label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.empresas-form-body label .empresas-form-req {
  color: #e11d48;
  font-weight: 800;
}

.empresas-form-body input,
.empresas-form-body select,
.empresas-form-body textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(10, 30, 54, 0.15);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.empresas-form-body textarea {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.5;
}

.empresas-form-body input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.empresas-form-body input[type="number"]::-webkit-outer-spin-button,
.empresas-form-body input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Barra de preço: animação ease-out; oculta sem display:none (preserva transition) */
.page-empresas .sticky-bottom-stack {
  position: fixed;
}

.page-empresas .sticky-bar {
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease-out,
    visibility 0.45s ease-out;
  will-change: transform, opacity;
}

.page-empresas .sticky-bar.is-hidden-orcamento {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-empresas .sticky-bar:not(.is-hidden-orcamento) {
  position: relative;
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .page-empresas .sticky-bar {
    transition-duration: 0.01ms;
  }

  .page-empresas .sticky-bottom-stack .sticky-social-row {
    transition-duration: 0.01ms;
  }
}

/* Sem barra de preço: ícones sociais no rodapé da tela */
.page-empresas .sticky-bottom-stack.is-bar-hidden {
  gap: 0;
  justify-content: flex-end;
}

.page-empresas .sticky-bottom-stack .sticky-social-row {
  transition: margin-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-empresas .sticky-bottom-stack.is-bar-hidden .sticky-social-row {
  margin-bottom: 0;
  margin-right: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.empresas-form-body input:focus,
.empresas-form-body select:focus,
.empresas-form-body textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.empresas-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.empresas-form-msg {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.empresas-form-msg.is-visible.is-success {
  display: block;
  background: rgba(16, 185, 129, 0.12);
  color: var(--green-dark);
}

.empresas-form-msg.is-visible.is-error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.empresas-form-submit {
  width: auto;
  max-width: 100%;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

@media (max-width: 768px) {
  .empresas-orcamento {
    padding: 4.5rem 1rem 5rem;
  }

  .empresas-form-card {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .empresas-form-aside {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .empresas-form-aside h3 {
    font-size: clamp(1.2rem, 5.2vw, 1.5rem);
  }

  .empresas-form-body {
    width: 100%;
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .empresas-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Rodapé: botões legais em branco (links já herdavam regra global do footer) */
body.page-empresas footer.bg-gray-800 button {
  color: #fff !important;
}

body.page-empresas footer.bg-gray-800 button:hover {
  opacity: 0.9;
}

/*
 * Rodapé encosta na barra de preço: o padding do body vira fundo do footer
 * (evita faixa branca entre footer e sticky-bar).
 */
body.page-empresas.page-variante5 {
  padding-bottom: 0;
}

body.page-empresas footer.bg-gray-800 {
  padding-bottom: calc(var(--empresas-sticky-stack-h) + 1.5rem);
  margin-bottom: 0;
}

/* Banner de cookies acima da barra fixa na página empresas */
body.page-empresas.page-variante5 #cookie-banner {
  bottom: var(--empresas-sticky-stack-h) !important;
}

/* Badge navbar */
.navbar-badge-empresas {
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: rgba(66, 146, 209, 0.12);
  color: var(--empresas-blue-dark);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
