/* ==========================================================================
   FIBER Z TELECOM - GLOBAL PAGE TRANSITION LOADER
   ========================================================================== */

.fiberz-global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #46549F; /* Azul oscuro premium corporativo */
  background-image: radial-gradient(circle at center, rgba(69, 86, 168, 0.4) 0%, #0e122b 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fiberz-global-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-logo {
  width: 180px;
  height: auto;
  position: relative;
  z-index: 2;
  animation: logoPulse 2s infinite ease-in-out;
}

/* Anillo animado giratorio alrededor o detrás del logo */
.loader-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #eeea60; /* Amarillo corporativo */
  border-bottom-color: rgba(69, 86, 168, 0.8);
  animation: ringSpin 1.5s linear infinite;
  z-index: 1;
}

.loader-ring::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-left-color: rgba(255, 255, 255, 0.5);
  animation: ringSpin 2s linear infinite reverse;
}

.loader-text {
  margin-top: 50px;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: textFade 1.5s infinite ease-in-out;
}

@keyframes logoPulse {
  0% { transform: scale(0.95); opacity: 0.9; filter: drop-shadow(0 0 10px rgba(69, 86, 168, 0.5)); }
  50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 25px rgba(238, 234, 96, 0.6)); }
  100% { transform: scale(0.95); opacity: 0.9; filter: drop-shadow(0 0 10px rgba(69, 86, 168, 0.5)); }
}

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

@keyframes textFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Asegurar que el scroll se oculte mientras carga para evitar rebotes extraños */
body.loading-active {
  overflow: hidden !important;
}
