/* Professional Preloader Styles for Hieroglyphics */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/home.jpg') no-repeat center center !important;
    background-size: cover !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: rgb(101, 101, 101);
}

.preloader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
    animation: logoFloat 2s ease-in-out infinite;
}

.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(39, 39, 39, 0.5));
}

.preloader-text {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: rgb(74, 74, 74);
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: textGlow 2s ease-in-out infinite alternate;
}

.preloader-tagline {
    font-size: 1rem;
    color: #272727;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInOut 3s ease-in-out infinite;
}

/* Loading Animation */
.loading-container {
    position: relative;
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #7d7d7d, #2c2c2c, #7d7d7d);
    border-radius: 2px;
    animation: loadingProgress 2.5s ease-in-out infinite;
    width: 100%;
    transform: translateX(-100%);
}

.loading-percentage {
    font-size: 0.9rem;
    color: #4a4a4a;
    margin-top: 1rem;
    font-weight: 500;
}

/* Spinning Elements */
.preloader-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border: 2px solid rgba(196, 129, 48, 0.2);
    border-top: 2px solid #6b6b6b;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.preloader-spinner::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

/* Floating Particles */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #3b3b3b;
    border-radius: 50%;
    animation: floatParticle 4s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    top: 80%;
    right: 10%;
    animation-delay: 1s;
}

.floating-particle:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(4) {
    top: 30%;
    right: 20%;
    animation-delay: 3s;
}

/* Animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 5px rgba(83, 83, 83, 0.5);
    }
    100% {
        text-shadow: 0 0 20px rgba(81, 81, 81, 0.8), 0 0 30px rgba(196, 129, 48, 0.6);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
    66% {
        transform: translateY(10px) scale(0.8);
        opacity: 0.8;
    }
}

/* Hide content while loading */
.content-hidden {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-visible {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preloader-logo {
        width: 80px;
        height: 80px;
    }

    .preloader-text {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .preloader-tagline {
        font-size: 0.9rem;
    }

    .loading-container {
        width: 150px;
    }

    .preloader-spinner {
        width: 120px;
        height: 120px;
    }
}
