/*
 * SERV-4: services beside a picture.
 * A portrait picture on one side. On the other: label, heading, lead, the
 * names of the services as a ruled list of links, and a button to all of them.
 */

/* ---------- The two halves ---------- */

.wprk-serv-4 .wprk-serv-4__cols {
	gap: var(--wp--preset--spacing--50);
	margin-block: 0;
}

/* Stacked, the picture keeps a modest size instead of filling the screen. */
.wprk-serv-4 .wprk-serv-4__image {
	margin: 0;
	max-width: 22rem;
}

.wprk-serv-4 .wprk-serv-4__image img {
	width: 100%;
}

.wprk-serv-4 .wprk-serv-4__body > * {
	margin-block: 0;
}

.wprk-serv-4 .wprk-serv-4__body > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.wprk-serv-4 .wprk-serv-4__body > .wprk-eyebrow + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.wprk-serv-4 .wprk-serv-4__body > .wp-block-query,
.wprk-serv-4 .wprk-serv-4__body > .wp-block-buttons {
	margin-block-start: var(--wp--preset--spacing--40);
}

/* ---------- The list of names ---------- */

/*
 * Two columns where each has room for a name, one column where not. The
 * smallest column is 13rem, or a little under half the list if that is more,
 * so there are never three.
 */
.wprk-serv-4 .wprk-serv-4__list {
	border-block-start: 1px solid var(--wprk-border);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, max(13rem, 40%)), 1fr));
}

/*
 * One hairline on top of the list and one under every name. The lines run
 * through both columns, and no line is drawn twice (the line colour is
 * see-through, so two on top of each other would look darker).
 */
.wprk-serv-4 .wprk-serv-4__list > li {
	border-block-end: 1px solid var(--wprk-border);
	margin-block: 0;
	min-width: 0;
	padding-inline-end: var(--wp--preset--spacing--40);
}

/* The name is a heading for structure, but reads as bold body text. */
.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-stretch: normal;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.35;
	margin: 0;
	overflow-wrap: break-word;
}

/* The link fills its cell, which makes a tap target of full height. */
.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a {
	box-sizing: border-box;
	color: var(--wprk-heading);
	display: block;
	min-height: 2.75rem;
	padding-block: 0.7rem;
	padding-inline: 1.75em 0;
	position: relative;
	text-decoration: none;
}

.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.06em;
	text-underline-offset: 0.2em;
}

/* The focus ring stays inside the cell, clear of the lines and the next column. */
.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a:focus-visible {
	outline-offset: -2px;
}

/*
 * The arrow marker stands level with the first line of the name. It is
 * decoration, so it has an empty text alternative.
 */
.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a::before {
	color: var(--wprk-accent-text);
	content: "\2192";
	content: "\2192" / "";
	inset-block-start: 0.7rem;
	inset-inline-start: 0;
	position: absolute;
}

/* ---------- Wide screens ---------- */

@media (min-width: 782px) {
	.wprk-serv-4 .wprk-serv-4__cols {
		gap: var(--wp--preset--spacing--60);
	}

	.wprk-serv-4 .wprk-serv-4__image {
		max-width: none;
	}
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a::before {
		transition: transform 0.18s ease;
	}

	.wprk-serv-4 .wprk-serv-4__list .wp-block-post-title a:hover::before {
		transform: translateX(0.2em);
	}
}
