/**
 * Team member profile (single-team_member.php). v0.22.0.
 *
 * A two-column profile: a sticky side card with the headshot, qualification
 * letters, GDC number, social links and a booking CTA, beside a readable
 * column carrying the intro, biography and long-form credential sections.
 * Uses the site tokens from main.css; no new colours or fonts.
 */

.tprofile {
	padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 var(--section-y);
}

.tprofile__grid {
	display: grid;
	grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	align-items: start;
}

/* Side card -------------------------------------------------------------- */
.tprofile__side {
	position: sticky;
	top: 110px;
}

.tprofile__photo {
	position: relative;
	margin: 0;
	aspect-ratio: 41 / 52;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--cream);
}

.tprofile__photo .img-cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tprofile__photo--ph {
	display: grid;
	place-items: center;
	background: var(--mirage);
}

.tprofile__initials {
	font-family: var(--font-display);
	font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
	color: var(--barley-light);
	letter-spacing: .02em;
}

.tprofile__cred {
	padding-top: var(--s-4);
}

.tprofile__letters {
	margin: 0 0 var(--s-2);
	font-size: .8125rem;
	font-weight: 500;
	letter-spacing: .04em;
	color: var(--barley-dark);
	text-transform: uppercase;
	line-height: 1.5;
}

.tprofile__gdc {
	margin: 0 0 var(--s-3);
	font-size: .875rem;
	color: var(--ink-muted);
}

.tprofile__gdc span {
	color: var(--ink);
	font-weight: 600;
}

.tprofile__langs {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	margin: 0 0 var(--s-3);
	font-size: .875rem;
	color: var(--ink-muted);
	line-height: 1.5;
}

.tprofile__langs svg {
	width: 16px;
	height: 16px;
	color: var(--barley);
	flex: none;
	margin-top: .15rem;
}

.tprofile__social {
	display: flex;
	gap: var(--s-2);
	margin-bottom: var(--s-4);
}

.tprofile__social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--hairline);
	border-radius: 50%;
	color: var(--ink);
	transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}

.tprofile__social a:hover {
	color: var(--white);
	background: var(--barley);
	border-color: var(--barley);
}

.tprofile__social svg {
	width: 18px;
	height: 18px;
}

.tprofile__book {
	display: block;
	width: 100%;
	text-align: center;
	margin-bottom: var(--s-3);
}

/* Click-to-phone button */
.tprofile__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	padding: .75rem 1rem;
	margin-bottom: var(--s-3);
	border: 1px solid var(--hairline);
	border-radius: var(--radius-sm);
	font-family: var(--font-body);
	font-size: .875rem;
	font-weight: 500;
	color: var(--ink);
	text-decoration: none;
	transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}

.tprofile__phone span {
	font-weight: 600;
	white-space: nowrap;
}

.tprofile__phone svg {
	width: 18px;
	height: 18px;
	color: var(--barley);
	flex: none;
	transition: color .2s var(--ease);
}

.tprofile__phone:hover {
	background: var(--mirage);
	border-color: var(--mirage);
	color: var(--white);
}

.tprofile__phone:hover svg {
	color: var(--white);
}

.tprofile__back {
	display: inline-block;
	font-size: .875rem;
	color: var(--ink-muted);
	text-decoration: none;
	transition: color .2s var(--ease);
}

.tprofile__back:hover {
	color: var(--ink);
}

.tprofile__back span {
	color: var(--barley);
}

/* Main column ------------------------------------------------------------ */
.tprofile__main .wsdc-crumbs {
	margin-bottom: var(--s-4);
}

.tprofile__name {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--fs-h1);
	line-height: 1.05;
	color: var(--ink);
	margin: var(--s-2) 0 var(--s-2);
}

.tprofile__role {
	font-size: var(--fs-lead);
	font-weight: 500;
	color: var(--barley-dark);
	margin: 0 0 var(--s-5);
}

.tprofile__intro.tprofile__rte p {
	font-size: var(--fs-body);
	color: var(--ink);
}

/* Rich text -------------------------------------------------------------- */
.tprofile__rte {
	color: var(--ink-muted);
	font-size: var(--fs-body);
	line-height: 1.7;
}

.tprofile__rte p {
	margin: 0 0 var(--s-3);
}

.tprofile__rte a {
	color: var(--barley-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.tprofile__rte a:hover {
	color: var(--ink);
}

.tprofile__rte h3 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--fs-h3);
	color: var(--barley-dark);
	margin: var(--s-4) 0 var(--s-2);
}

.tprofile__rte ul {
	list-style: none;
	margin: 0 0 var(--s-3);
	padding: 0;
}

.tprofile__rte li {
	position: relative;
	padding-left: 1.4rem;
	margin-bottom: var(--s-2);
}

.tprofile__rte li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .65em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--barley);
}

/* Long-form sections ----------------------------------------------------- */
.tprofile__section {
	margin-top: var(--s-6);
	padding-top: var(--s-5);
	border-top: 1px solid var(--hairline);
}

.tprofile__h2 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--fs-h2);
	color: var(--barley-dark);
	margin: 0 0 var(--s-3);
}

/* Jump nav --------------------------------------------------------------- */
.tprofile__jump {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	margin: 0 0 var(--s-5);
	padding-bottom: var(--s-4);
	border-bottom: 1px solid var(--hairline);
}

.tprofile__jump a {
	position: relative;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ink-muted);
	text-decoration: none;
	padding-bottom: 3px;
	transition: color .2s var(--ease);
}

.tprofile__jump a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0;
	height: 1px;
	background: var(--barley);
	transition: right .2s var(--ease);
}

.tprofile__jump a:hover {
	color: var(--ink);
}

.tprofile__jump a:hover::after {
	right: 0;
}

/* Anchored sections clear the sticky masthead when jumped to. */
html {
	scroll-behavior: smooth;
}

.tprofile__about,
.tprofile__section,
.tprofile-cases {
	scroll-margin-top: 100px;
}

/* Cases band ------------------------------------------------------------- */
.tprofile-cases {
	background: var(--cream);
}

/* Read more toggle for long lists --------------------------------------- */
.tprofile__more {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: var(--s-3);
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: var(--font-body);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--barley-dark);
	transition: color .2s var(--ease);
}

.tprofile__more::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s var(--ease);
	margin-top: -3px;
}

.tprofile__more[aria-expanded="true"]::after {
	transform: rotate(-135deg);
	margin-top: 3px;
}

.tprofile__more:hover {
	color: var(--ink);
}

/* Reviews ---------------------------------------------------------------- */
.tprofile-reviews {
	padding-block: var(--section-y);
}

/* Set by team-profile.js when the third-party reviews widget renders nothing
   (e.g. blocked by private browsing), so no empty white band is left behind. */
.tprofile-reviews.is-empty {
	display: none;
}

.tprofile-reviews .td-head {
	margin-bottom: var(--s-5);
}

.td-head--center {
	text-align: center;
}

/* Sticky mobile booking bar ---------------------------------------------- */
.tprofile-stickybar {
	display: none;
}

@media (max-width: 768px) {
	.tprofile-stickybar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: .625rem;
		padding: .625rem var(--gutter) calc(.625rem + env(safe-area-inset-bottom, 0px));
		background: var(--white);
		border-top: 1px solid var(--hairline);
		box-shadow: 0 -6px 20px rgba(28, 42, 58, .1);
	}

	.tprofile-stickybar__book {
		flex: 1 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .45rem;
		text-align: center;
	}

	.tprofile-stickybar__cal {
		display: inline-flex;
		line-height: 1;
	}

	.tprofile-stickybar__cal svg {
		width: 16px;
		height: 16px;
		flex: none;
	}

	.tprofile-stickybar__call {
		flex: 1 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .5rem;
		padding: .75rem 1rem;
		border: 1px solid var(--mirage);
		border-radius: var(--radius-sm);
		font-family: var(--font-body);
		font-size: .9375rem;
		font-weight: 600;
		color: var(--mirage);
		text-decoration: none;
	}

	.tprofile-stickybar__call svg {
		width: 18px;
		height: 18px;
		flex: none;
	}

	/* Reserve clearance on the navy footer, not the white body, so no empty
	   white strip is left below the footer when scrolled to the bottom. */
	.site-footer {
		padding-bottom: calc(var(--s-5) + 72px);
	}
}

@media (max-width: 900px) {
	.tprofile__grid {
		grid-template-columns: 1fr;
	}

	.tprofile__side {
		position: static;
		max-width: 360px;
	}

	.tprofile__main {
		order: 2;
	}
}

/* Closing band on profiles: the clinic entrance photo has a white facade, so the
   overlay is a little deeper than on treatment pages to keep the copy legible. */
.single-team_member .td-closing__bg::after {
	background: linear-gradient(180deg, rgba(28, 42, 58, .68), rgba(28, 42, 58, .8));
}

/* Peer review certificates ---------------------------------------------- */
.tprofile-certs {
	list-style: none;
	margin: var(--s-3) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.25rem 1rem;
}

.tprofile-certs li {
	margin: 0;
	padding: 0;
}

.tprofile-certs li::before {
	content: none;
}

.tprofile-cert {
	display: flex;
	flex-direction: column;
	gap: .35rem;
	height: 100%;
	color: var(--ink);
	text-decoration: none;
}

.tprofile-cert__img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	margin-bottom: .3rem;
	padding: .5rem;
	background: #fff;
	border: 1px solid var(--hairline);
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.tprofile-cert__img img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.tprofile-cert:hover .tprofile-cert__img,
.tprofile-cert:focus-visible .tprofile-cert__img {
	border-color: var(--barley);
	box-shadow: 0 10px 24px -16px rgba(28, 42, 58, .45);
}

.tprofile-cert__title {
	font-size: .85rem;
	font-weight: 600;
	line-height: 1.3;
}

.tprofile-cert__meta {
	font-size: .78rem;
	line-height: 1.35;
	color: var(--ink-muted);
}

@media (max-width: 900px) {
	.tprofile-certs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.tprofile-certs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
