/* ==========================================================
   CTA Block — style.css
   Variantes: banner (default) · strip · split
   Tokens: --wp--preset--color--* y --wp--preset--spacing--*
   ========================================================== */

/* Base */
.cta {
	position: relative;
	overflow: hidden;
	margin-block-start: 0 !important;
}
.single-ocasion .cta {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Padding */
.cta--py-sm {
	padding-block: 2rem;
}
.cta--py-md {
	padding-block: 3rem;
}
.cta--py-lg {
	padding-block: 4rem;
}

/* Background colors */
.cta--bg-default {
	background-color: var(--wp--preset--color--bg);
}
.cta--bg-light {
	background-color: var(--wp--preset--color--bg-secondary);
}
.cta--bg-primary {
	background-color: var(--wp--preset--color--primary);
}
.cta--bg-dark {
	background-color: var(--wp--preset--color--primary-dark, #1a1a2e);
}

/* Kicker */
.cta__kicker {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Heading */
.cta__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--secondary);
	font-size: clamp(1.5rem, 3vw, 3rem);
	font-weight: 900;
	line-height: 1.2;
	color: var(--wp--preset--color--text-heading);
	text-wrap: balance;
	text-transform: uppercase;
}

.cta__heading .highlight {
	color: var(--wp--preset--color--accent);
	background-color: transparent;
}

/* Subtitle */
.cta__subtitle {
	margin: 0;
	font-size: var(--wp--preset--font-size--18);
	font-style: italic;
	line-height: 1.6;
	color: var(--wp--preset--color--text-muted);
	text-wrap: balance;
}

/* Body */
.cta__body {
	margin: 0;
	font-size: var(--wp--preset--font-size--16);
	line-height: 1.7;
	color: var(--wp--preset--color--text);
}

.cta__body p {
	margin: 0 0 0.75em;
}
.cta__body p:last-child {
	margin-bottom: 0;
}

/* Prices list (optional, between body and buttons) */
.cta__prices {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	width: 100%;
}

.cta__price-item {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text-heading);
	border-radius: var(--wp--custom--radius--2, 0.25rem);
	padding: 1rem 1.25rem;
	box-shadow: var(--wp--preset--shadow--100);
}

.cta__price-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--15);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.3;
}

.cta__price-title {
	flex-shrink: 1;
	min-width: 0;
	text-align: left;
	width: stretch;
}

.cta__price-leader {
	flex: 1 1 auto;
	min-width: 1.5rem;
	height: 1px;
	width: 100%;
	align-self: center;
	transform: translateY(0.1em);
	background-image: linear-gradient(
		to right,
		var(--wp--preset--color--border) 0,
		var(--wp--preset--color--border) 100%
	);
}

.cta__price-amount {
	flex-shrink: 0;
	white-space: nowrap;
}

.cta__price-subtitle {
	display: block;
	margin-top: 0.35rem;
	font-size: var(--wp--preset--font-size--14);
	color: var(--wp--preset--color--text);
	text-transform: none;
	letter-spacing: normal;
	text-align: left;
}

/* Buttons group */
.cta__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--12);
}

/* Button base */
.cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--8);
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--24);
	border-radius: var(--wp--custom--radius--2, 0.25rem);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--15);
	text-transform: uppercase;
	text-decoration: none;
	border: 2px solid transparent;
	transition:
		opacity 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
	cursor: pointer;
	white-space: nowrap;
}

.cta__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1em;
	height: 1.1em;
	line-height: 1;
	flex: 0 0 auto;
}

.cta__btn-icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.cta__btn-icon svg path {
	fill: var(--wp--preset--color--white);
}

.cta__btn-label {
	line-height: 1;
}

.cta__btn:hover {
	transform: scale(0.96);
	text-decoration: none;
}

/* Button: primary (filled) */
.cta__btn--primary {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--primary);
}

.cta__btn--primary:hover {
	background: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--100);
}

/* Button: secondary (outline primary) */
.cta__btn--secondary {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.cta__btn--secondary:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--100);
}

/* Button: ghost (outline neutral) */
.cta__btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--border);
	border-color: var(--wp--preset--color--border);
}

.cta__btn--ghost:hover {
	background: var(--wp--preset--color--border);
	color: var(--wp--preset--color--text-heading);
	border-color: var(--wp--preset--color--border);
	box-shadow: var(--wp--preset--shadow--100);
}

/* Button: white (filled white) */
.cta__btn--white {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--white);
}

.cta__btn--white:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--white);
	box-shadow: var(--wp--preset--shadow--100);
}

/* ==========================================================
   VARIANT: banner (default)
   Background image with overlay + centered content
   ========================================================== */
.cta:not([class*="is-style"]),
.cta.is-style-banner {
	min-height: 20rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cta:not([class*="is-style"]) .cta__bg,
.cta.is-style-banner .cta__bg {
	position: absolute;
	inset: 0;
}

.cta:not([class*="is-style"]) .cta__bg-img,
.cta.is-style-banner .cta__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cta:not([class*="is-style"]) .cta__overlay,
.cta.is-style-banner .cta__overlay {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--color--black);
}

.cta:not([class*="is-style"]) .cta__inner,
.cta.is-style-banner .cta__inner {
	position: relative;
	z-index: 1;
	width: 100%;
}

.cta:not([class*="is-style"]) .cta__content,
.cta.is-style-banner .cta__content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: 42rem;
	padding-block: 3rem;
}

/* Banner: centered alignment (default) */
.cta:not([class*="is-style"]).cta--align-center .cta__content,
.cta.is-style-banner.cta--align-center .cta__content {
	align-items: center;
	text-align: center;
	margin-inline: auto;
}

.cta:not([class*="is-style"]).cta--align-center .cta__buttons,
.cta.is-style-banner.cta--align-center .cta__buttons {
	justify-content: center;
}

/* Banner: left alignment */
.cta:not([class*="is-style"]).cta--align-left .cta__content,
.cta.is-style-banner.cta--align-left .cta__content {
	align-items: flex-start;
	text-align: left;
}

/* Banner with image: white text */
.cta:not([class*="is-style"]) .cta__bg ~ .cta__inner .cta__kicker,
.cta.is-style-banner .cta__bg ~ .cta__inner .cta__kicker {
	color: rgba(255, 255, 255, 0.75);
}

.cta:not([class*="is-style"]) .cta__bg ~ .cta__inner .cta__heading,
.cta.is-style-banner .cta__bg ~ .cta__inner .cta__heading {
	color: var(--wp--preset--color--white);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cta:not([class*="is-style"]) .cta__bg ~ .cta__inner .cta__subtitle,
.cta.is-style-banner .cta__bg ~ .cta__inner .cta__subtitle {
	color: rgba(255, 255, 255, 0.8);
}

.cta:not([class*="is-style"]) .cta__bg ~ .cta__inner .cta__body,
.cta:not([class*="is-style"]) .cta__bg ~ .cta__inner .cta__body p,
.cta.is-style-banner .cta__bg ~ .cta__inner .cta__body,
.cta.is-style-banner .cta__bg ~ .cta__inner .cta__body p {
	color: rgba(255, 255, 255, 1);
	font-weight: 500;
	text-wrap: balance;
}

.cta .cta__bg ~ .cta__inner .cta__body p strong {
	color: var(--wp--preset--color--white);
	font-weight: var(--fw-bold);
}

/* Banner dark bg (no image): white text */
.cta:not([class*="is-style"]).cta--bg-dark .cta__kicker,
.cta:not([class*="is-style"]).cta--bg-primary .cta__kicker,
.cta.is-style-banner.cta--bg-dark .cta__kicker,
.cta.is-style-banner.cta--bg-primary .cta__kicker {
	color: rgba(255, 255, 255, 0.75);
}

.cta:not([class*="is-style"]).cta--bg-dark .cta__heading,
.cta:not([class*="is-style"]).cta--bg-primary .cta__heading,
.cta.is-style-banner.cta--bg-dark .cta__heading,
.cta.is-style-banner.cta--bg-primary .cta__heading {
	color: var(--wp--preset--color--white);
}

.cta:not([class*="is-style"]).cta--bg-dark .cta__subtitle,
.cta:not([class*="is-style"]).cta--bg-primary .cta__subtitle,
.cta.is-style-banner.cta--bg-dark .cta__subtitle,
.cta.is-style-banner.cta--bg-primary .cta__subtitle {
	color: rgba(255, 255, 255, 0.8);
}

.cta:not([class*="is-style"]).cta--bg-dark .cta__body,
.cta:not([class*="is-style"]).cta--bg-primary .cta__body,
.cta.is-style-banner.cta--bg-dark .cta__body,
.cta.is-style-banner.cta--bg-primary .cta__body {
	color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================
   VARIANT: strip
   Solid color band, horizontal or centered, no image
   ========================================================== */
.cta.is-style-strip .cta__inner {
	max-width: var(--wp--style--global--wide-size, 75rem);
	margin-inline: auto;
}

.cta.is-style-strip .cta__content {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Strip: centered alignment */
.cta.is-style-strip.cta--align-center .cta__content {
	align-items: center;
	text-align: center;
	max-width: 42rem;
	margin-inline: auto;
}

.cta.is-style-strip.cta--align-center .cta__buttons {
	justify-content: center;
}

/* Strip: left alignment */
.cta.is-style-strip.cta--align-left .cta__content {
	align-items: flex-start;
	text-align: left;
}

/* Strip with primary/dark bg: white text */
.cta.is-style-strip.cta--bg-primary .cta__kicker,
.cta.is-style-strip.cta--bg-dark .cta__kicker {
	color: rgba(255, 255, 255, 0.75);
}

.cta.is-style-strip.cta--bg-primary .cta__heading,
.cta.is-style-strip.cta--bg-dark .cta__heading {
	color: var(--wp--preset--color--white);
}

.cta.is-style-strip.cta--bg-primary .cta__subtitle,
.cta.is-style-strip.cta--bg-dark .cta__subtitle {
	color: rgba(255, 255, 255, 0.8);
}

.cta.is-style-strip.cta--bg-primary .cta__body,
.cta.is-style-strip.cta--bg-dark .cta__body {
	color: rgba(255, 255, 255, 0.85);
}

.cta.is-style-strip.cta--bg-primary .cta__btn--primary,
.cta.is-style-strip.cta--bg-dark .cta__btn--primary {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary-dark);
	border-color: var(--wp--preset--color--white);
}

.cta.is-style-strip.cta--bg-primary .cta__btn--ghost,
.cta.is-style-strip.cta--bg-dark .cta__btn--ghost {
	color: var(--wp--preset--color--white);
	border-color: rgba(255, 255, 255, 0.5);
}

.cta.is-style-strip.cta--bg-primary .cta__btn--secondary,
.cta.is-style-strip.cta--bg-dark .cta__btn--secondary {
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}

/* ==========================================================
   VARIANT: split
   Image on one side, content on the other
   ========================================================== */
.cta.is-style-split {
	display: grid;
	grid-template-columns: 1fr;
}

.cta.is-style-split .cta__media {
	overflow: hidden;
	min-height: 15rem;
	max-height: 20rem;
}

.cta.is-style-split .cta__media-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cta.is-style-split .cta__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	padding: 2.5rem 1.5rem;
}

.cta.is-style-split .cta__heading {
	font-size: clamp(1.375rem, 2.5vw, 2rem);
}

/* Split: bg-light on content side */
.cta.is-style-split.cta--bg-light .cta__content {
	background-color: var(--wp--preset--color--bg-secondary);
}

/* Split: bg-primary on content side */
.cta.is-style-split.cta--bg-primary .cta__content {
	background-color: var(--wp--preset--color--primary);
}

.cta.is-style-split.cta--bg-primary .cta__kicker {
	color: rgba(255, 255, 255, 0.75);
}
.cta.is-style-split.cta--bg-primary .cta__heading {
	color: var(--wp--preset--color--white);
}
.cta.is-style-split.cta--bg-primary .cta__subtitle {
	color: rgba(255, 255, 255, 0.8);
}
.cta.is-style-split.cta--bg-primary .cta__body {
	color: rgba(255, 255, 255, 0.85);
}

/* Split: bg-dark on content side */
.cta.is-style-split.cta--bg-dark .cta__content {
	background-color: var(--wp--preset--color--primary-dark, #1a1a2e);
}

.cta.is-style-split.cta--bg-dark .cta__kicker {
	color: rgba(255, 255, 255, 0.75);
}
.cta.is-style-split.cta--bg-dark .cta__heading {
	color: var(--wp--preset--color--white);
}
.cta.is-style-split.cta--bg-dark .cta__subtitle {
	color: rgba(255, 255, 255, 0.8);
}
.cta.is-style-split.cta--bg-dark .cta__body {
	color: rgba(255, 255, 255, 0.85);
}

/* Split: image left */
.cta.is-style-split.cta--image-left .cta__media {
	order: -1;
}

/* ==========================================================
   Responsive
   ========================================================== */

/* Tablet (48rem / 768px) */
@media (min-width: 48rem) {
	.cta--py-sm {
		padding-block: 1rem;
	}
	.cta--py-md {
		padding-block: 3rem;
	}
	.cta--py-lg {
		padding-block: 5rem;
	}

	/* Split: 2 columns */
	.cta.is-style-split {
		grid-template-columns: 1fr 1fr;
		min-height: 24rem;
	}

	.cta.is-style-split .cta__media {
		min-height: auto;
		max-height: none;
	}

	.cta.is-style-split .cta__content {
		padding: 3rem 2.5rem;
	}

	/* Prices: 2 cols on tablet+ */
	.cta__prices {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}

	/* Center an odd orphan in the last row so it doesn't leave a gap
	   on its right. Use explicit width (not max-width) so the item
	   doesn't shrink to its intrinsic content size — matches a regular
	   2-col cell (50% minus half the column gap). */
	.cta__price-item:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		width: calc(50% - 0.5rem);
		margin-inline: auto;
	}

	/* When there's a price list, widen the content area so items breathe. */
	.cta--has-prices.cta:not([class*="is-style"]) .cta__content,
	.cta--has-prices.cta.is-style-banner .cta__content,
	.cta--has-prices.cta.is-style-strip .cta__content {
		max-width: 60rem;
	}
}

/* Desktop (64rem / 1024px) */
@media (min-width: 64rem) {
	.cta:not([class*="is-style"]) .cta__content,
	.cta.is-style-banner .cta__content {
		padding-block: 5rem;
	}

	.cta.is-style-split .cta__content {
		padding: 4rem 3.5rem;
	}
}

/* ==========================================================
   PARALLAX — fixed background effect (banner only)
   Uses background-image + background-attachment: fixed.
   Pure CSS, no JS. Disabled on mobile (iOS ignores
   background-attachment: fixed and causes repaint issues).
   ========================================================== */
.cta__bg--parallax {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: scroll;
}

@media (min-width: 48rem) {
	.cta__bg--parallax {
		background-attachment: fixed;
	}
}

/* ==========================================================
   VIDEO — background video (banner only)
   ========================================================== */
.cta__bg-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Poster image sits on top until video plays */
.cta__bg-img--poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	transition: opacity 0.6s ease;
}

/* Once video is playing, hide the poster */
.cta--video-playing .cta__bg-img--poster {
	opacity: 0;
	pointer-events: none;
}

/* On mobile, hide video and show poster only */
@media (max-width: 47.999rem) {
	.cta__bg-video {
		display: none;
	}
}

/* ==========================================================
   Scroll-driven reveal — content elements fade up in cascade
   as the CTA enters the viewport. Uses native CSS scroll-driven
   animations (animation-timeline: view()); browsers without
   support fall back to the final state immediately. The
   cascade is built by staggering animation-range start points,
   so each element settles slightly after the previous one.
   Skipped entirely for reduced-motion users.
   ========================================================== */
@keyframes cta-fade-up {
	from {
		opacity: 0;
		transform: translateY(1rem);
	}
}

@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.cta__kicker,
		.cta__heading,
		.cta__subtitle,
		.cta__body,
		.cta__prices,
		.cta__buttons {
			animation: cta-fade-up linear both;
			animation-timeline: view();
		}

		.cta__kicker {
			animation-range: entry 0% entry 50%;
		}
		.cta__heading {
			animation-range: entry 5% entry 55%;
		}
		.cta__subtitle {
			animation-range: entry 10% entry 60%;
		}
		.cta__body {
			animation-range: entry 15% entry 65%;
		}
		.cta__prices {
			animation-range: entry 20% entry 70%;
		}
		.cta__buttons {
			animation-range: entry 25% entry 75%;
		}
	}
}
