/* furnica page-title — @rtthemes/builder üretir; elle düzenlemeyin. */
/*
 * Page title band (blog-sidebar, services-1, contact-1 references): breadcrumb + page title, optional short text.
 * Reference band: edges on the site frame (layout.gutter-start / gutter-end), 50px above and below the breadcrumb +
 * title block; photo bands start at the top of the page under an overlay header part.
 * WP: the user's editor markup lays the band out with block settings only (core/cover overlay colour, text and heading
 * colour, padding, minimum height; a flex core/group per variant; Responsive styles for tablets and phones), so every
 * rule on the root sits in :where() and the inner classes below exist only in the reference.
 */
:where(.rt-page-title) {
	--rt-page-title-header: 5.5rem;
	position: relative;
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	min-height: 0;
	padding: 3.125rem var(--wp--custom--layout--gutter-end, 1.5rem) 3.125rem var(--wp--custom--layout--gutter-start, 2.25rem);
	overflow: hidden;
	color: var(--rt-color-contrast, var(--wp--preset--color--contrast));
}

/* Under an overlay header: the header row (site-header min-height) plus a taller top margin */
:where(.rt-page-title--overlay) {
	padding-top: calc(var(--rt-page-title-header) + var(--wp--custom--spacing--70));
	padding-bottom: var(--wp--custom--spacing--60);
}

/* Reference only: core/cover's photo, overlay and inner container (core draws them in WP, the user picks the overlay) */
.rt-page-title > [data-bg] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rt-page-title > [data-overlay] {
	position: absolute;
	inset: 0;
	background-color: var(--wp--custom--page-title--surface-light);
}

.rt-page-title--image.rt-page-title--tone-light > [data-overlay] {
	background-color: var(--rt-color-base, var(--wp--preset--color--base));
}

.rt-page-title--tone-dark > [data-overlay] {
	background-color: var(--wp--custom--page-title--surface-dark);
}

.rt-page-title.rt-page-title--tone-accent {
	/* Yellow band: text uses the on-accent and on-image roles, so it stays readable in dark palettes */
	--rt-color-contrast: var(--wp--preset--color--on-accent);
	--rt-color-body: color-mix(in srgb, var(--wp--preset--color--on-accent) 80%, var(--wp--preset--color--on-image));
	--rt-color-base: var(--wp--preset--color--on-image);
}

.rt-page-title--tone-accent > [data-overlay] {
	background-color: var(--wp--custom--page-title--surface-accent);
}

.rt-page-title > [data-inner] {
	position: relative;
	z-index: 1;
	width: 100%;
}

/* Inner grid: areas place the same three blocks for every variant, so switching the variant class keeps the content */
.rt-page-title .rt-page-title__inner {
	--rt-page-title-crumb: var(--rt-color-body, var(--wp--preset--color--body));
	display: grid;
	grid-template-areas: "crumbs" "title" "tagline";
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--20) var(--wp--custom--spacing--50);
	align-items: end;
	color: var(--rt-color-contrast, var(--wp--preset--color--contrast));
}

.rt-page-title--tone-dark .rt-page-title__inner {
	--rt-page-title-crumb: var(--wp--custom--page-title--crumb-dark);
	color: var(--rt-color-base, var(--wp--preset--color--base));
}

.rt-page-title--centered .rt-page-title__inner {
	justify-items: center;
	text-align: center;
}

.rt-page-title--split .rt-page-title__inner {
	grid-template-areas: "title crumbs" "tagline tagline";
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
}

.rt-page-title--tagline .rt-page-title__inner {
	grid-template-areas: "crumbs crumbs" "title tagline";
	grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
}

/* Breadcrumb: 14px, separator from core/breadcrumbs' --separator (› in the patterns) */
.rt-page-title .rt-page-title__breadcrumbs {
	grid-area: crumbs;
	min-width: 0;
	color: var(--rt-page-title-crumb);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.rt-page-title__breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rt-page-title--centered .rt-page-title__breadcrumbs ol {
	justify-content: center;
}

.rt-page-title--split .rt-page-title__breadcrumbs ol {
	justify-content: flex-end;
}

.rt-page-title__breadcrumbs li {
	display: flex;
	align-items: center;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.rt-page-title__breadcrumbs li:not(:last-child)::after {
	content: var(--separator, "›") / "";
	margin: 0 0.625em;
	opacity: 0.7;
}

.rt-page-title__breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.rt-page-title__breadcrumbs a:hover {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rt-page-title__breadcrumbs a:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.rt-page-title .rt-page-title__title {
	grid-area: title;
	margin: 0;
	color: inherit;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: var(--wp--custom--font--weight--bold);
	line-height: var(--wp--custom--font--line-height--heading);
	overflow-wrap: break-word;
}

.rt-page-title .rt-page-title__tagline {
	grid-area: tagline;
	max-width: 36rem;
	margin: 0;
	color: inherit;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	line-height: var(--wp--custom--font--line-height--body);
	opacity: 0.8;
}

.rt-page-title--tagline .rt-page-title__tagline {
	justify-self: end;
	padding-bottom: 0.25em;
	font-size: var(--wp--preset--font-size--small);
	text-align: end;
}

/* Tablet: the header row is 72px */
@media (max-width: 64rem) {
	:where(.rt-page-title) {
		--rt-page-title-header: 4.5rem;
		padding-right: var(--wp--preset--spacing--40);
		padding-left: var(--wp--preset--spacing--40);
	}

	:where(.rt-page-title--overlay) {
		padding-top: calc(var(--rt-page-title-header) + var(--wp--custom--spacing--50));
		padding-bottom: var(--wp--custom--spacing--50);
	}
}

/* Mobile: every variant stacks as breadcrumb, title, short text */
@media (max-width: 37.5rem) {
	:where(.rt-page-title) {
		padding-top: var(--wp--custom--spacing--50);
		padding-bottom: var(--wp--custom--spacing--50);
	}

	.rt-page-title--split .rt-page-title__inner,
	.rt-page-title--tagline .rt-page-title__inner {
		grid-template-areas: "crumbs" "title" "tagline";
		grid-template-columns: minmax(0, 1fr);
	}

	.rt-page-title--split .rt-page-title__breadcrumbs ol {
		justify-content: flex-start;
	}

	.rt-page-title--tagline .rt-page-title__tagline {
		justify-self: start;
		padding-bottom: 0;
		text-align: start;
	}
}
