/* Loader.css — Premium Preloader */

:root {
  --teal-dark: #012026;
  --gold: #f7c50f;
  --white: #ffffff;
}

#loader-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #d0c30a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s;
  overflow: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: logoIn 0.8s ease-out;
  text-align: center;
}

.loader-logo {
  width: 140px; /* Ajuste para el logo animado */
  height: auto;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 20px rgba(247, 197, 15, 0.4));
  transition: transform 0.3s ease;
}

.loader-logo:hover {
  transform: scale(1.05);
}

.loader-text {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--white);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 15px;
  opacity: 0.8;
}

.loader-text span {
  animation: dotPulse 1.5s infinite;
}

/* Línea de carga decorativa y animada */
.loader-line {
  position: relative;
  width: 100px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  animation: lineSlide 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* ─────────────────────────────────────────
   ANIMACIONES
   ───────────────────────────────────────── */

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

@keyframes dotPulse {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes lineSlide {
  0% {
    left: -100%;
    width: 20%;
  }
  50% {
    left: 40%;
    width: 30%;
  }
  100% {
    left: 100%;
    width: 20%;
  }
}

/* Ocultar scrollbar mientras carga */
body.loading {
  overflow: hidden;
}

/* Clase para ocultar el loader con JS */
.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
