/**
 * Team: the listing page (/team/) and the profile template (/team/<name>/).
 * Numbers from design/reference/layout/team-*.txt and team__peter-curtis-*.txt.
 * Everything is scoped under .pw-team-*, .pw-team-intro or .pw-profile*.
 */

/* ---------- Listing page ---------- */
.pw-team-intro {
	margin-top: 60px;
	padding: 10px max(10px, calc((100% - var(--pw-max)) / 2));
}
.pw-team-intro h1 {
	margin-bottom: 20px;
}
.pw-team-intro p {
	width: 70%;
}
.pw-team-section {
	padding: 0 10px;
}
.pw-team-section--associates {
	margin-bottom: 60px;
}
.pw-team-subhead {
	/* 10px section padding + the heading's own 20px margin, inside the 1240px column */
	margin: 30px max(20px, calc((100% - var(--pw-max)) / 2 + 20px));
	font-size: 32px;
	text-align: center;
}
.pw-team-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	max-width: var(--pw-max);
	margin-inline: auto;
	padding-block: 10px;
}
.pw-team-list--associates {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pw-team-card {
	display: block;
	padding: 10px 15px 29.4px;
	border-radius: var(--pw-radius);
	background: #fafafa;
	color: inherit;
	text-align: center;
}
.pw-team-card__photo {
	display: block;
	line-height: 0;
}
.pw-team-card__img {
	width: 150px;
	height: 150px;
	border: 3px solid #d8d8d8;
	border-radius: 50%;
	object-fit: cover;
}
.pw-team-card__name {
	margin-top: 10px;
	color: #272727;
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 1px;
	text-transform: capitalize;
}
.pw-team-card__position {
	margin-top: 5px;
	color: var(--accent);
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 400;
	line-height: 16.8px;
	letter-spacing: 0.7px;
	text-transform: uppercase;
}

/* ---------- Profile ---------- */
.pw-profile-header {
	margin: 60px 0 20px;
	padding: 0 10px;
}
.pw-profile-header__inner {
	display: flex;
	gap: 20px;
	max-width: var(--pw-max);
	margin-inline: auto;
	padding-block: 10px;
}
/* Same flex arithmetic as the original: a 300px photo and a full-width text column both
   shrink, which is why the photo is 237px at desktop and 207px at 768px. */
.pw-profile__photo {
	/* Its width is set inline to the picture's own width (inc/team.php). It shrinks from
	   there with the text column; it never grows, so a small picture is never stretched. */
	flex: 0 1 auto;
	max-width: 100%;
	min-width: 0;
	line-height: 0;
}
.pw-profile__img {
	width: 100%;
	height: auto;
}
.pw-profile__info {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 100%;
	min-width: 0;
	padding: 10px;
}
.pw-profile__name {
	color: var(--text);
}
.pw-profile__position {
	color: var(--accent);
	font-family: var(--wp--preset--font-family--body);
	font-size: 24px;
	font-weight: 600;
	text-transform: uppercase;
}
.pw-profile__links {
	display: flex;
	gap: 20px;
	min-height: 50px;
	padding: 10px;
}
.pw-profile__link {
	display: block;
	width: 22px;
	height: 22px;
	color: var(--accent);
	line-height: 0;
}
.pw-profile__link .pw-icon {
	width: 22px;
	height: 22px;
}
.pw-profile__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: calc(var(--pw-max) + 20px);
	margin: 0 auto 60px;
	padding: 10px;
}
.pw-profile__back .wp-block-button__link {
	font-family: var(--wp--preset--font-family--body);
	text-transform: uppercase;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.pw-team-intro {
		margin-top: 20px;
		padding: 16px;
	}
	.pw-team-intro p {
		width: auto;
	}
	.pw-team-list,
	.pw-team-list--associates {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
	.pw-team-list,
	.pw-team-list--associates {
		grid-template-columns: minmax(0, 1fr);
	}
	.pw-profile-header__inner {
		flex-direction: column;
	}
	.pw-profile__position {
		font-size: 20px;
	}
}
