/* Sticky Section Animations */
.cosmic-sticky-yes,
.has-cosmic-sticky {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.4s ease,
        opacity 0.5s ease,
        visibility 0.5s !important;
}

/* Force Sticky for Sections inside Header Builder */
.site-header-builder .cosmic-sticky-yes {
    position: sticky !important;
}

/* Support for Header Wrapper Sticky */
.has-cosmic-sticky {
    position: sticky !important;
    top: 0;
    z-index: 9999;
}

/* Hide on Scroll States */
.cosmic-sticky--hidden {
    opacity: 0;
    visibility: hidden;
}

.cosmic-sticky-anim-hide-down.cosmic-sticky--hidden {
    transform: translateY(-100%) !important;
}

.cosmic-sticky-anim-hide-up.cosmic-sticky--hidden {
    transform: translateY(100%) !important;
}

/* Smooth Stuck State Transitions */
.cosmic-sticky--stuck {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Ensure no conflicts with Elementor Editor */
.elementor-editor-active .cosmic-sticky-yes,
.elementor-editor-active .has-cosmic-sticky {
    position: static !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}