/* FGI Mali Core Scroll Animations */

.fgi-reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

.fgi-reveal-up {
    transform: translateY(40px);
}

.fgi-reveal-left {
    transform: translateX(-40px);
}

.fgi-reveal-right {
    transform: translateX(40px);
}

.fgi-reveal-scale {
    transform: scale(0.9) translateY(20px);
}

/* State when visible */
.fgi-reveal.is-visible {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
}

/* Floating Animation */
@keyframes fgiFloating {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.fgi-floating {
    animation: fgiFloating 6s ease-in-out infinite;
}

/* Parallax Helper */
.fgi-parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Decorative Background Elements */
.fgi-deco-bg {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    color: #000;
}

/* Staggering for lists/grids */
.fgi-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fgi-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Generate delay classes for staggering up to 12 items */
.fgi-stagger.is-visible > *:nth-child(1) { transition-delay: 0.1s; }
.fgi-stagger.is-visible > *:nth-child(2) { transition-delay: 0.2s; }
.fgi-stagger.is-visible > *:nth-child(3) { transition-delay: 0.3s; }
.fgi-stagger.is-visible > *:nth-child(4) { transition-delay: 0.4s; }
.fgi-stagger.is-visible > *:nth-child(5) { transition-delay: 0.5s; }
.fgi-stagger.is-visible > *:nth-child(6) { transition-delay: 0.6s; }
.fgi-stagger.is-visible > *:nth-child(7) { transition-delay: 0.7s; }
.fgi-stagger.is-visible > *:nth-child(8) { transition-delay: 0.8s; }

/* --- ELEMENTOR EDITOR OVERRIDES --- */
/* Force visibility of all revealed elements in the editor to allow easy editing */
.elementor-editor-active .fgi-reveal,
.elementor-editor-active .fgi-stagger,
.elementor-editor-active .fgi-stagger > *,
.elementor-edit-mode .fgi-reveal,
.elementor-edit-mode .fgi-stagger,
.elementor-edit-mode .fgi-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    visibility: visible !important;
}

/* Fallback for Tailwind dimensions in the editor if CDN fails or is slow */
.elementor-editor-active .w-full { width: 100% !important; }
.elementor-editor-active .h-full { height: 100% !important; }
.elementor-editor-active .min-h-\[90vh\] { min-height: 90vh !important; }
.elementor-editor-active .min-h-\[80vh\] { min-height: 80vh !important; }
.elementor-editor-active .min-h-\[70vh\] { min-height: 70vh !important; }
.elementor-editor-active .h-screen { height: 100vh !important; }
.elementor-editor-active .flex { display: flex !important; }
.elementor-editor-active .hidden { display: block !important; } /* Show hidden content (like tabs) for easier editing in some cases */
.elementor-editor-active .fgi-tab-content.hidden { display: none !important; } /* Keep tabs working if correctly managed by JS */

/* Ensure floating decorations don't get in the way too much but stay visible */
.elementor-editor-active .fgi-deco-bg {
    opacity: 0.1 !important;
}
