.scroll_to_top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 42px; /* ancho fijo inicial - solo el ícono */
  height: 42px;
  border-radius: 30px;
  background: #00AEC7;
  z-index: 1000;
  padding: 11px; /* padding uniforme para centrar el ícono */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.3s ease-in-out, padding 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scroll_to_top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 30px;
  background: #00AEC7;
  z-index: 1000;
  padding: 11px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scroll_to_top i {
  color: #FFF;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.32px;
  flex-shrink: 0;
}

.scroll_to_top span {
  color: #FFF;
  text-align: center;
  font-feature-settings: 'liga' off, 'clig' off;
  font-family: Lato;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
  opacity: 0;
  width: 0;
  overflow: hidden;
}


@media (min-width: 768px) {
  .scroll_to_top {
    transition: width 0.5s ease-in-out;
  }

  .scroll_to_top i {
    order: 2; /* ícono al final */
  }

  .scroll_to_top span {
    order: 1; /* texto al inicio */
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out;
  }

  /* Efecto hover solo en desktop */
  .scroll_to_top:hover {
    width: 170px;
    padding: 11px 20px;
  }

  .scroll_to_top:hover span {
    opacity: 1;
    width: auto;
    margin-right: 8px;
  }
}

@media (max-width: 768px) {
  .scroll_to_top {
    bottom: 300px;
  }

  .scroll_to_top span {
    display: none; /* ocultamos completamente el texto */
  }
}