/* ============================================
   AMBIKA ENTERPRISES - CUSTOM PAGE LOADER
   Premium 2026 Loading Animation
   ============================================ */

/* Loader Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1628 0%, #1a2f4a 50%, #0d1f35 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader, 9999);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loader Container */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Logo Animation */
.loader-logo {
    width: 120px;
    height: 120px;
    position: relative;
    animation: logoFloat 2s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(52, 152, 219, 0.5));
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* Glow Ring Around Logo */
.loader-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #3498db;
    border-right-color: #3498db;
    transform: translate(-50%, -50%);
    animation: ringRotate 1.5s linear infinite;
}

.loader-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: #e6a200;
    border-left-color: #e6a200;
    transform: translate(-50%, -50%);
    animation: ringRotate 2s linear infinite reverse;
}

@keyframes ringRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Company Name */
.loader-text {
    text-align: center;
}

.loader-company {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 4px;
    margin-bottom: 8px;
    opacity: 0;
    animation: textReveal 0.8s ease forwards 0.3s;
}

.loader-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #3498db;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: textReveal 0.8s ease forwards 0.5s;
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Bar */
.loader-progress {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #e6a200, #3498db);
    background-size: 200% 100%;
    border-radius: 4px;
    width: 0%;
    animation: progressFill 2s ease-out forwards, progressShimmer 1s linear infinite;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }

    30% {
        width: 30%;
    }

    60% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

@keyframes progressShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Loading Dots */
.loader-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    background: #3498db;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating Particles Background */
.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(52, 152, 219, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 4s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 0.5s;
    animation-duration: 5s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 4.5s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1.5s;
    animation-duration: 5.5s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 2s;
    animation-duration: 4s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 0.3s;
    animation-duration: 5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 0.8s;
    animation-duration: 4.2s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 1.2s;
    animation-duration: 5.2s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 1.8s;
    animation-duration: 4.8s;
}

.particle:nth-child(10) {
    left: 95%;
    animation-delay: 0.2s;
    animation-duration: 5.5s;
}

.particle:nth-child(even) {
    background: rgba(230, 162, 0, 0.5);
    width: 4px;
    height: 4px;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* Metal Sparks Effect */
.spark {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #3498db;
    animation: sparkle 2s ease-in-out infinite;
}

.spark:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.spark:nth-child(2) {
    top: 30%;
    left: 85%;
    animation-delay: 0.3s;
}

.spark:nth-child(3) {
    top: 60%;
    left: 10%;
    animation-delay: 0.6s;
}

.spark:nth-child(4) {
    top: 70%;
    left: 90%;
    animation-delay: 0.9s;
}

.spark:nth-child(5) {
    top: 80%;
    left: 50%;
    animation-delay: 1.2s;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .loader-logo {
        width: 100px;
        height: 100px;
    }

    .loader-logo::before {
        width: 120px;
        height: 120px;
    }

    .loader-logo::after {
        width: 140px;
        height: 140px;
    }

    .loader-company {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .loader-tagline {
        font-size: 12px;
    }

    .loader-progress {
        width: 220px;
    }
}