/* Preloader Styles */
#custom-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

#custom-preloader.loaded {
  transform: translateY(-100%);
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo-img {
  height: 80px;
  width: auto;
  opacity: 0;
  animation: logoFadeIn 1s ease forwards, logoFloat 3s ease-in-out infinite;
}

.loader-text-wrapper {
  overflow: hidden;
  font-family: "Onest", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #0b1e3b;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  gap: 10px;
}

.word-relay {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: textReveal 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.word-relay:nth-child(1) {
  animation-delay: 0.3s;
  color: #0b1e3b;
}
.word-relay:nth-child(2) {
  animation-delay: 0.5s;
  color: #008080;
}
.word-relay:nth-child(3) {
  animation-delay: 0.7s;
  color: #0b1e3b;
}

.loader-progress-bar {
  width: 200px;
  height: 3px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-top: 15px;
  overflow: hidden;
  opacity: 0;
  animation: fadeInBar 0.5s ease 1s forwards;
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #008080 0%, #e85d36 100%);
  animation: loadProgress 2.5s ease-in-out forwards;
}

/* KEYFRAMES */
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInBar {
  to {
    opacity: 1;
  }
}

@keyframes loadProgress {
  0% {
    width: 0%;
  }
  40% {
    width: 30%;
  }
  80% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

body.preloader-active {
  overflow: hidden;
}
/* =====================================
      Responsive Preloader Styles
===================================== */

@media screen and (max-width: 991px) {
  .loader-logo-img {
    height: 70px;
  }
  .loader-text-wrapper {
    font-size: 20px;
  }
}

@media screen and (max-width: 767px) {
  .loader-logo-img {
    height: 60px;
  }

  .loader-text-wrapper {
    font-size: 18px;
    gap: 8px;
  }

  .loader-progress-bar {
    width: 160px;
  }
}

@media screen and (max-width: 479px) {
  .loader-content {
    gap: 15px;
  }

  .loader-logo-img {
    height: 50px;
  }

  .loader-text-wrapper {
    font-size: 16px;
    gap: 5px;
    flex-direction: row;
  }

  .word-relay {
    margin: 0 2px;
  }

  .loader-progress-bar {
    width: 140px;
    margin-top: 10px;
  }
}
