/* Restaurant chef (ManO2 Figma 242:831–242:835, ManO 242:1008–242:1012): left a white half with the
   heading (70/72, dark, centred) 146px from the top and the chef's name (eyebrow) 625px from the top,
   whatever the heading's length; under it the bio (18/24, 478 wide on ManO2, 518 on ManO) 55px lower
   and a button 55px under the bio; right four photos 2 × 2, 360 × 512.5 each, which set the section's
   height (1025 at 1440). At 1440 ManO2's section runs 2048–3073. */

.mano-chef.mano-chef {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-block: 0;
}

.mano-chef__text.mano-chef__text {
	display: grid;
	box-sizing: border-box;
	grid-template-rows: minmax(479px, auto) auto; /* 146 + 479 = the name at 625 */
	align-content: start;
	justify-items: center;
	margin: 0;
	padding: 146px 48px 80px;
	background: var(--wp--preset--color--bijela);
	text-align: center;
}

.mano-chef__text > *,
.mano-chef__about > * {
	margin-block: 0;
}

.mano-chef__title.mano-chef__title {
	max-width: 566px; /* Figma 242:831 / 242:1008 */
	color: var(--wp--preset--color--dark-kaptol);
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(44px, 4.861vw, 70px); /* 70px at 1440 */
	font-weight: 400;
	line-height: 1.0286; /* 72px */
}

.mano-chef__about.mano-chef__about {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.mano-chef__bio.mano-chef__bio {
	max-width: 478px;
	margin-top: 55px; /* eyebrow 13 + 55 = bio at +68 */
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--dark-kaptol);
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--body);
	line-height: 24px;
}

.page-template-page-restoran-kaptol .mano-chef__bio.mano-chef__bio {
	max-width: 518px;
}

.mano-chef__buttons.mano-chef__buttons {
	justify-content: center;
	margin-top: 55px;
}

.mano-chef__buttons .wp-block-button__link {
	color: var(--wp--preset--color--dark-kaptol);
	line-height: 16px;
}

.mano-chef__photos.mano-chef__photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0;
}

.mano-chef__photos > .wp-block-image {
	margin: 0;
}

.mano-chef__photos img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 360 / 512.5;
	object-fit: cover;
}

/* Below 1024px: text, then the four photos under it. */
@media (max-width: 1023px) {
	.mano-chef.mano-chef {
		grid-template-columns: minmax(0, 1fr);
	}

	.mano-chef__text.mano-chef__text {
		grid-template-rows: auto auto;
		row-gap: 48px;
		padding: 80px var(--wp--preset--spacing--gutter);
	}

	.mano-chef__buttons.mano-chef__buttons {
		margin-top: 48px;
	}
}

/* Phones (Figma 353:392 Frame 128, 370:1537 Frame 120): a white block at least 437 tall with everything
   centred in it: heading serif 30/33, 50px lower the eyebrow (Inter SemiBold 10/12, 2.5px tracking), the
   bio 15px under it (ManO2 serif 14/20 in 342, ManO 13/18 in 370), the pill button 24px lower
   (131 × 35, Inter Medium 11, warm white); then the four photos 2 × 2, 201 × 218.5 each. */
@media (max-width: 781px) {
	body:has(.mano-rhero__wordmark) .mano-chef__text.mano-chef__text {
		display: flex;
		min-height: 437px;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		row-gap: 50px;
		padding: 72px 16px;
	}

	body:has(.mano-rhero__wordmark) .mano-chef__title.mano-chef__title {
		max-width: none;
		font-size: 30px;
		line-height: 33px;
		text-wrap: balance; /* two even lines, as the frames break it */
	}

	body:has(.mano-rhero__wordmark) .mano-chef__about .is-style-eyebrow.is-style-eyebrow {
		font-size: 10px;
		line-height: 12px;
		letter-spacing: 2.5px;
	}

	body:has(.mano-rhero__wordmark) .mano-chef__bio.mano-chef__bio {
		max-width: 342px;
		margin-top: 15px;
		font-size: 14px;
		line-height: 20px;
		letter-spacing: 0.02em;
	}

	body.page-template-page-restoran-kaptol:has(.mano-rhero__wordmark) .mano-chef__bio.mano-chef__bio {
		max-width: none;
		font-size: 13px;
		line-height: 18px;
	}

	body:has(.mano-rhero__wordmark) .mano-chef__buttons.mano-chef__buttons {
		margin-top: 24px;
	}

	body:has(.mano-rhero__wordmark) .mano-chef__buttons .wp-block-button__link {
		padding: 11px 22px;
		border-radius: 100px;
		background: var(--wp--preset--color--topla-bijela);
		color: var(--wp--preset--color--dark-kaptol);
		font-size: 11px;
		font-weight: 500;
		line-height: 13.3px;
	}

	body:has(.mano-rhero__wordmark) .mano-chef__photos img {
		aspect-ratio: 201 / 218.5;
	}

	/* ManO (370:1537 Group 19): the top-right photo sits about 11% closer, aligned right. */
	body.page-template-page-restoran-kaptol:has(.mano-rhero__wordmark) .mano-chef__photos figure:nth-child(2) {
		overflow: hidden;
	}

	body.page-template-page-restoran-kaptol:has(.mano-rhero__wordmark) .mano-chef__photos figure:nth-child(2) img {
		transform: scale(1.113);
		transform-origin: 100% 50%;
	}
}
