/* Freccia con fluttuazione continua (onda sinusoidale) */
@keyframes bounce-freccia {
  from { transform: translateY(0); }
  to   { transform: translateY(-12px); }
}

.section-freccia {
  position: absolute;
  right: 2.5rem;
  top: 2.5rem;
  width: 74px;
  height: 100px;
  z-index: 10;
  opacity: 0.9;

  /* Trucco: alterna l’animazione avanti e indietro → diventa un’onda */
  animation: bounce-freccia 1.8s ease-in-out infinite alternate;

  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
  transition: filter 0.3s ease, opacity 0.3s ease;
  will-change: transform, opacity;
}

.section-freccia:hover {
  filter: drop-shadow(0 4px 14px rgba(231,76,60,0.22));
  opacity: 1;
}

@media (max-width: 900px) {
  .section-freccia {
    right: 1rem;
    top: 1rem;
    width: 38px;
    height: 56px;
  }
}

/* Scroll to Top Button - Fixed in bottom right */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 70px;
  height: 95px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

.scroll-to-top.visible {
  opacity: 0.9;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  opacity: 1;
  filter: drop-shadow(0 6px 18px rgba(231,76,60,0.3));
  transform: translateY(-3px);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

.scroll-to-top img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 900px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 68px;
  }
}
