:root {
    --loader-bg: #ffffff;
    --loader-color: #0b1c63;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loader-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.logo-path {
    fill: transparent;
    stroke: var(--loader-color);
    stroke-width: 0.8;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: fill 0.4s ease;
}

/* Drawing Animation: 1.6s drawing + 0.4s fill = 2s total */
@keyframes drawLogo {
    0% {
        stroke-dashoffset: 1;
    }
    80% {
        stroke-dashoffset: 0;
        fill: transparent;
    }
    100% {
        stroke-dashoffset: 0;
        fill: var(--loader-color);
    }
}

.loader-active .logo-path {
    animation: drawLogo 2s ease-in-out forwards;
}

/* Optional: Pulse effect while loading */
.loader-svg {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
