/* Carrossel deslizável em modo central: o cartão do meio inteiro, os vizinhos menores e apagados nas bordas. */

/* clip em vez de hidden: os cartões fora da tela não deixam o anúncio rolar de lado (foco, clique) */
.anuncio {
  overflow: clip;
  background:
    var(--montanhas) bottom / 100% 64px no-repeat,
    radial-gradient(circle at 50% 45%, var(--floresta-clara), var(--floresta) 72%);
}

.topo {
  position: absolute;
  left: 12px;
  top: 10px;
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s backwards;
}

.titulo {
  position: absolute;
  left: 12px;
  top: 40px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s backwards;
}

.titulo em {
  font-style: normal;
  color: var(--verde);
}

/* Faixa do carrossel: ocupa a largura toda para o arraste começar em qualquer ponto */
.carrossel {
  position: absolute;
  left: 0;
  right: 0;
  top: 76px;
  height: 116px;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s backwards;
}

.carrossel.arrastando {
  cursor: grabbing;
}

/* Cada cartão parte do centro; o JS aplica translateX/scale/opacity conforme a distância */
.cartao {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 150px;
  height: 106px;
  margin-left: -75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 8px 0;
  border-radius: 14px;
  text-align: center;
  color: var(--floresta);
  background: var(--creme);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
}

.carrossel:focus-visible .cartao.atual {
  outline: 2px solid var(--verde);
  outline-offset: 2px;
}

.icone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--floresta);
}

.icone svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--verde);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icone .preenche {
  fill: var(--verde);
  stroke: none;
  opacity: 0.3;
}

/* Tampa a linha que passa por baixo (moeda da raspadinha) */
.icone .tampa {
  fill: var(--floresta);
}

.icone .pontinho {
  stroke-width: 2.8;
}

.cartao-nome {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cartao-texto {
  margin-top: 3px;
  max-width: 124px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  color: #4a6264;
  text-wrap: balance;
}

/* Dica sobre a borda de baixo do cartão central, escura para se destacar do cartão claro */
.deslize {
  position: absolute;
  left: 50%;
  top: 100px;
  color: var(--branco);
  background: var(--floresta);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  translate: -50% 0;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
}

.deslize.visivel {
  opacity: 1;
}

/* Setinha para a esquerda que vai e volta, como o dedo deslizando */
.deslize-seta {
  position: relative;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  color: var(--verde);
  background: currentColor;
  animation: vai-e-volta 1.2s ease-in-out infinite alternate;
}

.deslize-seta::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Faixa de baixo: pontos à esquerda, CTA à direita */
.rodape {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: surgir 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s backwards;
}

.pontos {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Botão maior que o ponto, para facilitar o toque */
.ponto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: width 0.3s ease;
}

.ponto::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.ponto.ativo {
  width: 21px;
}

.ponto.ativo::before {
  width: 16px;
  background: var(--verde);
}

@keyframes vai-e-volta {
  from {
    transform: translateX(3px);
  }
  to {
    transform: translateX(-3px);
  }
}
