/*
 * Home: Google ratings, reviews and the two locations under the banner (templates/home-reviews.php,
 * RP_LAYOUT_PUBLISH_HOME_REVIEWS). Loaded on the front page only. Same tokens as rp-layout.css.
 */

.rp-shell .rp-home-reviews {
	--rp-line: #d5e3d8;
	--rp-muted: #4a5a52;
	max-width: 1240px;
	margin: 48px auto 24px;
	padding: 0 5%;
	box-sizing: content-box;
	font-family: var(--rp-body);
	color: var(--rp-ink);
}

.rp-shell .rp-home-reviews p {
	margin: 0;
	font: 400 18px/1.55 var(--rp-body);
	text-align: left;
	color: var(--rp-ink);
}

.rp-shell .rp-home-reviews__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px 32px;
}

.rp-shell .rp-home-reviews__title {
	max-width: 22em;
	margin: 0;
	font: 700 32px/1.2 var(--rp-display);
	color: var(--rp-ink);
	text-align: left;
	text-wrap: balance;
}

/* ---------- Rating summaries ---------- */
.rp-shell .rp-ratings {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rp-shell .rp-rating {
	display: grid;
	grid-template-columns: auto auto;
	align-items: center;
	gap: 2px 10px;
	min-height: 44px;
	padding: 12px 18px;
	border: 1px solid var(--rp-line);
	border-radius: 16px;
	background: #fff;
	color: var(--rp-ink);
	text-decoration: none;
}

.rp-shell .rp-rating:hover {
	border-color: var(--rp-green);
}

.rp-shell .rp-rating:focus-visible,
.rp-shell .rp-home-reviews__more:focus-visible {
	outline: 3px solid var(--rp-blue);
	outline-offset: 2px;
}

.rp-shell .rp-rating__score {
	font: 700 28px/1 var(--rp-display);
}

.rp-shell .rp-rating__text {
	grid-column: 1 / -1;
	font: 400 15px/1.3 var(--rp-body);
	color: var(--rp-muted);
}

.rp-shell .rp-rating__text strong {
	color: var(--rp-ink);
}

/* Stars: a grey row with a gold row on top, clipped to the rating. */
.rp-shell .rp-stars {
	position: relative;
	display: inline-block;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 2px;
	color: #c9d3cd;
	white-space: nowrap;
}

.rp-shell .rp-stars > span {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	color: #b87300; /* 3.6:1 on white; the rating is also given as text */
}

.rp-shell .rp-stars--small {
	font-size: 16px;
}

/* ---------- Review cards ---------- */
.rp-shell .rp-quotes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

.rp-shell .rp-quote {
	margin: 0;
}

.rp-shell .rp-quote figure {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	margin: 0;
	padding: 24px;
	border-radius: 20px;
	background: var(--rp-mint);
	box-sizing: border-box;
}

.rp-shell .rp-quote blockquote {
	flex: 1;
	margin: 0;
	padding: 0;
	border: 0;
	quotes: "“" "”";
}

.rp-shell .rp-home-reviews .rp-quote blockquote p::before { content: open-quote; }
.rp-shell .rp-home-reviews .rp-quote blockquote p::after { content: close-quote; }

.rp-shell .rp-quote figcaption {
	font: 400 15px/1.4 var(--rp-body);
	color: var(--rp-muted);
}

.rp-shell .rp-quote figcaption strong {
	display: block;
	font: 700 17px/1.3 var(--rp-body);
	color: var(--rp-ink);
}

.rp-shell .rp-home-reviews__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-top: 16px;
}

.rp-shell .rp-home-reviews p.rp-home-reviews__asof {
	font-size: 15px;
	color: var(--rp-muted);
}

.rp-shell .rp-home-reviews__more {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font: 700 16px/1.2 var(--rp-body);
	letter-spacing: 0.02em;
	color: var(--rp-green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Locations ---------- */
.rp-shell .rp-home-locs {
	margin-top: 44px;
}

.rp-shell .rp-home-locs__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 18px;
}

/* A lower map on Home, where the block sits above the programs. */
.rp-shell .rp-home-locs .rp-map {
	aspect-ratio: 21 / 8;
}

@media (max-width: 1023px) {
	.rp-shell .rp-quotes { grid-template-columns: minmax(0, 1fr); }
	.rp-shell .rp-home-reviews__title { font-size: 28px; }
}

@media (max-width: 699px) {
	.rp-shell .rp-home-reviews { margin-top: 32px; padding: 0 16px; }
	.rp-shell .rp-home-reviews__title { font-size: 25px; }
	.rp-shell .rp-ratings, .rp-shell .rp-ratings li, .rp-shell .rp-rating { width: 100%; box-sizing: border-box; }
	.rp-shell .rp-quote figure { padding: 20px; }
	.rp-shell .rp-home-locs__cards { grid-template-columns: minmax(0, 1fr); }
}
