/* ── Back to Top ─────────────────────────────────────────────── */

.back-to-top-wrap {
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  position: sticky;
  bottom: 40px;
  z-index: 100;
  margin: 0 220px;
}

.back-to-top {
  position: sticky;
  bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 20px;
  background-color: var(--primary-red);
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  animation: fadeInUp 0.6s ease;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.back-to-top svg,
.back-to-top i {
  stroke: var(--white);
  width: 20px;
  height: 20px;
}

@media (max-width: 962px) {
  .back-to-top-wrap {
    margin: 0 10px;
    bottom: 10px;
  }
}

@media (max-width: 768px) {
  .back-to-top-wrap {
    margin: 0 10px;
    bottom: 30px;
  }
}

@media (max-width: 640px) {
  .back-to-top-wrap {
    margin: 0 10px;
    bottom: 30px;
  }
  .back-to-top.is-visible {
    margin-right: 0;
  }
  .back-to-top {
    margin-right: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
