/* ========================================== */
/* PAGE LOADER STYLES */
/* ========================================== */

/* Loader overlay - covers entire page during load */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hide loader when page is loaded */
.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Logo container with animation */
.loader-logo-container {
    position: relative;
    width: 600px;
    height: auto;
    margin-bottom: 30px;
}

/* Bottom part (logo5_p1.png) - base layer */
#loader-logo-p1 {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* Top part (logo5_p2.png) - animated layer with pulse */
#loader-logo-p2 {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    animation: pulse 2s infinite ease-in-out;
}

/* Pulse animation for logo */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

/* Spinner */
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(242, 242, 228, 0.2);
    border-top-color: #D93829;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading text */
.loader-text {
    color: #F2F2E4;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 0.5s ease-in 0.5s forwards;
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .loader-logo-container {
        width: 450px;
        margin-bottom: 25px;
    }
    
    .loader-spinner {
        width: 45px;
        height: 45px;
        border-width: 4px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .loader-logo-container {
        width: 280px;
        margin-bottom: 20px;
    }
    
    .loader-spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    
    .loader-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .loader-logo-container {
        width: 220px;
        margin-bottom: 15px;
    }
    
    .loader-spinner {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }
    
    .loader-text {
        font-size: 0.9rem;
    }
}

/* Prevent scrolling while loader is active */
body.loading {
    overflow: hidden;
}
