/*
 * Services block. Loaded only on pages that use it (and on a single service
 * page, for its "other services" list). Mobile first; desktop from 900px.
 * Source: the builder's ".svc" CSS: look F = soft cards, look C = a hairline
 * list that becomes a joined three-column grid on desktop.
 */

.services { padding: 56px 0; }

.services__title { font-size: 1.9rem; line-height: 1.1; }
.services__intro { max-width: 56ch; margin: 10px 0 0; color: var(--muted); }

.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }

.services__card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 16px;
	border-radius: var(--card-r);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
}

.services__card--link:hover .services__text h3,
.services__card--link:focus-visible .services__text h3 { text-decoration: underline; text-underline-offset: 3px; }

.services__card--link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.services__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: var(--m-r);
	background: color-mix(in srgb, var(--accent) 22%, var(--surface));
	color: var(--ink);
}

.services__icon .ico { width: 24px; height: 24px; }

/* A picture instead of the icon: larger, cropped to fill its box. */
.services__icon--pic { width: var(--pic, 72px); height: var(--pic, 72px); overflow: hidden; background: var(--tint); }
.services__icon--pic .services__pic { width: 100%; height: 100%; object-fit: cover; }

.services__text h3 { margin: 0; font-size: 1.06rem; line-height: 1.2; }
.services__summary { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.services__more { margin: 28px 0 0; }

/* Only used by look C's joined desktop grid (below). */
.services__fill { display: none; }

/* ---------- Grouped by animal type (two or more animals seen) ---------- */

.services__groups { margin-top: 26px; }

.services__group + .services__group { margin-top: 36px; }

.services__group-title {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 1.25rem;
	line-height: 1.2;
}

.services__count { font-size: 13px; font-weight: 600; color: var(--muted); }

.services__group .services__grid { margin-top: 0; } /* beats the desktop margin on .services__grid */

.services__grid--grouped .services__text h4 { margin: 0; font-size: 1rem; line-height: 1.2; }

/* Short cards in a group: the description stops at two lines. */
.services__grid--grouped .services__card { padding: 14px 14px; gap: 6px; }
.services__grid--grouped .services__summary {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.services__grid--grouped .services__card--link:hover .services__text h4,
.services__grid--grouped .services__card--link:focus-visible .services__text h4 { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Look F: soft cards, round icons ---------- */

.look-f .services__card { box-shadow: 0 14px 30px -22px rgb(0 0 0 / 0.35); }
.look-f .services__group-title {
	display: inline-flex;
	padding: 6px 16px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent) 30%, var(--surface));
	color: var(--ink);
	font-size: 1.1rem;
}
.look-f .services__count { color: var(--ink); }
.look-f .services__icon { border-radius: 50%; background: color-mix(in srgb, var(--accent) 30%, var(--surface)); color: var(--brand-text, var(--brand)); }

/* ---------- Look C: a hairline list ---------- */

.look-c .services__grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }

.look-c .services__card {
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	background: transparent;
}

.look-c .services__icon { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand-text, var(--brand)); }

.look-c .services__group-title {
	padding-bottom: 10px;
	border-bottom: 2px solid var(--brand);
	font-size: 1.1rem;
}
.look-c .services__grid--grouped { border-top: 0; }

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.services { padding: 96px 0; }
	.services__title { font-size: 2.9rem; }

	.services__grid { grid-template-columns: repeat(var(--grid-cols, 3), 1fr); gap: 18px; margin-top: 40px; }
	.services__card { padding: 26px; }

	/* Look C: the list becomes one joined, outlined three-column grid. */
	.look-c .services__grid {
		grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
		gap: 1px;
		overflow: hidden;
		background: var(--line);
		border: 1px solid var(--line);
		border-radius: 12px;
	}

	.look-c .services__card { flex-direction: column; padding: 26px; border: 0; background: var(--surface); }
	.look-c .services__fill { display: block; grid-column: span var(--fill); background: var(--surface); }
}

/* ---------- Automatic, by category: the same cards, with names when asked for ---------- */

.services__card--category .services__summary { margin-top: 4px; }

.services__names {
	display: grid;
	gap: 4px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 1.4;
	color: var(--muted);
}

.services__names li { position: relative; padding-left: 14px; }

.services__names li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--brand);
}

.services__name-link { color: inherit; text-decoration: none; }
.services__name-link:hover,
.services__name-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.services__more-count { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Animal types: "We care for ..." strip and the small chips ---------- */

.services__animal-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; }
.services__animal-lead { color: var(--muted); font-size: 14px; font-weight: 600; }

.services__animals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.services__animals li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px 5px 8px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--brand) 9%, var(--surface));
	color: var(--ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
}
.services__animal-ico { display: inline-grid; place-items: center; color: var(--brand-text, var(--brand)); }
.services__animal-ico .ico { width: 16px; height: 16px; }
.services__card .services__animals { margin-top: 8px; }
.services__animals li { font-size: 12.5px; padding: 4px 10px 4px 7px; }
.services__animal-strip .services__animals li { font-size: 14px; padding: 6px 14px 6px 9px; }

/* ---------- Layout: large cards, two across ---------- */

.services__panels { display: grid; gap: 14px; margin-top: 26px; }

.services__panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--card-r);
	background: var(--surface);
}

.services__panel-head { display: flex; align-items: center; gap: 14px; }
.services__panel-head h3 { margin: 0; font-size: 1.25rem; line-height: 1.15; }
.services__count { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

.services__panel .services__names { margin: 0; }

/* ---------- Layout: separated rows ---------- */

.services__bands { display: grid; gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }

.services__band { display: grid; gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line); }

.services__band-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; align-content: start; }
.services__band-head .services__icon { grid-row: span 2; }
.services__band-head h3 { margin: 0; font-size: 1.3rem; line-height: 1.15; }
.services__band-head .services__count { margin: 0; }
.services__band-head .services__animals { grid-column: 1 / -1; margin-top: 8px; }

.services__names--cols { margin: 0; }

/* The same list style inside cards and rows, readable at a glance. */
.services__panel .services__names li,
.services__band .services__names li { padding-left: 16px; font-size: 15px; line-height: 1.35; }
.services__panel .services__names,
.services__band .services__names { display: grid; gap: 7px; }

@media (min-width: 700px) {
	.services__names--cols { grid-template-columns: 1fr 1fr; column-gap: 28px; }
}

@media (min-width: 900px) {
	.services__panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
	.services__panel { padding: 28px; }

	.services__bands { margin-top: 36px; }
	.services__band { grid-template-columns: minmax(240px, 0.8fr) 1.6fr; gap: 40px; padding: 32px 0; }
}

/* ---------- Heading link to the Services page ---------- */

.services__title-link { color: inherit; text-decoration: none; }
.services__title-link:hover { text-decoration: underline; text-underline-offset: 6px; }

.services__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.services__visit { font-size: 15px; font-weight: 700; color: var(--brand-text, var(--brand)); text-decoration: none; white-space: nowrap; }
.services__visit:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Picture tiles: a grid or a swipe slider (a stack on phones) ---------- */

.services__tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 28px; }

.services__tile-wrap { min-width: 0; }

.services__tile {
	display: flex;
	flex-direction: column;
	gap: 14px;
	height: 100%;
	padding: 14px 14px 22px;
	border-radius: var(--card-r);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.services__tile--link:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* The picture takes the site's picture style (corners, border, shadow) from base.css. */
.services__tile-img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: calc(var(--card-r) * 0.6); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.services__tile-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.services__tile-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand-text, var(--brand)); opacity: 0.45; }
.services__tile-ph .ico { width: 52px; height: 52px; }

.services__tile-body { display: grid; gap: 8px; padding-inline: 6px; align-content: start; }
.services__tile-body h3 { margin: 4px 0 0; color: var(--brand-text, var(--brand)); font-size: 1.4rem; line-height: 1.15; }
.services__tile-text { margin: 0; color: var(--muted); }
.services__tile-meta { display: grid; gap: 2px; margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; }
.services__tile-meta b { font-weight: 700; }
.services__tile-meta span { color: var(--muted); }
.services__tile--link:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 700px) {
	.services__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.services--tiles-grid .services__tiles { grid-template-columns: repeat(var(--tile-cols, 3), minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
}

/* Swipe slider: from 700px. On phones it is a plain stack (the rules above), with no arrows or dots. */
.services__slider { position: relative; }
.services__nav, .services__dots { display: none; }

@media (min-width: 700px) {
	.services--tiles-slider .services__tiles {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.services--tiles-slider .services__tiles::-webkit-scrollbar { display: none; }
	.services--tiles-slider .services__tiles:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
	.services--tiles-slider .services__tile-wrap { flex: 0 0 calc((100% - 20px) / 2); scroll-snap-align: start; }

	.services__nav {
		position: absolute;
		top: calc(50% - 30px);
		z-index: 2;
		display: grid;
		place-items: center;
		width: 52px;
		height: 52px;
		margin-top: -26px;
		border: 0;
		border-radius: 50%;
		background: var(--surface);
		box-shadow: 0 8px 22px -8px rgb(0 0 0 / 0.4);
		color: var(--brand-text, var(--brand));
		cursor: pointer;
	}
	.services__nav[hidden] { display: none; }
	.services__nav--prev { left: -26px; }
	.services__nav--next { right: -26px; }
	.services__nav--prev .ico { transform: rotate(180deg); }
	.services__nav:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

	.services__dots { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
	.services__dots[hidden] { display: none; }
	.services__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); cursor: pointer; }
	.services__dots button.is-active { background: var(--brand); }
	.services__dots button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
}

@media (min-width: 900px) {
	.services--tiles-slider .services__tile-wrap { flex-basis: calc((100% - (var(--tile-cols, 3) - 1) * 20px) / var(--tile-cols, 3)); }
}

@media (max-width: 1099px) {
	.services__nav--prev { left: -8px; }
	.services__nav--next { right: -8px; }
}

/* ---------- Category pictures: size and shape (Large cards and Separated rows) ---------- */
/* --pic is the picture's height (and width, unless the shape is wide). Small is the original 72px. */

.services--pic-medium { --pic: 120px; }
.services--pic-large { --pic: 180px; }

.services--shape-square .services__icon--pic,
.services--shape-wide .services__icon--pic { border-radius: calc(var(--card-r) * 0.6); }
.services--shape-wide .services__icon--pic { width: calc(var(--pic, 72px) * 1.5); }
.services--shape-round .services__icon--pic { border-radius: 50%; }

/* Large cards: the picture goes above the name, as a wide banner unless the shape is square or a circle. */
.services--cards.services--pic-large .services__panel-head { flex-direction: column; align-items: flex-start; gap: 16px; }
.services--cards.services--pic-large:not(.services--shape-square):not(.services--shape-round) .services__icon--pic { width: 100%; height: auto; aspect-ratio: 16 / 9; }

@media (max-width: 899px) {
	.services--rows.services--pic-large { --pic: 120px; }
}

/* ---------- Picture tiles: the "Show all services" button ---------- */

.services__tile-main { display: flex; flex: 1; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; }
.services__tile-main:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.services__tile--has-all.services__tile--link:hover h3 { text-decoration: none; }
.services__tile--has-all .services__tile-main:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.services__all { margin: 0 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.services__all summary { cursor: pointer; color: var(--brand-text, var(--brand)); font-weight: 700; list-style: none; }
.services__all summary::-webkit-details-marker { display: none; }
.services__all summary::after { content: " +"; }
.services__all[open] summary::after { content: " \2212"; }
.services__all-line { margin: 10px 0 0; color: var(--muted); line-height: 1.5; }
.services__all-list { display: grid; gap: 4px; margin: 10px 0 0; padding-left: 18px; color: var(--muted); }

/* ---------- Small boxes: category picture size and shape, and the number across ---------- */

.services__icon--pic { max-width: 100%; }

@media (max-width: 899px) {
	.services--grid.services--pic-medium { --pic: 96px; }
	.services--grid.services--pic-large { --pic: 120px; }
}

/* Large on desktop: a wide picture across the top of each box, unless the shape is square or a circle. */
@media (min-width: 900px) {
	.services--grid.services--pic-large:not(.services--shape-square):not(.services--shape-round) .services__icon--pic { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}