/**
 * Header & Footer Builder CSS
 */

/* Custom Header Container */
.viozzo-custom-header {
    position: relative;
    z-index: 9998;
    width: 100%;
    /* Fixed positioning is handled by .modern-header inside */
}

/* Custom Footer Container */
.viozzo-custom-footer {
    position: relative;
    width: 100%;
    margin-top: auto;
}

/* Hide default theme header/footer when using custom ones */
body.using-viozzo-header .site-header,
body.using-viozzo-header #site-header,
body.using-viozzo-header #masthead,
body.using-viozzo-header header.header,
body.using-viozzo-header .header,
body.using-viozzo-header header.site-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.using-viozzo-footer .site-footer,
body.using-viozzo-footer #site-footer,
body.using-viozzo-footer #colophon,
body.using-viozzo-footer footer.footer:not(.viozzo-custom-footer footer),
body.using-viozzo-footer footer.site-footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Elementor compatibility */
.elementor-location-header {
    position: relative;
    z-index: 9999;
}

.elementor-location-footer {
    margin-top: auto;
}

/* Remove sticky from container - let .modern-header handle positioning */
/* .modern-header inside uses position: fixed */

/* Make footer stick to bottom on short pages */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden !important;
}

#page,
#content,
main {
    flex: 1 0 auto;
}

.viozzo-custom-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Ensure content doesn't jump - padding added via JS */
body.using-viozzo-header {
    /* padding-top is dynamically added by JS based on header height */
}

/* Logo size control - prevent huge logos */
.modern-header .logo img,
.modern-header .logo-image,
.logo img,
.logo-image {
    max-width: 140px !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Footer logo size control */
footer .footer-item__logo img,
.footer-item__logo img,
footer img[alt*="logo" i],
footer img[alt*="Logo" i],
.viozzo-custom-footer img,
.elementor-location-footer img {
    max-width: 140px !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}
