/**
 * AMC Reseñas de Google — estilos del carrusel.
 * Todas las reglas viven bajo .amc-gr para no invadir el tema.
 */

.amc-gr {
	--amc-gr-accent: #0e7c7b;
	--amc-gr-star: #f5a524;
	--amc-gr-radius: 18px;
	--amc-gr-cols: 3;
	--amc-gr-cols-t: 2;
	--amc-gr-cols-m: 1;

	--amc-gr-ink: #16302f;
	--amc-gr-muted: #5b6b6a;
	--amc-gr-surface: #ffffff;
	--amc-gr-bg: transparent;
	--amc-gr-line: rgba(22, 48, 47, 0.12);
	--amc-gr-shadow: 0 1px 2px rgba(22, 48, 47, 0.05), 0 12px 28px -18px rgba(22, 48, 47, 0.35);
	--amc-gr-gap: 20px;

	position: relative;
	box-sizing: border-box;
	padding: clamp(4px, 2vw, 8px) 0;
	color: var(--amc-gr-ink);
	background: var(--amc-gr-bg);
	font-family: inherit;
	container-type: inline-size;
}

.amc-gr *,
.amc-gr *::before,
.amc-gr *::after {
	box-sizing: border-box;
}

.amc-gr--soft {
	--amc-gr-bg: #f2f7f6;
	--amc-gr-surface: #ffffff;
	padding: clamp(20px, 4vw, 40px);
	border-radius: calc(var(--amc-gr-radius) + 8px);
}

.amc-gr--dark {
	--amc-gr-ink: #f2f7f6;
	--amc-gr-muted: #9db3b1;
	--amc-gr-surface: #1b2c2c;
	--amc-gr-bg: #12201f;
	--amc-gr-line: rgba(242, 247, 246, 0.14);
	--amc-gr-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 16px 32px -20px rgba(0, 0, 0, 0.9);
	padding: clamp(20px, 4vw, 40px);
	border-radius: calc(var(--amc-gr-radius) + 8px);
}

/* ---------- Cabecera ---------- */

.amc-gr__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: clamp(18px, 3vw, 28px);
}

.amc-gr__title {
	margin: 0 0 10px;
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
	line-height: 1.2;
	font-weight: 650;
	letter-spacing: -0.015em;
	color: inherit;
}

.amc-gr__score {
	display: flex;
	align-items: center;
	gap: 14px;
}

.amc-gr__score-number {
	font-size: clamp(2.4rem, 2rem + 2vw, 3.4rem);
	line-height: 0.9;
	font-weight: 700;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	color: var(--amc-gr-ink);
}

.amc-gr__score-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.amc-gr__score-link {
	color: var(--amc-gr-muted);
	font-size: 0.875rem;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.amc-gr__score-link:hover,
.amc-gr__score-link:focus-visible {
	color: var(--amc-gr-ink);
	border-bottom-color: currentColor;
}

.amc-gr__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 999px;
	background: var(--amc-gr-accent);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.amc-gr__cta:hover,
.amc-gr__cta:focus-visible {
	filter: brightness(1.08);
	color: #fff;
	transform: translateY(-1px);
}

/* ---------- Estrellas ---------- */

.amc-gr-stars {
	display: inline-flex;
	gap: 2px;
	line-height: 0;
}

.amc-gr-star {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.amc-gr-star.is-on {
	fill: var(--amc-gr-star);
}

.amc-gr-star.is-off {
	fill: currentColor;
	opacity: 0.22;
}

/* ---------- Pista ---------- */

.amc-gr__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	margin: 0 -2px;
	padding: 4px 2px 8px;
	border-radius: var(--amc-gr-radius);
}

.amc-gr__viewport::-webkit-scrollbar {
	display: none;
}

.amc-gr__viewport:focus-visible {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 4px;
}

.amc-gr__track {
	display: flex;
	align-items: stretch;
	gap: var(--amc-gr-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.amc-gr__slide {
	flex: 0 0 calc((100% - (var(--amc-gr-cols) - 1) * var(--amc-gr-gap)) / var(--amc-gr-cols));
	scroll-snap-align: start;
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.amc-gr__slide::before,
.amc-gr__slide::marker {
	content: none;
}

/* ---------- Tarjeta ---------- */

.amc-gr-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	padding: clamp(18px, 2vw, 24px);
	border: 1px solid var(--amc-gr-line);
	border-radius: var(--amc-gr-radius);
	background: var(--amc-gr-surface);
	box-shadow: var(--amc-gr-shadow);
}

.amc-gr-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.amc-gr-card__avatar {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 50%;
	object-fit: cover;
	background: color-mix(in srgb, var(--amc-gr-accent) 12%, transparent);
}

.amc-gr-card__avatar--initial {
	display: grid;
	place-items: center;
	background: var(--amc-gr-accent);
	color: #fff;
	font-size: 1.125rem;
	font-weight: 650;
	line-height: 1;
}

.amc-gr-card__id {
	min-width: 0;
	flex: 1 1 auto;
}

.amc-gr-card__author {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 620;
	line-height: 1.3;
	color: var(--amc-gr-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.amc-gr-card__date {
	margin: 2px 0 0;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: var(--amc-gr-muted);
}

.amc-gr-card__source {
	flex: 0 0 auto;
	line-height: 0;
	opacity: 0.9;
}

.amc-gr-card__text {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--amc-gr-muted);
	quotes: none;
}

.amc-gr-card__text::before,
.amc-gr-card__text::after {
	content: none;
}

.amc-gr-card__more {
	display: inline;
	margin-left: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--amc-gr-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.amc-gr-card__more:focus-visible {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ---------- Controles ---------- */

.amc-gr__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 18px;
}

.amc-gr__dots {
	display: flex;
	align-items: center;
	gap: 7px;
}

.amc-gr__dot {
	position: relative;
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--amc-gr-line);
	cursor: pointer;
	overflow: hidden;
	transition: width 0.35s ease, background-color 0.2s ease;
}

.amc-gr__dot[aria-selected="true"] {
	width: 34px;
	background: color-mix(in srgb, var(--amc-gr-accent) 24%, transparent);
}

/* La barra del punto activo avanza al ritmo del autoplay: indica cuánto falta. */
.amc-gr__dot[aria-selected="true"]::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--amc-gr-progress, 0%);
	background: var(--amc-gr-accent);
	border-radius: inherit;
}

.amc-gr__dot:focus-visible {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 3px;
}

.amc-gr__arrows {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

.amc-gr__arrow {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--amc-gr-line);
	border-radius: 50%;
	background: var(--amc-gr-surface);
	color: var(--amc-gr-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.amc-gr__arrow svg {
	width: 20px;
	height: 20px;
}

.amc-gr__arrow:hover:not(:disabled) {
	border-color: var(--amc-gr-accent);
	color: var(--amc-gr-accent);
}

.amc-gr__arrow:focus-visible {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 2px;
}

.amc-gr__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

/* ---------- Atribución ---------- */

.amc-gr__attribution {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	font-size: 0.8125rem;
	color: var(--amc-gr-muted);
}

.amc-gr__attribution a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--amc-gr-line);
}

.amc-gr__attribution a:hover,
.amc-gr__attribution a:focus-visible {
	color: var(--amc-gr-ink);
	border-bottom-color: currentColor;
}

/* ---------- Formulario ---------- */

.amc-gr-form {
	margin-top: clamp(24px, 4vw, 40px);
	padding: clamp(20px, 3vw, 28px);
	border: 1px solid var(--amc-gr-line);
	border-radius: var(--amc-gr-radius);
	background: var(--amc-gr-surface);
}

.amc-gr-form__title {
	margin: 0 0 6px;
	font-size: 1.125rem;
	font-weight: 650;
	color: var(--amc-gr-ink);
}

.amc-gr-form__lede {
	margin: 0 0 20px;
	font-size: 0.9375rem;
	color: var(--amc-gr-muted);
}

.amc-gr-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.amc-gr-field {
	display: block;
	margin-bottom: 16px;
}

.amc-gr-field > span,
.amc-gr-field legend {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--amc-gr-ink);
}

.amc-gr-field input[type="text"],
.amc-gr-field input[type="email"],
.amc-gr-field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--amc-gr-line);
	border-radius: calc(var(--amc-gr-radius) / 2);
	background: var(--amc-gr-bg, #fff);
	color: var(--amc-gr-ink);
	font: inherit;
	font-size: 0.9375rem;
}

.amc-gr-field input:focus-visible,
.amc-gr-field textarea:focus-visible {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 1px;
	border-color: transparent;
}

.amc-gr-field--check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 0.875rem;
	color: var(--amc-gr-muted);
}

.amc-gr-field--check span {
	margin: 0;
	font-weight: 400;
	color: var(--amc-gr-muted);
}

.amc-gr-rating {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.amc-gr-rating__row {
	display: flex;
	gap: 4px;
}

.amc-gr-rating__item {
	cursor: pointer;
	line-height: 0;
}

.amc-gr-rating__item input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.amc-gr-rating__item svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
	opacity: 0.22;
	transition: opacity 0.12s ease, fill 0.12s ease;
}

/* Se colorean la estrella marcada y todas las anteriores. */
.amc-gr-rating__item:has(input:checked) svg,
.amc-gr-rating__item:has(~ .amc-gr-rating__item input:checked) svg {
	opacity: 1;
	fill: var(--amc-gr-star);
}

.amc-gr-rating__item input:focus-visible + span + svg {
	outline: 2px solid var(--amc-gr-accent);
	outline-offset: 2px;
}

.amc-gr-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 4px;
}

.amc-gr-form__submit {
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--amc-gr-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.amc-gr-form__submit:hover:not(:disabled) {
	filter: brightness(1.08);
}

.amc-gr-form__submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

.amc-gr-form__alt {
	color: var(--amc-gr-accent);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.amc-gr-form__msg {
	margin: 14px 0 0;
	font-size: 0.9375rem;
	min-height: 1.4em;
}

.amc-gr-form__msg.is-ok {
	color: var(--amc-gr-accent);
}

.amc-gr-form__msg.is-error {
	color: #c0392b;
}

/* Honeypot: fuera de la vista pero presente en el DOM. */
.amc-gr-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.amc-gr .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.amc-gr-empty {
	padding: 16px 20px;
	border: 1px dashed rgba(22, 48, 47, 0.3);
	border-radius: 12px;
	color: #5b6b6a;
	font-size: 0.9375rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.amc-gr {
		--amc-gr-cols: var(--amc-gr-cols-t);
		--amc-gr-gap: 16px;
	}
}

@media (max-width: 680px) {
	.amc-gr {
		--amc-gr-cols: var(--amc-gr-cols-m);
		--amc-gr-gap: 14px;
	}

	.amc-gr__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.amc-gr__cta {
		width: 100%;
		justify-content: center;
	}

	.amc-gr__controls {
		justify-content: center;
	}

	.amc-gr__arrows {
		margin-left: 0;
	}
}

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

	.amc-gr *,
	.amc-gr *::before,
	.amc-gr *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
