/* ===== Depoimentos em pilhas animadas (AnimatedReviewCards) ===== */
.rstacks {
  display: grid;
  gap: 1.5rem;
}

.rstack {
  position: relative;
  height: 360px;
  outline: none;
}

.rcard {
  position: absolute;
  left: 0;
  bottom: 40px;
  width: calc(100% - 48px);
  height: 260px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 10px 30px -12px rgba(26, 26, 26, .18);
  transform-origin: center;
  /* entrada: sobe de baixo, menor e transparente */
  transform: translateY(100px) scale(.8);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  touch-action: pan-x; /* arrasto vertical é do card (como no original) */
  -webkit-user-select: none;
  user-select: none;
}
.rcard.is-front { cursor: grab; }
.rcard.is-front:active,
.rcard.is-dragging { cursor: grabbing; }
.rcard.is-dragging { transition: none; }
.rcard:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.rcard__body { position: relative; height: 100%; padding: 1.5rem; }

.rcard__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rcard__avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.rcard__name { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; }
.rcard__text { font-size: .92rem; color: #3a3a3a; }

.rcard__stars { position: absolute; left: 1.5rem; bottom: 1.5rem; display: flex; gap: 2px; }
.rcard__stars svg { width: 20px; height: 20px; fill: var(--orange); stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; }

/* ----- Brilho percorrendo a borda do card da frente (BorderBeam) ----- */
.rcard__beam {
  --size: 250;
  --duration: 12;
  --anchor: 90;
  --from: #FF6B35;
  --to: #FFC2A6;
  position: absolute;
  inset: 0;
  display: none;
  border: 1.5px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  mask: linear-gradient(transparent, transparent), linear-gradient(#fff, #fff);
  mask-clip: padding-box, border-box;
  mask-composite: intersect;
}
.rcard.is-front .rcard__beam { display: block; }
.rcard__beam::after {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  width: calc(var(--size) * 1px);
  background: linear-gradient(to left, var(--from), var(--to), transparent);
  offset-anchor: calc(var(--anchor) * 1%) 50%;
  offset-path: rect(0 auto auto 0 round calc(var(--size) * 1px));
  animation: border-beam calc(var(--duration) * 1s) infinite linear;
  animation-delay: -9s;
}
@keyframes border-beam { 100% { offset-distance: 100%; } }

/* Celular: uma pilha só (cada pilha já tem todos os depoimentos) */
@media (max-width: 767px) {
  .rstack:not(:first-child) { display: none; }
  .rcard { width: 100%; }
}

@media (min-width: 768px) {
  .rstacks { grid-template-columns: repeat(3, 1fr); }
}

/* Sem JS: cards visíveis, empilhados um embaixo do outro */
html:not(.js) .rstack { height: auto; display: grid; gap: 1rem; }
html:not(.js) .rcard { position: relative; bottom: auto; width: 100%; transform: none; opacity: 1; }
