/* ============================================================
   Dynamic Loading - Prevents flash of static content (FOSC)
   Hide dynamic content sections until JS replaces them.
   ============================================================ */

/* Sections marked with .dynamic-content start hidden */
.dynamic-content {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Once JS marks them as loaded, fade in smoothly */
.dynamic-content.loaded {
    opacity: 1;
}

/* Fullscreen loading overlay shown before data arrives */
#dynamic-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease;
}

#dynamic-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#dynamic-loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #8b3eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#dynamic-loading-overlay .loading-text {
    margin-top: 16px;
    font-size: 15px;
    color: #666;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

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