/* Testimonials on member directory profiles. */
/* Ruled off top and bottom so it reads as its own section between the bio and the back button. */
.member-testimonials {
	clear: both; /* The member description above is floated. */
	margin: 40px 0;
	padding: 40px 0;
	border-top: 1px solid #dcdcdc;
	border-bottom: 1px solid #dcdcdc;
	scroll-margin-top: 30px; /* Room above the section when jumped to from the "View our testimonials" link. */
}

/* Focus moves here from the "View our testimonials" button, for keyboard and screen reader users. */
.member-testimonials:focus {
	outline: none;
}

.member-testimonials h2 {
	margin-bottom: 25px;
}

.member-testimonials .cta {
	margin-bottom: 0;
}

.member-testimonials .testimonials-none {
	margin: 0 0 25px;
	font-size: 18px;
	color: #6a737c;
}

/* Cards match the site's own style: the contact details box colour, and the diagonal rounded corners of the buttons. */
.member-testimonials .testimonial {
	margin: 0 0 25px;
	padding: 35px 40px;
	background: #f2fafd;
	border-radius: 30px 0;
}

.member-testimonials .testimonial blockquote {
	margin: 0 0 20px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1.4;
	color: #6a737c;
}

.member-testimonials .testimonial blockquote p {
	margin: 0;
	font-size: inherit;
	color: inherit;
}

.member-testimonials .testimonial figcaption {
	font-size: 18px;
	line-height: 1.4;
	color: #6a737c;
}

.member-testimonials .testimonial-name {
	font-weight: 600;
	color: #015a8c;
}

.member-testimonials .testimonial-company::before {
	content: ", ";
}

.member-testimonials .testimonial-date {
	display: block;
	margin-top: 4px;
	font-size: 16px;
}

/* "View our testimonials" button above the member's bio.  It uses the template's .cta button style, and the
   bottom margin matches the 60px below the contact details box so it sits evenly between the box and the bio. */
.member-testimonials-link {
	clear: both;
	margin: 0 0 60px;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Testimonials beyond the first few are behind a "View all" toggle.  No margin of its own: the toggle and the
   cards inside already have 25px below them, the same gap as between cards. */
.member-testimonials .testimonials-more {
	margin: 0;
}

.member-testimonials .testimonials-more summary {
	display: inline-block;
	margin: 0 0 25px;
	color: #015a8c;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
}

.member-testimonials .testimonials-more summary:hover,
.member-testimonials .testimonials-more summary:focus-visible {
	text-decoration: underline;
}

.member-testimonials .testimonials-more summary::-webkit-details-marker {
	display: none;
}

/* Chevron: points down when closed and up when open.  The box is one capital letter tall (Montserrat's cap height is
   0.7em) and sits on the baseline, and the chevron is drawn centred in it, so it's centred on the text by
   construction.  It's an SVG mask over currentColor so it follows the link colour, and it rotates about its own
   centre so it doesn't move when it flips. */
.member-testimonials .testimonials-more summary::after {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.7em;
	margin-left: 0.2em; /* There's already a space before it, from the line break after the label in the markup. */
	vertical-align: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 5l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 5l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
	transition: transform 0.2s ease;
}

.member-testimonials .testimonials-more[open] summary::after {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.member-testimonials .testimonials-more summary::after {
		transition: none;
	}
}

.member-testimonials .testimonials-more-close,
.member-testimonials .testimonials-more[open] .testimonials-more-open {
	display: none;
}

.member-testimonials .testimonials-more[open] .testimonials-more-close {
	display: inline;
}

@media (max-width: 767px) {
	/* The contact details box has 30px below it on mobile, and the bio 10px of top padding. */
	.member-testimonials-link {
		margin-bottom: 20px;
	}

	.member-testimonials {
		margin: 30px 0;
		padding: 30px 0;
	}

	.member-testimonials .testimonial {
		padding: 25px;
	}

	.member-testimonials .testimonial blockquote {
		font-size: 18px;
	}
}
