/*
 * CaryTamura inner-page hero — the band the global header overlays.
 *
 * SCOPE. Scoped under `.ct-page-hero`, the class the CT Page Hero and CT Post
 * Hero Theme Builder templates put on their first container. It styles that
 * band and nothing else; the header's own overlay state lives in
 * header-overlay.css and the home page keeps its own hero in home.css.
 *
 * THE IMAGE IS THE PAGE'S OWN. Each template binds the container background to
 * that page's or post's FEATURED IMAGE through Elementor's dynamic tag, so
 * every page brings its own picture and none inherits the home page's. This
 * file never names an image.
 *
 * WHAT A PAGE WITHOUT A FEATURED IMAGE GETS. The dark panel below, and its
 * title. That is a deliberate floor rather than a placeholder photograph: the
 * header floats over this band in white, so the band must be dark whatever the
 * page has set. Add a featured image and it takes over; remove it and the page
 * degrades to the same dark band rather than to an unreadable header.
 *
 * CLEARANCE, NOT GUESSWORK. The header is absolutely positioned over this band
 * (header-overlay.css), so it occupies no space of its own and the hero must
 * reserve it: the logo is 100px tall over 24px of padding on desktop and 70px
 * over 15px below 767px, so the top padding below clears the taller of the two
 * with room to spare. Under-reserving it is what makes a title collide with a
 * menu, so these two numbers are tied to those.
 */

.ct-page-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52vh;
	padding: 190px var(--ct-body-padding) 72px;
	background-color: var(--ct-dark);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	text-align: center;
	overflow: hidden;
}

/* A scrim, so a bright photograph cannot swallow the white header or the
 * title. Same token the home hero uses over its video. */
.ct-page-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--ct-overlay);
	pointer-events: none;
}

/* The header's own band. A featured image is whatever the page owner uploaded
 * — a bright sky is as likely as a dark facade — and white labels on a pale
 * horizon are the one failure this pattern invites. The flat scrim above is
 * not enough at the top, so the first fifth of the band carries a gradient
 * that fades to nothing before it reaches the title. */
.ct-page-hero::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 22%;
	min-height: 160px;
	background-image: linear-gradient(to bottom, var(--ct-overlay-strong), transparent);
	pointer-events: none;
}

.ct-page-hero > .e-con-inner,
.ct-page-hero > .elementor-widget,
.ct-page-hero .ct-page-hero__title {
	position: relative;
	z-index: 1;
}

/* The home hero's title treatment at inner-page scale: same family, weight,
 * tracking and case, one step down the type scale because these titles sit in
 * a shorter band. */
.ct-page-hero .ct-page-hero__title .elementor-heading-title {
	margin: 0;
	font-family: var(--ct-font-display);
	font-size: var(--ct-size-h2);
	font-weight: 400;
	line-height: var(--ct-leading-display);
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--ct-on-dark);
}

/* The page's own content, below the band. */
.ct-page-body {
	padding-block: var(--ct-section-padding-compact);
	/*
	 * Long unbroken strings — the bare URLs pasted into several of the posts —
	 * are wider than a phone and cannot wrap on their own. Left alone they
	 * widen the layout VIEWPORT, not just their own column, which on a phone
	 * both scrolls the page sideways and drags the fixed navigation panel off
	 * the right edge with it. Breaking them is presentation; the content is
	 * untouched.
	 */
	overflow-wrap: break-word;
}

.ct-page-body img,
.ct-page-body video {
	max-width: 100%;
	height: auto;
}

/* Embeds keep their own height (height="100%" in a ratio box, or an inline
 * style): `height: auto` on an iframe collapses it to the browser's 150px. */
.ct-page-body iframe {
	max-width: 100%;
}

/* A template-rendered page whose content is itself a full-bleed layout (the
 * properties archive owns its own gutters and full width) must not be boxed
 * twice. */
.ct-page-body:has(.ct-properties) {
	padding-block: 0;
}

@media (max-width: 1024px) {
	.ct-page-hero {
		min-height: 42vh;
		padding-top: 170px;
	}
}

@media (max-width: 767px) {
	.ct-page-hero {
		min-height: 320px;
		padding: 130px var(--ct-body-padding) 48px;
	}

	.ct-page-hero .ct-page-hero__title .elementor-heading-title {
		font-size: var(--ct-size-h3);
	}
}
