/* Seção 3: o que tem no guia. Um celular mostrando as páginas reais do guia rolando,
   ao lado dos três grupos do sumário em cartões. */

.abf-sumario__corpo {
  display: grid;
  gap: 40px;
  max-width: 1080px;
  margin: 48px auto 0;
}

/* O celular */
.abf-sumario__vitrine {
  position: relative;
  justify-self: center;
  text-align: center;
}

.abf-sumario__vitrine::before {
  content: "";
  position: absolute;
  inset: 8% -30% 12%;
  z-index: 0;
  background: radial-gradient(closest-side, rgb(255 216 79 / 0.22), transparent);
}

.abf-celular {
  --celular-largura: 220px;

  position: relative;
  z-index: 1;
  width: var(--celular-largura);
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  padding: 10px;
  background: #0a1d13;
  border: 1px solid rgb(242 246 241 / 0.18);
  border-radius: 38px;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);
}

.abf-celular__tela {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #d6ded8;
  border-radius: 29px;
}

.abf-celular__barra {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  background: #f2f4f1;
  color: #4a5a50;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  white-space: nowrap;
}

.abf-celular__barra span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.abf-celular__barra svg {
  flex: none;
  width: 12px;
  height: 12px;
  color: #c0392b;
}

.abf-celular__rolo {
  flex: 1;
  overflow: hidden;
}

.abf-celular__rolo img {
  width: 100%;
  animation: abf-sumario-rola 26s ease-in-out 1s infinite alternate;
}

.abf-celular:hover .abf-celular__rolo img {
  animation-play-state: paused;
}

.abf-sumario__legenda {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: var(--abf-texto-2);
  font-size: var(--abf-step-small);
}

/* Os três grupos */
.abf-sumario__grupos {
  display: grid;
  gap: 14px;
}

.abf-sumario__grupo {
  padding: 22px 20px;
}

.abf-sumario__grupo-nome {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 8px;
  background: rgb(255 216 79 / 0.12);
  color: var(--abf-amarelo);
  border-radius: 999px;
  font-family: var(--abf-face-titulo);
  font-size: var(--abf-step-body);
  font-weight: 800;
  line-height: 1.1;
}

.abf-sumario__grupo-nome svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.abf-sumario__itens {
  display: grid;
  margin: 8px 0 0;
}

.abf-sumario__item {
  padding: 14px 0;
}

.abf-sumario__item + .abf-sumario__item {
  border-top: 1px solid var(--abf-linha);
}

.abf-sumario__item dt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.abf-sumario__pagina {
  flex: none;
  padding: 2px 9px;
  background: rgb(242 246 241 / 0.08);
  color: var(--abf-texto-2);
  border-radius: 999px;
  font-size: var(--abf-step-small);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.abf-sumario__item dd {
  margin: 4px 0 0;
  color: var(--abf-texto-2);
  font-size: var(--abf-step-small);
  line-height: 1.5;
}

.abf-sumario__acao {
  width: 100%;
  margin-top: 6px;
}

@media (min-width: 768px) {
  .abf-celular {
    --celular-largura: 250px;
  }

  .abf-sumario__grupo {
    padding: 26px 28px;
  }

  .abf-sumario__acao {
    width: auto;
    justify-self: start;
  }
}

/* Desktop: celular parado à esquerda, sumário à direita */
@media (min-width: 1024px) {
  .abf-sumario__corpo {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    margin-top: 64px;
  }

  .abf-sumario__vitrine {
    position: sticky;
    top: 32px;
  }

  .abf-celular {
    --celular-largura: 280px;
  }
}

@keyframes abf-sumario-rola {
  0%,
  8% {
    transform: translateY(0);
  }

  92%,
  100% {
    transform: translateY(-62%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .abf-celular__rolo {
    overflow-y: auto;
  }

  .abf-celular__rolo img {
    animation: none;
  }
}
