/* templates/page.html + patterns/page-content.php — header/photo layout. */

.offer-page-top-plate {
	/* height: var(--nav-bar-height, clamp(4rem, 3vw + 3.5rem, 6.5rem)); */
	height: clamp(4rem, 3vw + 3.5rem, 6.5rem);
}

.offer-page-header {
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding: var(--wp--custom--page-header-block) var(--wp--custom--gutter) 0;
}

/* The bottom padding is 0, so this margin would collapse out and add to the facts row's own spacing. */
.offer-page-header > :last-child {
	margin-block-end: 0;
}

/* Without page-facts, the intro keeps the same distance to the next section as to the facts cells. */
.offer-page-header:not(:has(+ .page-facts)) {
	padding-block-end: calc(var(--wp--custom--section-block) / 2);
}

/* The page background is paper, so a paper row has no background break to carry its full padding. */
.offer-page-header + .row.tone-paper > .row-inner {
	padding-block-start: calc(var(--wp--custom--section-block) / 2);
}

.offer-page-photo {
	position: relative;
}

/* Three class selectors (0,3,0) beat the block editor's own
   .block-editor-block-list__layout .block-editor-block-list__block rule
   (0,2,0), which otherwise forces position: relative on this same
   element inside the editor and breaks the absolute positioning below. */
.offer-page-photo .wp-block-post-title.offer-page-photo-title {
	position: absolute;
	z-index: 1;
	left: var(--wp--custom--gutter);
	right: var(--wp--custom--gutter);
	bottom: var(--wp--custom--gutter);
	margin: 0;
	color: var(--wp--preset--color--neutral-100);
	/* Core's post-title sets word-break: break-word; hyphenate first so a long word doesn't strand one letter. */
	hyphens: auto;
	hyphenate-limit-chars: 8 4 4;
}

@media print {
	.offer-page-top-plate {
		display: none;
	}

	.offer-page-photo .wp-block-post-title.offer-page-photo-title {
		position: static;
		margin-block-start: var(--print-box-padding);
		color: var(--wp--preset--color--neutral-900);
	}
}
