/* ------------------------------
   Back to Top Button
------------------------------ */

.back-to-top {
  position: fixed !important;
  bottom: 30px;
  right: 30px;
  width: 50px !important;
  height: 50px;
  max-width: none !important;
  background: rgba(179, 18, 23, 0.9);
  border: 2px solid rgba(179, 18, 23, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(179, 18, 23, 0.4);
}

.back-to-top i {
  color: var(--fg);
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.back-to-top:hover i {
  transform: translateY(-3px);
}

/* Animation when scrolling */
.back-to-top.pulse {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .back-to-top i {
    font-size: 1.1rem;
  }
}

/* Accessibility */
.back-to-top:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.back-to-top:active {
  transform: translateY(-2px) scale(0.95);
}
