/* Home hero (Figma 1:677–1:684): two restaurants side by side, full screen.
   At rest each half is its photo with the name; hovering a half fades the photo to the
   restaurant's colour (the Cover block's own overlay) and fades in its line, text and button.
   Touch screens without hover show the full panel; below 782px the halves stack and always show
   the panel, without the photo. */

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

.mano-hero__half--mano2 {
	--mano-hero-panel: var(--wp--preset--color--dark-kaptol);
	--mano-hero-ink: var(--wp--preset--color--button);
	--mano-hero-eyebrow: var(--wp--preset--color--beige);
}

.mano-hero__half--kaptol {
	--mano-hero-panel: var(--wp--preset--color--kaptol-svijetla);
	--mano-hero-ink: var(--wp--preset--color--dark-kaptol);
	--mano-hero-eyebrow: var(--wp--preset--color--kaptol);
}

.mano-hero__half.wp-block-cover {
	min-height: 100svh !important; /* the block stores 100vh; svh avoids mobile browser-bar jumps */
	padding: 0;
	color: var(--wp--preset--color--topla-bijela);
}

.mano-hero__half .wp-block-cover__inner-container {
	position: static;
	width: 100%;
}

/* Name: 24% from the top (Figma 244 of 1024). */
.mano-hero__name {
	position: absolute;
	z-index: 1;
	top: 23.8%;
	right: var(--wp--preset--spacing--40);
	left: var(--wp--preset--spacing--40);
	margin: 0;
	color: var(--wp--preset--color--topla-bijela);
	line-height: 1.19;
	transition: color 0.4s ease;
}

.mano-hero__name.wp-block-image img {
	width: min(349px, 100%);
	height: auto;
	margin-inline: auto;
}

/* ManO's wordmark (Figma 249:1103): 284 wide, its middle level with ManO2's logo (top 233 vs 244).
   The image is dark; over the photo it shows light like the ManO2 logo, and goes back to dark with
   the panel (hover, touch tablets, editor). */
.mano-hero__half--kaptol .mano-hero__name.wp-block-image {
	top: calc(23.8% - 11px);
}

.mano-hero__half--kaptol .mano-hero__name.wp-block-image img {
	width: min(284px, 100%);
	filter: brightness(0) invert(0.97);
	transition: filter 0.4s ease;
}

/* Line, text and button: from the middle of the half (Figma 510 of 1024). */
.mano-hero__details {
	position: absolute;
	z-index: 1;
	top: 49.8%;
	right: var(--wp--preset--spacing--40);
	left: var(--wp--preset--spacing--40);
	margin: 0; /* no block gap: it would push the absolutely placed panel down */
	color: var(--mano-hero-ink);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 500;
	line-height: 1.556; /* 28 / 18 */
}

.mano-hero__details > * + * {
	margin-block-start: 22px;
}

.mano-hero__details .wp-block-buttons {
	margin-block-start: 52px;
}

.mano-hero__details .is-style-eyebrow {
	color: var(--mano-hero-eyebrow);
}

/* ManO's panel (Figma 242:670 / 242:668, update 28/10): text 332 wide, button 81 under it (top 680). */
@media (min-width: 782px) {
	.mano-hero__half--kaptol .mano-hero__details > p {
		max-width: 332px;
	}

	.mano-hero__half--kaptol .mano-hero__details .wp-block-buttons {
		margin-block-start: 81px;
	}
}

/* Hover (desktop with a pointer): photo → colour, name → ink, details fade in, the buttons with them
   (owner, 2026-11-24; from 2026-11-15 they showed at rest).
   The overlay selectors outrank core's `.wp-block-cover .x.has-background-dim.has-background-dim-100`. */
@media (hover: hover) and (min-width: 782px) {
	.mano-hero .mano-hero__half.wp-block-cover .wp-block-cover__background.has-background-dim {
		opacity: 0;
		transition: opacity 0.4s ease;
	}

	.mano-hero__details {
		opacity: 0;
		transform: translateY(8px);
		transition: opacity 0.4s ease, transform 0.4s ease;
	}

	.mano-hero .mano-hero__half.wp-block-cover:hover .wp-block-cover__background.has-background-dim,
	.mano-hero .mano-hero__half.wp-block-cover:focus-within .wp-block-cover__background.has-background-dim {
		opacity: 1;
	}

	.mano-hero__half:hover .mano-hero__name,
	.mano-hero__half:focus-within .mano-hero__name {
		color: var(--mano-hero-ink);
	}

	.mano-hero__half--kaptol:hover .mano-hero__name img,
	.mano-hero__half--kaptol:focus-within .mano-hero__name img {
		filter: none;
	}

	.mano-hero__half:hover .mano-hero__details,
	.mano-hero__half:focus-within .mano-hero__details {
		opacity: 1;
		transform: none;
	}
}

/* Side by side but no hover (tablets): show the full panel. */
@media (hover: none) and (min-width: 782px) {
	.mano-hero .mano-hero__half.wp-block-cover .wp-block-cover__background.has-background-dim {
		opacity: 1;
	}

	.mano-hero__name {
		color: var(--mano-hero-ink);
	}

	.mano-hero__half--kaptol .mano-hero__name img {
		filter: none;
	}
}

/* Stacked (phones, Figma 353:152, 402 × 874, as of 2026-11-18): each restaurant takes half the
   screen and always shows its panel, never the photo, and nothing changes on tap (owner,
   2026-11-19): the restaurant's colour, the name centred, line, text, and "Otkrijte …" with
   "Rezervirajte stol" under it in the same light style (Figma shows one button).
   Figma's px hold on halves of 437px and up. On shorter halves the name's top and the two big
   gaps shrink together so everything fits: --mano-hero-fit is the height a half has beyond the
   panel's fixed parts (name, line, up to three lines of text, two buttons: 240px). */
@media (max-width: 781px) {
	.mano-hero__half.wp-block-cover {
		--mano-hero-fit: max(0px, 50svh - 240px);
		--mano-hero-top: min(110px, var(--mano-hero-fit) * 0.625); /* 110 of 437 */
		--mano-hero-gap-line: min(50px, var(--mano-hero-fit) * 0.284); /* name → line */
		--mano-hero-gap-buttons: min(24px, var(--mano-hero-fit) * 0.136); /* text → buttons */
		display: block;
		height: 50svh;
		min-height: 0 !important;
		padding: 0;
	}

	.mano-hero__half--mano2 {
		--mano-hero-ink: var(--wp--preset--color--topla-bijela);
		--mano-hero-eyebrow: var(--wp--preset--color--kaptol);
	}

	.mano-hero__half--kaptol {
		--mano-hero-panel: var(--wp--preset--color--mano-dva-bez);
	}

	.mano-hero__half--kaptol.wp-block-cover {
		--mano-hero-top: min(102px, var(--mano-hero-fit) * 0.58); /* 102 of 437 */
	}

	/* The panel colour only: the photo stays hidden on phones. */
	.mano-hero__half .wp-block-cover__image-background {
		display: none;
	}

	.mano-hero .mano-hero__half.wp-block-cover .wp-block-cover__background.has-background-dim {
		opacity: 1;
	}

	/* !important: core's `.has-<colour>-background-color` presets are !important too. */
	.mano-hero .mano-hero__half--kaptol.wp-block-cover .wp-block-cover__background.has-background-dim {
		background-color: var(--mano-hero-panel) !important;
	}

	/* Name and details flow in one centred column from the name's top. */
	.mano-hero__half .wp-block-cover__inner-container {
		position: absolute;
		z-index: 1;
		top: var(--mano-hero-top);
		right: 35px;
		left: 35px;
		width: auto;
	}

	.mano-hero__name,
	.mano-hero__name.wp-block-image.aligncenter, /* core gives centred images display: table */
	.mano-hero__half--kaptol .mano-hero__name.wp-block-image {
		position: static;
		display: block;
		margin: 0 auto;
		transform: none;
		transition: none;
	}

	.mano-hero__name.wp-block-image img {
		display: block;
		width: 173px;
		margin: 0 auto;
	}

	/* ManO's wordmark in its own dark colour (the light filter is for the desktop photo). */
	.mano-hero__half--kaptol .mano-hero__name.wp-block-image img {
		width: 156px;
		filter: none;
	}

	.mano-hero__details {
		position: static;
		margin: 0;
		padding: 0;
		color: var(--mano-hero-ink);
		font-size: 16px;
		font-weight: 400;
		line-height: 20px;
		letter-spacing: 0.02em;
	}

	.mano-hero__details > * {
		max-width: none;
	}

	.mano-hero__half .mano-hero__details > p {
		margin-block-start: 15px;
	}

	.mano-hero__half .mano-hero__details > p:first-child {
		margin-block-start: var(--mano-hero-gap-line);
	}

	.mano-hero__details .is-style-eyebrow {
		font-size: 10px;
		line-height: 12.1px;
		letter-spacing: 2.5px;
	}

	.mano-hero__half .mano-hero__details > .wp-block-buttons {
		flex-direction: column;
		align-items: center;
		gap: 10px;
		margin-block-start: var(--mano-hero-gap-buttons);
	}

	/* Every hero button looks like Figma's "Otkrijte": light fill, ink text, no border. */
	.mano-hero .mano-hero__half .wp-block-button .wp-block-button__link {
		border: 0;
		padding: 11px 22px;
		background-color: var(--wp--preset--color--topla-bijela);
		color: var(--wp--preset--color--dark-kaptol);
		font-size: 11px;
		font-weight: 500;
		line-height: 13px;
		letter-spacing: normal;
	}
}

/* In the editor always show the hovered state, so every text is visible and editable. */
.editor-styles-wrapper .mano-hero__half .wp-block-cover__background {
	opacity: 1 !important;
}

.editor-styles-wrapper .mano-hero__name {
	color: var(--mano-hero-ink);
}

.editor-styles-wrapper .mano-hero__half--kaptol .mano-hero__name img {
	filter: none;
}

.editor-styles-wrapper .mano-hero__details {
	opacity: 1 !important;
	transform: none !important;
}
