/* ====== Loader de página ====== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.logo-outline {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #d0d0d0;
  stroke-width: 8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.logo-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  fill: #216369; /* Verde azulado Sanyca */
  stroke: none;
  clip-path: inset(100% 0 0 0);
  animation: llenarLogo 2s ease-in-out infinite alternate;
}

@keyframes llenarLogo {
  0%   { clip-path: inset(100% 0 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

.loading-text {
  margin-top: 20px;
  font-size: 14px;
  font-weight: bold;
  color: #216369;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: parpadear 1.5s infinite;
}

@keyframes parpadear {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* Respeta usuarios que prefieren menos animación */
@media (prefers-reduced-motion: reduce) {
  .logo-fill { animation: none; clip-path: inset(0 0 0 0); }
  .loading-text { animation: none; }
}