#custom-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  flex-direction: column;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

#custom-preloader .preloader-content {
  text-align: center;
  width: 100%;
}

#custom-preloader .preloader-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
}

/* Por defecto se muestra el logo claro y se oculta el oscuro */
#custom-preloader .preloader-logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  #custom-preloader .preloader-logo-light {
    display: none;
  }
  #custom-preloader .preloader-logo-dark {
    display: inline-block;
  }
}

#custom-preloader .spl-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#custom-preloader .spl-dot,
#custom-preloader .spl-dot::before {
  box-sizing: border-box;
  border: none;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#custom-preloader .spl-dot {
  width: 22px;
  height: 22px;
  background-color: #030611;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: inline-block;
  animation: spl-pop 1.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

#custom-preloader .spl-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0076b6;
  border-radius: 50%;
  transform: scale(0);
  transform-origin: center;
  animation: spl-grow 1.4s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

#custom-preloader .spl-dot:nth-child(1),
#custom-preloader .spl-dot:nth-child(1)::before {
  animation-delay: 0s;
}
#custom-preloader .spl-dot:nth-child(2),
#custom-preloader .spl-dot:nth-child(2)::before {
  animation-delay: 0.28s;
}
#custom-preloader .spl-dot:nth-child(3),
#custom-preloader .spl-dot:nth-child(3)::before {
  animation-delay: 0.56s;
}
#custom-preloader .spl-dot:nth-child(4),
#custom-preloader .spl-dot:nth-child(4)::before {
  animation-delay: 0.84s;
}
#custom-preloader .spl-dot:nth-child(5),
#custom-preloader .spl-dot:nth-child(5)::before {
  animation-delay: 1.12s;
}

#custom-preloader .preloader-text {
  color: #030611;
  margin-top: 20px;
  font-size: 16px;
  font-family: sans-serif;
}

@keyframes spl-grow {
  0%, 100% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
}

@keyframes spl-pop {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@media (max-width: 768px) {
  #custom-preloader .spl-dot {
    width: 16px;
    height: 16px;
  }
}
