/* Reviews */

.reviews__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 40px;
	margin-bottom: 40px;
}

.reviews__head .section__title { max-width: 631px; }

.reviews__arrows {
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

.reviews__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

/* Slider */

.reviews__track {
	display: flex;
	gap: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.reviews__track::-webkit-scrollbar { display: none; }

.review-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 30px;
	width: 320px;
	min-height: 490px;
	flex: 0 0 320px;
	padding: 29px 24px 33px;
	scroll-snap-align: start;
	/* Figma 177:442 — hairline on top, right and bottom; no left edge. */
	border: 1px solid var(--color-neutral-4);
	border-left: 0;
}

.review-card__quote { width: 14px; height: 13px; }

.review-card__text {
	flex: 1;
	color: var(--color-primary);
	font-size: 15px;
	line-height: 1.4;
}

.review-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.review-card__user {
	display: flex;
	align-items: center;
	gap: 13px;
}

.review-card__avatar {
	width: 55px;
	height: 55px;
	flex: 0 0 55px;
	border-radius: 50%;
	object-fit: cover;
	/* Portrait sources are 463x632 with the face high in the frame. */
	object-position: 50% 12%;
}

.review-card__name {
	color: var(--color-neutral-1);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.review-card__source { width: 25px; height: 25px; }

@media (min-width: 1024px) {
	.reviews__head { margin-bottom: 60px; }
	.reviews__layout { grid-template-columns: 360px minmax(0, 1fr); gap: 0; }
	/* Desktop: the panel butts against the first review card. */
	.rating-card--panel {
		width: 360px;
		border-radius: var(--radius-lg) 0 0 var(--radius-lg);
	}
	.review-card { width: 360px; flex-basis: 360px; }
}

/*
 * Phones: the arrows read as controls for the cards, so they sit under the
 * track rather than beside the heading. `display: contents` dissolves the head
 * so its two children can be ordered against the layout below it.
 */
@media (max-width: 767px) {
	.reviews .section__container {
		display: flex;
		flex-direction: column;
	}

	.reviews__head { display: contents; }
	.reviews__head .section__title { order: 1; margin-bottom: 40px; }
	.reviews__layout { order: 2; }

	.reviews__arrows {
		order: 3;
		justify-content: center;
		margin-top: 30px;
	}
}
