/* ==========================================================================
   Template: Standard Constrained Layout with Full-Width Breakouts
   ========================================================================== */

.page-template-template-boxed main {
    min-height: 600px;
    padding: var(--spacing-xl) 0;
    width: 100%;
    max-width: 100%;
}
.home.page-template-template-boxed main {
    padding-bottom: 0;
    padding-top: 0;
}

.page-template-template-boxed .entry-content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.page-template-template-boxed .entry-header {
    max-width: 1240px;
    margin: 0 auto var(--spacing-lg);
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
    box-sizing: border-box;
}

.page-template-template-boxed .entry-title {
    margin-bottom: 10px;
}

.page-template-template-boxed .entry-body {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns:
        [full-start] minmax(var(--spacing-lg), 1fr)
        [wide-start] minmax(0, 120px)
        [content-start] min(100% - (var(--spacing-lg) * 2), 1200px) [content-end]
        minmax(0, 120px) [wide-end]
        minmax(var(--spacing-lg), 1fr) [full-end];
    row-gap: var(--spacing-lg);
    width: 100%;
}

/* Default Blocks: Left-aligned inside the 1200px centered track */
.page-template-template-boxed .entry-body > * {
    grid-column: content;
    justify-self: start;
    margin-left: 0;
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Text & container blocks still span the full 1200px track width, left-aligned */
.page-template-template-boxed .entry-body > p,
.page-template-template-boxed .entry-body > h1,
.page-template-template-boxed .entry-body > h2,
.page-template-template-boxed .entry-body > h3,
.page-template-template-boxed .entry-body > h4,
.page-template-template-boxed .entry-body > h5,
.page-template-template-boxed .entry-body > h6,
.page-template-template-boxed .entry-body > ul,
.page-template-template-boxed .entry-body > ol,
.page-template-template-boxed .entry-body > .wp-block-group,
.page-template-template-boxed .entry-body > .wp-block-columns {
    width: 100%;
}

/* Preserve explicit Center/Right alignment when chosen in the block toolbar */
.page-template-template-boxed .entry-body > .aligncenter {
    justify-self: center;
    margin-left: auto;
    margin-right: auto;
}

.page-template-template-boxed .entry-body > .alignright {
    justify-self: end;
    margin-left: auto;
    margin-right: 0;
}

/* Wide blocks (.alignwide -> 1440px inner width) */
.page-template-template-boxed .entry-body > .alignwide {
    grid-column: wide;
    width: 100%;
    max-width: 100%;
}

/* Full-Width Group blocks & .alignfull with responsive side gutters */
.page-template-template-boxed .entry-body > .alignfull,
.page-template-template-boxed .entry-body > .wp-block-group.is-style-full-width-container {
    grid-column: full !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: clamp(1.25rem, 4vw, 2rem);
    padding-right: clamp(1.25rem, 4vw, 2rem);
    box-sizing: border-box;
}

/* Constrain direct children inside a Full Width (100%) Group block to 1200px */
.page-template-template-boxed .entry-body > .wp-block-group.is-style-full-width-container > *,
.page-template-template-boxed .entry-body > .wp-block-group.alignfull > * {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Allow nested .alignwide / .alignfull blocks inside a full-width group */
.page-template-template-boxed .entry-body > .wp-block-group.is-style-full-width-container > .alignwide {
    max-width: 1440px;
}

.page-template-template-boxed .entry-body > .wp-block-group.is-style-full-width-container > .alignfull {
    max-width: 100%;
}