/*
 * WP Consultant Toolkit — Services Grid widget. Defaults match the live
 * homepage tiles (based on .service-card in outputs/style.css); the widget's
 * Style controls override them. Selectors are two classes deep where a
 * theme/Elementor kit rule like `.elementor-kit-5 h3` could otherwise win.
 */

.wpct-services {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpct-service {
	box-sizing: border-box;
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 30px;
	border: 1px solid #dce4eb;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(7, 24, 47, .08);
	transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}

.wpct-service:hover {
	box-shadow: 0 18px 50px rgba(7, 24, 47, .12);
	transform: translateY(var(--wpct-service-lift, -6px));
}

.wpct-service-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.wpct-service-icon {
	display: grid;
	flex: 0 0 auto;
	width: var(--wpct-service-icon-box, 42px);
	height: var(--wpct-service-icon-box, 42px);
	place-items: center;
	border-radius: 12px;
	background: #edf2ff;
}

.wpct-service-icon .wpct-service-icon-img {
	display: block;
	width: var(--wpct-service-icon-size, 32px);
	max-width: none;
	height: var(--wpct-service-icon-size, 32px);
	object-fit: contain;
}

.wpct-service .wpct-service-title {
	min-width: 0;
	margin: 0;
	color: #07182f;
	font-family: "Manrope", Arial, sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.12;
	transition: color .25s ease;
}

.wpct-service .wpct-service-link {
	color: inherit;
	text-decoration: none;
}

/* Stretches the title link over the whole tile (the tile is position: relative). */
.wpct-service .wpct-service-link::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	border-radius: inherit;
	content: "";
}

.wpct-service--linked {
	cursor: pointer;
}

/* Focus ring on the tile instead of on the title text. */
@supports selector(:has(a)) {
	.wpct-service .wpct-service-link:focus-visible {
		outline: none;
	}

	.wpct-service:has(.wpct-service-link:focus-visible) {
		outline: 2px solid #245bff;
		outline-offset: 3px;
	}
}

.wpct-service .wpct-service-desc {
	margin: 0 0 24px;
	color: #52657b;
	line-height: 1.72;
}

.wpct-service-cta {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 10px;
	margin-top: auto;
	color: #164ad8;
	font-size: .92rem;
	font-weight: 700;
	transition: color .25s ease;
}

.wpct-service-cta-icon {
	display: inline-flex;
	font-size: .92em;
	transition: transform .2s ease;
}

.wpct-service-cta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.wpct-service:hover .wpct-service-cta-icon {
	transform: translateX(4px);
}

.wpct-service.wpct-service--highlighted {
	border-color: #245bff;
	background: #245bff;
}

.wpct-service--highlighted .wpct-service-icon {
	background: #42d9b0;
}

.wpct-service.wpct-service--highlighted .wpct-service-title,
.wpct-service.wpct-service--highlighted .wpct-service-desc,
.wpct-service.wpct-service--highlighted .wpct-service-cta {
	color: #ffffff;
}

@media (max-width: 1024px) {
	.wpct-services {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.wpct-services {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpct-service,
	.wpct-service-cta-icon {
		transition: none;
	}

	.wpct-service:hover,
	.wpct-service:hover .wpct-service-cta-icon {
		transform: none;
	}
}
