/* Layout Stability Fix for Wildsvleisbewerking */

/* Basic smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal scrolling and ensure centered layout */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    scroll-padding-top: 80px; /* Account for fixed navbar */
}

/* Ensure all main containers stay centered */
.container {
    margin: 0 auto;
    padding: 0 20px;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation container centering */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Prevent sidebar from affecting body layout */
.sidebar-overlay.active ~ * {
    transform: none !important;
}

/* Ensure main content doesn't shift when sidebar is open */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Desktop layout stability */
@media (min-width: 769px) {
    body {
        position: static !important;
        overflow: visible !important;
        width: auto !important;
    }
    
    .nav-menu {
        transform: none !important;
        position: static !important;
    }
    
    /* Ensure navbar stays centered */
    .navbar {
        width: 100%;
        left: 0;
        right: 0;
    }
    
    /* Center all sections */
    section {
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }
    
    /* Footer centering */
    .footer {
        width: 100%;
        margin: 0 auto;
    }
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    /* Prevent content shift when sidebar opens */
    body.sidebar-open {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
}
