  /* Single Profile template */

/*
 * Component scoped values taken from the original stylesheet.
 * The original site uses a 10px root, all values are converted to px.
 * These colours are candidates for promotion into the token layers of trf.css.
 */
.single-profile {
  --profile-page-bg: #f6f6f6;
  --profile-surface: #ffffff;
  --profile-link-blue: var(--ctx-blue-accent, #006daa);
  --profile-header-blue: var(--ctx-blue-band, #004371);
  --profile-header-border: var(--ctx-navy-mid, #042d52);
  --profile-label-blue: var(--ctx-blue-deep, #004a7c);
  --profile-divider: #cccccc;
  --profile-item-divider: #e9e9e9;
  --profile-text: #000000;

  background: var(--profile-page-bg);
}

/* Page header */

.profile-topbar {
  background: var(--profile-header-blue);
  border-top: 1px solid var(--profile-header-border);
  color: var(--color-white);
}

.profile-topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.profile-topbar-label {
  font-size: 22px;
  line-height: 34px;
  font-weight: 700;
}

.profile-topbar-link,
.profile-topbar-link:visited,
.profile-topbar-link:hover,
.profile-topbar-link:focus {
  color: var(--color-white);
  font-size: 16px;
  line-height: 23px;
  font-weight: 600;
  text-decoration: none;
}

.profile-topbar-link:hover,
.profile-topbar-link:focus {
  text-decoration: underline;
}

/* Layout */

.profile-layout-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 30px 48px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.profile-column {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.profile-feed {
  display: flex;
  flex-direction: column;
  min-width: 60%;
  max-width: 60%;
  margin-left: 30px;
  padding: 0 0 24px 30px;
  border-left: 1px solid;
  border-image: linear-gradient(180deg, transparent, var(--profile-divider) 150px, var(--profile-divider) 95%, transparent) 1;
}

/* Profile card */

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 10px;
  background: var(--profile-surface);
}

.profile-background {
  display: flex;
  width: 100%;
  height: 192px;
  background: var(--color-light-grey);
}

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

.profile-image-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-top: -110px;
}

.profile-image {
  display: flex;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 7px solid var(--color-white);
  background: var(--color-light-grey);
  overflow: hidden;
  z-index: 10;
}

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

.profile-info {
  padding: 0 20px;
}

.profile-name {
  font-size: 28px;
  line-height: 42px;
  font-weight: 600;
  margin: 11px 0 0;
}

.profile-role {
  font-size: 20px;
  line-height: 27px;
  font-weight: 400;
  margin: 0;
}

.profile-organisation {
  font-size: 20px;
  line-height: 31px;
  font-weight: 700;
  margin: 0 0 20px;
}

.profile-bio {
  max-width: min(900px, 80%);
  font-size: 18px;
  line-height: 31px;
  font-weight: 400;
  color: var(--color-body-copy);
  margin-bottom: 20px;
}

.profile-bio p {
  margin: 0 0 26px;
}

.profile-bio p:last-child {
  margin-bottom: 0;
}

.single-profile--no-feed .profile-layout-inner {
  padding-bottom: 30px;
}

.profile-bio.profile-bio--long {
  margin-bottom: -6px;
}

.profile-bio--long p:last-child {
  margin-bottom: 26px;
}

/* Social links */

.profile-social {
  display: flex;
  flex-direction: row;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 10px 0 30px;
}

.profile-social li {
  display: flex;
}

.profile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 49px;
  height: 49px;
  margin: 0 11px;
  background-repeat: no-repeat;
  background-size: cover;
}

.profile-social-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-social-link:focus-visible {
  outline: 2px solid var(--profile-text);
  outline-offset: 3px;
}

/* Feed item */

.profile-feed-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--profile-item-divider);
}

.profile-feed-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.profile-feed-item-date {
  font-size: 13px;
  line-height: 21px;
  font-weight: 700;
  color: var(--profile-link-blue);
  margin: -6px 0 8px;
}

.profile-feed-item-headline-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-feed-item-headline,
.profile-feed-item-headline:visited {
  font-size: 27px;
  line-height: 37px;
  font-weight: 500;
  color: var(--profile-text);
  text-decoration: none;
  margin-bottom: 10px;
}

.profile-feed-item-headline:hover,
.profile-feed-item-headline:focus {
  color: var(--profile-text);
  text-decoration: underline;
}

.profile-feed-item-label,
.profile-feed-item-label:visited,
.profile-feed-item-label:hover,
.profile-feed-item-label:focus {
  display: inline-flex;
  background: var(--profile-label-blue);
  color: var(--color-white);
  font-size: 11px;
  line-height: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
}

.profile-feed-item-label:hover span,
.profile-feed-item-label:focus span {
  text-decoration: underline;
}

.profile-feed-item-image {
  width: 100%;
  margin: 12px 0 23px;
}

.profile-feed-item-image a {
  display: block;
}

.profile-feed-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 100 / 68;
  object-fit: cover;
}

.profile-feed-item-description,
.profile-feed-item-description p {
  font-size: 16px;
  line-height: 25px;
  font-weight: 400;
  color: var(--profile-text);
}

.profile-feed-item-description p {
  margin: 0 0 15px;
}

.profile-feed-item-description a {
  color: var(--profile-text);
  text-decoration: underline;
}

/* Share row */

.profile-feed-item-share-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.profile-feed-item-share,
.profile-feed-item-share:link,
.profile-feed-item-share:visited {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  color: var(--profile-text);
  text-decoration: none;
  cursor: pointer;
}

.profile-feed-item-share-icon {
  display: flex;
  width: 17px;
  height: 17px;
}

.profile-feed-item-share-icon img {
  width: 100%;
  height: auto;
}

.profile-feed-item-share span {
  font-size: 16px;
  font-weight: 600;
  color: var(--profile-text);
  margin-left: 5px;
}

.profile-feed-item-share:hover span,
.profile-feed-item-share:focus span {
  text-decoration: underline;
}

.profile-feed-item-share:focus-visible {
  outline: 2px solid var(--profile-text);
  outline-offset: 3px;
}

.profile-feed-item-readmore,
.profile-feed-item-readmore:link,
.profile-feed-item-readmore:visited {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: var(--profile-link-blue);
  text-decoration: none;
}

.profile-feed-item-readmore:hover,
.profile-feed-item-readmore:focus {
  text-decoration: underline;
}

/* Load more */

/* Matches the Context: Button block, see context-button.css */

.profile-feed-more {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.profile-feed-more-button {
  display: inline-block;
  padding: 16px 36px;
  border: 0;
  border-radius: 2px;
  background-color: var(--ctx-blue-accent, #006daa);
  color: #fff;
  font-family: var(--fontfamily-body, inherit);
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none !important;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.profile-feed-more-button:hover,
.profile-feed-more-button:focus,
.profile-feed-more-button:active {
  background-color: var(--ctx-blue-accent, #006daa);
  color: #fff;
  text-decoration: underline !important;
}

.profile-feed-more-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.profile-feed-more-button.is-loading {
  opacity: 0.6;
  cursor: default;
  text-decoration: none !important;
}

.profile-feed-empty {
  margin: 0;
  font-size: 16px;
  line-height: 25px;
  color: var(--color-medium-grey);
}

/* Legacy team directory */

.profile-team {
  background: var(--profile-page-bg);
}

.profile-team__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 30px;
}

.profile-team__header {
  height: 254px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #042d52;
  border-radius: 1px;
  padding: 0 10px;
}

.profile-team__header h2 {
  margin: 0;
  color: #fff;
  font-family: var(--fontfamily-display, "moret", Georgia, serif);
  font-size: 58px;
  line-height: 52px;
  font-weight: 600;
}

.profile-team__group {
  padding-top: 39px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.profile-team__group:last-child {
  margin-bottom: 0;
}

.profile-team__group > h3 {
  margin: 0 0 41px;
  color: var(--profile-text);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.profile-team__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 56px 82px;
  padding-top: 52px;
  margin-bottom: 53px;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, #f6f6f6, #ddd, #f6f6f6) 1;
}

.profile-team__grid--continuation {
  padding-top: 0;
  border-top: 0;
}

.profile-team__grid--editor-first {
  margin-bottom: 54px;
}

.profile-team__group:last-child .profile-team__grid {
  margin-bottom: 44px;
}

.profile-team__card {
  min-width: 260px;
  flex: 1 1 0%;
  text-align: center;
}

.profile-team__group--editors .profile-team__card {
  flex: 0 0 260px;
}

.profile-team__image {
  display: block;
  box-sizing: content-box;
  width: 246px;
  height: 246px;
  border: 7px solid #fff;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

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

.profile-team__card h4 {
  margin: 17px 0 5px;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 600;
}

.profile-team__card h4 a,
.profile-team__card h4 a:visited {
  color: var(--profile-text);
  text-decoration: underline;
}

.profile-team__card h4 a:hover,
.profile-team__card h4 a:focus {
  text-decoration: underline;
}

.profile-team__card p {
  margin: 0 auto;
  max-width: 260px;
  color: #212529;
  font-size: 19px;
  line-height: 1.5;
}

/* Breakpoints follow the original stylesheet */

@media (max-width: 1199.98px) {
	.profile-team__grid {
		gap: 55px 61px;
		margin-bottom: 57px;
	}

	.profile-team__header h2 { font-size: 51px; }
	.profile-team__card { min-width: 216px; }
	.profile-team__group--editors .profile-team__card { flex-basis: 216px; }
	.profile-team__image { width: 204px; height: 204px; border-width: 6px; }
	.profile-team__card p { max-width: 216px; }
	.profile-team__grid--editor-first { margin-bottom: 54px; }

  .profile-layout-inner {
    flex-direction: column;
    padding: 25px 25px 40px;
  }

  .profile-feed {
    min-width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 24px 0 0;
    border-left: none;
    border-image: none;
  }

  .profile-feed-item-headline {
    font-size: 30px;
    line-height: 41px;
    margin-bottom: 13px;
  }

  .profile-feed-item-image {
    margin: 12px 0 16px;
  }

  .profile-feed-item-image img {
    aspect-ratio: 100 / 55;
  }
}

@media (max-width: 899.98px) and (min-width: 640px) {
  .profile-team__grid { gap: 50px 61px; padding-top: 46px; margin-bottom: 66px; }
  .profile-team__grid--continuation { padding-top: 0; }
  .profile-team__grid--editor-first { margin-bottom: 54px; }
  .profile-team__group { padding-top: 34px; }
  .profile-team__group > h3 { font-size: 30px; margin-bottom: 37px; }
}

@media (max-width: 639.98px) {
	.profile-team__inner {
		padding: 0 15px;
	}

	.profile-team__header {
		height: 193px;
	}

	.profile-team__header h2 {
		font-size: 38px;
		line-height: 42px;
	}

	.profile-team__group > h3 {
		font-size: 23px;
		margin-bottom: 31px;
	}
	.profile-team__group { padding-top: 32px; border-bottom-color: rgba(144,195,206,.2); }
	.profile-team__card,
	.profile-team__group--editors .profile-team__card { flex: 0 0 100%; min-width: 0; }
	.profile-team__image { width: 180px; height: 180px; border-width: 5px; }
	.profile-team__card h4 { font-size: 20px; }
	.profile-team__card p { font-size: 17px; max-width: none; }

  .profile-team__grid {
    gap: 43px 0;
    padding-top: 39px;
    margin-bottom: 50px;
    border-image: linear-gradient(90deg, #f6f6f6, rgba(144,195,206,.3), #f6f6f6) 1;
  }

  .profile-team__grid--continuation { padding-top: 0; }
  .profile-team__grid--editor-first { margin-bottom: 43px; }

  .profile-topbar-inner {
    padding: 16px 15px;
  }

  .profile-topbar-label {
    font-size: 17px;
    line-height: 27px;
  }

  .profile-topbar-link {
    font-size: 13px;
    line-height: 19px;
  }

  .profile-layout-inner {
    padding: 20px 15px 30px;
  }

  .profile-background {
    height: 152px;
  }

  .profile-image-wrapper {
    margin-top: -95px;
  }

  .profile-image {
    width: 190px;
    height: 190px;
    border-width: 5px;
  }

  .profile-name {
    font-size: 21px;
    line-height: 31px;
    margin: 12px 0 5px;
  }

  .profile-role {
    font-size: 17px;
    line-height: 23px;
  }

  .profile-organisation {
    font-size: 18px;
    line-height: 23px;
    font-weight: 600;
    margin-bottom: 10px;
  }

  .profile-bio {
    font-size: 15px;
    line-height: 23px;
    margin-bottom: 10px;
  }

  .profile-bio p {
    margin-bottom: 20px;
  }

  .profile-bio.profile-bio--long {
    margin-bottom: -13px;
  }

  .profile-bio--long p:last-child {
    margin-bottom: 20px;
  }

  .profile-social {
    padding-bottom: 18px;
  }

  .profile-social-link {
    width: 40px;
    height: 40px;
    margin: 0 7px;
  }

  .profile-feed {
    padding-top: 8px;
  }

  .profile-feed-item {
    margin-bottom: 4px;
    padding-bottom: 12px;
  }

  .profile-feed-item-date {
    display: none;
  }

  .profile-feed-item-headline-container {
    flex-direction: column-reverse;
  }

  .profile-feed-item-headline {
    font-size: 20px;
    line-height: 27px;
    margin: 4px 0 10px;
  }

  .profile-feed-item-image img {
    aspect-ratio: 100 / 58;
  }

  .profile-feed-item-share-row {
    display: none;
  }
}

/* Share popup — shared shell, copied verbatim from the component specification */

.ctx-modal {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	/* Sits above the sticky header, which uses --ctx-z-popup in header.css. */
	z-index: calc(var(--ctx-z-popup, 9999) + 1);
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ctx-modal:target {
	display: flex;
}

.ctx-modal__backdrop {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100;
	background-color: rgba(255, 255, 255, 0.7);
	border: 0;
	text-decoration: none;
}

.ctx-modal__dialog {
	position: relative;
	z-index: 200;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	width: 100%;
	max-height: 100%;
	overflow-y: auto;
	background-color: #ffffff;
	border: 1px solid #cccccc;
}

.ctx-modal__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 65px;
	background: var(--ctx-navy-mid, #042d52);
	color: #ffffff;
	flex: 0 0 auto;
}

.ctx-modal__title {
	display: flex;
	align-items: center;
	margin: 0 20px;
	font-style: normal;
	font-weight: 600;
	font-size: 19px;
	line-height: 24px;
}

.ctx-modal__close,
.ctx-modal__close:link,
.ctx-modal__close:visited {
	width: 15px;
	height: 15px;
	margin: 25px;
	flex: 0 0 15px;
	background: url("/wp-content/themes/trust/image/icon-share-close.svg") 50% no-repeat;
	background-size: 15px 15px;
	border: none;
	text-decoration: none;
}

@media (min-width: 640px) {

	.ctx-modal__header {
		height: 81px;
	}

	.ctx-modal__title {
		font-size: 22px;
		line-height: 28px;
		margin: 0 31px;
	}

	.ctx-modal__close,
	.ctx-modal__close:link,
	.ctx-modal__close:visited {
		margin: 33px;
	}
}

.ctx-share {
	max-width: 345px;
	padding-bottom: 30px;
}

.ctx-share__media {
	margin: 0 0 22px;
	min-height: 200px;
	line-height: 0;
}

.ctx-share__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
}

.ctx-share__headline {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 23px 10px 16px;
	margin: 0;
	font-style: normal;
	font-weight: 600;
	font-size: 18px;
	line-height: 23px;
	text-align: left;
	color: #000000;
}

.ctx-share__copy {
	display: flex;
	align-items: center;
	min-height: 32px;
	margin: 0 0 14px 16px;
}

.ctx-copy-url {
	border: none;
	background: transparent;
	padding: 0;
	color: #000000;
	font-family: inherit;
	font-weight: 600;
	font-size: 18px;
	line-height: 23px;
	text-decoration-line: underline;
	cursor: pointer;
}

.ctx-copy-url__feedback {
	display: none;
	flex-direction: row;
	align-items: center;
	padding: 0 8px;
	margin-left: 12px;
	height: 28px;
	border-radius: 4px;
	background-color: #888888;
	color: #ffffff;
	font-size: 13px;
	line-height: 13px;
	font-weight: 500;
}

.ctx-copy-url__feedback.is-visible {
	display: flex;
}

.ctx-share__links {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 20px;
	list-style: none;
	margin: 0 16px -4px;
	padding: 0;
}

.ctx-share__link,
.ctx-share__link:link,
.ctx-share__link:visited {
	display: block;
	width: 41px;
	height: 41px;
	border: 0;
	line-height: 0;
	text-decoration: none;
}

.ctx-share__link img {
	display: block;
	width: 100%;
	height: 100%;
}

@media (min-width: 640px) {

	.ctx-share {
		max-width: 528px;
	}

	.ctx-share__media {
		margin: 0 0 20px;
		min-height: 306px;
	}

	.ctx-share__image {
		min-height: 306px;
	}

	.ctx-share__headline {
		padding: 0 31px 13px;
		font-size: 26px;
		line-height: 32.6px;
	}

	.ctx-share__copy {
		margin: 0 31px 20px;
	}

	.ctx-share__links {
		margin: 0 31px -4px;
	}

	.ctx-share__link,
	.ctx-share__link:link,
	.ctx-share__link:visited {
		width: 52px;
		height: 52px;
	}
}
