/**
 * Professional WordPress Layout Architecture
 * Clean, minimal solution for double scrollbar elimination
 * 
 * @package Codlion Theme
 * @version 2.0.0
 * @author Codlion Development Team
 * @since 1.0.0
 */

/* ==========================================================================
   SINGLE SCROLLBAR FOUNDATION
   ========================================================================== */

/**
 * Root document setup
 * Establishes single scrolling context
 */
html {
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

/**
 * Body foundation
 * Prevents secondary scrollbar creation
 */
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: visible;
}

/* ==========================================================================
   CONTAINER ARCHITECTURE
   ========================================================================== */

/**
 * Main page container
 * Flexbox layout to ensure footer visibility
 */
#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/**
 * Content areas
 * Ensure no inner scrolling contexts
 */
#content,
.site-content,
.entry-content,
.simple-page-content {
    overflow: visible;
    flex: 1;
}

/* ==========================================================================
   WORDPRESS BLOCKS COMPATIBILITY
   ========================================================================== */

/**
 * WordPress Block Editor elements
 * Prevent Gutenberg blocks from creating scrolling contexts
 */
.wp-block-group,
.wp-block-columns,
.wp-block-column,
.wp-site-blocks {
    overflow: visible;
    max-height: none;
    height: auto;
}

/* ==========================================================================
   RESPONSIVE CONSIDERATIONS
   ========================================================================== */

/**
 * Mobile optimization
 * Maintain single scrollbar on all devices
 */
@media (max-width: 991px) {
    body {
        overflow-y: auto;
    }
}

/**
 * Accessibility
 * Respect user motion preferences
 */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
