/**
 * Webbotica — CRM & Automation Service Section
 * Connected enquiry capture, lead journey and quiet follow-up automation.
 */

.wb-service-crm {
	--wb-crm-blue: var(--color-primary, #496af9);
	--wb-crm-surface: var(--color-surface, #ffffff);
	--wb-crm-heading: var(--color-heading, #111827);
	--wb-crm-copy: var(--color-paragraph, #6b7280);
	--wb-crm-border: var(--color-border, #e5e7eb);
	--wb-crm-muted: #f7f7f5;
	--wb-crm-green: #2f7d57;

	padding: 5.5rem 0;
	scroll-margin-top: 6rem;
	background: var(--wb-crm-bg);
	font-family: "Plus Jakarta Sans", sans-serif;
}

.wb-service-crm *,
.wb-service-crm *::before,
.wb-service-crm *::after { box-sizing: border-box; }

.wb-service-crm__container {
	width: min(100% - 2rem, 1240px);
	margin-inline: auto;
}

.wb-service-crm__copy { max-width: 620px; }

.wb-service-crm__index {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.15rem;
	color: var(--wb-crm-copy);
	font-size: 0.69rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	line-height: 1.4;
	text-transform: uppercase;
}

.wb-service-crm__index span { color: var(--wb-crm-blue); }

.wb-service-crm__title {
	max-width: 670px;
	margin: 0;
	color: var(--wb-crm-heading);
	font-size: clamp(2.25rem, 10vw, 3.25rem);
	font-weight: 700;
	letter-spacing: -0.05em;
	line-height: 1.04;
	text-wrap: balance;
}

.wb-service-crm__outcome {
	max-width: 610px;
	margin: 1.4rem 0 0;
	color: var(--wb-crm-heading);
	font-size: clamp(1.22rem, 5.2vw, 1.55rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.38;
	text-wrap: balance;
}

.wb-service-crm__summary {
	max-width: 590px;
	margin: 1rem 0 0;
	color: var(--wb-crm-copy);
	font-size: 0.95rem;
	line-height: 1.68;
}

.wb-service-crm__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: 1.65rem;
	padding-bottom: 0.3rem;
	color: var(--wb-crm-heading);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: color 180ms ease;
}

.wb-service-crm__link::after {
	content: "";
	position: absolute;
	right: 1.6rem;
	bottom: 0;
	left: 0;
	height: 1px;
	background: currentColor;
	transform-origin: left;
	transition: transform 180ms ease;
}

.wb-service-crm__link:hover { color: var(--wb-crm-blue); }
.wb-service-crm__link:hover::after { transform: scaleX(0.72); }
.wb-service-crm__link:focus-visible { outline: 3px solid rgba(73, 106, 249, 0.22); outline-offset: 5px; }

.wb-service-crm__link svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__visual { margin-top: 3rem; }

.wb-service-crm__frame {
	overflow: hidden;
	width: 100%;
	border: 1px solid var(--wb-crm-border);
	border-radius: 18px;
	background: var(--wb-crm-surface);
}

.wb-service-crm__bar {
	display: flex;
	min-height: 45px;
	padding: 0.7rem 0.85rem;
	align-items: center;
	justify-content: space-between;
	gap: 0.7rem;
	border-bottom: 1px solid var(--wb-crm-border);
	background: var(--wb-crm-muted);
	font-size: 0.54rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	line-height: 1.3;
	text-transform: uppercase;
}

.wb-service-crm__bar-title {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 0.42rem;
	color: var(--wb-crm-heading);
}

.wb-service-crm__bar-title svg {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	fill: none;
	stroke: var(--wb-crm-blue);
	stroke-width: 1.45;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__bar strong {
	flex: 0 0 auto;
	color: var(--wb-crm-green);
	font-size: inherit;
	font-weight: 700;
	letter-spacing: inherit;
}

.wb-service-crm__content {
	display: grid;
	gap: 0.72rem;
	padding: 0.76rem;
	background: var(--wb-crm-muted);
}

.wb-service-crm__capture,
.wb-service-crm__journey,
.wb-service-crm__automations {
	min-width: 0;
	padding: 0.72rem;
	border: 1px solid var(--wb-crm-border);
	background: var(--wb-crm-surface);
}

.wb-service-crm__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
}

.wb-service-crm__label {
	color: var(--wb-crm-copy);
	font-size: 0.51rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.wb-service-crm__section-head small {
	color: var(--wb-crm-green);
	font-size: 0.47rem;
	font-weight: 700;
	line-height: 1.3;
}

.wb-service-crm__source-flow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(98px, 0.45fr);
	align-items: center;
	gap: 0.48rem;
	margin-top: 0.55rem;
}

.wb-service-crm__sources {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.32rem;
}

.wb-service-crm__sources > span {
	display: grid;
	min-width: 0;
	min-height: 48px;
	padding: 0.34rem 0.2rem;
	place-items: center;
	align-content: center;
	gap: 0.2rem;
	border: 1px solid var(--wb-crm-border);
	background: var(--wb-crm-muted);
	color: var(--wb-crm-heading);
	font-size: 0.4rem;
	font-weight: 650;
	line-height: 1.15;
	text-align: center;
}

.wb-service-crm__sources svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--wb-crm-copy);
	stroke-width: 1.35;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__flow-arrow {
	display: grid;
	place-items: center;
	color: var(--wb-crm-blue);
}

.wb-service-crm__flow-arrow svg {
	width: 25px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__inbox {
	display: flex;
	min-width: 0;
	min-height: 54px;
	padding: 0.48rem;
	align-items: center;
	gap: 0.42rem;
	border: 1px solid rgba(73, 106, 249, 0.28);
	background: rgba(73, 106, 249, 0.055);
}

.wb-service-crm__inbox-icon {
	display: grid;
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	place-items: center;
	border-radius: 50%;
	background: var(--wb-crm-blue);
}

.wb-service-crm__inbox-icon svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: #ffffff;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__inbox > div {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 0.04rem;
}

.wb-service-crm__inbox strong,
.wb-service-crm__inbox small {
	min-width: 0;
}

.wb-service-crm__inbox strong {
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
}

.wb-service-crm__inbox small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wb-service-crm__inbox strong {
	color: var(--wb-crm-heading);
	font-size: 0.5rem;
	line-height: 1.25;
}

.wb-service-crm__inbox small {
	color: var(--wb-crm-copy);
	font-size: 0.39rem;
	line-height: 1.25;
}

.wb-service-crm__main {
	display: grid;
	gap: 0.72rem;
}

.wb-service-crm__customer {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.48rem;
	margin-top: 0.55rem;
	padding: 0.55rem;
	border: 1px solid var(--wb-crm-border);
	background: var(--wb-crm-muted);
}

.wb-service-crm__customer > span {
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	border-radius: 50%;
	background: #9ca3af;
	color: #ffffff;
	font-size: 0.49rem;
	font-weight: 750;
}

.wb-service-crm__customer > div {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 0.04rem;
}

.wb-service-crm__customer strong {
	color: var(--wb-crm-heading);
	font-size: 0.5rem;
	line-height: 1.25;
}

.wb-service-crm__customer small {
	color: var(--wb-crm-copy);
	font-size: 0.39rem;
	line-height: 1.25;
}

.wb-service-crm__customer > i {
	padding: 0.25rem 0.34rem;
	border: 1px solid rgba(73, 106, 249, 0.24);
	background: rgba(73, 106, 249, 0.055);
	color: var(--wb-crm-blue);
	font-size: 0.38rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.1;
	white-space: nowrap;
}

.wb-service-crm__timeline {
	position: relative;
	display: grid;
	gap: 0.12rem;
	margin-top: 0.45rem;
}

.wb-service-crm__timeline > div {
	position: relative;
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr);
	align-items: center;
	gap: 0.46rem;
	min-height: 45px;
}

.wb-service-crm__timeline > div:not(:last-child)::after {
	content: "";
	position: absolute;
	z-index: 0;
	top: calc(50% + 15px);
	left: 14.5px;
	width: 1px;
	height: calc(15px + 0.12rem);
	background: #d5d9df;
}

.wb-service-crm__timeline > div > span {
	position: relative;
	z-index: 1;
	display: grid;
	width: 30px;
	height: 30px;
	place-items: center;
	border: 1px solid var(--wb-crm-border);
	border-radius: 50%;
	background: #ffffff;
}

.wb-service-crm__timeline svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--wb-crm-copy);
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__timeline .is-complete > span {
	border-color: rgba(47, 125, 87, 0.28);
	background: rgba(47, 125, 87, 0.07);
}

.wb-service-crm__timeline .is-complete svg { stroke: var(--wb-crm-green); }

.wb-service-crm__timeline .is-active > span {
	border-color: rgba(73, 106, 249, 0.3);
	background: rgba(73, 106, 249, 0.07);
}

.wb-service-crm__timeline .is-active svg { stroke: var(--wb-crm-blue); }

.wb-service-crm__timeline p,
.wb-service-crm__automation-list p {
	display: flex;
	min-width: 0;
	margin: 0;
	flex-direction: column;
	gap: 0.04rem;
}

.wb-service-crm__timeline strong,
.wb-service-crm__automation-list strong {
	color: var(--wb-crm-heading);
	font-size: 0.49rem;
	line-height: 1.25;
}

.wb-service-crm__timeline small,
.wb-service-crm__automation-list small {
	color: var(--wb-crm-copy);
	font-size: 0.39rem;
	line-height: 1.25;
}

.wb-service-crm__automation-list {
	display: grid;
	gap: 0.34rem;
	margin-top: 0.55rem;
}

.wb-service-crm__automation-list > div {
	display: grid;
	grid-template-columns: 29px minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.45rem;
	min-height: 51px;
	padding: 0.46rem;
	border: 1px solid var(--wb-crm-border);
	background: var(--wb-crm-muted);
}

.wb-service-crm__automation-list > div > span {
	display: grid;
	width: 29px;
	height: 29px;
	place-items: center;
	border: 1px solid var(--wb-crm-border);
	background: #ffffff;
}

.wb-service-crm__automation-list svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--wb-crm-blue);
	stroke-width: 1.35;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wb-service-crm__automation-list i {
	position: relative;
	display: block;
	width: 24px;
	height: 14px;
	border-radius: 999px;
	background: rgba(47, 125, 87, 0.18);
}

.wb-service-crm__automation-list i::after {
	content: "";
	position: absolute;
	top: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--wb-crm-green);
}

.wb-service-crm.is-enhanced .wb-service-crm__frame {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 520ms ease, transform 520ms ease;
}

.wb-service-crm.is-visible .wb-service-crm__frame {
	opacity: 1;
	transform: none;
}

@media (min-width: 560px) {
	.wb-service-crm__main {
		grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	}
}

@media (min-width: 900px) {
	.wb-service-crm {
		padding: clamp(7rem, 9vw, 9.5rem) 0;
		scroll-margin-top: 7rem;
	}

	.wb-service-crm__container {
		width: min(100% - 3rem, 1240px);
		display: grid;
		grid-template-columns: minmax(520px, 1.08fr) minmax(0, 0.92fr);
		grid-template-areas: "visual copy";
		align-items: center;
		gap: clamp(4rem, 7vw, 7rem);
	}

	.wb-service-crm__copy { grid-area: copy; }
	.wb-service-crm__visual { grid-area: visual; margin-top: 0; }
	.wb-service-crm__title { font-size: clamp(3rem, 4.15vw, 4.35rem); }
	.wb-service-crm__outcome { font-size: clamp(1.35rem, 1.8vw, 1.72rem); }
	.wb-service-crm__summary { font-size: 1rem; }
	.wb-service-crm__bar { min-height: 47px; padding-inline: 0.95rem; }
	.wb-service-crm__content { gap: 0.78rem; padding: 0.84rem; }
	.wb-service-crm__capture,
	.wb-service-crm__journey,
	.wb-service-crm__automations { padding: 0.8rem; }
}

@media (max-width: 559px) {
	.wb-service-crm__source-flow {
		grid-template-columns: minmax(0, 1fr) auto minmax(104px, 0.5fr);
	}

	.wb-service-crm__sources > span { min-height: 45px; }
	.wb-service-crm__inbox { padding-inline: 0.42rem; }
	.wb-service-crm__inbox strong { font-size: 0.48rem; white-space: nowrap; }
	.wb-service-crm__inbox small { font-size: 0.36rem; }
	.wb-service-crm__main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 390px) {
	.wb-service-crm__container { width: min(100% - 1.25rem, 1240px); }
	.wb-service-crm__bar { font-size: 0.49rem; }
	.wb-service-crm__source-flow { grid-template-columns: minmax(0, 1fr) auto minmax(100px, 0.52fr); }
	.wb-service-crm__sources > span { font-size: 0.37rem; }
	.wb-service-crm__inbox { gap: 0.34rem; padding-inline: 0.36rem; }
	.wb-service-crm__inbox-icon { width: 25px; height: 25px; }
	.wb-service-crm__inbox strong { font-size: 0.44rem; }
	.wb-service-crm__inbox small { font-size: 0.33rem; }
	.wb-service-crm__customer > i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wb-service-crm *,
	.wb-service-crm *::before,
	.wb-service-crm *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
