/* Loader Overlay */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

/* Gear Loader */
.gear-loader {
    position: relative;
    width: 120px;
    height: 120px;
}

.gear {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 2s linear infinite;
}

.gear svg {
    width: 100%;
    height: 100%;
    fill: #FFC107;
    filter: drop-shadow(0 0 15px rgba(255, 193, 7, 0.6));
}

/* Logo FPM en el centro */
.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.loader-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Animación de rotación */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Texto de carga */
.loader-text {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFC107;
    font-family: 'League Spartan', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 3px;
    white-space: nowrap;
}

/* Animación de puntos */
.loader-text::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}