/*
 * Doguify Testimonios — estilos front-end.
 * Paleta y tipografía tomadas de doguify.com para que el formulario y
 * las tarjetas de testimonios encajen visualmente con el resto de la web.
 */

.dgf-form-wrap,
.dgf-reviews-section {
	--dgf-font: Inter, -apple-system, "system-ui", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--dgf-text: #334155;
	--dgf-heading: #111111;
	--dgf-muted: #6b7280;
	--dgf-accent: #465ed1;
	--dgf-star: #f5a623;
	--dgf-star-empty: #e2e4e9;
	--dgf-border: #e5e7eb;
	--dgf-bg-soft: #f8f9fb;
	--dgf-dark: #17181c;
	--dgf-radius: 16px;
	--dgf-success-bg: #eefbf1;
	--dgf-success-text: #1e7a34;
	--dgf-error-bg: #fdecec;
	--dgf-error-text: #b3261e;

	font-family: var( --dgf-font );
	color: var( --dgf-text );
	box-sizing: border-box;
}

.dgf-form-wrap *,
.dgf-reviews-section *,
.dgf-form-wrap *::before,
.dgf-reviews-section *::before,
.dgf-form-wrap *::after,
.dgf-reviews-section *::after {
	box-sizing: inherit;
}

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

.dgf-form-wrap {
	max-width: 640px;
	margin-top: 40px;
	margin-bottom: 40px;
}

.dgf-form__title {
	font-family: var( --dgf-font );
	font-weight: 600;
	font-size: 24px;
	line-height: 1.3;
	color: var( --dgf-heading );
	margin: 0 0 20px;
}

.dgf-form {
	background: #ffffff;
	border: 1px solid var( --dgf-border );
	border-radius: var( --dgf-radius );
	padding: 28px;
}

.dgf-field {
	margin-bottom: 18px;
}

.dgf-field label,
.dgf-field__label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: var( --dgf-heading );
	margin-bottom: 6px;
}

.dgf-req {
	color: var( --dgf-error-text );
}

.dgf-field input[type="text"],
.dgf-field input[type="email"],
.dgf-field input[type="url"],
.dgf-field textarea {
	width: 100%;
	font-family: var( --dgf-font );
	font-size: 15px;
	color: var( --dgf-heading );
	background: #ffffff;
	border: 1px solid var( --dgf-border );
	border-radius: 10px;
	padding: 11px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dgf-field input:focus,
.dgf-field textarea:focus {
	outline: none;
	border-color: var( --dgf-accent );
	box-shadow: 0 0 0 3px rgba( 70, 94, 209, 0.15 );
}

.dgf-field textarea {
	resize: vertical;
	min-height: 120px;
}

.dgf-help {
	margin: 6px 0 0;
	font-size: 12px;
	color: var( --dgf-muted );
}

.dgf-field--checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13px;
	color: var( --dgf-text );
	cursor: pointer;
}

.dgf-field--checkbox input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

/* Campo trampa anti-spam, oculto visualmente pero accesible a bots */
.dgf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Selector de estrellas (CSS puro, accesible con teclado) */
.dgf-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}

.dgf-rating input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.dgf-rating label {
	font-size: 30px;
	line-height: 1;
	color: var( --dgf-star-empty );
	cursor: pointer;
	transition: color 0.12s ease, transform 0.12s ease;
	margin: 0;
}

.dgf-rating input:focus-visible + label {
	outline: 2px solid var( --dgf-accent );
	outline-offset: 2px;
	border-radius: 4px;
}

.dgf-rating input:checked + label,
.dgf-rating input:checked ~ label {
	color: var( --dgf-star );
}

.dgf-rating label:hover,
.dgf-rating label:hover ~ label {
	color: var( --dgf-star );
	transform: scale( 1.08 );
}

/* Botón principal, estilo "pill" negro como en doguify.com */
.dgf-btn {
	font-family: var( --dgf-font );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 15px;
	border: none;
	border-radius: 999px;
	padding: 13px 26px;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.dgf-btn--primary {
	background: var( --dgf-dark );
	color: #ffffff;
}

.dgf-btn--primary:hover {
	opacity: 0.88;
}

.dgf-btn--primary:active {
	transform: scale( 0.98 );
}

/* Avisos de éxito / error */
.dgf-notice {
	border-radius: 12px;
	padding: 18px 20px;
	font-size: 14px;
}

.dgf-notice--success {
	background: var( --dgf-success-bg );
	color: var( --dgf-success-text );
	border: 1px solid rgba( 30, 122, 52, 0.25 );
}

.dgf-notice--success strong {
	display: block;
	font-size: 16px;
	margin-bottom: 4px;
}

.dgf-notice--error {
	background: var( --dgf-error-bg );
	color: var( --dgf-error-text );
	border: 1px solid rgba( 179, 38, 30, 0.25 );
	margin-bottom: 16px;
}

/* ----------------------------------------------------------------------
 * Estrellas de solo lectura (usadas en el escritorio y en las tarjetas)
 * -------------------------------------------------------------------- */

.dgf-stars {
	display: inline-flex;
	gap: 2px;
	font-size: 16px;
	line-height: 1;
}

.dgf-star {
	color: var( --dgf-star-empty );
}

.dgf-star--filled {
	color: var( --dgf-star );
}

/* ----------------------------------------------------------------------
 * Cinta de testimonios aprobados (scroll automático infinito)
 * -------------------------------------------------------------------- */

.dgf-reviews-section {
	margin: 24px 0;
}

.dgf-reviews-wrapper {
	overflow: hidden;
	/* Difumina los bordes izq./dcha. para que las tarjetas "entren y salgan" con suavidad */
	-webkit-mask-image: linear-gradient( to right, transparent 0, #000 32px, #000 calc( 100% - 32px ), transparent 100% );
	mask-image: linear-gradient( to right, transparent 0, #000 32px, #000 calc( 100% - 32px ), transparent 100% );
}

.dgf-reviews-track {
	display: flex;
	gap: 20px;
	width: max-content;
	animation-name: dgf-scroll-infinite;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: 40s;
}

.dgf-reviews-track:hover {
	animation-play-state: paused;
}

.dgf-reviews-track--static {
	animation: none;
	width: 100%;
	flex-wrap: wrap;
	justify-content: center;
}

@keyframes dgf-scroll-infinite {
	0% {
		transform: translateX( 0 );
	}
	100% {
		transform: translateX( -50% );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.dgf-reviews-track {
		animation: none;
	}
}

.dgf-review-card {
	width: 300px;
	min-width: 300px;
	height: 300px;
	background: #ffffff;
	border: 1px solid var( --dgf-border );
	border-radius: var( --dgf-radius );
	padding: 22px;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	overflow: hidden;
}

.dgf-reviews-track--static .dgf-review-card {
	flex-shrink: 1;
}

.dgf-review-card__name {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var( --dgf-heading );
}

.dgf-review-card__name a {
	color: inherit;
	text-decoration: none;
}

.dgf-review-card__name a:hover {
	color: var( --dgf-accent );
}

.dgf-review-card__rating-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.dgf-review-card__rating-row .dgf-stars {
	font-size: 15px;
}

.dgf-review-card__date {
	font-size: 13px;
	color: var( --dgf-muted );
}

.dgf-review-card__text {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.6;
	color: var( --dgf-text );
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
}

.dgf-review-card__footer {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
}

.dgf-review-card__avatar {
	width: 26px;
	height: 26px;
	border-radius: 999px;
	flex-shrink: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dgf-review-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dgf-review-card__avatar--initial {
	background: var( --dgf-accent );
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.dgf-review-card__author {
	font-size: 13px;
	font-weight: 500;
	color: var( --dgf-heading );
}

@media ( max-width: 768px ) {
	.dgf-review-card {
		width: 270px;
		min-width: 270px;
	}
}

@media ( max-width: 480px ) {
	.dgf-review-card {
		width: 240px;
		min-width: 240px;
		height: 280px;
	}
}
