/**
 * Sticky Footer Implementation for TDY Helix Ultimate Template
 * Places footer at bottom of viewport on short pages
 * Without interfering with existing header and layout
 */

/* Only apply sticky footer styles, don't change colors or styling */
@media (min-width: 768px) {
    /* Ensure html and body can grow */
    html {
        height: 100%;
    }
    
    body.site {
        min-height: 100%;
        position: relative;
    }
    
    /* Main wrapper should take full height minus footer */
    .body-wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    /* Let main content grow */
    .body-innerwrapper {
        flex: 1;
    }
    
    /* Footer stays at bottom but doesn't interfere with sticky header */
    #sp-footer {
        margin-top: auto;
        /* Ensure footer stays below content */
        position: relative;
        z-index: 1;
    }
    
    /* Make sure sticky header stays on top */
    #sp-header.header-sticky,
    .sp-megamenu-wrapper,
    #offcanvas-toggler {
        z-index: 999 !important;
    }
}

/* For smaller screens, let footer flow naturally */
@media (max-width: 767px) {
    #sp-footer {
        position: relative;
    }
}