/* Hero slider — stili scritti a mano, indipendenti dal CSS Tailwind compilato */

.hero-slider {
  position: relative;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* le slide sono impilate nella stessa cella: l'altezza la detta l'aspect-ratio dell'immagine */
.hero-slides {
  display: grid;
}

.hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slider.is-init .hero-slide {
  transition: none;
}

/* frecce */
.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  background: rgba(20, 20, 30, 0.35);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.hero-arrow--prev { left: 0.75rem; }
.hero-arrow--next { right: 0.75rem; }

.hero-arrow:hover { background: rgba(20, 20, 30, 0.6); }

.hero-slider:hover .hero-arrow,
.hero-slider:focus-within .hero-arrow {
  opacity: 1;
}

/* su touch niente hover: le frecce restano visibili ma discrete */
@media (hover: none) {
  .hero-arrow { opacity: 0.85; width: 2.25rem; height: 2.25rem; margin-top: -1.125rem; }
}

.hero-arrow svg { width: 1.1rem; height: 1.1rem; }

/* pallini sotto l'immagine */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.hero-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: currentColor;
  color: rgba(26, 45, 171, 0.25); /* klein con trasparenza */
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

/* area di tocco più grande senza cambiare l'aspetto */
.hero-dot::after {
  content: "";
  position: absolute;
  inset: -0.75rem -0.25rem;
}

.hero-dot:hover { color: rgba(26, 45, 171, 0.5); }

.hero-dot[aria-current="true"] {
  width: 1.75rem;
  color: #1a2dab;
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible {
  outline: 2px solid #1a2dab;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-arrow,
  .hero-dot { transition: none; }
}
