/* ========================================
   PRELOADER - Moderno e Fluido
   ======================================== */

.page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A6AFF 0%, #0D4FB8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Logo Container */
.preloader-content {
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

/* Logo Animation */
.preloader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Logo originale a colori */
}

/* Testo sotto il logo */
.preloader-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 15px;
    letter-spacing: 0.5px;
    animation: fadeIn 1s ease-in-out infinite alternate;
}

/* Spinner rotante sotto il testo */
.preloader-spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animazioni */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-logo {
        width: 90px;
        height: 90px;
    }
    
    .preloader-text {
        font-size: 1rem;
    }
    
    .preloader-spinner {
        width: 35px;
        height: 35px;
    }
}
