/**
 * CD Pearl — behavior styles layered on top of the locked design snapshot.
 * Replaces the Elementor-JS-driven pieces (slideshow hero, popup, entrance
 * animations, stretched section) with self-contained equivalents.
 */

/* ── Hero background (replaces Elementor background slideshow) ─────────── */
.cd-pearl-root .elementor-element-6ea20e3 {
	position: relative;
	overflow: hidden;
}
.cd-pearl-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	z-index: 0;
	animation: cdPearlKenBurns 14s ease-out both;
}
@keyframes cdPearlKenBurns {
	from { transform: scale(1); }
	to   { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
	.cd-pearl-hero-bg { animation: none; }
}
.cd-pearl-root .elementor-element-6ea20e3 > .elementor-background-overlay { z-index: 1; }
.cd-pearl-root .elementor-element-6ea20e3 > .elementor-container {
	position: relative;
	z-index: 2;
}

/* ── Hero: fully cover the transparent overlay header ───────────────────
 * The locked design pulls the hero up a fixed -80px so it sits behind the
 * site's transparent header. Whenever the header renders taller than 80px
 * (real web fonts, longer menus) the uncovered strip shows the white page
 * background through the semi-transparent nav — the thin grey line across
 * the very top of the page. Pulling up 60px further and adding the same
 * 60px back as padding extends the background upward while leaving the hero
 * content exactly where it was. Now covers headers up to 140px tall. */
.cd-pearl-root .elementor-9497 .elementor-element.elementor-element-6ea20e3 {
	margin-top: -140px;
	padding-top: 160px;
}
@media (max-width: 1024px) {
	.cd-pearl-root .elementor-9497 .elementor-element.elementor-element-6ea20e3 { padding-top: 200px; }
}
@media (max-width: 767px) {
	.cd-pearl-root .elementor-9497 .elementor-element.elementor-element-6ea20e3 { padding-top: 190px; }
}

/* ── Quote Section: breathing room between text panel and logo ──────────
 * The left column's light panel ran to within ~13px of the logo, so a wide
 * client logo reads as crowding the quote block. Ending the panel sooner on
 * the right opens the gap. Scoped to the only breakpoint where the two
 * columns sit side by side — below 1025px the right column drops beneath. */
@media (min-width: 1025px) {
	.cd-pearl-root .cd-pearl-quote .elementor-element.elementor-element-q8e7b15b > .elementor-element-populated {
		margin-right: 40px;
	}
}

/* ── Section 2 logo: center it in its column ────────────────────────────
 * Elementor renders image-box images as display:block, so the locked
 * `text-align:center` on the wrapper cannot move them — the logo sits at the
 * left edge of the 80%-wide figure while the caption and button below it are
 * centered. Auto side margins center the block properly. */
.cd-pearl-root .elementor-element-44b0aad .elementor-image-box-img img {
	margin-left: auto;
	margin-right: auto;
}

/* ── Section 2 checklists: stack on mobile ──────────────────────────────
 * The snapshot carries per-widget custom CSS from the analytics page that
 * puts the two checklists side by side at EVERY width:
 *   .elementor-element-b28941e { width:45%; float:left }
 *   .elementor-element-311dff8 { width:45% }
 * On a phone that leaves two ~87px columns. Below Elementor's mobile
 * breakpoint they go full width and run one after the other instead. */
@media (max-width: 767px) {
	.cd-pearl-root .elementor-9497 .elementor-element.elementor-element-b28941e,
	.cd-pearl-root .elementor-9497 .elementor-element.elementor-element-311dff8 {
		width: 100%;
		float: none;
	}
}

/* ── Demo form: workflow category checkboxes ────────────────────────────
 * Sits inside the form's white panel, so text must be dark. Each row is a
 * checkbox aligned to the top of a bold label with a lighter description
 * beneath it; the whole row is clickable (it is wrapped in a <label>). */
.cd-pearl-checkgroup {
	margin-bottom: 20px;
	text-align: left;
}
.cd-pearl-checkgroup-label {
	display: block;
	margin-bottom: 12px;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: #1D1D1F;
}
.cd-pearl-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
	cursor: pointer;
}
.cd-pearl-check:last-child { margin-bottom: 0; }
.cd-pearl-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: #941111;
	cursor: pointer;
}
.cd-pearl-check-text { display: block; }
.cd-pearl-check-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #1D1D1F;
}
.cd-pearl-check-desc {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	line-height: 1.45;
	color: #5A5A5F;
}
.cd-pearl-check:hover .cd-pearl-check-title { color: #941111; }

/* ── Hero buttons: no hover underline ───────────────────────────────────
 * The theme underlines every link on hover (a bare `a:hover{text-decoration:
 * underline}`), which reads badly on the solid hero buttons. Covers both the
 * two-column layout and the centered solo button — same element ids. */
.cd-pearl-root .elementor-element-b5b8ed9 .elementor-button,
.cd-pearl-root .elementor-element-b5b8ed9 .elementor-button:hover,
.cd-pearl-root .elementor-element-b5b8ed9 .elementor-button:focus,
.cd-pearl-root .elementor-element-ded273f .elementor-button,
.cd-pearl-root .elementor-element-ded273f .elementor-button:hover,
.cd-pearl-root .elementor-element-ded273f .elementor-button:focus {
	text-decoration: none;
}

/* ── Hero: lone button ──────────────────────────────────────────────────
 * When only one hero button is in use it renders in a single full-width
 * column. The locked design gives each button a 20px right margin to space
 * the pair apart; that has to go, or the "centered" button sits ~10px left
 * of true center. Column padding mirrors the two-column columns. */
.cd-pearl-root .cd-pearl-btn-solo > .elementor-element-populated {
	padding: 10px;
}
.cd-pearl-root .cd-pearl-btn-solo .elementor-widget-button > .elementor-widget-container {
	margin-left: 0;
	margin-right: 0;
}

/* ── Section 5 column icons ─────────────────────────────────────────────
 * SVG icons are inlined so the snapshot's `.elementor-icon svg{height:50px}`
 * and fill rules apply. Raster icons fall back to <img>, sized to match. */
.cd-pearl-icon-img {
	height: 50px;
	width: auto;
	max-width: 100%;
}

/* ── Central Image size presets ─────────────────────────────────────────
 * The snapshot carries per-widget custom CSS from the analytics page
 * (`.elementor-9497 .elementor-element.elementor-element-5d876c3 img
 * {width:90px}`), so these presets must repeat that ancestor chain to
 * outrank it. Small reproduces the original 90px. */
.cd-pearl-center-img {
	height: auto;
	max-width: 100%;
}
.elementor-9497 .elementor-element.elementor-element-5d876c3 img.cd-pearl-center-img--small  { width: 90px; }
.elementor-9497 .elementor-element.elementor-element-5d876c3 img.cd-pearl-center-img--medium { width: 150px; }
.elementor-9497 .elementor-element.elementor-element-5d876c3 img.cd-pearl-center-img--large  { width: 225px; }
.elementor-9497 .elementor-element.elementor-element-5d876c3 img.cd-pearl-center-img--xlarge { width: 300px; }

/* ── Stretched section (replaces Elementor JS section stretch) ─────────── */
.cd-pearl-root .elementor-section-stretched {
	width: 100vw !important;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ── Entrance animations (replaces elementor-invisible + waypoints) ────── */
.cd-pearl-anim {
	opacity: 0;
}
.cd-pearl-anim.animated {
	opacity: 1;
	animation-duration: 1.25s;
	animation-fill-mode: both;
}

/* ── Video modal (replaces Elementor Pro popup / WP Video Lightbox) ────── */
.cd-pearl-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.cd-pearl-modal.is-open { opacity: 1; }
.cd-pearl-modal-inner {
	position: relative;
	width: min(900px, 92vw);
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.cd-pearl-modal-inner iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.cd-pearl-modal-close {
	position: absolute;
	top: -38px;
	right: -6px;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}
.cd-pearl-modal-close:hover { color: #c5c5c5; background: transparent; }
body.cd-pearl-modal-open { overflow: hidden; }

/* Video trigger links inherit theme link styling; just add a pointer. */
a.cd-pearl-video { cursor: pointer; }

/* ── Demo form ──────────────────────────────────────────────────────────── */
.cd-pearl-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0;
	overflow: hidden;
}
/* The message renders inside the form's white panel (the widget container is
 * #FFFFFF), not on the section's dark gradient — so it needs dark text on a
 * tinted block, not the white/pale colours the surrounding section uses. */
.cd-pearl-form-msg {
	display: none;
	margin-top: 18px;
	padding: 12px 16px;
	border-radius: 4px;
	border-left: 4px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	text-align: left;
}
.cd-pearl-form-msg.is-success {
	display: block;
	background: #E7F5EC;
	border-left-color: #1B7F3B;
	color: #15632F;
}
.cd-pearl-form-msg.is-error {
	display: block;
	background: #FBEAEA;
	border-left-color: #941111;
	color: #8A1010;
}
.cd-pearl-form.is-sending button[type="submit"] { opacity: 0.6; pointer-events: none; }
