/* ===== PRELOADER STYLES ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F8FAFC; /* Using your neutral-light color */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Prevent scrolling while preloader is active */
body.preloader-active {
    overflow: hidden;
    height: 100vh;
}

.preloader-container {
    text-align: center;
    max-width: 600px;
    width: 90%;
    padding: 2rem;
}

/* Logo Animation */
.logo-animation {
    margin-bottom: 2.5rem;
    position: relative;
}

.logo-circle {
    position: relative;
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-circle svg circle {
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: logoDraw 2s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes logoDraw {
    0% {
        stroke-dashoffset: 226;
        transform: rotate(0deg);
    }
    50% {
        stroke-dashoffset: 113;
    }
    100% {
        stroke-dashoffset: 0;
        transform: rotate(360deg);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Loading Animation */
.loading-animation {
    margin: 2rem 0;
    position: relative;
    height: 120px;
}

/* Progress Rings */
.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    border-top-color: #00A878;
    animation: ringSpin 2s linear infinite;
}

.ring-2 {
    border-right-color: #1E6FD9;
    animation: ringSpin 2s linear infinite reverse;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.ring-3 {
    border-bottom-color: rgba(0, 168, 120, 0.5);
    animation: ringSpin 3s linear infinite;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

@keyframes ringSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Growth Bars */
.growth-bars {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    height: 40px;
    align-items: flex-end;
}

.growth-bar {
    width: 8px;
    background: linear-gradient(to top, #00A878, #1E6FD9);
    border-radius: 4px 4px 0 0;
    animation: growthWave 1.5s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 1s);
}

@keyframes growthWave {
    0%, 100% {
        height: 10px;
        opacity: 0.3;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
}

/* Loading Text */
.loading-text {
    margin-bottom: 2rem;
}

.company-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0A1E3C;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #00A878, #1E6FD9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

.company-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #5D6D7E;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 1rem 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00A878;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.loading-message {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    color: #5D6D7E;
    font-weight: 500;
    letter-spacing: 1px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Progress Indicator */
.progress-indicator {
    margin-top: 2rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-track {
    height: 4px;
    background: rgba(0, 168, 120, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.progress-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00A878, #1E6FD9);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressLoad 2s ease-in-out infinite;
}

@keyframes progressLoad {
    0%, 100% {
        width: 10%;
    }
    50% {
        width: 90%;
    }
}

.progress-percentage {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #1E6FD9;
    font-weight: 600;
    text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .preloader-container {
        padding: 1.5rem;
    }
    
    .logo-circle svg {
        width: 60px;
        height: 60px;
    }
    
    .company-name {
        font-size: 1.8rem;
    }
    
    .company-subtitle {
        font-size: 0.875rem;
    }
    
    .loading-animation {
        height: 100px;
    }
    
    .progress-ring {
        width: 80px;
        height: 80px;
    }
    
    .growth-bars {
        height: 30px;
    }
    
    .growth-bar {
        width: 6px;
    }
    
    @keyframes growthWave {
        0%, 100% {
            height: 8px;
        }
        50% {
            height: 30px;
        }
    }
}

@media (max-width: 480px) {
    .preloader-container {
        padding: 1rem;
        width: 95%;
    }
    
    .logo-circle svg {
        width: 50px;
        height: 50px;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
    
    .company-subtitle {
        font-size: 0.75rem;
    }
    
    .loading-animation {
        height: 80px;
        margin: 1.5rem 0;
    }
    
    .progress-ring {
        width: 60px;
        height: 60px;
    }
    
    .growth-bars {
        height: 25px;
        gap: 4px;
    }
    
    .growth-bar {
        width: 5px;
    }
    
    @keyframes growthWave {
        0%, 100% {
            height: 6px;
        }
        50% {
            height: 25px;
        }
    }
    
    .loading-message {
        font-size: 0.875rem;
    }
    
    .progress-indicator {
        max-width: 250px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .preloader-container {
        max-width: 700px;
    }
    
    .logo-circle svg {
        width: 100px;
        height: 100px;
    }
    
    .company-name {
        font-size: 2.5rem;
    }
    
    .company-subtitle {
        font-size: 1.125rem;
    }
    
    .loading-animation {
        height: 140px;
    }
    
    .progress-ring {
        width: 120px;
        height: 120px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .logo-circle,
    .ring,
    .growth-bar,
    .dot,
    .progress-fill,
    .company-name,
    .loading-message {
        animation: none !important;
    }
    
    .logo-circle svg circle {
        animation: none !important;
        stroke-dashoffset: 0;
    }
    
    .preloader.loaded {
        transition: opacity 0.3s ease;
    }
}

/* Print styles - hide preloader when printing */
@media print {
    .preloader {
        display: none !important;
    }
}