/* Reseñas de clientes: formulario (/review/) y tarjetas ([homiture_reviews]). */

.hr-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Estrellas (solo lectura) ---------- */
.hr-stars {
	color: #eba607;
	letter-spacing: 2px;
	font-size: 1.1rem;
	white-space: nowrap;
}
.hr-stars__off {
	color: #ddd6c6;
}

/* ---------- Tarjetas ---------- */
.hr-reviews {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin: 0 auto;
}
.hr-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin: 0 0 var(--wp--preset--spacing--60, 2rem);
}
.hr-summary__avg {
	font-size: 1.6rem;
	font-weight: 700;
}
.hr-summary__count {
	color: var(--wp--preset--color--muted, #6b6558);
}
/* Carrusel (reviews.js crea flechas y puntos cuando hay algo que desplazar).
 * - Celular: la tarjeta siempre queda en el centro, con un asomo de las vecinas.
 * - Escritorio: 1-2 reseñas se centran sin carrusel; 3 o más van en carrusel
 *   (≈2,5 tarjetas a la vista para que se note que hay más). */
.hr-reviews {
	--hr-gap: 12px;
}
.hr-grid {
	display: flex;
	gap: var(--hr-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 2px 10%; /* margen lateral = lo que se asoma de las tarjetas vecinas */
}
.hr-grid::-webkit-scrollbar {
	display: none;
}
@supports (justify-content: safe center) {
	.hr-grid {
		justify-content: safe center;
	}
}
.hr-reviews:not(.is-scrollable) .hr-grid {
	justify-content: center;
}
.hr-card {
	flex: 0 0 100%;
	scroll-snap-align: center;
	box-sizing: border-box;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	padding: var(--wp--preset--spacing--50, 1.5rem);
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
	border-radius: 16px;
}
.hr-grid--one {
	padding-inline: 2px;
}
.hr-grid--one .hr-card {
	flex-basis: min(100%, 560px);
}
@media (min-width: 600px) {
	.hr-reviews {
		--hr-gap: 1.25rem;
	}
	.hr-grid {
		padding: 2px;
	}
	/* 1-2 reseñas: pueden encogerse un poco para que siempre quepan (sin carrusel). */
	.hr-card {
		flex: 0 1 380px;
		min-width: 0;
		scroll-snap-align: start;
	}
	.hr-grid--one .hr-card {
		flex-basis: min(100%, 560px);
	}
	/* 3 o más: no se encogen; se ven ≈1,6 tarjetas y el resto se desliza. */
	.hr-grid--many .hr-card {
		flex: 0 0 calc((100% - var(--hr-gap)) / 1.6);
	}
}
@media (min-width: 1000px) {
	.hr-grid--many .hr-card {
		flex: 0 0 calc((100% - 2 * var(--hr-gap)) / 2.5);
	}
}
.hr-card__text {
	margin: 0;
	flex: 1;
	font-size: 1.05rem;
	line-height: 1.55;
}
.hr-card__who {
	font-size: .9rem;
	font-weight: 600;
}
.hr-card__project {
	font-weight: 400;
	color: var(--wp--preset--color--muted, #6b6558);
}

/* Flechas y puntos del carrusel */
.hr-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	margin-top: 1.25rem;
}
.hr-nav[hidden] {
	display: none;
}
.hr-nav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	padding: 0;
	font: inherit;
	font-size: 1.4rem;
	line-height: 1;
	color: var(--wp--preset--color--ink, #1f2b27);
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, opacity .15s;
}
.hr-nav__btn:hover:not([disabled]) {
	border-color: var(--wp--preset--color--primary, #2f8678);
	color: var(--wp--preset--color--primary, #2f8678);
}
.hr-nav__btn[disabled] {
	opacity: .35;
	cursor: default;
}
.hr-nav__btn:focus-visible,
.hr-nav__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #2f8678);
	outline-offset: 2px;
}
.hr-nav__dots {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
}
.hr-nav__dot {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}
.hr-nav__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: #d9d2c2;
	transition: transform .2s, background-color .2s;
}
.hr-nav__dot[aria-current="true"]::before {
	background: var(--wp--preset--color--primary, #2f8678);
	transform: scale(1.4);
}
@media (prefers-reduced-motion: reduce) {
	.hr-nav__btn,
	.hr-nav__dot::before {
		transition: none;
	}
}

/* ---------- Formulario ---------- */
/* Autocontenido: NO usa .homiture-form (el tema lo estiliza y hmt-journey.js le adjunta
 * el resumen de navegación de los leads, que aquí no aplica). */
.hr-form-wrap {
	max-width: 600px;
	margin: 0 auto;
}
.hr-title {
	text-align: center;
	margin: 0 0 .5rem;
	text-wrap: balance;
}
.hr-note {
	text-align: center;
	color: var(--wp--preset--color--muted, #6b6558);
	margin: 0 0 1.75rem;
}

.hr-form {
	position: relative;
	margin-top: 1.75rem;
	padding: clamp(1.25rem, 4vw, 2.25rem);
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
	border-radius: 20px;
	box-shadow: 0 12px 36px rgba(31, 43, 39, .07);
}

/* Calificación */
.hr-form .hr-rating {
	margin: 0 0 1.75rem;
	padding: 0 0 1.5rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--border, #e6dfd0);
	text-align: center;
}
.hr-form .hr-rating__legend {
	display: block;
	width: 100%;
	margin: 0 0 .85rem;
	padding: 0;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-form .hr-rating__stars {
	display: flex;
	flex-direction: row-reverse; /* el DOM va 5..1 para poder iluminar con ~ */
	justify-content: center;
	gap: .35rem;
}
.hr-form .hr-rating__stars input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.hr-form .hr-star {
	display: grid;
	place-items: center;
	flex: 1 1 0;
	min-width: 0;
	max-width: 3.75rem;
	aspect-ratio: 1;
	margin: 0;
	border-radius: 14px;
	color: #d9d2c3;
	cursor: pointer;
	transition: color .15s ease, transform .15s ease, background-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.hr-form .hr-star svg {
	width: 78%;
	height: 78%;
	fill: currentColor;
	stroke: currentColor;
	stroke-width: 1.2;
	stroke-linejoin: round;
	pointer-events: none;
}
:where(.hr-form .hr-rating__stars) input:checked ~ .hr-star {
	color: #eba607;
}
.hr-form .hr-rating__stars:hover .hr-star {
	color: #d9d2c3;
}
.hr-form .hr-rating__stars .hr-star:hover,
.hr-form .hr-rating__stars .hr-star:hover ~ .hr-star {
	color: #eba607;
}
.hr-form .hr-rating__stars .hr-star:hover {
	transform: translateY(-2px) scale(1.08);
}
.hr-form .hr-rating__stars input:focus-visible + .hr-star {
	outline: 2px solid var(--wp--preset--color--primary, #2f8678);
	outline-offset: 2px;
	background: rgba(235, 166, 7, .1);
}
.hr-form .hr-rating__stars.is-picked input:checked + .hr-star svg {
	animation: hr-pop .35s ease;
}
@keyframes hr-pop {
	0%   { transform: scale(1); }
	45%  { transform: scale(1.3); }
	100% { transform: scale(1); }
}
.hr-form .hr-rating__text {
	min-height: 1.5em;
	margin: .75rem 0 0;
	font-size: 1rem;
	color: var(--wp--preset--color--muted, #6b6558);
	transition: color .15s ease;
}
.hr-form .hr-rating__text.is-set {
	color: var(--wp--preset--color--ink, #1f2b27);
	font-weight: 600;
}

/* Campos */
.hr-form .hr-row {
	display: flex;
	flex-direction: column;
	margin-bottom: 1.1rem;
}
.hr-form .hr-row label {
	margin-bottom: .4rem;
	font-size: .9rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink, #1f2b27);
}
.hr-form .hr-row input,
.hr-form .hr-row textarea {
	width: 100%;
	box-sizing: border-box;
	padding: .8rem .95rem;
	font: inherit;
	color: var(--wp--preset--color--ink, #1f2b27);
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
	border-radius: var(--wp--custom--radius--md, 12px);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.hr-form .hr-row textarea {
	min-height: 9rem;
	resize: vertical;
	line-height: 1.5;
}
.hr-form .hr-row input:focus,
.hr-form .hr-row textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary, #2f8678);
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-soft, rgba(47, 134, 120, .18));
}
.hr-form .hr-count {
	align-self: flex-end;
	margin-top: .3rem;
	font-size: .8rem;
	color: var(--wp--preset--color--muted, #6b6558);
}

/* Consentimiento */
.hr-form .hr-consent {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	margin: 1.25rem 0 1.5rem;
	font-size: .95rem;
	line-height: 1.45;
	font-weight: 400;
	cursor: pointer;
}
.hr-form .hr-consent input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: .1rem 0 0;
	accent-color: var(--wp--preset--color--primary, #2f8678);
	cursor: pointer;
}

/* Envío */
.hr-form .hr-submit {
	display: block;
	width: 100%;
	min-height: 3.25rem;
	padding: .85rem 1.5rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--wp--preset--color--primary, #2f8678);
	border: 0;
	border-radius: var(--wp--custom--radius--md, 12px);
	cursor: pointer;
	transition: background-color .2s ease, transform .15s ease, opacity .2s ease;
}
.hr-form .hr-submit:hover {
	background: var(--wp--preset--color--primary-hover, #256d62);
}
.hr-form .hr-submit:active {
	transform: translateY(1px);
}
.hr-form .hr-submit:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #2f8678);
	outline-offset: 3px;
}
.hr-form .hr-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}
.hr-form .hr-error {
	margin: .85rem 0 0;
	padding: .65rem .9rem;
	font-size: .92rem;
	color: #8f1f1b;
	background: #fbeceb;
	border-radius: 10px;
}
.hr-form .hr-fineprint {
	margin: .9rem 0 0;
	font-size: .8rem;
	text-align: center;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-form .hr-fineprint a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Gracias */
.hr-form-wrap.is-done .hr-title,
.hr-form-wrap.is-done .hr-note { display: none; }
.hr-thanks {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .6rem;
	margin: 1.75rem 0 0;
	padding: 2.5rem 1.5rem 2rem;
	text-align: center;
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
	border-radius: 20px;
	box-shadow: 0 12px 36px rgba(31, 43, 39, .07);
}
.hr-thanks[hidden] { display: none; }
.hr-thanks__icon {
	display: grid;
	place-items: center;
	width: 3.75rem;
	height: 3.75rem;
	margin-bottom: .4rem;
	font-size: 1.8rem;
	font-weight: 700;
	color: #fff;
	background: var(--wp--preset--color--primary, #2f8678);
	border-radius: 50%;
	animation: hr-pop .45s ease;
}
.hr-thanks__title { font-size: 1.6rem; line-height: 1.2; }
.hr-thanks__text {
	max-width: 30ch;
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-thanks__back {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	margin-top: 1rem;
	padding: .85rem 2rem;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background: var(--wp--preset--color--primary, #2f8678);
	border-radius: var(--wp--custom--radius--md, 12px);
	transition: background-color .2s ease, transform .15s ease;
}
.hr-thanks__back:hover { background: var(--wp--preset--color--primary-hover, #256d62); color: #fff; }
.hr-thanks__back:active { transform: translateY(1px); }
.hr-thanks__back:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #2f8678);
	outline-offset: 3px;
}
.hr-thanks__count {
	font-size: .88rem;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-thanks__count[hidden] { display: none; }
.hr-thanks__stay {
	padding: .25rem .1rem;
	font: inherit;
	color: var(--wp--preset--color--primary, #2f8678);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

/* Fotos del cliente (formulario) */
.hr-form .hr-row__title {
	margin-bottom: .4rem;
	font-size: .9rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink, #1f2b27);
}
.hr-form .hr-row__title em {
	font-weight: 400;
	font-style: normal;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-form .hr-drop {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: 1rem 1.1rem;
	min-height: 4rem;
	cursor: pointer;
	background: #faf8f3;
	border: 1.5px dashed #cfc7b4;
	border-radius: var(--wp--custom--radius--md, 12px);
	transition: border-color .2s ease, background-color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.hr-form .hr-drop:hover {
	background: #fff;
	border-color: var(--wp--preset--color--primary, #2f8678);
}
.hr-form #hr-files:focus-visible + .hr-drop {
	outline: 2px solid var(--wp--preset--color--primary, #2f8678);
	outline-offset: 2px;
}
.hr-form .hr-drop.is-full {
	opacity: .55;
	cursor: not-allowed;
}
.hr-form .hr-drop__icon {
	flex: none;
	width: 2rem;
	height: 2rem;
	fill: none;
	stroke: var(--wp--preset--color--primary, #2f8678);
	stroke-width: 1.6;
	stroke-linejoin: round;
}
.hr-form .hr-drop__text {
	display: flex;
	flex-direction: column;
	gap: .1rem;
	min-width: 0;
}
.hr-form .hr-drop__text strong {
	font-size: .98rem;
	color: var(--wp--preset--color--ink, #1f2b27);
}
.hr-form .hr-drop__text small {
	font-size: .82rem;
	color: var(--wp--preset--color--muted, #6b6558);
}
.hr-form .hr-previews {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .6rem;
	margin: .8rem 0 0;
	padding: 0;
	list-style: none;
}
.hr-form .hr-previews[hidden] { display: none; }
.hr-form .hr-previews li {
	position: relative;
	margin: 0;
	aspect-ratio: 1;
}
.hr-form .hr-previews img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--border, #e6dfd0);
}
.hr-form .hr-previews__remove {
	position: absolute;
	top: -.45rem;
	right: -.45rem;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	font-size: 1.3rem;
	line-height: 1;
	color: #fff;
	background: rgba(31, 43, 39, .88);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
}
.hr-form .hr-previews__remove:hover { background: #8f1f1b; }
.hr-form .hr-photo-error {
	margin: .6rem 0 0;
	font-size: .88rem;
	color: #8f1f1b;
}

/* Fotos en las tarjetas publicadas + visor */
.hr-card__photos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .5rem;
}
.hr-card__photolink {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 10px;
}
.hr-card__photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}
.hr-card__photolink:hover .hr-card__photo { transform: scale(1.05); }
.hr-lightbox {
	max-width: min(94vw, 1100px);
	max-height: 92vh;
	padding: 0;
	overflow: visible;
	background: transparent;
	border: 0;
}
.hr-lightbox::backdrop { background: rgba(15, 20, 18, .82); }
.hr-lightbox img {
	display: block;
	max-width: 100%;
	max-height: 88vh;
	margin: 0 auto;
	object-fit: contain;
	border-radius: 12px;
}
.hr-lightbox__close {
	position: absolute;
	top: -2.9rem;
	right: 0;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	font-size: 1.9rem;
	line-height: 1;
	color: #fff;
	background: transparent;
	border: 0;
	cursor: pointer;
}

/* Teléfono */
@media (max-width: 480px) {
	.hr-thanks { padding: 2rem 1.1rem 1.6rem; }
	.hr-thanks__back { width: 100%; }
	body .hr-form-wrap { max-width: 100%; }
	.hr-form {
		padding: 1.15rem 1rem 1.35rem;
		border-radius: 16px;
	}
	.hr-form .hr-rating__stars { gap: .15rem; }
	.hr-form .hr-rating__text { font-size: .95rem; }
	/* 16 px mínimo: por debajo, iOS Safari hace zoom al tocar un campo */
	.hr-form .hr-row input,
	.hr-form .hr-row textarea { font-size: 16px; }
	.hr-form .hr-previews { gap: .5rem; }
	.hr-form .hr-submit { min-height: 3.4rem; }
	.hr-lightbox { max-width: 100vw; }
	.hr-lightbox__close { top: -2.6rem; right: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
	.hr-form .hr-star,
	.hr-form .hr-submit,
	.hr-card__photo { transition: none; }
	.hr-form .hr-rating__stars .hr-star:hover { transform: none; }
	.hr-card__photolink:hover .hr-card__photo { transform: none; }
	.hr-form .hr-rating__stars.is-picked input:checked + .hr-star svg { animation: none; }
}

/* La zona de fotos es un <label> dentro de .hr-row: se neutralizan los estilos de etiqueta de campo. */
.hr-form .hr-row .hr-drop {
	margin-bottom: 0;
	font-size: 1rem;
	font-weight: 400;
}
