/* PHV Arvustused: review cards slider. Uses the theme's colour/font tokens,
   with fallbacks so it also works outside the PHV theme. */
.phv-reviews {
	--phv-accent: var(--color-accent, #B5563C);
	--phv-dark: var(--color-dark, #3A352F);
	--phv-text: var(--color-text-strong, #6b615c);
	--phv-border: rgba(181, 86, 60, 0.7);
	--phv-hover-bg: var(--color-accent, #B5563C);
	--n: var(--phv-phone, 1);
	--phv-gap: 20px;
	--phv-peek: 10%;
	display: flex;
	flex-direction: column;
	text-align: left;
	margin: 0;
}
@media (min-width: 601px) {
	.phv-reviews { --n: var(--phv-tablet, 2); --phv-peek: 8%; }
}
@media (min-width: 993px) {
	.phv-reviews { --n: var(--phv-desktop, 3); --phv-gap: 36px; --phv-peek: 6%; }
}

/* Track: native horizontal scrolling with snap (smooth finger swiping).
   It bleeds to both screen edges so cards slide off the edge of the screen,
   while the first card still lines up with the page content. */
.phv-reviews__track {
	display: flex;
	align-items: stretch;
	gap: var(--phv-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 2px calc(50vw - 50%);
	/* scroll-padding is set in px by the script (a % here would mean the track's own width) */
}
.phv-reviews__track::-webkit-scrollbar { display: none; }
.phv-reviews__track:focus-visible { outline: 2px solid var(--phv-accent); outline-offset: -2px; }

/* Card */
.phv-review {
	flex: 0 0 calc((100% - (var(--n) - 1) * var(--phv-gap) - var(--phv-peek)) / var(--n));
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	scroll-snap-align: start;
	padding: 34px 36px 36px;
	border: 1px solid var(--phv-border);
	background: transparent;
	text-align: left;
}
.phv-review__quote {
	display: block;
	height: 32px;
	overflow: hidden;
	margin-bottom: 16px;
	font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
	font-size: 60px;
	line-height: 1;
	color: var(--phv-accent);
}
.phv-reviews .phv-review__text {
	align-self: stretch;
	max-height: calc(var(--phv-lines, 4) * 1.6em);
	overflow: hidden;
	font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif);
	font-size: 17px;
	line-height: 1.6;
	color: var(--phv-text);
}
.phv-reviews .phv-review__text p { margin: 0 0 0.8em; font-size: inherit; line-height: inherit; color: inherit; text-align: left; }
.phv-reviews .phv-review__text p:last-child { margin-bottom: 0; }
/* cut-off text: the last visible line fades out (as on Lydia) */
.phv-review__text.is-clamped {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);
	        mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent);
}
.phv-review.is-open .phv-review__text { max-height: none; -webkit-mask-image: none; mask-image: none; }

.phv-reviews .phv-review__more {
	-webkit-appearance: none;
	appearance: none;
	margin: 18px 0 0;
	padding: 0 0 5px;
	background: none;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--phv-dark);
}
.phv-reviews .phv-review__more[hidden] { display: none; }
.phv-review__more:focus-visible { outline: 2px solid var(--phv-accent); outline-offset: 4px; }

.phv-review__author { margin-top: 32px; }
.phv-review__name {
	display: block;
	font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif);
	font-size: 18px;
	line-height: 1.3;
	color: var(--phv-dark);
}
.phv-review__country {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	color: var(--phv-text);
}

/* Arrows: small white circles, top right (below the cards on phones) */
.phv-reviews__nav {
	order: -1;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 24px;
}
.phv-reviews__nav[hidden] { display: none; }
.phv-reviews .phv-reviews__arrow {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	color: var(--phv-dark);
	cursor: pointer;
	transition: background-color .2s, color .2s, opacity .2s;
}
.phv-reviews__arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phv-reviews__arrow:disabled { opacity: 0.4; cursor: default; }
.phv-reviews__arrow:focus-visible { outline: 2px solid var(--phv-accent); outline-offset: 3px; }
@media (hover: hover) {
	.phv-reviews .phv-reviews__arrow:not(:disabled):hover { background: var(--phv-hover-bg); color: #fff; }
	.phv-reviews .phv-review__more:hover { color: var(--phv-accent); }
}

@media (max-width: 600px) {
	.phv-review { padding: 28px 24px 26px; }
	.phv-reviews .phv-review__text { font-size: 16px; }
	.phv-review__author { margin-top: 26px; }
	.phv-reviews__nav { order: 1; margin: 20px 0 0; }
}
@media (min-width: 601px) and (max-width: 992px) {
	.phv-review { padding: 28px 26px 30px; }
}
@media (prefers-reduced-motion: reduce) {
	.phv-reviews__track { scroll-behavior: auto; }
}

/* ==========================================================================
   "quotes" style: ratings line, short quotes in a slider, arrows below
   ========================================================================== */
.phv-reviews--quotes { --phv-line: #d6cbbd; --phv-gap: 80px; max-width: 1180px; margin-left: auto; margin-right: auto; text-align: center; }
@media (max-width: 992px) { .phv-reviews--quotes { --phv-gap: 48px; } }

.phv-reviews .phv-ratings { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 0; margin: -4px 0 0; /* sits close under the heading, like a subtitle */ padding: 0; list-style: none; }
.phv-reviews .phv-ratings li { margin: 0; padding: 0 28px; }
.phv-reviews .phv-ratings li::before { content: none; display: none; }
.phv-reviews .phv-ratings li + li { border-left: 1px solid var(--phv-line); }
.phv-reviews .phv-rating { display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); font-size: 15px; font-weight: 400; color: var(--phv-text); text-decoration: none; border: 0; }
.phv-rating__score { font-family: var(--font-heading, 'Playfair Display', Georgia, serif); font-size: 28px; line-height: 1; color: var(--phv-dark); }
.phv-stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 2px; color: #cfc3b4; white-space: nowrap; }
.phv-stars span { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; color: var(--phv-accent); }
@media (hover: hover) { .phv-reviews a.phv-rating:hover .phv-rating__src { text-decoration: underline; text-underline-offset: 3px; } }
.phv-reviews a.phv-rating:focus-visible { outline: 2px solid var(--phv-accent); outline-offset: 4px; }

/* the slider window stays inside the page content (no bleed, no peek) */
.phv-reviews--quotes .phv-reviews__track {
	margin: 56px 0 0;
	padding: 0;
	gap: var(--phv-gap);
	align-items: stretch;
}
.phv-quote {
	position: relative;
	flex: 0 0 calc((100% - (var(--n) - 1) * var(--phv-gap)) / var(--n));
	min-width: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	text-align: left;
	scroll-snap-align: start;
}
/* fine divider in the middle of the gap; the one left of the first visible quote falls outside the window */
.phv-quote::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--phv-gap) / -2); border-left: 1px solid var(--phv-line); }
.phv-quote__fig { flex: 1 1 auto; display: flex; flex-direction: column; margin: 0; padding: 0; justify-content: inherit; }
.phv-quote__mark { display: block; height: 28px; overflow: hidden; margin-bottom: 16px; font-family: var(--font-heading, 'Playfair Display', Georgia, serif); font-size: 56px; line-height: 1; color: var(--phv-accent); }
.phv-reviews .phv-quote__text { margin: 0; font-family: var(--font-heading, 'Playfair Display', Georgia, serif); font-style: italic; font-size: 22px; line-height: 1.5; color: var(--phv-dark); text-align: inherit; }
.phv-reviews .phv-quote__tr { margin: 8px 0 0; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); font-size: 15px; line-height: 1.5; color: var(--phv-text); text-align: inherit; }
.phv-quote__who { margin-top: auto; padding-top: 24px; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); }
.phv-reviews .phv-quote__name { display: block; font-size: 16px; font-weight: 400; color: var(--phv-dark); }
.phv-quote__meta { display: block; margin-top: 2px; font-size: 14px; color: var(--phv-text); }

.phv-reviews--quotes .phv-reviews__nav { order: 0; justify-content: center; align-items: center; gap: 16px; margin: 40px 0 0; }
.phv-reviews__count { min-width: 3.5em; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); font-size: 14px; color: var(--phv-text); text-align: center; }
.phv-reviews .phv-reviews__note a { color: inherit; font-weight: 400; text-decoration: underline; text-decoration-color: var(--phv-line); text-underline-offset: 3px; }
@media (hover: hover) { .phv-reviews .phv-reviews__note a:hover { color: var(--phv-dark); text-decoration-color: currentColor; } }
.phv-reviews .phv-reviews__note a:focus-visible { outline: 2px solid var(--phv-accent); outline-offset: 3px; }
.phv-reviews .phv-reviews__note { margin: 20px 0 0; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); font-size: 13px; line-height: 1.5; color: var(--phv-text); text-align: center; }

@media (min-width: 601px) { .phv-reviews--quotes .phv-reviews__count { display: none; } }
@media (min-width: 601px) and (max-width: 992px) {
	.phv-reviews .phv-ratings { margin-top: 4px; }
	.phv-reviews--quotes .phv-reviews__track { margin-top: 48px; }
}
@media (max-width: 600px) {
	/* compact one-line ratings: "4,7 ★ Google · 900+" */
	.phv-reviews .phv-ratings { flex-wrap: nowrap; }
	.phv-reviews .phv-ratings li { padding: 0 14px; }
	.phv-reviews .phv-rating { gap: 5px; font-size: 13px; white-space: nowrap; }
	.phv-rating__score { font-size: 20px; }
	.phv-reviews .phv-stars { display: none; }
	.phv-rating__score::after { content: "\2605"; margin-left: 4px; font-family: var(--font-body, 'Source Sans 3', Arial, sans-serif); font-size: 13px; color: var(--phv-accent); vertical-align: 2px; }
	.phv-reviews .phv-ratings { margin-top: -8px; }
	.phv-reviews--quotes .phv-reviews__track { margin-top: 32px; }
	/* slides share the tallest slide's height; centre each quote in it so short
	   quotes don't leave a gap above the arrows (arrows stay put while swiping) */
	.phv-quote { text-align: center; justify-content: center; }
	.phv-quote::before { display: none; }
	.phv-quote__mark { margin-bottom: 10px; font-size: 44px; height: 22px; }
	.phv-reviews .phv-quote__text { font-size: 17px; line-height: 1.55; }
	.phv-quote__who { margin-top: 0; padding-top: 16px; }
	.phv-reviews--quotes .phv-reviews__nav { margin-top: 24px; order: 0; }
	.phv-reviews .phv-reviews__note { margin-top: 16px; }
}
