/* ═══════════════════════════════════════════════════════════
   HERO SLIDER — SATOSPOLIO
   Substitui a imagem única dentro de .hero-board-wrap por um
   slideshow de substituição (fade) com autoplay + paginação
   com barra de progresso, inspirado em meshcore.pt/pt/home.

   Não define tamanho/posição/sombra de .hero-board-wrap — isso
   já está definido em style.css/additions.css. Este ficheiro
   só preenche o espaço que esse contentor já ocupa.
   ═══════════════════════════════════════════════════════════ */

.hero-board-wrap {
  position: relative; /* necessário para a paginação absoluta */
  overflow: hidden;
}

.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
  width: 100%;
  height: 100%;
}

.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Paginação: pontos com barra de progresso no ativo ────── */
.hero-pagination {
  position: absolute;
  z-index: 10;
  top: 16px;
  right: 16px;
  left: auto;
  width: auto;
  display: flex;
  gap: 6px;
}

.hero-pagination .swiper-pagination-bullet {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
  opacity: 1;
  margin: 0;
  position: relative;
  overflow: hidden;
  transition: background .2s;
  cursor: pointer;
}

.hero-pagination .swiper-pagination-bullet-active {
  background: rgba(255,255,255,.35);
}

/* A "linha" que preenche o ponto ativo, sincronizada com o autoplay.
   A duração é definida via JS (--autoplay-duration) para acompanhar
   o delay real configurado no Swiper. */
.hero-pagination .swiper-pagination-bullet-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  transform: scaleX(0);
  animation: hero-progress var(--autoplay-duration, 5000ms) linear forwards;
}

@keyframes hero-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (max-width: 720px) {
  .hero-pagination { top: 10px; right: 10px; }
}
