/* ==================== PAGE LOADER STYLES ==================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Logo Animation - Hidden */
.loader-logo {
    display: none;
}

/* Spinner Container */
.loader-spinner {
    position: relative;
    width: 100px;
    height: 100px;
}

/* Main Spinner Ring */
.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #0d5ba8;
    border-right-color: #a8d5ff;
    border-radius: 50%;
    animation: spinRotate 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: #a8d5ff;
    border-right-color: #5b9bd5;
    animation-duration: 2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #5b9bd5;
    border-right-color: #0d5ba8;
    animation-duration: 1s;
}

@keyframes spinRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Center Dot */
.spinner-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #0d5ba8;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
}

/* Loading Text */
.loader-text {
    margin-top: 40px;
    color: #0d5ba8;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 2px;
    animation: textFade 2s ease-in-out infinite;
}

@keyframes textFade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Animated Dots */
.loader-dots {
    display: inline-block;
}

.loader-dots span {
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bar */
.loader-progress {
    position: absolute;
    bottom: 60px;
    width: 300px;
    height: 4px;
    background: rgba(13, 91, 168, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d5ba8, #a8d5ff, #5b9bd5);
    background-size: 200% 100%;
    animation: progressMove 1.5s linear infinite;
    width: 60%;
}

@keyframes progressMove {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(250%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loader-spinner {
        width: 80px;
        height: 80px;
    }

    .loader-text {
        font-size: 16px;
    }

    .loader-progress {
        width: 80%;
    }
}