/* === GLOBAL FOOTER FIX PATCH === */

/* Base reset for footer positions */
footer,
footer.nembien-footer,
.fy-footer,
.bootscore-footer,
.site-footer {
    position: static !important;
    order: 999999 !important; /* Highest order - always last */
    margin-top: auto !important;
    z-index: auto !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Main page container as flex column to push footer to bottom */
body #page,
body .site,
body .wrap {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

/* Footer always at the end */
body #page > footer,
body .site > footer,
body .wrap > footer {
    margin-top: auto !important;
    order: 999999 !important; /* Highest order - always last */
    flex-shrink: 0 !important;
}

/* Safety: remove weird transforms / fixed positions on known classes */
footer[class*="fixed"],
footer[class*="sticky"] {
    position: static !important;
    bottom: auto !important;
    top: auto !important;
}

/* Debug class to visualize if footer gets broken */
footer.footer-debug-broken {
    outline: 2px dashed red !important;
}
