/* ── SMOOTH BACK-TO-TOP ENGINE ── */

/* Force smooth scrolling for the whole page */
html {
  scroll-behavior: smooth !important;
}

/* Base state: Hidden at the top */
html body #back-to-top {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  
  width: 56px; 
  height: 56px;
  background-color: rgba(0, 162, 237, 0.9); 
  border-radius: 50%;
  
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  
  /* Standard transition for the fade in/out */
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease, background-color 0.3s ease;
}

/* Active state: Visible when scrolling */
html body #back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* The Grey Icon: Large and Metallic */
html body #back-to-top img {
  width: 100%;
  height: 100%;
  /* Zooms the grey circle to fill the blue circle */
  transform: scale(1.45); 
  filter: brightness(1.2); 
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* Hover effects: Glow and Float */
html body #back-to-top:hover {
  background-color: rgb(0, 162, 237);
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 162, 237, 0.6);
}

html body #back-to-top:hover img {
  transform: scale(1.55);
}