/* ==========================================================================
   ORIGIN Estimations: Service detail page (Hero + Details + Final CTA)
   Every selector is scoped to .ce-service-detail (root) or ce-sd__* children.
   Palette: Charcoal #202B2B · Forest #52796F · Gold #D4B483 · Off-white #FAF9F6
   Breakpoints (Elementor defaults): tablet ≤1024px, mobile ≤767px.
   ========================================================================== */

/* ---------- Tokens (Elementor controls override these variables) ---------- */
.ce-service-detail {
	--ce-sd-hero-bg: #FFFFFF;
	--ce-sd-details-bg: #FAF9F6;
	--ce-sd-accent: #D4B483;
	--ce-sd-focus: #52796F;

	--ce-sd-eyebrow: #86693A;      /* deeper gold: AA contrast for text on white */
	--ce-sd-heading: #202B2B;
	--ce-sd-text: #5B625F;
	--ce-sd-support: #5B625F;

	--ce-sd-frame: rgba(212, 180, 131, 0.75);
	--ce-sd-ratio: 5 / 4;
	--ce-sd-pos: center center;
	--ce-sd-img-radius: 8px;

	--ce-sd-h-bg: #52796F;
	--ce-sd-h-color: #FFFFFF;
	--ce-sd-h-bg-hover: #202B2B;
	--ce-sd-h-color-hover: #FFFFFF;
	--ce-sd-h-arrow: #D4B483;

	--ce-sd-h2: #202B2B;
	--ce-sd-intro: #5B625F;

	--ce-sd-card-bg: #FFFFFF;
	--ce-sd-card-border: #E7E5DF;
	--ce-sd-card-border-hover: #D4B483;
	--ce-sd-card-title: #202B2B;
	--ce-sd-card-desc: #5B625F;
	--ce-sd-num: #52796F;
	--ce-sd-radius: 6px;
	--ce-sd-lift: 2px;
	--ce-sd-gap: 22px;
	--ce-sd-cols: 3;

	--ce-sd-icon: #52796F;
	--ce-sd-icon-bg: rgba(82, 121, 111, 0.08);
	--ce-sd-icon-border: rgba(82, 121, 111, 0.2);
	--ce-sd-icon-hover: #FAF9F6;
	--ce-sd-icon-bg-hover: #52796F;
	--ce-sd-icon-size: 26px;
	--ce-sd-icon-box: 54px;
	--ce-sd-icon-radius: 4px;

	--ce-sd-cta-bg: #202B2B;
	--ce-sd-cta-glow: #52796F;
	--ce-sd-cta-glow-op: 0.3;
	--ce-sd-cta-title: #FAF9F6;
	--ce-sd-cta-text: #D9E0DC;
	--ce-sd-cta-accent: #D4B483;
	--ce-sd-cta-w: 760px;
	--ce-sd-c-bg: #D4B483;
	--ce-sd-c-color: #202B2B;
	--ce-sd-c-bg-hover: #FAF9F6;
	--ce-sd-c-color-hover: #202B2B;
	--ce-sd-c-arrow: #202B2B;

	--ce-sd-max-w: 1200px;
	--ce-sd-text-w: 56%;
	--ce-sd-hero-gap: 64px;
	--ce-sd-hero-va: center;
	--ce-sd-head-gap: 52px;
	--ce-sd-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	/* Alignment helpers (set by the alignment classes below) */
	--ce-sd-ta: center;
	--ce-sd-ml: auto;
	--ce-sd-mr: auto;

	width: 100%;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.ce-service-detail *,
.ce-service-detail *::before,
.ce-service-detail *::after {
	box-sizing: border-box;
}

.ce-service-detail ul,
.ce-service-detail li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ce-service-detail p {
	margin: 0;
}

.ce-service-detail .ce-sd__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ce-sd__inner {
	width: 100%;
	max-width: var(--ce-sd-max-w);
	margin-inline: auto;
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
.ce-sd__hero {
	padding: 88px 32px;
	background: var(--ce-sd-hero-bg);
	overflow: hidden;
}

.ce-sd__hero-grid {
	display: grid;
	grid-template-columns: minmax(0, var(--ce-sd-text-w)) minmax(0, 1fr);
	align-items: var(--ce-sd-hero-va);
	gap: var(--ce-sd-hero-gap);
}

.ce-sd__hero--no-media .ce-sd__hero-grid {
	grid-template-columns: minmax(0, 1fr);
}

.ce-sd__hero--no-media .ce-sd__hero-text {
	max-width: 760px;
}

.ce-sd__hero-text {
	min-width: 0;
}

.ce-service-detail .ce-sd__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 20px;
	color: var(--ce-sd-eyebrow);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.4;
	text-transform: uppercase;
}

.ce-service-detail .ce-sd__eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 36px;
	height: 2px;
	background: var(--ce-sd-accent);
}

.ce-service-detail .ce-sd__title {
	max-width: 18ch;
	margin: 0 0 24px;
	padding: 0;
	color: var(--ce-sd-heading);
	font-family: inherit;
	font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.ce-service-detail .ce-sd__desc {
	max-width: 58ch;
	margin: 0 0 16px;
	color: var(--ce-sd-text);
	font-size: 1.1875rem;
	line-height: 1.7;
}

.ce-service-detail .ce-sd__support {
	max-width: 58ch;
	margin: 0;
	color: var(--ce-sd-support);
	font-size: 1.0625rem;
	line-height: 1.7;
}

.ce-sd__actions {
	margin-top: 32px;
}

/* ---------- Image + optional gold frame ---------- */
.ce-sd__media {
	position: relative;
	min-width: 0;
}

.ce-sd__hero--frame .ce-sd__media {
	padding: 0 16px 16px 0;
}

.ce-sd__hero--frame .ce-sd__media::before {
	content: "";
	position: absolute;
	top: 16px;
	left: 16px;
	right: 0;
	bottom: 0;
	border: 2px solid var(--ce-sd-frame);
	border-radius: var(--ce-sd-img-radius);
	pointer-events: none;
}

.ce-service-detail .ce-sd__photo {
	position: relative;
	z-index: 1;
	aspect-ratio: var(--ce-sd-ratio);
	overflow: hidden;
	background: #E7E5DF;
	border-radius: var(--ce-sd-img-radius);
}

.ce-service-detail .ce-sd__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
	object-position: var(--ce-sd-pos);
}

/* Editor-only empty state */
.ce-service-detail .ce-sd__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	background-color: #202B2B;
	background-image:
		linear-gradient(rgba(212, 180, 131, 0.1) 1px, transparent 1px),
		linear-gradient(90deg, rgba(212, 180, 131, 0.1) 1px, transparent 1px);
	background-size: 28px 28px;
	text-align: center;
}

.ce-service-detail .ce-sd__placeholder-text {
	max-width: 28ch;
	color: rgba(250, 249, 246, 0.85);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	line-height: 1.5;
}

/* ---------- Buttons (shared) ---------- */
.ce-service-detail a.ce-sd__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 17px 30px;
	border: 1px solid transparent;
	border-radius: 3px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.09em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ce-sd-ease);
}

.ce-service-detail a.ce-sd__btn:hover,
.ce-service-detail a.ce-sd__btn:focus-visible {
	text-decoration: none;
	transform: translateY(-1px);
}

.ce-service-detail a.ce-sd__btn:focus-visible {
	outline: 2px solid var(--ce-sd-focus);
	outline-offset: 4px;
}

.ce-service-detail a.ce-sd__btn--hero {
	background: var(--ce-sd-h-bg);
	color: var(--ce-sd-h-color);
}

.ce-service-detail a.ce-sd__btn--hero:hover,
.ce-service-detail a.ce-sd__btn--hero:focus-visible {
	background: var(--ce-sd-h-bg-hover);
	color: var(--ce-sd-h-color-hover);
}

.ce-service-detail .ce-sd__btn--hero .ce-sd__arrow {
	color: var(--ce-sd-h-arrow);
}

.ce-service-detail a.ce-sd__btn--cta {
	background: var(--ce-sd-c-bg);
	color: var(--ce-sd-c-color);
}

.ce-service-detail a.ce-sd__btn--cta:hover,
.ce-service-detail a.ce-sd__btn--cta:focus-visible {
	background: var(--ce-sd-c-bg-hover);
	color: var(--ce-sd-c-color-hover);
}

.ce-service-detail a.ce-sd__btn--cta:focus-visible {
	outline-color: #FAF9F6;
}

.ce-service-detail .ce-sd__btn--cta .ce-sd__arrow {
	color: var(--ce-sd-c-arrow);
}

.ce-service-detail .ce-sd__arrow {
	flex: 0 0 auto;
	transition: transform 0.25s var(--ce-sd-ease);
}

.ce-service-detail a.ce-sd__btn:hover .ce-sd__arrow,
.ce-service-detail a.ce-sd__btn:focus-visible .ce-sd__arrow {
	transform: translateX(3px);
}

/* ==========================================================================
   2. DETAILS
   ========================================================================== */
.ce-sd__details {
	padding: 88px 32px;
	background: var(--ce-sd-details-bg);
}

.ce-sd__head {
	margin-bottom: var(--ce-sd-head-gap);
	text-align: var(--ce-sd-ta);
}

.ce-service-detail .ce-sd__h2 {
	max-width: 24ch;
	margin: 0;
	margin-left: var(--ce-sd-ml);
	margin-right: var(--ce-sd-mr);
	padding: 0;
	color: var(--ce-sd-h2);
	font-family: inherit;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.02em;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.ce-service-detail .ce-sd__h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 2px;
	margin: 0 var(--ce-sd-mr) 22px var(--ce-sd-ml);
	background: var(--ce-sd-accent);
}

.ce-service-detail .ce-sd__intro {
	max-width: 70ch;
	margin-top: 20px;
	margin-left: var(--ce-sd-ml);
	margin-right: var(--ce-sd-mr);
	color: var(--ce-sd-intro);
	font-size: 1.0625rem;
	line-height: 1.75;
}

/* ---------- Grid + cards ---------- */
.ce-service-detail .ce-sd__grid {
	display: grid;
	grid-template-columns: repeat(var(--ce-sd-cols), minmax(0, 1fr));
	align-items: stretch;
	gap: var(--ce-sd-gap);
}

.ce-service-detail .ce-sd__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 30px 28px 28px;
	background: var(--ce-sd-card-bg);
	border: 1px solid var(--ce-sd-card-border);
	border-radius: var(--ce-sd-radius);
	transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ce-sd-ease);
}

/* Gold top rule: short at rest, extends on hover/focus */
.ce-sd__card::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--ce-sd-accent);
	border-radius: var(--ce-sd-radius) var(--ce-sd-radius) 0 0;
	transform: scaleX(0.14);
	transform-origin: left center;
	transition: transform 0.45s var(--ce-sd-ease);
	pointer-events: none;
}

.ce-service-detail .ce-sd__card:hover,
.ce-service-detail .ce-sd__card:focus-within {
	border-color: var(--ce-sd-card-border-hover);
	transform: translateY(calc(-1 * var(--ce-sd-lift)));
}

.ce-sd__card:hover::before,
.ce-sd__card:focus-within::before {
	transform: scaleX(1);
}

.ce-sd__card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px;
}

.ce-service-detail .ce-sd__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--ce-sd-icon-box);
	height: var(--ce-sd-icon-box);
	background: var(--ce-sd-icon-bg);
	border: 1px solid var(--ce-sd-icon-border);
	border-radius: var(--ce-sd-icon-radius);
	color: var(--ce-sd-icon);
	line-height: 1;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.ce-service-detail .ce-sd__card:hover .ce-sd__icon,
.ce-service-detail .ce-sd__card:focus-within .ce-sd__icon {
	background: var(--ce-sd-icon-bg-hover);
	border-color: var(--ce-sd-icon-bg-hover);
	color: var(--ce-sd-icon-hover);
}

.ce-service-detail .ce-sd__icon svg {
	display: block;
	width: var(--ce-sd-icon-size);
	height: var(--ce-sd-icon-size);
	max-width: none;
}

.ce-service-detail .ce-sd__icon svg:not(.ce-sd__svg) {
	fill: currentColor; /* custom Elementor SVG icons */
}

.ce-service-detail .ce-sd__icon i {
	display: block;
	font-size: var(--ce-sd-icon-size);
	line-height: 1;
}

.ce-service-detail .ce-sd__num {
	margin-left: auto;
	color: var(--ce-sd-num);
	font-size: 0.8125rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.1em;
	line-height: 1;
}

.ce-service-detail .ce-sd__card-title {
	margin: 0 0 10px;
	padding: 0;
	color: var(--ce-sd-card-title);
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.ce-service-detail .ce-sd__card-desc {
	color: var(--ce-sd-card-desc);
	font-size: 0.96875rem;
	line-height: 1.7;
}

.ce-service-detail .ce-sd__notice {
	padding: 14px 18px;
	border: 1px dashed var(--ce-sd-card-border);
	color: var(--ce-sd-text);
	font-size: 0.875rem;
}

/* ==========================================================================
   3. FINAL CTA
   ========================================================================== */
.ce-sd__cta {
	position: relative;
	isolation: isolate;
	padding: 84px 32px;
	overflow: hidden;
	background: var(--ce-sd-cta-bg);
}

.ce-sd__cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(ellipse 55% 90% at 100% 100%, var(--ce-sd-cta-glow) 0%, transparent 70%);
	opacity: var(--ce-sd-cta-glow-op);
	pointer-events: none;
}

.ce-sd__cta::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--ce-sd-cta-accent);
	pointer-events: none;
}

.ce-sd__cta-body {
	max-width: var(--ce-sd-cta-w);
}

.ce-sd__cta--center .ce-sd__cta-body {
	margin-inline: auto;
	text-align: center;
}

.ce-service-detail .ce-sd__cta-title {
	margin: 0;
	padding: 0;
	color: var(--ce-sd-cta-title);
	font-family: inherit;
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.02em;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.ce-service-detail .ce-sd__cta-title::before {
	content: "";
	display: block;
	width: 44px;
	height: 2px;
	margin-bottom: 22px;
	background: var(--ce-sd-cta-accent);
}

.ce-sd__cta--center .ce-sd__cta-title::before {
	margin-inline: auto;
}

.ce-service-detail .ce-sd__cta-text {
	margin-top: 18px;
	color: var(--ce-sd-cta-text);
	font-size: 1.0625rem;
	line-height: 1.75;
}

/* ==========================================================================
   Header alignment (Elementor "Header Alignment" → wrapper classes)
   ========================================================================== */
.ce-sd-align-left   .ce-service-detail { --ce-sd-ta: left;   --ce-sd-ml: 0;    --ce-sd-mr: auto; }
.ce-sd-align-center .ce-service-detail { --ce-sd-ta: center; --ce-sd-ml: auto; --ce-sd-mr: auto; }

/* ==========================================================================
   Compact desktop (1025–1199px)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1199px) {
	.ce-service-detail .ce-sd__card {
		padding: 26px 22px 24px;
	}
}

/* ==========================================================================
   Tablet (≤1024px)
   ========================================================================== */
@media (max-width: 1024px) {
	.ce-sd-tablet-align-left   .ce-service-detail { --ce-sd-ta: left;   --ce-sd-ml: 0;    --ce-sd-mr: auto; }
	.ce-sd-tablet-align-center .ce-service-detail { --ce-sd-ta: center; --ce-sd-ml: auto; --ce-sd-mr: auto; }

	/* Hero stacks: text first, image below */
	.ce-sd__hero-grid {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}

	.ce-service-detail .ce-sd__title {
		max-width: 22ch;
	}

	.ce-service-detail .ce-sd__h2 {
		max-width: 28ch;
	}
}

/* ==========================================================================
   Mobile (≤767px)
   ========================================================================== */
@media (max-width: 767px) {
	.ce-sd-mobile-align-left   .ce-service-detail { --ce-sd-ta: left;   --ce-sd-ml: 0;    --ce-sd-mr: auto; }
	.ce-sd-mobile-align-center .ce-service-detail { --ce-sd-ta: center; --ce-sd-ml: auto; --ce-sd-mr: auto; }

	.ce-service-detail .ce-sd__eyebrow {
		gap: 10px;
		margin-bottom: 16px;
		font-size: 0.75rem;
		letter-spacing: 0.14em;
	}

	.ce-service-detail .ce-sd__eyebrow::before {
		width: 24px;
	}

	.ce-service-detail .ce-sd__desc {
		font-size: 1.0625rem;
	}

	.ce-service-detail .ce-sd__support,
	.ce-service-detail .ce-sd__intro,
	.ce-service-detail .ce-sd__cta-text {
		font-size: 1rem;
	}

	.ce-sd__actions {
		margin-top: 26px;
	}

	.ce-service-detail a.ce-sd__btn {
		width: 100%;
		white-space: normal;
		text-align: center;
	}

	.ce-sd__hero--frame .ce-sd__media {
		padding: 0 10px 10px 0;
	}

	.ce-sd__hero--frame .ce-sd__media::before {
		top: 10px;
		left: 10px;
	}

	.ce-service-detail .ce-sd__card {
		padding: 26px 22px 24px;
	}

	.ce-sd__card::before {
		transform: scaleX(0.1);
	}

	.ce-sd__cta--center .ce-sd__cta-body,
	.ce-sd__cta--left .ce-sd__cta-body {
		text-align: left;
	}

	.ce-sd__cta--center .ce-sd__cta-title::before {
		margin-inline: 0;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.ce-service-detail *,
	.ce-service-detail *::before,
	.ce-service-detail *::after {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}

	.ce-service-detail .ce-sd__card:hover,
	.ce-service-detail .ce-sd__card:focus-within,
	.ce-service-detail a.ce-sd__btn:hover,
	.ce-service-detail a.ce-sd__btn:focus-visible,
	.ce-service-detail a.ce-sd__btn:hover .ce-sd__arrow,
	.ce-service-detail a.ce-sd__btn:focus-visible .ce-sd__arrow {
		transform: none;
	}
}