/*
 * Sister locations block. Loaded only on pages that use it. Mobile first; desktop from 900px.
 * Uses only this site's design tokens, so the cards take the clinic's own colours, fonts and corners.
 * Cards follow the Services cards: the surface colour, soft shadow in look F, a hairline in look C,
 * and a small lift on hover. The logo sits in a full-width tile above the details and is never cropped.
 */

.sisters { padding: 56px 0; }

.sisters__title { font-size: 1.9rem; line-height: 1.1; }
.sisters__intro { max-width: var(--intro-w, 90ch); margin: 10px 0 0; color: var(--muted); }

.sisters__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	grid-auto-rows: 1fr; /* every card the same height */
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

/* A card is one link: the "Visit website" link stretches over it (see .sisters__link::after). */
.sisters__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	border-radius: var(--card-r);
	background: var(--surface);
	color: var(--ink);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sisters__card:hover,
.sisters__card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 18px 32px -18px rgb(0 0 0 / 0.35);
}

@media (prefers-reduced-motion: reduce) {
	.sisters__card { transition: none; }
	.sisters__card:hover,
	.sisters__card:focus-within { transform: none; }
}

/* ---------- Logo ---------- */

/* Height by the "Logo size" setting; the logo is fitted inside, whole. */
.sisters { --sis-logo: 120px; }
.sisters--logo-sm { --sis-logo: 84px; }
.sisters--logo-lg { --sis-logo: 160px; }
.sisters--logo-xl { --sis-logo: 200px; }

.sisters__logo {
	display: grid;
	place-items: center;
	flex: 1 1 auto; /* takes the spare height, so the text below always sits at the bottom of the card */
	min-height: var(--sis-logo);
	padding: 12px;
	border-radius: calc(var(--card-r) - 4px);
	background: #fff;
}

.sisters--tile-tint .sisters__logo { background: var(--tint); }
.sisters--tile-none .sisters__logo { background: transparent; }

/* The logo keeps its own proportions and is never cropped: as wide as the tile allows, no taller than the size setting. */
.sisters__logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(var(--sis-logo) * 1.4); }

/* No logo: the clinic's initials on a tint of the brand colour. */
.sisters__initials {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: calc(var(--sis-logo) - 24px);
	border-radius: inherit;
	background: color-mix(in srgb, var(--brand) 12%, var(--surface));
	color: var(--brand-text, var(--brand));
	font-family: var(--fh);
	font-size: 2rem;
	font-weight: var(--hw);
}

/* ---------- Details ---------- */

.sisters__body { min-width: 0; }

.sisters__name { margin: 0; font-size: 1.15rem; line-height: 1.2; }

.sisters__line {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
}

.sisters__line .ico { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* The phone link keeps its icon and number on one line, and sits above the stretched card link. */
.sisters__phone {
	position: relative;
	z-index: 1;
	display: inline-flex;
	gap: 10px;
	align-items: center;
	color: inherit;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.sisters__phone .ico { flex: none; width: 16px; height: 16px; margin: 0; }
.sisters__phone:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The phone line's own icon is inside the link, so the line needs none of its own spacing. */
.sisters__line:has(.sisters__phone) { align-items: center; }

.sisters__visit { margin: 14px 0 0; font-weight: 600; }

.sisters__link { color: var(--brand-text, var(--brand)); text-underline-offset: 3px; }
.sisters__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sisters__link:focus-visible { outline: none; }
.sisters__link:focus-visible::after { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Look C: a hairline around each card ---------- */

.look-c .sisters__card { border: 1px solid var(--line); }
.look-c .sisters__logo { border-radius: 6px; }

/* ---------- Look F: soft cards with a gentle shadow, rounder logo tile ---------- */

.look-f .sisters__card { box-shadow: 0 14px 30px -22px rgb(0 0 0 / 0.35); }
.look-f .sisters__card:hover,
.look-f .sisters__card:focus-within { box-shadow: 0 22px 36px -20px rgb(0 0 0 / 0.4); }
.look-f .sisters__logo { border-radius: 22px; }
.look-f .sisters__name { font-size: 1.25rem; }

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

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

	.sisters__list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
}

@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
	.look-f .sisters__card:hover { box-shadow: 0 14px 30px -22px rgb(0 0 0 / 0.35); }
}
