/* ==========================================================================
   SCROLL TO TOP BUTTON
   ========================================================================== */

.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background-color: #F5A800;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(245, 168, 0, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050; /* Por encima de la navegación y footer, pero por debajo de modales (z-index 1055+) */
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Estados Hover y Focus */
.scroll-to-top:hover,
.scroll-to-top:focus {
  background-color: #DC9700;
  color: #ffffff;
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(245, 168, 0, 0.6);
}

/* Estado activo (al hacer clic) */
.scroll-to-top:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 168, 0, 0.5);
}

/* Estado visible tras scroll */
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Estilo del ícono SVG */
.scroll-to-top svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

/* Micro-animación en el ícono al pasar el mouse */
.scroll-to-top:hover svg {
  transform: translateY(-2px);
}

/* Adaptabilidad para dispositivos móviles */
@media (max-width: 767.98px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
  
  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}
