/*
Theme Name:   Applied Knowledge Child
Theme URI:    https://appliedknowledge.io
Description:  Child theme for Twenty Twenty-Five — strips layout constraints for full-width custom pages
Author:       Applied Knowledge
Template:     twentytwentyfive
Version:      1.0.0
Text Domain:  appliedknowledge-child
*/

/* ============================================================
   LAYER 1: Kill TT5's global layout constraint system
   These vars are injected by theme.json and override everything
   ============================================================ */
:root {
    --wp--style--root--padding-top: 0px !important;
    --wp--style--root--padding-right: 0px !important;
    --wp--style--root--padding-bottom: 0px !important;
    --wp--style--root--padding-left: 0px !important;
    --wp--style--global--content-size: 100% !important;
    --wp--style--global--wide-size: 100% !important;
}

/* ============================================================
   LAYER 2: Kill the .is-layout-constrained centering engine
   This is the main rule in editor-style.css that narrows content
   ============================================================ */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.is-layout-flow > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}

/* ============================================================
   LAYER 3: Strip all WordPress structural wrappers
   ============================================================ */
.wp-site-blocks,
.wp-block-post-content,
.entry-content,
.site-content,
#primary,
#content,
main.wp-block-query-title,
.wp-block-group.is-layout-constrained {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ============================================================
   LAYER 4: Hide default TT5 header/footer on custom pages
   Add class "ak-full-bleed" to the page body via a plugin
   like "Add Body Class", or target by page ID
   ============================================================ */
body.ak-full-bleed header.wp-block-template-part,
body.ak-full-bleed footer.wp-block-template-part,
body.ak-full-bleed .wp-block-post-title,
body.ak-full-bleed .entry-header {
    display: none !important;
}

/* ============================================================
   LAYER 5: Responsive utilities — applied site-wide safely
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}
