/* Loading Optimization CSS */

/* Loading state styles */
body.loading {
    overflow: hidden;
}

#dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    transition: opacity 0.3s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Prevent layout shifts for sections */
.ac-section {
    min-height: 100px;
    contain: layout style paint;
    position: relative;
}

.ac-section_first {
    min-height: 200px;
    contain: layout style paint;
}

/* Font loading optimization */
.font-loading {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

.fonts-loaded .font-loading {
    opacity: 1;
}

/* Reserve space for dynamic content */
.content_area {
    min-height: 200px;
    contain: layout style paint;
}

/* Loading spinner styles */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Prevent layout shifts for images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Add specific height for first section to prevent layout shift */
.ac-section_first.clearfix {
    min-height: 300px;
    contain: layout style paint;
    position: relative;
} 