/* CF Reseñas — carrusel responsivo (1 / 2 / 3 según ancho del contenedor) */
.elementor-widget-shortcode .cf-resenas,
.cf-resenas {
	--cf-navy: #0b1c33;
	--cf-blue: #008CCB;
	--cf-blue-deep: #003E7E;
	--cf-text: #4a5568;
	--cf-muted: #8a95a5;
	--cf-star: #f5a623;
	--cf-star-empty: #d5dbe3;
	--cf-white: #ffffff;
	--cf-card-border: #e6ebf0;
	--cf-radius: 18px;
	--cf-gap: 22px;
	--cf-visible: 3;
	font-family: inherit;
	background: transparent !important;
	padding: 40px 16px !important;
	position: relative !important;
	overflow-x: clip !important;
	overflow-y: visible !important;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	clear: both;
}

.cf-resenas *,
.cf-resenas *::before,
.cf-resenas *::after {
	box-sizing: border-box;
}

.cf-resenas__header {
	max-width: 1200px;
	margin: 0 auto 28px;
	text-align: center;
}

.cf-resenas__title {
	margin: 0 0 10px;
	font-size: clamp(1.6rem, 2.8vw, 2.2rem);
	font-weight: 800;
	color: var(--cf-navy);
	line-height: 1.2;
}

.cf-resenas__subtitle {
	margin: 0;
	color: var(--cf-text);
	font-size: 0.98rem;
	line-height: 1.6;
}

.cf-resenas__carousel {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: stretch;
	gap: 8px;
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.cf-resenas__viewport {
	flex: 1 1 auto;
	overflow: hidden;
	min-width: 0;
	width: 100%;
	container-type: inline-size;
	container-name: cf-resenas;
}

.cf-resenas__track {
	display: flex;
	gap: var(--cf-gap);
	transition: transform 0.45s ease;
	will-change: transform;
	width: max-content;
	max-width: none;
}

/* Ancho de card = fracción del VIEWPORT (cqi), no del track */
.cf-resenas__card {
	flex: 0 0 auto;
	width: calc((100cqi - (var(--cf-gap) * (var(--cf-visible) - 1))) / var(--cf-visible));
	min-width: 0;
	max-width: 100cqi;
	background: var(--cf-white);
	border: 1px solid var(--cf-card-border);
	border-radius: var(--cf-radius);
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(11, 28, 51, 0.06);
	display: flex;
	flex-direction: column;
}

.cf-resenas__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #f3f6f9;
	overflow: hidden;
	border-radius: var(--cf-radius) var(--cf-radius) 0 0;
}

.cf-resenas__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.cf-resenas__media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8eef4 0%, #f7f9fb 100%);
}

.cf-resenas__body {
	padding: 18px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1 1 auto;
}

.cf-resenas__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
}

.cf-resenas__stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.cf-resenas__star {
	display: inline-flex;
	color: var(--cf-star-empty);
	line-height: 0;
}

.cf-resenas__star.is-filled {
	color: var(--cf-star);
}

.cf-resenas__person {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--cf-muted);
	font-size: 0.82rem;
	line-height: 1.3;
}

.cf-resenas__person-icon {
	flex-shrink: 0;
	opacity: 0.85;
}

.cf-resenas__card-title {
	margin: 2px 0 0;
	font-size: 1.28rem;
	font-weight: 800;
	color: #000000;
	line-height: 1.15;
}

.cf-resenas__summary,
.cf-resenas__client {
	margin: 0;
	color: var(--cf-text);
	font-size: 0.9rem;
	line-height: 1.65;
	text-align: justify;
	hyphens: auto;
}

.cf-resenas__client {
	color: #5b6777;
	padding-top: 4px;
	border-top: 1px solid #eef2f6;
}

.elementor-element .cf-resenas button.cf-resenas__nav,
.elementor-widget-shortcode .cf-resenas .cf-resenas__nav,
.elementor-shortcode .cf-resenas button.cf-resenas__nav,
.elementor .cf-resenas .cf-resenas__nav,
.cf-resenas .cf-resenas__nav,
button.cf-resenas__nav {
	appearance: none !important;
	-webkit-appearance: none !important;
	flex: 0 0 auto;
	align-self: center;
	width: 28px !important;
	height: 48px !important;
	min-width: 0 !important;
	max-width: 28px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #94a3b8 !important;
	font-size: 0 !important;
	line-height: 0 !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, transform 0.2s ease;
}

.elementor-widget-shortcode .cf-resenas .cf-resenas__nav:hover,
.elementor .cf-resenas .cf-resenas__nav:hover,
.cf-resenas .cf-resenas__nav:hover,
.cf-resenas .cf-resenas__nav:focus,
.cf-resenas .cf-resenas__nav:focus-visible {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: #64748b !important;
	outline: none;
}

.cf-resenas .cf-resenas__nav:hover {
	transform: scale(1.12);
}

.cf-resenas .cf-resenas__nav svg {
	display: block;
	width: 22px;
	height: 22px;
	pointer-events: none;
}

.cf-resenas .cf-resenas__nav:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
	transform: none;
}

.cf-resenas__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}

.cf-resenas__dot {
	width: 8px !important;
	height: 8px !important;
	min-width: 8px !important;
	min-height: 8px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #c5ced8 !important;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none !important;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cf-resenas__dot.is-active {
	background: var(--cf-blue) !important;
	transform: scale(1.15);
}

.cf-resenas__dot:hover,
.cf-resenas__dot:focus-visible {
	background: var(--cf-blue-deep) !important;
	outline: none;
}

/* Tablet / móvil según ANCHO DEL CONTENEDOR (Elementor preview incluido) */
@container cf-resenas (max-width: 991px) {
	.cf-resenas__card {
		--cf-visible: 2;
		width: calc((100cqi - var(--cf-gap)) / 2);
	}
}

@container cf-resenas (max-width: 679px) {
	.cf-resenas__card {
		--cf-visible: 1;
		width: 100cqi;
	}
}

/* Fallback si el navegador no soporta container queries */
@supports not (width: 1cqi) {
	.cf-resenas__card {
		flex: 0 0 calc((100% - (var(--cf-gap) * 2)) / 3);
		width: auto;
	}
	@media (max-width: 991px) {
		.cf-resenas__card {
			flex-basis: calc((100% - var(--cf-gap)) / 2);
		}
	}
	@media (max-width: 679px) {
		.cf-resenas__card {
			flex-basis: 100%;
		}
	}
}

@media (max-width: 679px) {
	.cf-resenas {
		padding: 28px 8px !important;
	}

	.cf-resenas__carousel {
		gap: 0;
	}

	.cf-resenas .cf-resenas__nav {
		position: absolute;
		z-index: 2;
		top: 50%;
		transform: translateY(-50%);
		background: transparent !important;
		background-color: transparent !important;
		box-shadow: none !important;
	}

	.cf-resenas .cf-resenas__nav:hover {
		transform: translateY(-50%) scale(1.12);
	}

	.cf-resenas__nav--prev {
		left: 0;
	}

	.cf-resenas__nav--next {
		right: 0;
	}

	.cf-resenas__body {
		padding: 16px 18px 20px;
	}

	.cf-resenas__card-title {
		font-size: 1.15rem;
		line-height: 1.12;
	}

	.cf-resenas__summary,
	.cf-resenas__client {
		font-size: 0.85rem;
		line-height: 1.5;
	}
}
