/* Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero/bg.jpg') center center/cover no-repeat;
    background-color: #161413;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transition: all 0.5s cubic-bezier(0.64, 0.14, 0.34, 1.32);
    box-sizing: border-box;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.4);
}

.preloader__logo {
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
    margin-bottom: 2rem;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 183, 81, 0.3));
}

.preloader__progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #ffb751, #ffce8f);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 183, 81, 0.5);
}

.preloader__items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.preloader__item {
    width: 14px;
    height: 14px;
    background: #decfbe;
    border-radius: 50%;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    animation: preloadItem 1.5s ease-in-out infinite;
    box-shadow: 0 0 5px rgba(255, 183, 81, 0.3);
}

.preloader__item:nth-child(1) {
    animation-delay: 0s;
}

.preloader__item:nth-child(2) {
    animation-delay: 0.2s;
}

.preloader__item:nth-child(3) {
    animation-delay: 0.4s;
}

.preloader__item:nth-child(4) {
    animation-delay: 0.6s;
}

.preloader__item:nth-child(5) {
    animation-delay: 0.8s;
}

.preloader__text {
    color: #bab2a8;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 0.875rem;
    margin-top: 1rem;
    opacity: 0.8;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Animations */
@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes preloadItem {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes preloadFadeOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* Loading state improvements */
.preloader__item.active {
    background: #ffb751;
    box-shadow: 0 0 10px rgba(255, 183, 81, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .preloader__logo {
        max-width: 150px;
        margin-bottom: 1.5rem;
    }
    
    .preloader__items {
        gap: 1rem;
    }
    
    .preloader__item {
        width: 12px;
        height: 12px;
    }
    
    .preloader__text {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .preloader__logo {
        max-width: 120px;
        margin-bottom: 1rem;
    }
    
    .preloader__items {
        gap: 0.75rem;
    }
    
    .preloader__item {
        width: 10px;
        height: 10px;
    }
}
