/* Loader Container */
#preloader {
  position: fixed;
  inset: 0;
  background: #002e5b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

/* Fade-out effect */
#preloader.fade-out {
  opacity: 0;
}

/* Spinning + Zooming Logo */
#loader-logo {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  animation: spinZoom 2.5s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

/* Combined Spin + Zoom */
@keyframes spinZoom {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.85;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

/* Progress bar under the logo */
.loader-bar {
  width: 150px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
}

.loader-bar::before {
  content: '';
  position: absolute;
  height: 100%;
  width: 60%;
  background: #ffffff;
  animation: loadBar 1.8s infinite ease-in-out;
  border-radius: 4px;
}

@keyframes loadBar {
  0% {
    left: -60%;
  }
  50% {
    left: 20%;
    width: 80%;
  }
  100% {
    left: 100%;
    width: 60%;
  }
}
