/* Zoaretz Landing Page — Frontend Styles */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	height: 100%;
}

body.cpl-landing-body {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100%;
	overflow-x: hidden !important;
	background: var(--cpl-panel-bg, #fff) !important;
	font-family: var(--e-global-typography-text-font-family, inherit);
	color: var(--cpl-text, #353b3b);
	direction: rtl;
	-webkit-font-smoothing: antialiased;
}

/* Hide theme / Elementor injections outside our page shell */
body.cpl-landing-body > *:not(#cpl-page):not(script):not(style):not(link) {
	display: none !important;
}

body.cpl-landing-body .elementor-location-footer,
body.cpl-landing-body .elementor-location-header,
body.cpl-landing-body .site-footer,
body.cpl-landing-body .site-header,
body.cpl-landing-body footer:not(.cpl-footer),
body.cpl-landing-body header:not(.cpl-header) {
	display: none !important;
}

body.cpl-landing-body #wpadminbar {
	display: none !important;
}

/* ══════════════════════════════════════════
   Page shell
   Mobile: flex column — logo, form+content, media at the bottom.
   ══════════════════════════════════════════ */
.cpl-page {
	position: relative;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	font-family: inherit;
}

/* ══════════════════════════════════════════
   Media block
   Mobile: in-flow at the bottom, below text + form.
   ══════════════════════════════════════════ */
.cpl-bg {
	position: relative;
	order: 4;
	flex: 1 1 auto;
	min-height: 44vh;
	min-height: 44dvh;
	width: 100%;
	z-index: 1;
	overflow: hidden;
}

.cpl-bg-poster,
.cpl-bg-image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: 1;
}

.cpl-bg-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.cpl-bg-video.is-playing {
	opacity: 1;
}

.cpl-bg-poster.is-hidden {
	opacity: 0;
	transition: opacity 0.5s ease;
}

/* ══════════════════════════════════════════
   Logo
   ══════════════════════════════════════════ */
.cpl-header {
	position: relative;
	z-index: 10;
	order: 1;
	padding-block-start: 16px;
	text-align: center;
	width: 100%;
}

.cpl-header picture {
	display: inline-block;
	line-height: 0;
}

.cpl-logo {
	max-width: clamp(90px, 26vw, 150px);
	height: auto;
	display: inline-block;
}

/* ══════════════════════════════════════════
   Panel: content + form
   Mobile: transparent, stacked, form first
   ══════════════════════════════════════════ */
.cpl-panel {
	position: relative;
	z-index: 10;
	order: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding-inline: 18px;
	padding-block-end: 18px;
	background: var(--cpl-panel-bg, #fff);
}

/* ══════════════════════════════════════════
   Mobile layout (<1024px): reorder via flex
   ══════════════════════════════════════════ */
@media (max-width: 1023px) {

	/* Let panel children participate in page flex order */
	.cpl-panel {
		display: contents;
	}

	.cpl-content,
	.cpl-form-section {
		width: 100%;
		max-width: 100%;
		padding-inline: 18px;
		background: var(--cpl-panel-bg, #fff);
		box-sizing: border-box;
	}

	.cpl-header  { order: 1; }
	.cpl-bg      { order: 4; }
	.cpl-footer  { order: 5; }

	/* Default: form → text → media */
	.cpl-mobile-form-before-content .cpl-form-section { order: 2; }
	.cpl-mobile-form-before-content .cpl-content      { order: 3; }

	/* Text → form → media */
	.cpl-mobile-form-after-content .cpl-content      { order: 2; }
	.cpl-mobile-form-after-content .cpl-form-section { order: 3; }

	/* Text → media → form */
	.cpl-mobile-form-after-media .cpl-content      { order: 2; }
	.cpl-mobile-form-after-media .cpl-bg           { order: 3; }
	.cpl-mobile-form-after-media .cpl-form-section { order: 4; }
	.cpl-mobile-form-after-media .cpl-footer      { order: 6; position: relative; background: var(--cpl-panel-bg, #fff); }

	/* Disclaimer overlays the media when form is not last */
	.cpl-mobile-form-before-content .cpl-footer,
	.cpl-mobile-form-after-content .cpl-footer {
		position: absolute;
		bottom: 0;
		inset-inline: 0;
	}
}

/* ── Form ── */
.cpl-form-section {
	width: 100%;
	max-width: 420px;
	text-align: center;
	padding-block: 10px 6px;
}

.cpl-form-heading {
	font-size: clamp(15px, 4.2vw, 19px);
	line-height: 1.35;
	color: var(--cpl-text, #353b3b);
	margin-block-end: 12px;
	font-weight: 400;
}

.cpl-form-heading strong {
	font-weight: 700;
}

.cpl-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.cpl-field {
	width: 100%;
}

.cpl-field input {
	width: 100%;
	height: 42px;
	border: 1px solid rgba(53, 59, 59, 0.35);
	border-radius: 0;
	background: #fff;
	text-align: center;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	color: var(--cpl-text, #353b3b);
	padding-inline: 12px;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.cpl-field input::placeholder {
	color: rgba(53, 59, 59, 0.55);
	font-weight: 400;
}

.cpl-field input:focus {
	border-color: var(--cpl-text, #353b3b);
}

.cpl-submit {
	width: 100%;
	height: 42px;
	border: none;
	border-radius: 0;
	background: var(--cpl-accent, #db98a2);
	color: #fff;
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.cpl-submit:hover {
	opacity: 0.9;
}

.cpl-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Consent checkbox */
.cpl-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	text-align: start;
	cursor: pointer;
	margin-block-start: 2px;
}

.cpl-consent input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.cpl-consent-box {
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	border: 1.5px solid var(--cpl-text, #353b3b);
	margin-block-start: 2px;
	position: relative;
	background: #fff;
}

.cpl-consent input:checked + .cpl-consent-box::after {
	content: '';
	position: absolute;
	inset: 2px;
	background: var(--cpl-text, #353b3b);
}

.cpl-consent-text {
	font-size: 11px;
	line-height: 1.45;
	font-weight: 400;
	color: var(--cpl-text, #353b3b);
}

.cpl-form-message {
	margin-block-start: 10px;
	padding: 8px 14px;
	font-size: 14px;
}

.cpl-form-message.is-success {
	background: rgba(45, 138, 90, 0.15);
	color: #2d8a5a;
}

.cpl-form-message.is-error {
	background: rgba(196, 69, 45, 0.12);
	color: #c4452d;
}

/* ── Content (rich text) ── */
.cpl-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	padding-block-start: clamp(10px, 2.5vh, 24px);
}

/* Rich text typography — controlled from the WP editor */
.cpl-rich > * {
	width: 100%;
}

.cpl-rich h1 {
	font-size: clamp(34px, 9.5vw, 50px);
	font-weight: 400;
	color: var(--cpl-accent, #db98a2);
	line-height: 1.08;
	margin: 0 0 4px;
	letter-spacing: -0.5px;
}

.cpl-rich h2 {
	font-size: clamp(30px, 8.5vw, 48px);
	font-weight: 700;
	color: var(--cpl-text, #353b3b);
	line-height: 1.12;
	margin: 6px 0;
	letter-spacing: -0.5px;
}

.cpl-rich h3 {
	font-size: clamp(22px, 6vw, 34px);
	font-weight: 700;
	color: var(--cpl-accent, #db98a2);
	line-height: 1.2;
	margin: 6px 0;
	letter-spacing: -0.3px;
}

.cpl-rich h4 {
	font-size: clamp(18px, 5vw, 26px);
	font-weight: 400;
	color: var(--cpl-text, #353b3b);
	line-height: 1.25;
	margin: 6px 0;
	white-space: normal;
}

.cpl-rich h4 br {
	display: block;
	margin-block-end: 0.25em;
}

.cpl-rich p {
	font-size: clamp(16px, 4.4vw, 21px);
	font-weight: 400;
	line-height: 1.4;
	color: var(--cpl-text, #353b3b);
	margin: 6px 0;
	letter-spacing: -0.3px;
}

.cpl-rich ul,
.cpl-rich ol {
	font-size: clamp(15px, 4vw, 19px);
	line-height: 1.5;
	color: var(--cpl-text, #353b3b);
	margin: 6px 0;
	padding-inline-start: 1.4em;
	text-align: start;
}

.cpl-rich strong,
.cpl-rich b {
	font-weight: 700;
}

/* Marker highlight — fixed brush PNG + configurable text color */
.cpl-rich mark,
.cpl-rich h1 mark,
.cpl-rich h2 mark,
.cpl-rich h3 mark,
.cpl-rich h4 mark,
.cpl-rich p mark,
.cpl-rich li mark {
	color: var(--cpl-highlight-text, var(--cpl-text, #353b3b));
	background-color: transparent;
	background-image: var(--cpl-highlight-bg);
	background-repeat: no-repeat;
	background-size: 100% 0.78em;
	background-position: center 90%;
	padding-inline: 10px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Utility classes available in the editor's "עיצובים" menu */
.cpl-rich .cpl-accent {
	color: var(--cpl-accent, #db98a2);
}

.cpl-rich .cpl-huge {
	font-size: 2em;
	font-weight: 700;
	letter-spacing: -1.5px;
	line-height: 1.05;
}

.cpl-rich .cpl-small {
	font-size: 0.65em;
	font-weight: 400;
	letter-spacing: 0;
}

/* Relative vertical spacing between content blocks */
.cpl-rich p.cpl-spacer {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1em;
	line-height: 0;
	overflow: hidden;
	color: transparent;
	user-select: none;
	pointer-events: none;
}

.cpl-rich p.cpl-spacer br {
	display: none;
}

.cpl-rich p.cpl-spacer-xs { height: 0.5em; min-height: 0.5em; }
.cpl-rich p.cpl-spacer-sm { height: 1em; min-height: 1em; }
.cpl-rich p.cpl-spacer-md { height: 1.5em; min-height: 1.5em; }
.cpl-rich p.cpl-spacer-lg { height: 2em; min-height: 2em; }
.cpl-rich p.cpl-spacer-xl { height: 3em; min-height: 3em; }

/* Price row — ₪ + amount, "החל מ-" pinned to top-right of the digits */
.cpl-rich .cpl-price-row {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	justify-content: center;
	gap: clamp(4px, 1.2vw, 10px);
	direction: ltr;
	line-height: 1;
	margin: 6px 0;
}

.cpl-rich .cpl-price-figure {
	position: relative;
	display: inline-block;
}

.cpl-rich .cpl-price-figure .cpl-price-prefix {
	position: absolute;
	top: 0.1em;
	right: 0;
	transform: translateX(22%);
	font-size: clamp(11px, 2.6vw, 14px);
	font-weight: 400;
	color: var(--cpl-accent, #db98a2);
	line-height: 1;
	white-space: nowrap;
	z-index: 1;
}

.cpl-rich .cpl-price-prefix {
	font-size: clamp(11px, 2.6vw, 14px);
	color: var(--cpl-accent, #db98a2);
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

/* Legacy markup without .cpl-price-figure wrapper */
.cpl-rich .cpl-price-row:not(:has(.cpl-price-figure)) {
	display: inline-grid;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto;
	grid-template-areas:
		". prefix"
		"currency amount";
	justify-content: center;
	align-items: end;
	column-gap: clamp(4px, 1.2vw, 10px);
	row-gap: 0;
}

.cpl-rich .cpl-price-row:not(:has(.cpl-price-figure)) .cpl-price-prefix {
	grid-area: prefix;
	justify-self: end;
	align-self: end;
	transform: translateY(0.35em);
	margin-inline-end: 0.1em;
}

.cpl-rich .cpl-price-row:not(:has(.cpl-price-figure)) .cpl-price-amount {
	grid-area: amount;
}

.cpl-rich .cpl-price-row:not(:has(.cpl-price-figure)) .cpl-price-currency {
	grid-area: currency;
	align-self: center;
}

.cpl-rich .cpl-price-amount {
	font-size: clamp(46px, 13vw, 64px);
	font-weight: 700;
	color: var(--cpl-accent, #db98a2);
	letter-spacing: -1.5px;
	direction: ltr;
}

.cpl-rich .cpl-price-currency {
	font-size: clamp(24px, 6.5vw, 34px);
	font-weight: 700;
	color: var(--cpl-accent, #db98a2);
	align-self: center;
	padding-bottom: 0.12em;
}

.cpl-badge {
	max-width: clamp(80px, 22vw, 130px);
	height: auto;
	margin-block-start: 10px;
}

/* ══════════════════════════════════════════
   Footer / disclaimer
   ══════════════════════════════════════════ */
.cpl-footer {
	position: absolute;
	bottom: 0;
	inset-inline: 0;
	z-index: 10;
	padding-block: 8px 12px;
	text-align: center;
}

.cpl-disclaimer {
	font-size: clamp(10px, 2.6vw, 13px);
	color: var(--cpl-text, #353b3b);
	font-weight: 400;
	margin: 0;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* ══════════════════════════════════════════
   Sound toggle
   ══════════════════════════════════════════ */
.cpl-sound-toggle {
	position: absolute;
	z-index: 20;
	bottom: 34px;
	inset-inline-end: 14px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--cpl-text, #353b3b);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s ease;
}

.cpl-sound-toggle:hover {
	background: #fff;
}

.cpl-sound-toggle.is-unmuted .cpl-sound-muted {
	display: none;
}

.cpl-sound-toggle.is-unmuted .cpl-sound-on {
	display: block !important;
}

.cpl-sound-toggle:not(.is-unmuted) .cpl-sound-on {
	display: none !important;
}

/* ══════════════════════════════════════════
   Loader
   ══════════════════════════════════════════ */
.cpl-loader {
	position: fixed;
	inset: 0;
	z-index: 100;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cpl-loader[hidden] {
	display: none;
}

.cpl-loader-dots {
	display: inline-block;
	position: relative;
	width: 80px;
	height: 80px;
}

.cpl-loader-dots span {
	position: absolute;
	top: 33px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #fff;
	animation: cpl-ellipsis 0.6s infinite cubic-bezier(0, 1, 1, 0);
}

.cpl-loader-dots span:nth-child(1) { left: 8px; animation-name: cpl-ellipsis1; }
.cpl-loader-dots span:nth-child(2) { left: 8px; animation-delay: -0.3s; }
.cpl-loader-dots span:nth-child(3) { left: 32px; animation-delay: -0.15s; }
.cpl-loader-dots span:nth-child(4) { left: 56px; animation-name: cpl-ellipsis3; }

@keyframes cpl-ellipsis1 {
	0%   { transform: scale(0); }
	100% { transform: scale(1); }
}
@keyframes cpl-ellipsis3 {
	0%   { transform: scale(1); }
	100% { transform: scale(0); }
}
@keyframes cpl-ellipsis {
	0%   { transform: translate(0, 0); }
	100% { transform: translate(24px, 0); }
}

/* ══════════════════════════════════════════
   Desktop (≥1024px): split layout
   White panel on the LEFT, media fills the rest.
   Logo top-right over media, disclaimer bottom-right.
   ══════════════════════════════════════════ */
@media (min-width: 1024px) {

	body.cpl-landing-body {
		overflow: hidden !important;
	}

	.cpl-page {
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
		display: block;
	}

	/* Media back to full-screen behind the panel */
	.cpl-bg {
		position: absolute;
		inset: 0;
		order: initial;
		flex: none;
		min-height: 0;
	}

	/* White side panel, pinned to the left (inline-end in RTL) */
	.cpl-panel {
		position: absolute;
		top: 0;
		bottom: 0;
		inset-inline-end: 0;
		width: clamp(400px, 38vw, 560px);
		height: 100%;
		display: flex;
		flex-direction: column;
		background: var(--cpl-panel-bg, #fff);
		justify-content: center;
		padding-inline: clamp(32px, 3.5vw, 56px);
		padding-block: 32px;
		box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
	}

	/* Desktop order: content on top, form below */
	.cpl-content,
	.cpl-form-section {
		width: 100%;
		max-width: none;
		padding-inline: 0;
		background: transparent;
	}

	.cpl-content      { order: 1; padding-block-start: 0; margin-block: 0; }
	.cpl-form-section { order: 2; padding-block: 20px 0; }

	/* Logo floats over the media, top corner */
	.cpl-header {
		position: absolute;
		top: 28px;
		inset-inline-start: 36px;
		width: auto;
		padding: 0;
	}

	.cpl-logo {
		max-width: 170px;
	}

	/* Disclaimer over the media, bottom corner */
	.cpl-footer {
		inset-inline: auto;
		inset-inline-start: 36px;
		bottom: 14px;
		text-align: start;
	}

	/* Sound toggle near the media edge */
	.cpl-sound-toggle {
		bottom: 20px;
		inset-inline-end: calc(clamp(400px, 38vw, 560px) + 20px);
	}

	/* Typography scale-up for the panel */
	.cpl-rich h1 {
		font-size: clamp(38px, 3.4vw, 50px);
	}

	.cpl-rich h2 {
		font-size: clamp(40px, 3.7vw, 54px);
	}

	.cpl-rich h3 {
		font-size: clamp(26px, 2.4vw, 36px);
	}

	.cpl-rich h4 {
		font-size: clamp(20px, 1.9vw, 28px);
	}

	.cpl-rich p {
		font-size: clamp(18px, 1.7vw, 24px);
	}

	.cpl-rich .cpl-price-amount {
		font-size: clamp(54px, 4.8vw, 72px);
	}

	.cpl-rich .cpl-price-figure .cpl-price-prefix,
	.cpl-rich .cpl-price-row:not(:has(.cpl-price-figure)) .cpl-price-prefix {
		font-size: clamp(12px, 1.1vw, 16px);
	}

	.cpl-rich .cpl-price-currency {
		font-size: clamp(26px, 2.4vw, 36px);
	}

	.cpl-form-heading {
		font-size: clamp(16px, 1.5vw, 21px);
		margin-block-end: 14px;
	}

	.cpl-form-section {
		max-width: 380px;
	}

	.cpl-field input,
	.cpl-submit {
		height: 44px;
	}
}
