/* ============================================================
   HEA Zambia — Official Loading Screen System
   Matches online.hea.org.zm exact styling and animation
   ============================================================ */

.hea-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at 50% 42%, #0d489b 0%, #073477 55%, #031c44 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #ffffff;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.hea-loading-screen.hea-loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Ambient Background Particles ──────────────────────────── */
.hea-loader-bg-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(245, 158, 11, 0.45) 100%, transparent),
    radial-gradient(1.5px 1.5px at 85% 35%, rgba(255, 255, 255, 0.4) 100%, transparent),
    radial-gradient(2px 2px at 30% 75%, rgba(147, 197, 253, 0.4) 100%, transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(245, 158, 11, 0.35) 100%, transparent),
    radial-gradient(2px 2px at 50% 15%, rgba(255, 255, 255, 0.35) 100%, transparent),
    radial-gradient(1.5px 1.5px at 90% 70%, rgba(245, 158, 11, 0.3) 100%, transparent),
    radial-gradient(1.5px 1.5px at 10% 85%, rgba(255, 255, 255, 0.3) 100%, transparent),
    radial-gradient(2px 2px at 78% 18%, rgba(147, 197, 253, 0.45) 100%, transparent);
  animation: heaParticleDrift 20s linear infinite alternate;
}

@keyframes heaParticleDrift {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-15px) scale(1.02); }
}

/* ── Central Emblem Container ──────────────────────────────── */
.hea-loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.hea-loader-emblem-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer Orbit Rings */
.hea-loader-orbit-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(245, 158, 11, 0.7);
  border-right-color: rgba(59, 130, 246, 0.4);
  animation: heaSpinOrbit 6s linear infinite;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.2);
}

.hea-loader-orbit-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  animation: heaSpinOrbitRev 9s linear infinite;
}

/* Badge Icon on Orbit */
.hea-loader-orbit-badge {
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: #f59e0b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px #f59e0b;
}

.hea-loader-orbit-badge svg {
  width: 10px;
  height: 10px;
  fill: #1e3a8a;
}

/* Center Logo Disc */
.hea-loader-disc {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f1f5f9 85%, #cbd5e1 100%);
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(30, 64, 175, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: heaPulseDisc 3s ease-in-out infinite;
}

.hea-loader-disc img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes heaSpinOrbit {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes heaSpinOrbitRev {
  0%   { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes heaPulseDisc {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 35px rgba(30, 64, 175, 0.5); }
  50%      { transform: scale(1.025); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 50px rgba(245, 158, 11, 0.4); }
}

/* ── Headings ──────────────────────────────────────────────── */
.hea-loader-subhead {
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 26px;
  margin-bottom: 2px;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.hea-loader-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 800;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.5px;
  margin: 2px 0 6px 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hea-loader-motto {
  color: #93c5fd;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

/* ── 3 Animated Glowing Dots ───────────────────────────────── */
.hea-loader-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.hea-loader-dot {
  width: 7px;
  height: 7px;
  background-color: #f59e0b;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  animation: heaDotBounce 1.4s ease-in-out infinite both;
}

.hea-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.hea-loader-dot:nth-child(2) { animation-delay: -0.16s; }
.hea-loader-dot:nth-child(3) { animation-delay: 0s; }

@keyframes heaDotBounce {
  0%, 80%, 100% {
    transform: scale(0.65);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
    background-color: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 1);
  }
}

/* ── Progress Bar ──────────────────────────────────────────── */
.hea-loader-progress-wrap {
  width: 320px;
  max-width: 86vw;
  margin-bottom: 12px;
}

.hea-loader-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.hea-loader-status-text {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.hea-loader-percent {
  color: #f59e0b;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.hea-loader-track {
  width: 100%;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hea-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 60%, #10b981 100%);
  border-radius: 999px;
  transition: width 0.18s cubic-bezier(0.2, 0.8, 0.4, 1);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.85);
}

/* ── Bottom Quote / Tagline ────────────────────────────────── */
.hea-loader-quote {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11.5px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.2px;
  z-index: 2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
