/* Custom Preloader Styles for PT Surya Mas Perkasa */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F3F2;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    position: relative;
}

.construction-loader {
    position: relative;
}

/* Logo Wrapper */
.logo-wrapper {
    margin-bottom: 30px;
    animation: logoFade 1.5s ease-in-out infinite;
}

.loading-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(1.1);
}

/* Building Animation */
.building-animation {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 80px;
}

.building-blocks {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.block {
    width: 20px;
    background: linear-gradient(to top, #F84E1D, #ff6b3d);
    border-radius: 3px 3px 0 0;
    animation: buildingGrow 1.2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(248, 78, 29, 0.3);
}

.block-1 {
    height: 40px;
    animation-delay: 0s;
}

.block-2 {
    height: 60px;
    animation-delay: 0.2s;
}

.block-3 {
    height: 50px;
    animation-delay: 0.4s;
}

.block-4 {
    height: 70px;
    animation-delay: 0.6s;
}

/* Loading Text */
.loading-text {
    margin-top: 30px;
}

.loading-text h3 {
    color: #141416;
    font-family: 'Gantari', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Spinner Circle */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.spinner-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(248, 78, 29, 0.15);
    border-top-color: #F84E1D;
    animation: spinnerRotate 1s linear infinite;
    position: relative;
}

.spinner-sector {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.loading-percentage {
    color: #141416;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

/* Animations */
@keyframes logoFade {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes buildingGrow {
    0%, 100% {
        transform: scaleY(1);
        opacity: 1;
    }
    50% {
        transform: scaleY(0.6);
        opacity: 0.7;
    }
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-logo {
        max-width: 150px;
    }
    
    .loading-text h3 {
        font-size: 20px;
    }
    
    .spinner-circle {
        width: 50px;
        height: 50px;
    }
    
    .building-blocks {
        gap: 6px;
    }
    
    .block {
        width: 16px;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        max-width: 120px;
    }
    
    .loading-text h3 {
        font-size: 18px;
    }
    
    .spinner-circle {
        width: 45px;
        height: 45px;
    }
    
    .building-animation {
        height: 60px;
    }
    
    .block-1 { height: 30px; }
    .block-2 { height: 45px; }
    .block-3 { height: 38px; }
    .block-4 { height: 52px; }
}

