/* Preloader – Modern Design with Advanced Gradients & Animations */
/* Color Palette: #192b4a (dark blue), #00897b (teal), #d4af37 (gold), #1a3a52 (accent) */

/* Modern backdrop with animated gradient */
.preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f1e35 0%, #192b4a 25%, #1a3a52 50%, #122837 75%, #0a1220 100%);
    background-size: 400% 400%;
    animation: preloader-bg-shift 8s ease-in-out infinite;
    z-index: 99999;
    box-shadow: none;
    backdrop-filter: blur(2px);
}

.preloader .cssload-speeding-wheel {
    position: absolute;
    top: calc(50% - 3.5px);
    left: calc(50% - 3.5px);
}

.preloader .cssload-speeding-wheel {
    position: absolute;
    top: calc(50% - 3.5px);
    left: calc(50% - 3.5px);
}

/* Modern glass-morphism card with enhanced visual effects */
.preloader .box_section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    position: relative;
    padding: 1.5rem 1.85rem 1.6rem;
    background: linear-gradient(160deg, rgba(25, 43, 74, 0.55) 0%, rgba(25, 43, 74, 0.25) 70%, rgba(0, 137, 123, 0.08) 100%);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: 
        0 0 30px rgba(0, 137, 123, 0.15) inset,
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(212, 175, 55, 0.1);
    animation: preloader-float 4s ease-in-out infinite;
}

/* Animated dual-color gradient ring with smooth rotation */
.preloader .box_section::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    border: 2.5px solid transparent;
    border-top-color: #00897b;
    border-right-color: rgba(0, 137, 123, 0.7);
    border-bottom-color: #d4af37;
    border-left-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(45deg, transparent 50%, rgba(0, 137, 123, 0.05) 100%);
    box-shadow: 0 0 15px rgba(0, 137, 123, 0.2);
    animation: preloader-spin 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.preloader .box_section::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    border: 1.5px solid rgba(212, 175, 55, 0.2);
    pointer-events: none;
    box-shadow: 
        0 0 20px rgba(0, 137, 123, 0.25),
        inset 0 0 20px rgba(0, 137, 123, 0.05);
    animation: preloader-pulse-glow 3s ease-in-out infinite;
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes preloader-pulse-glow {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(0, 137, 123, 0.25),
            inset 0 0 20px rgba(0, 137, 123, 0.05);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(0, 137, 123, 0.4),
            inset 0 0 35px rgba(0, 137, 123, 0.12);
    }
}

@keyframes preloader-bg-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modern logo container with glassmorphism and smooth transitions */
.preloader .image_box {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animated gradient divider line below logo */
.preloader .image_box::after {
    display: none;
}

/* Modern logo with smooth animations and enhanced rendering */
.preloader .site_logo {
    width: 54px;
    height: auto;
    max-width: 68px;
    display: block;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: brightness(1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: preloader-logo-pulse 3s ease-in-out infinite;
}

.preloader .image_box:hover .site_logo {
    transform: scale(1.08) rotate(-2deg);
    filter: brightness(1.05);
}

/* Animated separator line above progress bar */
.preloader .img_filter::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    width: 56px;
    height: 1.5px;
    margin-bottom: 0.6rem;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 137, 123, 0.4) 25%, rgba(212, 175, 55, 0.4) 75%, transparent 100%);
    border-radius: 2px;
    animation: preloader-line-shimmer 2.5s ease-in-out infinite;
}

/* Modern gradient progress bar with smooth animation */
.preloader .img_filter {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    width: 90px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(0, 137, 123, 0.2) 0%, rgba(0, 137, 123, 0.35) 50%, rgba(212, 175, 55, 0.2) 100%);
    overflow: hidden;
    z-index: 1;
    border: none;
    box-shadow: 0 0 15px rgba(0, 137, 123, 0.15) inset;
}

.preloader .img_filter::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    border-radius: 4px;
    background: linear-gradient(90deg, #00897b 0%, #00bb8c 40%, #d4af37 100%);
    box-shadow: 0 0 15px rgba(0, 137, 123, 0.5);
    animation: preloader-shine 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Additional modern animations */
@keyframes preloader-line-shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes preloader-logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes preloader-shine {
    0%   { left: -50%; }
    100% { left: 100%; }
}
