/* ================================
   PRELOADER STYLES
   ================================ */

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0C5AB5 0%, #1a2332 100%);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-in-out;
}

.preloader-content {
  text-align: center;
  color: #ffffff;
}

/* Spinner Animation */
.spinner-container {
  margin-bottom: 30px;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Logo Styles */
.preloader-logo {
  margin-bottom: 20px;
}

.preloader-logo img {
  max-width: 150px;
  height: auto;
  opacity: 0.9;
}

/* Loading Text */
.loading-text {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.loading-text span {
  color: #ffffff;
}

/* Animated Dots */
.dots {
  display: flex;
  gap: 2px;
}

.dot {
  animation: blink 1.5s infinite;
  font-weight: bold;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.3s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes blink {

  0%,
  20% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  80%,
  100% {
    opacity: 0;
  }
}

/* Main Content Initial State */
.main-content {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Body Overflow Hidden During Loading */
body {
  overflow: hidden;
}

/* Alternative Spinner Designs (Optional) */
.spinner-alternative {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
}

/* Pulse Animation for Logo */
.preloader-logo img {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .spinner {
    width: 50px;
    height: 50px;
  }

  .preloader-logo img {
    max-width: 120px;
  }

  .loading-text {
    font-size: 16px;
    letter-spacing: 1px;
  }
}

@media screen and (max-width: 480px) {
  .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .preloader-logo img {
    max-width: 100px;
  }

  .loading-text {
    font-size: 14px;
  }
}

/* Advanced Loading Progress Bar (Optional) */
.progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 20px auto 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #0C5AB5);
  border-radius: 2px;
  animation: progress 3s ease-in-out infinite;
}

@keyframes progress {
  0% {
    width: 0%;
    transform: translateX(-100%);
  }

  50% {
    width: 100%;
    transform: translateX(0%);
  }

  100% {
    width: 100%;
    transform: translateX(100%);
  }
}