/* =============================================================================
   Home section "kvietimai" (#kvietimai) – gift voucher + "Pakviesk draugą".
   Owned by the Sections 3 agent. Loaded on the home template only, after site.css (and the booking widget CSS).
   Scope every rule to .dz-sec--kvietimai.

   Two promo cards: side by side from 1150 px (design A), stacked below. From 600 px the picture sits in the
   card's bottom-right corner and the text column is limited so it never runs under the picture (a wide single
   card keeps its heading on one line); on phones the picture moves under the button (design A).
   ============================================================================= */

/* No wave here, the cream simply continues from #atsiliepimai. The two cream backgrounds overlap by 1 px: where
   they only touch, a seam on a fractional device pixel (browser zoom, 125–175 % display scaling, 2.625× phones)
   lets the dark page background show through as a thin line. The extra 1 px of padding keeps the layout as it was. */
.dz-sec--kvietimai { margin-top: -1px; }
.dz-sec--kvietimai .dz-kv {
	position: relative;
	padding-top: 25px;
	padding-bottom: 128px;
}
.dz-sec--kvietimai .dz-kv__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

.dz-sec--kvietimai .dz-kv__item { display: flex; min-width: 0; }
.dz-sec--kvietimai .dz-kv__card {
	flex: 1 1 auto;
	min-width: 0;
	/* Picture: % of the card, capped at the design size. */
	--dz-kv-img: min(290px, 47.7%);
	--dz-kv-img-right: -8px;
	/* Text width: the room left of the picture (% of the text column = card − 2 × 40 px padding, 12 px gap)
	   and a cap – one line for a wide single card, the design's 280 px when the cards sit side by side. */
	--dz-kv-room: max(calc(100% - 254px), calc(52.3% - 2px));
	--dz-kv-cap: 440px;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 340px;
	padding: 40px;
	overflow: hidden;
	border-radius: var(--dz-r-xl);
}
.dz-sec--kvietimai .dz-kv__card--kuponas {
	background: var(--dz-sun);
	color: var(--dz-bark);
	--dz-focus-ring: var(--dz-night);
}
.dz-sec--kvietimai .dz-kv__card--kvietimas {
	--dz-kv-img: min(320px, 52.6%);
	--dz-kv-img-right: -22px;
	--dz-kv-room: max(calc(100% - 270px), calc(47.4% + 8px));
	background: var(--dz-jungle);
	color: var(--dz-cream);
	--dz-focus-ring: var(--dz-focus);
}
@media (min-width: 1150px) {
	.dz-sec--kvietimai .dz-kv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dz-sec--kvietimai .dz-kv__card { --dz-kv-cap: 280px; }
}

.dz-sec--kvietimai .dz-kv__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch; /* full card width, so the text limits above resolve against the card */
	gap: 16px;
}
.dz-sec--kvietimai .dz-kv__eyebrow { font-size: 13px; }
.dz-sec--kvietimai .dz-kv__title {
	max-width: min(var(--dz-kv-cap), var(--dz-kv-room));
	font-family: var(--dz-font-display);
	font-size: 46px;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}
.dz-sec--kvietimai .dz-kv__text {
	max-width: min(var(--dz-kv-cap), var(--dz-kv-room));
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	color: inherit;
	text-wrap: pretty;
}
.dz-sec--kvietimai .dz-kv__alt {
	max-width: min(var(--dz-kv-cap), var(--dz-kv-room));
	margin-top: -6px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
}
.dz-sec--kvietimai .dz-kv__alt a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* <picture> is display:contents, so its <source> would become an empty flex item (an extra gap) on phones. */
.dz-sec--kvietimai .dz-kv__card source { display: none; }
.dz-sec--kvietimai .dz-kv__card .dz-kv__img {
	position: absolute;
	right: var(--dz-kv-img-right);
	bottom: -18px;
	width: var(--dz-kv-img);
	max-width: none;
	height: auto;
	pointer-events: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.dz-sec--kvietimai .dz-kv__card { transition: transform .35s var(--dz-ease); }
	.dz-sec--kvietimai .dz-kv__card .dz-kv__img { transition: transform .45s var(--dz-ease); }
	.dz-sec--kvietimai .dz-kv__card:hover { transform: translateY(-6px); }
	.dz-sec--kvietimai .dz-kv__card:hover .dz-kv__img { transform: rotate(-4deg) scale(1.05); }
}

@media (max-width: 900px) {
	.dz-sec--kvietimai .dz-kv { padding-bottom: 84px; }
}

/* Phones: the picture follows the button, tucked into the bottom-right corner (design A). */
@media (max-width: 599.98px) {
	.dz-sec--kvietimai .dz-kv__grid { gap: 20px; }
	.dz-sec--kvietimai .dz-kv__card {
		--dz-kv-room: 100%;
		--dz-kv-cap: 100%;
		min-height: 0;
		gap: 16px;
	}
	.dz-sec--kvietimai .dz-kv__card .dz-kv__img {
		position: relative;
		right: auto;
		bottom: auto;
		align-self: flex-end;
		width: min(79%, 280px); /* design A: 220 px of the 278 px text column */
		margin: -8px -18px -30px 0;
	}
}
/* Narrow phones (design A values fit down to 375 px). */
@media (max-width: 374px) {
	.dz-sec--kvietimai .dz-kv__card { padding: 32px 24px 36px; border-radius: 32px; }
	.dz-sec--kvietimai .dz-kv__title { font-size: 42px; }
	.dz-sec--kvietimai .dz-kv__text { font-size: 17px; }
	.dz-sec--kvietimai .dz-kv__btn { --dz-btn-pl: 18px; --dz-btn-pr: 18px; gap: 8px; }
	.dz-sec--kvietimai .dz-kv__card .dz-kv__img { width: 204px; margin: -8px -10px -26px 0; }
}
