/* === OVERLAY DE STORIES === */
.story-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .2s ease;
}
.story-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Viewer centralizado ocupando a tela */
.story-viewer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 10000; /* acima do blur e da barra */
}

/* A IMAGEM do story */
.story-viewer img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.story-viewer img.active {
  opacity: 1;
}

/* Botão de fechar */
#story-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 99999;
}

/* === BARRA DE PROGRESSO === */

.story-progress-bar {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
  z-index: 10001;
  border-radius: 999px;
}

.story-progress-bar .fill {
  height: 100%;
  width: 0%;
  background: #d11843;
  animation: none;            /* base sem animação */
}
.story-progress-bar.active .fill {
  width: 100%;
  transition: width 5s linear;
}

/* Zonas de clique (avançar/voltar) */
.story-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  z-index: 10002;
}
#story-left-zone { left: 0; }
#story-right-zone { right: 0; }

/* Botão fechar */
#story-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10003;
  background: transparent;
  color: #fff;
  font-size: 22px;
  border: 0;
  cursor: pointer;
}

@keyframes fillBar {
  from { width: 0%; }
  to   { width: 100%; }
}

/* === LISTAGEM DE STORIES / SWIPER === */
.stories-swiper {
  width: 100%;
  padding: 10px 0;
  overflow: hidden;
}

.stories-swiper .swiper-slide {
  width: 120px;
  height: 230px;
  flex-shrink: 0;
  border-radius: 15px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.stories-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Centraliza os stories no desktop */
@media (min-width: 1024px) {
  .stories-swiper {
    display: flex;
    justify-content: center;
  }

  .stories-swiper .swiper-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px; /* espaçamento entre cards */
  }
}

/* stories.css – respiro sutil nas bordas */
.stories-swiper {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: 8px; /* reduzido pra não deslocar */
  box-sizing: border-box;
}
/* Animação suave dos stories ao carregar */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stories-swiper .swiper-slide {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: fadeUp 0.6s ease forwards;
}

/* Cada slide entra com delay diferente */
.stories-swiper .swiper-slide:nth-child(1) { animation-delay: 0.1s; }
.stories-swiper .swiper-slide:nth-child(2) { animation-delay: 0.25s; }
.stories-swiper .swiper-slide:nth-child(3) { animation-delay: 0.4s; }

