/* ============================================
   JAYSHREE TECHNOSOFT — Premium White Preloader
   ============================================ */

/* Lock scroll while preloader is visible */
html.preloader-active {
  overflow: hidden;
}

/* Fullscreen Preloader Overlay */
#jst-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  will-change: opacity;
}

/* Hidden state triggered by JS */
#jst-preloader.preloader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Subtle top progress bar */
#jst-preloader .preloader-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #ef3139, #022d62);
  border-radius: 0 2px 2px 0;
  animation: preloader-bar 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  box-shadow: 0 0 12px rgba(239, 49, 57, 0.5);
}

@keyframes preloader-bar {
  0%   { width: 0%; }
  60%  { width: 75%; }
  90%  { width: 92%; }
  100% { width: 100%; }
}

/* Inner content wrapper */
#jst-preloader .preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: preloader-fadein 0.5s ease both;
}

@keyframes preloader-fadein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* GIF icon container — clean white card feel */
#jst-preloader .preloader-icon-wrap {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Subtle animated ring around icon */
#jst-preloader .preloader-icon-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #ef3139;
  border-right-color: rgba(239, 49, 57, 0.3);
  animation: preloader-spin 1.2s linear infinite;
}

#jst-preloader .preloader-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(2, 45, 98, 0.2);
  border-bottom-color: rgba(2, 45, 98, 0.2);
  animation: preloader-spin 2s linear infinite reverse;
}

@keyframes preloader-spin {
  to { transform: rotate(360deg); }
}

/* The actual GIF */
#jst-preloader .preloader-gif {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  display: block;
  position: relative;
  z-index: 1;
}

/* Brand name below icon */
#jst-preloader .preloader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#jst-preloader .preloader-brand-name {
  font-family: 'Archivo', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: #022d62;
  line-height: 1.2;
}

#jst-preloader .preloader-brand-name span {
  color: #ef3139;
}

#jst-preloader .preloader-brand-sub {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aab4c3;
}

/* Animated dots loader */
#jst-preloader .preloader-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

#jst-preloader .preloader-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef3139;
  animation: preloader-dot-bounce 1.4s ease-in-out infinite both;
}

#jst-preloader .preloader-dots span:nth-child(1) { animation-delay: 0s;    background: #ef3139; }
#jst-preloader .preloader-dots span:nth-child(2) { animation-delay: 0.16s; background: #c0392b; }
#jst-preloader .preloader-dots span:nth-child(3) { animation-delay: 0.32s; background: #022d62; }

@keyframes preloader-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* Thin separator line */
#jst-preloader .preloader-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #ef3139, #022d62);
  border-radius: 2px;
  opacity: 0.25;
}

/* Mobile adjustments */
@media (max-width: 576px) {
  #jst-preloader .preloader-icon-wrap {
    width: 110px;
    height: 110px;
  }
  #jst-preloader .preloader-gif {
    width: 82px;
    height: 82px;
  }
  #jst-preloader .preloader-brand-name {
    font-size: 17px;
  }
}
