/* ==========================================================================
   Services widget — ported from pestcontrolgroupusa_core_old
   (components.css .services__*, responsive.css services__track rules).
   Classes are namespaced pcgu-services(__*) to avoid collisions with other
   plugins/themes; rendered output otherwise matches the original exactly.
   The carousel drag/autoplay/clone-loop behavior (.js-carousel-*) lives in
   assets/js/drag-carousel.js — shared, not duplicated here.

   .pcgu-services__nav-btn is a <button type="button"> and is prefixed
   with ".pcgu-services" — same theme "[type=button]" global-reset
   specificity collision documented on Header's hamburger button; every
   future widget with a <button> must check for this. ---- */

.pcgu-services {
	overflow: hidden;
	background-color: color-mix(in oklab, var(--muted) 40%, transparent);
}

.pcgu-services__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
}
.pcgu-services__heading {
	margin-top: 1rem;
	font-size: 1.875rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--foreground);
	font-family: var(--font-display);
}
.pcgu-services__intro {
	margin-top: 0.75rem;
	max-width: 34rem;
	font-size: 1rem;
	line-height: 1.625;
	color: var(--muted-foreground);
}

.pcgu-services__nav {
	margin-top: 2rem;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
}
.pcgu-services .pcgu-services__nav-btn {
	appearance: none;
	-webkit-appearance: none;
	display: grid;
	place-items: center;
	height: 2.75rem;
	width: 2.75rem;
	border-radius: 9999px;
	border: 1px solid var(--border);
	background-color: var(--card);
	color: var(--foreground);
	padding: 0;
	transition: background-color 200ms, color 200ms, border-color 200ms, opacity 200ms;
}
.pcgu-services .pcgu-services__nav-btn:hover:not(:disabled) {
	border-color: var(--secondary);
	color: var(--secondary);
}
.pcgu-services .pcgu-services__nav-btn:disabled {
	opacity: 0.4;
	cursor: default;
}
.pcgu-services .pcgu-services__nav-btn--next {
	background-image: var(--gradient-call);
	border-color: transparent;
	color: #fff;
}
.pcgu-services .pcgu-services__nav-btn--next:hover:not(:disabled) {
	color: #fff;
	filter: brightness(1.1);
}

.pcgu-services__viewport {
	margin-top: 1rem;
	/* Padding gives the hover-lifted card's shadow/border room to breathe —
	   overflow-x:auto implicitly clips overflow-y too, so without this the
	   card's top and left edges get cut off by the scroll container. */
	padding: 0.75rem 0.25rem 1.25rem;
	margin-inline: -0.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}
.pcgu-services__viewport::-webkit-scrollbar {
	display: none;
}
.pcgu-services__viewport.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}
.pcgu-services__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 78%;
	gap: 1.25rem;
	padding-inline: 0.25rem;
}
/* display:flex + the link's margin-top:auto below (not in the original,
   which only ever showed same-length placeholder copy so this never
   surfaced) — with editable content, cards in the same row can have
   1-3 lines of body text, which without this pins "Get Started" at a
   different height per card instead of a shared baseline. */
.pcgu-services__card {
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	border-radius: var(--radius-2xl);
	border: 1px solid oklch(0.85 0.02 250);
	background-color: var(--card);
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
	transition: transform 250ms, box-shadow 250ms, border-color 250ms;
}
.pcgu-services__card:hover {
	transform: translateY(-4px);
	border-color: oklch(0.78 0.03 250);
	box-shadow: 0 16px 32px -16px rgba(15, 23, 42, 0.18);
}
.pcgu-services__card-media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius-xl);
}
.pcgu-services .pcgu-services__card-img {
	height: 100%;
	width: 100%;
	object-fit: cover;
}
.pcgu-services__card-title {
	margin-top: 1.25rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--foreground);
}
.pcgu-services__card-body {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.625;
	color: var(--muted-foreground);
}
.pcgu-services__card-link {
	margin-top: auto;
	padding-top: 1.25rem;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--secondary);
	transition: color 200ms;
}
.pcgu-services__card-link:hover {
	color: var(--primary);
}
.pcgu-services__card-link svg {
	height: 0.9375rem;
	width: 0.9375rem;
}

.pcgu-services__cta-row {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
}

/* ---- Responsive — exact original breakpoints (sm:640 / md:768 / lg:1024) ---- */

@media (min-width: 640px) {
	.pcgu-services__track { grid-auto-columns: 46%; }
}

@media (min-width: 768px) {
	.pcgu-services__track { grid-auto-columns: 33%; }
}

@media (min-width: 1024px) {
	.pcgu-services__track { grid-auto-columns: 23.5%; }
}
