/* Restaurant cards: white cards with photo, title, text and a full-width button pinned to the bottom.
   Three cards (ManO2 Figma 1:1573/1:1582/1:1591, Kaptol 1:2267/1:2276/1:2285): 403 × 436, 20px apart,
   photo 387 × 239, 118px under the awards line and 106px above the chef section (1388–2048 at 1440).
   Button text dark on ManO2, grey on Kaptol.
   Two cards (ManO2, Figma 1:1721/1:1730): 554 × 566, 77px apart, centred, photo 538 × 368, text 13/19.
   The variant follows the number of cards in the row. */

.mano-cards.mano-cards {
	margin-block: 0;
	padding: 118px var(--wp--preset--spacing--gutter) 106px;
	background: var(--mano-page, var(--wp--preset--color--topla-bijela));
}

/* ManO: 104px above the chef section (Figma 242:999 at 2046). */
.page-template-page-restoran-kaptol .mano-cards.mano-cards {
	padding-bottom: 104px;
}

.mano-cards__row.mano-cards__row {
	gap: 20px;
	max-width: 1249px; /* 3 × 403 + 2 × 20 */
	margin: 0 auto;
}

.mano-card.mano-card {
	display: flex;
	box-sizing: border-box;
	flex-direction: column;
	min-height: 436px;
	height: 100%;
	padding: 8px;
	border-radius: 5px;
	background: var(--wp--preset--color--bijela);
}

.mano-card > * {
	margin-block: 0;
}

.mano-card__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 387 / 239;
	object-fit: cover;
	border-radius: 5px;
}

.mano-card__title.mano-card__title {
	margin-top: 30px;
	color: var(--wp--preset--color--dark-kaptol);
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--lead);
	font-stretch: condensed;
	font-weight: 500;
	line-height: 24px;
	text-align: center;
}

.mano-card__text.mano-card__text {
	max-width: 340px;
	margin: 12px auto 0;
	color: var(--wp--preset--color--siva);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	line-height: 17px;
	text-align: center;
}

/* Button: pinned to the bottom of the card, at least 39px under the text (Figma). */
.mano-card__buttons.mano-card__buttons {
	margin-top: auto;
	padding-top: 39px;
}

.mano-card__buttons .wp-block-button {
	width: 100%;
}

.mano-card__buttons .wp-block-button__link {
	box-sizing: border-box;
	width: 100%;
	padding: 13px 22px;
	border-radius: 5px;
	background: var(--wp--preset--color--button);
	color: var(--wp--preset--color--dark-kaptol);
	font-weight: 600;
	line-height: 16px;
}

.page-template-page-restoran-kaptol .mano-card__buttons .wp-block-button__link {
	color: var(--wp--preset--color--siva);
}

/* Two cards (ManO2): 1.388 → 2.092 at 1440, cards at y 1453, 65px under the awards line. */
.mano-cards:not(.mano-cards--intro):has(.mano-cards__row > .wp-block-column:nth-child(2):last-child) {
	padding-top: 65px;
	padding-bottom: 73px;
}

.mano-cards:not(.mano-cards--intro) .mano-cards__row.mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) {
	gap: 77px;
	max-width: 1185px; /* 2 × 554 + 77 */
}

.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) .mano-card.mano-card {
	min-height: 566px;
}

.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) .mano-card__photo img {
	aspect-ratio: 538 / 368;
}

.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) .mano-card__text.mano-card__text {
	max-width: 426px;
	font-size: var(--wp--preset--font-size--ui);
	line-height: 19px;
}

.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) .mano-card__buttons.mano-card__buttons {
	padding-top: 36px;
}

/* Tablet: two cards per row, the third centred under them. */
@media (min-width: 782px) and (max-width: 1023px) {
	.mano-cards.mano-cards {
		padding-block: 96px 80px;
	}

	.mano-cards__row.mano-cards__row {
		flex-wrap: wrap !important; /* core Columns sets nowrap !important from 782px */
		justify-content: center;
	}

	.mano-cards__row > .wp-block-column.wp-block-column {
		flex: 0 0 calc(50% - 10px);
	}
}

/* Two cards on tablet: side by side, 20px apart, card height from content. */
@media (min-width: 782px) and (max-width: 1023px) {
	.mano-cards:not(.mano-cards--intro) .mano-cards__row.mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) {
		gap: 20px;
	}

	.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) > .wp-block-column.wp-block-column {
		flex: 1 1 0;
	}

	.mano-cards:not(.mano-cards--intro) .mano-cards__row:has(> .wp-block-column:nth-child(2):last-child) .mano-card.mano-card {
		min-height: 0;
	}
}

@media (max-width: 781px) {
	.mano-cards.mano-cards {
		padding-block: 64px;
	}

	.mano-card.mano-card {
		min-height: 0;
	}
}

/* ManO intro with cards (Figma 305:36, update 28/10): one 1024 screen on the page's krem. Centred
   eyebrow (dark), 54 lower the sentence (statement style, 45/55), 54 lower the note (Inter Medium
   14/18, 399 wide), then two 403 × 436 cards 20 apart, 85 under the note. */
.mano-cards--intro.mano-cards--intro {
	padding-top: 111px;
	padding-bottom: 106px;
}

.mano-cards__head.mano-cards__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 0 85px;
	color: var(--wp--preset--color--dark-kaptol);
	text-align: center;
}

.mano-cards__head > * {
	margin-block: 0;
}

.mano-cards__head .is-style-eyebrow.is-style-eyebrow {
	color: inherit;
	line-height: 13px;
}

.mano-cards__head .mano-statement__note.mano-statement__note {
	max-width: 399px;
}

.mano-cards--intro .mano-cards__row.mano-cards__row {
	justify-content: center;
}

.mano-cards--intro .mano-cards__row > .wp-block-column {
	flex: 0 1 403px !important;
}

/* Phones (Figma 353:392 Frame 140, 370:1537 Frame 116/117): cards 370 wide, 24px apart, 7px inside;
   photo 354 × 219 (radius 4.6), title serif 20/22 15px under it, text 11px lower (ManO2 Inter 11/15.6
   in the kaptol grey, ManO 12/17), the 37px button 15px under the text. ManO2's row starts 50px
   under the awards line and ends 24px above the chef; ManO's intro has 80px above and below, eyebrow
   (Inter SemiBold 11/13.3), 15 lower the sentence (serif 30/33), 50 lower the note (Inter Medium
   12/14), the cards 50 lower. Only the restaurant pages. */
@media (max-width: 781px) {
	body:has(.mano-rhero__wordmark) .mano-cards.mano-cards {
		padding: 50px 16px 24px;
	}

	body:has(.mano-rhero__wordmark) .mano-cards__row.mano-cards__row {
		gap: 24px;
		margin-bottom: 0;
	}

	body:has(.mano-rhero__wordmark) .mano-card.mano-card {
		padding: 7.33px 8.33px 7.04px 7.32px; /* Figma: 354.35 of content in a 370 card */
		border-radius: 4.6px;
	}

	body:has(.mano-rhero__wordmark) .mano-card__photo img {
		aspect-ratio: 354.35 / 218.84;
		border-radius: 4.6px;
	}

	body:has(.mano-rhero__wordmark) .mano-card__title.mano-card__title {
		margin-top: 15px;
		font-size: 20px;
		line-height: 22px;
	}

	body:has(.mano-rhero__wordmark) .mano-card__text.mano-card__text {
		max-width: none;
		margin-top: 11px;
		color: var(--wp--preset--color--kaptol);
		font-size: 11px;
		line-height: 16px; /* Figma's text box: two lines in 32 */
	}

	body:has(.mano-rhero__wordmark) .mano-card__buttons.mano-card__buttons {
		padding-top: 15px;
	}

	body:has(.mano-rhero__wordmark) .mano-card__buttons .wp-block-button__link {
		padding: 11.9px 20px;
		border-radius: 4.6px;
		color: var(--wp--preset--color--dark-kaptol);
		font-size: 11px;
		line-height: 13.3px;
	}

	body:has(.mano-rhero__wordmark) .mano-cards--intro.mano-cards--intro {
		padding: 80px 16px;
	}

	body:has(.mano-rhero__wordmark) .mano-cards--intro .mano-card__text.mano-card__text {
		color: var(--wp--preset--color--siva);
		font-size: 12px;
		line-height: 17px;
	}

	/* ManO's second card: the frame sets its text in a 297 wide box, centred. */
	body:has(.mano-rhero__wordmark) .mano-cards--intro .wp-block-column:nth-child(2) .mano-card__text.mano-card__text {
		max-width: 297px;
		margin-inline: auto;
	}

	body:has(.mano-rhero__wordmark) .mano-cards__head.mano-cards__head {
		margin-bottom: 50px;
	}

	body:has(.mano-rhero__wordmark) .mano-cards__head .is-style-eyebrow.is-style-eyebrow {
		font-size: 11px;
		line-height: 13.3px;
		letter-spacing: 2.5px;
	}

	body:has(.mano-rhero__wordmark) .mano-cards__head .mano-statement__text.mano-statement__text {
		margin-top: 15px;
		font-size: 30px;
		line-height: 33px;
		letter-spacing: 0.02em;
	}

	body:has(.mano-rhero__wordmark) .mano-cards__head .mano-statement__note.mano-statement__note {
		max-width: none;
		margin-top: 50px;
		font-size: 12px;
		line-height: 14px;
	}
}
