/* Home "Dvije kuhinje, dva ritma." (Figma 242:698, 242:699, 242:736): full screen, two halves.
   Left: warm white, heading and text (487 wide) as one centred block, 79px apart, sitting 39px above
   the middle (Figma: heading at +297, text at +520 of the 991px half).
   Right: the "Split tanjuri" gallery. Below 782px everything stacks (heading, text, square plates). */

.mano-kitchens.mano-kitchens {
	gap: 0;
	margin-block: 0;
}

/* The awards strip (33px) under this section shares its screen (Figma 242:674 at 2015–2048). */
.mano-kitchens > .wp-block-column {
	min-height: calc(100svh - 33px);
}

.mano-kitchens__text {
	display: grid;
	box-sizing: border-box;
	align-content: center;
	row-gap: 79px;
	height: 100%;
	padding: 48px var(--wp--preset--spacing--40) 126px; /* 78px more below than above: the block sits 39px high */
	background: var(--wp--preset--color--topla-bijela);
	color: var(--wp--preset--color--dark-kaptol);
}

.mano-kitchens__text > * {
	align-self: center;
	margin: 0 auto;
}

.mano-kitchens__text > p {
	max-width: 487px;
	letter-spacing: 0.02em;
}

/* --- "Split tanjuri" gallery style ---
   Every photo is stacked over the whole panel; the script marks one photo `is-top` (shows its
   upper half) and one `is-bottom` (shows its lower half). Without the script, the first photo
   shows whole. Photos are cropped to the panel, centred — plates must be centred in the photo. */
.wp-block-gallery.is-style-split-plates.is-style-split-plates {
	position: relative;
	display: block;
	height: 100%;
	min-height: inherit;
	margin: 0;
	overflow: hidden;
}

.wp-block-gallery.is-style-split-plates > .wp-block-image.wp-block-image {
	position: absolute;
	inset: 0;
	/* !important: core sizes gallery images with `figure.wp-block-image:not(#individual-image)`, an ID-level selector. */
	width: 100% !important;
	height: 100%;
	margin: 0;
	visibility: hidden;
}

.wp-block-gallery.is-style-split-plates > .wp-block-image > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.wp-block-gallery.is-style-split-plates:not(.is-split) > .wp-block-image:first-child,
.wp-block-gallery.is-style-split-plates > .wp-block-image.is-top,
.wp-block-gallery.is-style-split-plates > .wp-block-image.is-bottom {
	visibility: visible;
}

.wp-block-gallery.is-style-split-plates > .wp-block-image.is-top {
	clip-path: inset(0 0 50% 0);
}

.wp-block-gallery.is-style-split-plates > .wp-block-image.is-bottom {
	clip-path: inset(50% 0 0 0);
}

/* In the editor the photos sit in a normal grid, so each one can be selected and replaced. */
.editor-styles-wrapper .wp-block-gallery.is-style-split-plates > .wp-block-image.wp-block-image {
	position: relative;
	visibility: visible;
	height: auto;
}

/* Phones (Figma 353:152, Frame 211 and Group 18): the text block is half a screen (437px):
   heading 111px under its top, 50px to the text, 112px below it; then the two plates as two
   202px strips (405px). */
@media (max-width: 781px) {
	.mano-kitchens > .wp-block-column {
		min-height: 0;
	}

	.mano-kitchens__text {
		grid-template-rows: auto auto; /* the desktop 1fr/1fr split would add uneven space */
		gap: 50px;
		padding: 111px 16px 112px;
	}

	.mano-kitchens__text > h2.has-display-font-size {
		font-size: 40px !important; /* core preset classes are !important */
		line-height: 42px;
	}

	.mano-kitchens__text > p {
		max-width: 369px;
		font-size: 14px;
		line-height: 20px;
		letter-spacing: 0.02em;
	}

	.mano-kitchens .wp-block-gallery.is-style-split-plates {
		height: auto;
		aspect-ratio: 402 / 405;
	}
}
