/* ============================================================
   PAGE LOADER — Stephanie Leathers Real Estate
   ============================================================ */

#page-loader {
  position: fixed;
  inset: 0;
  background: #1A2332;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  will-change: opacity;
}

#page-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  animation: loaderFadeIn 0.5s ease forwards;
}

.loader-logo {
  margin-bottom: 2.5rem;
  animation: logoPulse 2s ease-in-out infinite;
}

.loader-logo img {
  max-width: 220px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* Animated dots */
.loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.loader-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2D8B8C;
  display: inline-block;
  animation: dotBounce 1.4s ease-in-out infinite both;
}

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

.loader-tagline {
  color: rgba(201, 169, 110, 0.8);
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
  animation: taglineFade 2s ease-in-out infinite alternate;
}

/* Keyframes */
@keyframes loaderFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);     }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1);    opacity: 0.9; }
  50%       { transform: scale(1.04); opacity: 1;   }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0);   opacity: 0.3; }
  40%            { transform: scale(1.2); opacity: 1;   background: #C9A96E; }
}

@keyframes taglineFade {
  from { opacity: 0.5; }
  to   { opacity: 1;   }
}

/* Progress bar at top */
#page-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2D8B8C, #C9A96E, #2D8B8C);
  background-size: 200% 100%;
  animation: progressBar 1.5s linear infinite;
  width: 100%;
}

@keyframes progressBar {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
