:root {
  --back-to-top-bottom: 1.25rem;
  --back-to-top-right: 1.25rem;
}
.back-to-top-button {
  position: fixed;
  right: var(--back-to-top-right);
  bottom: var(--back-to-top-bottom);
  z-index: 1080;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  background: rgba(2, 6, 23, 0.92);
  color: #e2e8f0 !important;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.back-to-top-button:hover,
.back-to-top-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(8, 47, 73, 0.96);
  border-color: rgba(103, 232, 249, 0.55);
  outline: none;
}

.back-to-top-button::before {
  content: "↑";
  font-size: 1rem;
  line-height: 1;
}

/* Hide any legacy back-to-top blocks if they still render somewhere. */
#back-top {
  display: none !important;
}

@media (max-width: 767px) {
  :root {
    /* Leave room for the WhatsApp widget in the bottom-right corner. */
    --back-to-top-bottom: 5.25rem;
    --back-to-top-right: 1rem;
  }

  .back-to-top-button {
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
  }
}
