/*
 * Situ Page Profile
 * Page-level layout adapter. Loaded only on pages using a Situ profile.
 */

/* Generic/common classic-theme adapters */
body.situ-blocks-page-profile .sidebar-left,
body.situ-blocks-page-profile .sidebar-right,
body.situ-blocks-page-profile #secondary,
body.situ-blocks-page-profile .widget-area.sidebar,
body.situ-blocks-page-profile aside.sidebar {
	display: none !important;
}

body.situ-blocks-page-profile .main-content,
body.situ-blocks-page-profile .main-container,
body.situ-blocks-page-profile .content-area,
body.situ-blocks-page-profile .site-main,
body.situ-blocks-page-profile article.page,
body.situ-blocks-page-profile .post-content,
body.situ-blocks-page-profile .entry-content {
	box-sizing: border-box;
	max-width: none !important;
}

body.situ-blocks-page-profile .main-container,
body.situ-blocks-page-profile .content-area {
	float: none !important;
	width: 100% !important;
}

/* Current Situ Framework CC07 adapter */
body.situ-blocks-page-profile .main-content {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.situ-blocks-page-profile .main-content.boxed-wrapper {
	width: 100% !important;
	max-width: none !important;
}

body.situ-blocks-page-profile .main-container {
	overflow: visible !important;
}

body.situ-blocks-page-profile .post-content {
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Hero Page removes legacy page chrome around the first Hero */
body.situ-blocks-profile-hero-page .main-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.situ-blocks-profile-hero-page article.page > .post-header,
body.situ-blocks-profile-hero-page article.page > header.post-header,
body.situ-blocks-profile-hero-page .page-title {
	display: none !important;
}

body.situ-blocks-profile-hero-page .post-content > .wp-block-situ-hero:first-child {
	margin-top: 0 !important;
}

/* Prevent accidental horizontal scroll from full-bleed blocks. */
body.situ-blocks-page-profile {
	overflow-x: clip;
}

@supports not (overflow: clip) {
	body.situ-blocks-page-profile {
		overflow-x: hidden;
	}
}


/* =========================================================
 * v0.4.1 — Hero Page Layout Reset
 * Remove legacy article/page chrome after Page Profile has
 * already switched the page to a no-sidebar layout.
 * ======================================================= */

body.situ-blocks-profile-hero-page .main-container,
body.situ-blocks-profile-hero-page .main-content,
body.situ-blocks-profile-hero-page .content-area,
body.situ-blocks-profile-hero-page .site-main,
body.situ-blocks-profile-hero-page article.page,
body.situ-blocks-profile-hero-page .post-content,
body.situ-blocks-profile-hero-page .entry-content {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Remove common boxed wrappers / legacy gutters on Hero Page. */
body.situ-blocks-profile-hero-page .boxed-wrapper,
body.situ-blocks-profile-hero-page .content-wrapper,
body.situ-blocks-profile-hero-page .container,
body.situ-blocks-profile-hero-page .site-content {
	max-width: none !important;
}

/* The first Situ Hero becomes the visual page opening. */
body.situ-blocks-profile-hero-page .post-content > .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page .entry-content > .wp-block-situ-hero:first-child {
	margin-top: 0 !important;
}

/*
 * Hide article-oriented sharing UI on a Hero landing page.
 * Covers AddToAny's standard inline/floating containers.
 */
body.situ-blocks-profile-hero-page .addtoany_share_save_container,
body.situ-blocks-profile-hero-page .a2a_kit.a2a_kit_size_32,
body.situ-blocks-profile-hero-page .a2a_floating_style {
	display: none !important;
}

/* Remove empty spacing commonly left by theme metadata/title wrappers. */
body.situ-blocks-profile-hero-page article.page > .post-header,
body.situ-blocks-profile-hero-page article.page > .entry-header,
body.situ-blocks-profile-hero-page article.page > header,
body.situ-blocks-profile-hero-page .page-header,
body.situ-blocks-profile-hero-page .page-title,
body.situ-blocks-profile-hero-page .post-title,
body.situ-blocks-profile-hero-page .entry-title {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Keep later Gutenberg content readable; only Hero itself is viewport bleed. */
body.situ-blocks-profile-hero-page .wp-block-situ-hero.alignfull,
body.situ-blocks-profile-hero-page .wp-block-situ-hero {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}


/* =========================================================
 * v0.4.2 — Situ Framework CC07 Hero Page Wrapper Reset
 * Precision reset for the legacy .main-content.boxed-wrapper.
 * Applies only to Situ Hero Page profile.
 * ======================================================= */

/* CC07 outer boxed wrapper: remove 94% width/max-width and all page gutters. */
body.situ-blocks-profile-hero-page .main-content.boxed-wrapper {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

/* CC07 inner page container: no inherited top/side spacing. */
body.situ-blocks-profile-hero-page .main-content.boxed-wrapper > .main-container,
body.situ-blocks-profile-hero-page .main-container {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible !important;
}

/* Page/article/content wrappers must not re-introduce gutters. */
body.situ-blocks-profile-hero-page article.page,
body.situ-blocks-profile-hero-page article.page .post-content,
body.situ-blocks-profile-hero-page article.page .entry-content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Remove legacy title/header area before the Hero. */
body.situ-blocks-profile-hero-page article.page > .post-header,
body.situ-blocks-profile-hero-page article.page > .entry-header,
body.situ-blocks-profile-hero-page article.page > header,
body.situ-blocks-profile-hero-page .post-header,
body.situ-blocks-profile-hero-page .entry-header,
body.situ-blocks-profile-hero-page .page-header {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}

/* The first Hero starts immediately at the content origin. */
body.situ-blocks-profile-hero-page .post-content > .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page .entry-content > .wp-block-situ-hero:first-child {
	margin-top: 0 !important;
}

/* Keep viewport bleed exact after the outer wrapper reset. */
body.situ-blocks-profile-hero-page .wp-block-situ-hero {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}


/* =========================================================
 * v0.4.3 — CC07 legacy Page Skin reset for Hero Page only
 * Targets the actual legacy .page-content article.page skin.
 * ======================================================= */

body.situ-blocks-profile-hero-page .main-content,
body.situ-blocks-profile-hero-page .page-content,
body.situ-blocks-profile-hero-page .main-container {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

/* Actual CC07 skin:
 * .page-content article.page {
 *   background:#fff; padding:30px; box-shadow:...;
 *   margin:3px; border-radius:3px;
 * }
 */
body.situ-blocks-profile-hero-page .page-content article.page,
body.situ-blocks-profile-hero-page .page-content > article.page,
body.situ-blocks-profile-hero-page article.page {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 0 !important;
}

/* Remove wrappers that can preserve the 30px visual gutter. */
body.situ-blocks-profile-hero-page article.page .post-content,
body.situ-blocks-profile-hero-page article.page .entry-content,
body.situ-blocks-profile-hero-page .page-content .post-content,
body.situ-blocks-profile-hero-page .page-content .entry-content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Legacy title/header must occupy no layout space on Hero Page. */
body.situ-blocks-profile-hero-page .page-content article.page > .post-header,
body.situ-blocks-profile-hero-page .page-content article.page > .entry-header,
body.situ-blocks-profile-hero-page .page-content article.page > header,
body.situ-blocks-profile-hero-page article.page .page-title {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}

/* No gap immediately before the Hero block. */
body.situ-blocks-profile-hero-page article.page .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page .post-content > .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page .entry-content > .wp-block-situ-hero:first-child {
	margin-top: 0 !important;
}


/* =========================================================
 * v0.4.4 — Hero/Header seam reset
 * The v0.4.3 article skin reset is retained.
 * This layer removes legacy vertical spacing between the
 * theme header/title region and the first Situ Hero.
 * Hero block internals are intentionally untouched.
 * ======================================================= */

/* Collapse vertical layout spacing on the page shell only. */
body.situ-blocks-profile-hero-page .main-content,
body.situ-blocks-profile-hero-page .main-content.boxed-wrapper,
body.situ-blocks-profile-hero-page .main-container,
body.situ-blocks-profile-hero-page .page-content {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	min-height: 0 !important;
}

/* Legacy page-heading / breadcrumb / title shells:
   on Hero Profile the Hero itself is the page heading. */
body.situ-blocks-profile-hero-page .page-title,
body.situ-blocks-profile-hero-page .page-header,
body.situ-blocks-profile-hero-page .post-header,
body.situ-blocks-profile-hero-page .entry-header,
body.situ-blocks-profile-hero-page .breadcrumbs,
body.situ-blocks-profile-hero-page .breadcrumb,
body.situ-blocks-profile-hero-page .breadcrumb-area,
body.situ-blocks-profile-hero-page .page-heading,
body.situ-blocks-profile-hero-page .page-heading-area,
body.situ-blocks-profile-hero-page .title-area,
body.situ-blocks-profile-hero-page .inner-page-header {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}

/* Remove empty theme-generated siblings before the actual page article.
   :empty keeps this conservative and Hero-profile-only. */
body.situ-blocks-profile-hero-page .main-container > :empty,
body.situ-blocks-profile-hero-page .page-content > :empty {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

/* First page/article/content element must begin at shell origin. */
body.situ-blocks-profile-hero-page .page-content > article.page:first-of-type,
body.situ-blocks-profile-hero-page article.page,
body.situ-blocks-profile-hero-page article.page > .post-content,
body.situ-blocks-profile-hero-page article.page > .entry-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Gutenberg sometimes gives first blocks top margins via theme styles. */
body.situ-blocks-profile-hero-page article.page .post-content > :first-child,
body.situ-blocks-profile-hero-page article.page .entry-content > :first-child {
	margin-top: 0 !important;
}

/* Explicit Hero seam: no gap above first Situ Hero. */
body.situ-blocks-profile-hero-page article.page .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page article.page .post-content > .wp-block-situ-hero:first-child,
body.situ-blocks-profile-hero-page article.page .entry-content > .wp-block-situ-hero:first-child {
	margin-top: 0 !important;
}
