/* Page Loading Animation with Company Logo */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.page-loader-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.page-loader-content {
    text-align: center;
    color: white;
}

.logo-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: logoFloat 2s ease-in-out infinite;
}

.logo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: logoSpin 1.5s linear infinite;
}

.logo-ring:nth-child(2) {
    width: 90%;
    height: 90%;
    animation-delay: -0.3s;
    animation-duration: 2s;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    animation: textPulse 2s ease-in-out infinite;
}

.loading-subtext {
    font-size: 14px;
    opacity: 0.8;
    animation: textPulse 2s ease-in-out infinite 0.5s;
}

.progress-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff 0%, #bfdbfe 100%);
    border-radius: 2px;
    animation: progressFill 2s ease-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes progressFill {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Smooth page transitions */
.page-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.page-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation loading states */
.nav-loading {
    pointer-events: none;
    opacity: 0.7;
}

.nav-loading .navbar-brand,
.nav-loading .nav-link {
    position: relative;
    overflow: hidden;
}

.nav-loading .navbar-brand::after,
.nav-loading .nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .logo-container {
        width: 100px;
        height: 100px;
    }
    
    .logo-image {
        width: 70px;
        height: 70px;
    }
    
    .loading-text {
        font-size: 16px;
    }
    
    .progress-bar {
        width: 150px;
    }
}