/* ------------------------------------------------------------------
   fundacaosns.pt - home page quote slider (replaces Unite Revolution Slider)
   Pure CSS: no JavaScript, no extension. Loaded automatically by Astroid
   from templates/tz_jollyany/css/custom.css.
   4 slides x 5 s = 20 s cycle. To add/remove a slide, change the
   20s / 5s values and the nth-child delays below.
   ------------------------------------------------------------------ */
.fsns-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;              /* 1920 x 640, as the old slider */
  min-height: 340px;
  max-height: 640px;
  overflow: hidden;
  background: #e7e7e7;
}
.fsns-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fsns-hero-fade 20s infinite;
  animation-fill-mode: backwards;
}
.fsns-hero__slide:nth-child(1) { animation-delay: 0s; }
.fsns-hero__slide:nth-child(2) { animation-delay: 5s; }
.fsns-hero__slide:nth-child(3) { animation-delay: 10s; }
.fsns-hero__slide:nth-child(4) { animation-delay: 15s; }

@keyframes fsns-hero-fade {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  25%  { opacity: 1; }
  29%  { opacity: 0; }
  100% { opacity: 0; }
}

.fsns-hero__quote {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 1.4rem max(5%, calc((100% - 1140px) / 2)) 2.6rem;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.45) 70%, rgba(0,0,0,0));
  color: #fff;
  border: 0;
}
.fsns-hero__quote p {
  margin: 0 0 .5rem;
  max-width: 900px;
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  font-style: italic;
  color: #fff;
}
.fsns-hero__quote cite {
  font-style: normal;
  font-weight: 600;
  font-size: clamp(.85rem, 1.1vw, 1rem);
  letter-spacing: .03em;
  color: #fff;
}
.fsns-hero__quote cite::before { content: "\2014\00a0"; }

/* progress dots, in step with the slides */
.fsns-hero__dots {
  position: absolute;
  bottom: .9rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .5rem;
}
.fsns-hero__dots span {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: rgba(255,255,255,.45);
  animation: fsns-hero-dot 20s infinite;
  animation-fill-mode: backwards;
}
.fsns-hero__dots span:nth-child(1) { animation-delay: 0s; }
.fsns-hero__dots span:nth-child(2) { animation-delay: 5s; }
.fsns-hero__dots span:nth-child(3) { animation-delay: 10s; }
.fsns-hero__dots span:nth-child(4) { animation-delay: 15s; }
@keyframes fsns-hero-dot {
  0%        { background: rgba(255,255,255,.45); }
  1%, 26%   { background: #fff; }
  27%, 100% { background: rgba(255,255,255,.45); }
}

/* pause on hover so the quote can be read */
.fsns-hero:hover .fsns-hero__slide,
.fsns-hero:hover .fsns-hero__dots span { animation-play-state: paused; }

@media (max-width: 767px) {
  .fsns-hero { aspect-ratio: auto; height: 420px; }
}

/* visitors who ask for less motion see the first slide only */
@media (prefers-reduced-motion: reduce) {
  .fsns-hero__slide, .fsns-hero__dots span { animation: none; }
  .fsns-hero__slide:first-child { opacity: 1; }
  .fsns-hero__dots { display: none; }
}
