/**
 * Focel: Banner da campanha 2027 (carrossel)
 * ---------------------------------------------------------------------------
 * Três banners de largura total com foto de fundo, título branco e botão
 * âmbar (Produtividade com IA | Normas ISO | Orçamento 2027), trocando
 * sozinhos com transição suave. Setas nas laterais, bolinhas e pausa embaixo.
 * Comportamento: js/campanha-2027.js. Prefixo das classes: cp-
 * ---------------------------------------------------------------------------
 */

.cp-banner {
  --cp-ambar: #F2A93B;
  --cp-noite: #081F3F;
  --cp-focel: #0C3061;
  position: relative;
  overflow: hidden;
  background: var(--cp-noite);
  color: #fff;
}

/* só para leitores de tela e buscadores */
.cp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Banners empilhados (troca por esmaecimento) ---------- */

.cp-slides { display: grid; }
.cp-slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 74svh, 640px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms ease, visibility 0s linear 900ms;
}
.cp-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms ease, visibility 0s;
  z-index: 1;
}

.cp-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  transform: scale(1.06);
}
/* aproximação lenta da foto enquanto o banner está na tela */
.cp-slide.is-active .cp-slide-img { animation: cp-zoom 9s ease-out forwards; }
@keyframes cp-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }

/* azul Focel por cima da foto: forte à esquerda (texto), aberto à direita */
.cp-slide-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 31, 63, 0.94) 0%, rgba(12, 48, 97, 0.86) 38%, rgba(12, 48, 97, 0.35) 70%, rgba(12, 48, 97, 0.15) 100%);
}

.cp-slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: 64px 96px;
}
.cp-slide-copy { max-width: 620px; }

/* entrada do texto do banner ativo */
.cp-slide.is-active .cp-slide-copy > * { animation: cp-up 700ms cubic-bezier(0.22, 1, 0.36, 1) both 250ms; }
.cp-slide.is-active .cp-slide-copy > :nth-child(2) { animation-delay: 350ms; }
.cp-slide.is-active .cp-slide-copy > :nth-child(3) { animation-delay: 450ms; }
.cp-slide.is-active .cp-slide-copy > :nth-child(4) { animation-delay: 550ms; }
@keyframes cp-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Texto ---------- */

.cp-slide-tag {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--cp-ambar);
  color: var(--cp-noite);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cp-slide-title {
  margin: 0 0 18px;
  max-width: 19ch;
  font-family: var(--lp-font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  text-wrap: balance;
}
.cp-slide-text {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.cp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.cp-banner .cp-cta.btn {
  border: 2px solid var(--cp-ambar);
  background: var(--cp-ambar);
  color: var(--cp-noite);
  font-weight: 800;
  box-shadow: none;
}
.cp-banner .cp-cta.btn:hover {
  border-color: #F6BA5E;
  background: #F6BA5E;
  color: var(--cp-noite);
  transform: translateY(-1px);
}
.cp-banner .cp-more.btn {
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}
.cp-banner .cp-more.btn:hover { background: #fff; color: var(--cp-focel); border-color: #fff; }
.cp-banner .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Setas laterais ---------- */

.cp-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.cp-arrow svg { width: 24px; height: 24px; }
.cp-arrow:hover { background: #fff; color: var(--cp-focel); }
.cp-arrow:focus-visible, .cp-dot:focus-visible, .cp-pause:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.cp-arrow--prev { left: 16px; }
.cp-arrow--next { right: 16px; }
/* no meio da tela as setas ficariam em cima do texto */
@media (max-width: 1299px) {
  .cp-arrow { display: none; }
}

/* ---------- Bolinhas e pausa ---------- */

.cp-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cp-dot {
  position: relative;
  width: 40px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.cp-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 300ms ease, margin 300ms ease, background-color 300ms ease;
}
.cp-dot:hover::before { background: rgba(255, 255, 255, 0.85); }
.cp-dot.is-active::before { width: 32px; margin-left: -16px; background: var(--cp-ambar); }

.cp-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}
.cp-pause svg { width: 16px; height: 16px; }
.cp-pause:hover { background: rgba(255, 255, 255, 0.3); }
.cp-pause span { display: inline-flex; }
.cp-pause .cp-ico-play { display: none; }
.cp-pause[aria-pressed="true"] .cp-ico-pause { display: none; }
.cp-pause[aria-pressed="true"] .cp-ico-play { display: inline-flex; }

/* ---------- Celular ---------- */

@media (max-width: 767px) {
  .cp-slide { align-items: flex-end; min-height: 620px; }
  .cp-slide-shade {
    background: linear-gradient(180deg, rgba(8, 31, 63, 0.55) 0%, rgba(8, 31, 63, 0.88) 45%, rgba(8, 31, 63, 0.96) 100%);
  }
  .cp-slide-inner { padding-block: 120px 84px; }
  .cp-actions .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .cp-controls { bottom: 20px; }
}

/* ---------- Sem movimento ---------- */

@media (prefers-reduced-motion: reduce) {
  .cp-slide, .cp-slide.is-active { transition: none; }
  .cp-slide.is-active .cp-slide-img { animation: none; transform: none; }
  .cp-slide.is-active .cp-slide-copy > * { animation: none; }
}
