/**
 * Service directory and single service pages.
 */

.services-page,
.service-page {
	background: var(--color-bg);
}

/* Breadcrumbs are shared by both service templates. */
.service-breadcrumb-wrap {
	padding-top: var(--space-5);
}

.service-breadcrumb-wrap .breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	padding: 0;
	margin: 0;
	color: var(--color-muted);
	font-size: 0.76rem;
	font-weight: 650;
	list-style: none;
}

.service-breadcrumb-wrap .breadcrumbs li {
	min-width: 0;
}

.service-breadcrumb-wrap .breadcrumbs a {
	text-decoration-line: underline;
	text-decoration-color: transparent;
	text-underline-offset: 0.25em;
}

.service-breadcrumb-wrap .breadcrumbs a:hover {
	color: var(--color-accent);
	text-decoration-color: currentColor;
}

.service-breadcrumb-wrap .breadcrumbs [aria-current="page"] {
	color: var(--color-text);
	overflow-wrap: anywhere;
}

/* Offer and service heroes. */
.services-hero__inner,
.service-hero__inner,
.service-hero__content,
.service-hero__visual {
	min-width: 0;
}

.services-hero h1,
.service-hero h1 {
	max-width: 15ch;
	margin-bottom: var(--space-6);
	font-size: clamp(2.75rem, 9vw, 6.5rem);
	font-weight: 850;
	letter-spacing: -0.06em;
	line-height: 0.95;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.services-hero__lead,
.service-hero__lead {
	max-width: 46rem;
	margin-bottom: 0;
	color: var(--color-muted);
	font-size: clamp(1.15rem, 2.5vw, 1.55rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.45;
}

.service-hero__inner {
	display: grid;
	gap: var(--space-7);
	align-items: center;
}

.service-hero__content {
	max-width: 50rem;
}

.service-hero__price {
	display: grid;
	gap: var(--space-1);
	width: fit-content;
	max-width: 100%;
	padding: var(--space-3) var(--space-4);
	margin: var(--space-6) 0;
	background: var(--color-surface-soft);
	border: 0.0625rem solid var(--color-border);
	border-radius: var(--radius-md);
}

.service-hero__price span {
	color: var(--color-muted);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.3;
	text-transform: uppercase;
}

.service-hero__price strong {
	font-size: clamp(1.05rem, 3vw, 1.35rem);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.service-hero .button {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.service-hero__visual {
	margin: 0;
}

.service-hero__image {
	width: 100%;
	height: auto;
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
}

/* Editable Gutenberg content. */
.service-entry {
	border-top: 0.0625rem solid var(--color-border);
}

.service-entry__content {
	max-width: var(--container-narrow);
	color: var(--color-muted);
	font-size: clamp(1.02rem, 1.8vw, 1.16rem);
}

.service-entry__content > :first-child {
	margin-top: 0;
}

.service-entry__content > :last-child {
	margin-bottom: 0;
}

.service-entry__content h2,
.service-entry__content h3 {
	max-width: none;
	color: var(--color-text);
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.service-entry__content h2 {
	margin-block: var(--space-8) var(--space-5);
	font-size: clamp(2rem, 6vw, 3.5rem);
	line-height: 1;
}

.service-entry__content h3 {
	margin-block: var(--space-6) var(--space-3);
	font-size: clamp(1.35rem, 3.5vw, 2rem);
	line-height: 1.15;
}

.service-entry__content p,
.service-entry__content ul,
.service-entry__content ol {
	margin-bottom: var(--space-5);
}

.service-entry__content ul,
.service-entry__content ol {
	padding-left: 1.25em;
}

.service-entry__content li + li {
	margin-top: var(--space-2);
}

.service-entry__content strong {
	color: var(--color-text);
}

.service-entry__content a {
	color: var(--color-accent-dark);
	font-weight: 650;
	text-decoration-thickness: 0.125rem;
	text-underline-offset: 0.2em;
	overflow-wrap: anywhere;
}

.service-entry__content img {
	height: auto;
	border-radius: var(--radius-md);
}

.service-entry__content figure,
.service-entry__content iframe,
.service-entry__content video,
.service-entry__content table,
.service-entry__content .wp-block-column,
.service-entry__content .alignwide,
.service-entry__content .alignfull {
	min-width: 0;
	max-width: 100%;
}

.service-entry__content .alignwide,
.service-entry__content .alignfull {
	width: 100%;
	margin-inline: 0;
}

.service-entry__content .wp-block-table,
.service-entry__content pre {
	max-width: 100%;
	overflow-x: auto;
}

.service-entry__content code {
	overflow-wrap: anywhere;
}

.service-entry__content details {
	padding-block: var(--space-4);
	border-top: 0.0625rem solid var(--color-border);
}

.service-entry__content details:last-child {
	border-bottom: 0.0625rem solid var(--color-border);
}

.service-entry__content summary {
	color: var(--color-text);
	font-weight: 750;
	cursor: pointer;
}

.service-entry__content details > :last-child {
	margin-bottom: 0;
}

/* Four-card offer directory; overrides the five-card homepage composition. */
.services-directory__grid {
	grid-template-columns: minmax(0, 1fr);
}

.services-directory__grid > .service-card {
	min-width: 0;
}

.services-directory .service-card__meta {
	flex-wrap: wrap;
}

.services-directory .service-card__price {
	max-width: 100%;
	color: var(--color-muted);
	border-color: var(--color-border);
	overflow-wrap: anywhere;
}

.services-directory .service-card__link {
	overflow-wrap: anywhere;
}

/* Related projects reuse the existing card component. */
.service-projects__grid {
	grid-template-columns: minmax(0, 1fr);
}

.service-projects__grid > .project-card,
.service-projects__grid > .project-card:last-child {
	grid-column: auto;
	width: auto;
	min-width: 0;
}

/* Final CTA. */
.service-cta__inner {
	display: grid;
	gap: var(--space-6);
	align-items: end;
}

.service-cta h2 {
	max-width: 12ch;
	margin: 0;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.service-cta .button {
	justify-self: start;
	max-width: 100%;
}

.service-cta :focus-visible {
	outline-color: var(--color-accent-on-dark);
}

@media (min-width: 48rem) {
	.services-directory__grid,
	.service-projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.services-directory__grid > .service-card,
	.services-directory__grid > .service-card:nth-child(4),
	.services-directory__grid > .service-card:last-child {
		grid-column: auto;
	}

	.service-cta__inner {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.service-cta .button {
		justify-self: end;
	}
}

@media (min-width: 64rem) {
	.service-hero__inner--with-image {
		grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 1.05fr);
		gap: clamp(var(--space-7), 6vw, var(--space-10));
	}

	.service-projects__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 75rem) {
	.services-directory__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
