/*
 * Section heading, the HTML reference: optional eyebrow (caps written in the content), title and text; centered, a half
 * frame on the left or under the title, or the title in a dark box.
 * The original theme (section-heading.wp.njk): a core/group Stack of core blocks with their own settings and no rt-* classes; the half
 * frames are the heading block styles Frame left and Frame bottom (themes/furnica/wp/block-styles/frame-left,
 * frame-bottom), the dark box is the heading's colour and padding settings. Changes to the frames go in both places.
 */
:where(.rt-section-heading) {
	display: grid;
	gap: var(--rt-spacing-20);
}

.rt-section-heading--centered {
	text-align: center;
}

.rt-section-heading__eyebrow {
	margin: 0;
	color: var(--rt-color-accent);
	font-size: var(--rt-font-size-small);
	font-weight: var(--rt-font-weight-bold);
	letter-spacing: 0.08em;
}

.rt-section-heading__title {
	margin: 0;
	font-family: var(--rt-font-family-heading);
	font-size: var(--rt-font-size-large);
	line-height: 1.15;
}

.rt-section-heading__text {
	max-width: 40rem;
	margin: 0;
	color: var(--rt-color-muted);
}

/* The content sets the title's lines (Shift+Enter where needed); only the text keeps a readable width. */
.rt-section-heading--centered .rt-section-heading__text,
.rt-section-heading--frame-bottom .rt-section-heading__text {
	justify-self: center;
}

/* Half frame: an accent frame left of the title (top arm 75px, bottom arm 113px) or under it (61.5px past the text on both sides). */
.rt-section-heading--half-frame .rt-section-heading__title {
	position: relative;
}

.rt-section-heading--frame-left .rt-section-heading__title {
	padding: 1.25rem 0 1.125rem 1.625rem;
}

.rt-section-heading--frame-left .rt-section-heading__title::before,
.rt-section-heading--frame-left .rt-section-heading__title::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	height: 50%;
	border: 0 solid var(--rt-color-accent);
	border-inline-start-width: var(--rt-border-width-frame, 3px);
}

.rt-section-heading--frame-left .rt-section-heading__title::before {
	top: 0;
	width: 4.6875rem;
	border-top-width: var(--rt-border-width-frame, 3px);
	border-start-start-radius: var(--rt-radius-frame, 23px);
}

.rt-section-heading--frame-left .rt-section-heading__title::after {
	bottom: 0;
	width: 7.0625rem;
	border-bottom-width: var(--rt-border-width-frame, 3px);
	border-end-start-radius: var(--rt-radius-frame, 23px);
}

.rt-section-heading--frame-bottom {
	text-align: center;
}

.rt-section-heading--frame-bottom .rt-section-heading__title {
	justify-self: center;
	width: fit-content;
	/* The frame reaches past both sides; the title narrows by as much so a narrow screen does not overflow. */
	max-width: calc(100% - 7.6875rem);
	padding-block-end: 2.5rem;
}

/* In flow right under the text (as the Frame bottom block style), so the padding is only the room below the frame */
.rt-section-heading--frame-bottom .rt-section-heading__title::after {
	content: "";
	display: block;
	height: 1.78125rem;
	margin: -0.78125rem -3.84375rem 0;
	border: var(--rt-border-width-frame, 3px) solid var(--rt-color-accent);
	border-top: 0;
	border-radius: 0 0 var(--rt-radius-frame, 23px) var(--rt-radius-frame, 23px);
}

/* Title in a dark box */
.rt-section-heading--boxed .rt-section-heading__title {
	justify-self: start;
	box-sizing: border-box;
	max-width: 30.8125rem;
	padding: 2.1875rem 4.375rem 2.4375rem var(--rt-spacing-50);
	background-color: var(--rt-color-contrast);
	color: var(--rt-color-base);
}

/* Furnica: başlık 36/45 SemiBold (final H2), açıklama gövde metni rengi. */
.rt-section-heading__title {
	color: var(--rt-color-contrast);
	font-size: var(--rt-font-size-x-large);
	font-weight: var(--rt-font-weight-semibold);
	line-height: var(--rt-font-line-height-heading);
}

.rt-section-heading__text {
	max-width: 36.9375rem;
	color: var(--rt-color-body);
	font-size: var(--rt-font-size-base);
	line-height: var(--rt-font-line-height-body);
}
