.pulse {
  position: fixed;
  text-align: center;
  padding: 20px;
  border-radius: 50%;
  background: rgb(8, 219, 0);
  width: 80px;
  height: 80px;
  right: 20px;
  bottom: 20px;
}
.pulse a {
  cursor: pointer;
  z-index: 1000;
}
.pulse p {
  z-index: 1;
}
.pulse::before {
  content: "";
  position: fixed;
  border: 2px solid rgb(177, 135, 135);
  opacity: 0;
  right: 0;
  top: -20px;
  bottom: -20px;
  border-radius: 50%;
  animation: pulse 2.5s linear infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.pulse::after,
.pulse::before {
  content: "";
  position: absolute;
  border: 5px solid rgb(38, 173, 4);
  left: -20px;
  opacity: 0;
  right: -20px;
  top: -20px;
  bottom: -20px;
  border-radius: 50%;
  animation: pulse 2.5s linear infinite;
}

.pulse::after {
  animation-delay: 1.25s;
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  text-align: center;
  padding: 20px;
  border-radius: 50%;
  background: #fff;
  width: 45px;
  height: 45px;
  right: 35px;
  bottom: 110px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.scroll-to-top:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.scroll-to-top a {
  cursor: pointer;
  z-index: 1000;
  text-decoration: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.scroll-to-top span {
  font-size: 20px;
  font-weight: bold;
  color: #000;
}

/* Mobile: always show buttons */
@media (max-width: 767px) {
  .pulse,
  .scroll-to-top {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Hide pulse and scroll-to-top initially on desktop */
@media (min-width: 768px) {
  .pulse,
  .scroll-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
  }

  .pulse.visible,
  .scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
  }
}
