/* Scroll to top button */
body .scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  --btn-translate-x: -50%;
  --btn-translate-y: 20px;
  --btn-scale: 0.8;

  transform: translateX(var(--btn-translate-x)) translateY(var(--btn-translate-y)) scale(var(--btn-scale));
  width: 56px;
  height: 56px;
  background: rgba(20, 20, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--newsletter-border-radius);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  z-index: 50;
  transition: all var(--animation-duration-normal) var(--animation-easing-smooth);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  --btn-translate-y: 0;
  --btn-scale: 1;
}
.scroll-to-top-btn:hover {
  background: rgba(40, 40, 40, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  --btn-translate-y: -2px;
  --btn-scale: 1.05;

  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.scroll-to-top-btn svg {
  width: 24px;
  height: 24px;
  fill: currentcolor;
  transition: transform var(--animation-duration-fast) var(--animation-easing);
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 30%));
}
.scroll-to-top-btn.footer-overlap {
  bottom: calc(var(--footer-height, 80px) + 20px);
  transition: bottom var(--animation-duration-normal) var(--animation-easing);
}

@media (max-width: 640px) {
  body .scroll-to-top-btn {
    min-height: 44px !important;
    min-width: 44px ;
    width: 50px ;
    height: 50px ;
    bottom: var(--space-lg) !important;
    right: var(--space-md) !important;
    font-size: clamp(0.9rem, 3vw, 1rem) ;
    border-radius: 8px !important;
  }
}

@media (max-width: 480px) {
  body .scroll-to-top-btn {
    bottom: var(--space-md) !important;
    right: var(--space-sm) !important;
  }
}
