/* =============================================================================
   Widget: Profic Slider Testimonios
   Figma Design-Profic-Mike 2:271 / Slider 1:870 (1280×871)
   Fondos: comilla izq. 1:871, línea 1:873, comilla der. 1:874
   ============================================================================= */

/* Evitar que Elementor sume padding y achique el card vs el menú (28px inset). */
.elementor-widget-profic_testimonial_slider,
.elementor-widget-profic_testimonial_slider:not(:last-child),
.elementor-widget-profic_testimonial_slider > .elementor-widget-container {
	margin: 0 !important;
	margin-block-end: 0 !important;
	padding: 0 !important;
	max-width: 100%;
	width: 100%;
}

.profic-testimonial-slider-wrapper {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 60px 0 64px;
	width: 100%;
	overflow: visible;
	isolation: isolate;
	box-sizing: border-box;
	/* Onda que cruza el título Servicios — negativo = sube */
	--profic-slider-line-nudge-y: -30px;
}

@media (min-width: 768px) {
	.profic-testimonial-slider-wrapper {
		/* Figma: carrusel y=79; pb reducido para no sumar vacío con Servicios */
		padding: 79px 0 48px;
	}
}

@media (min-width: 1280px) {
	.profic-testimonial-slider-wrapper {
		/* Sin min-height:871 — dejaba hueco bajo los dots antes de Servicios */
		padding: 79px 0 40px;
	}
}

/* Artboard 1280 anclado al centro — coords Figma Desktop */
.profic-testimonial-slider-backgrounds {
	position: absolute;
	top: 0;
	left: 50%;
	width: 1280px;
	min-height: 871px;
	height: 100%;
	margin-left: -640px;
	pointer-events: none;
	z-index: 0;
	overflow: visible;
}

/*
 * ONDA DETRÁS DEL TÍTULO "SERVICIOS" (Figma Slider Linea 2058:25479)
 * Vive en el Slider y desborda hacia la cabecera de Servicios.
 * D/T: (-100|-340, 344.5) 1600×1116 · M: (-552, 244.5) 1600×1116
 * Nudge: --profic-slider-line-nudge-y
 */
.profic-testimonial-slider-line-bg {
	position: absolute;
	pointer-events: none;
	display: none;
	opacity: 1;
}

.profic-testimonial-slider-line-bg svg {
	display: block;
	width: 100%;
	height: 100%;
}

.profic-testimonial-slider-line-bg.show-desktop {
	display: block;
	left: -100px;
	top: calc(344.5px + var(--profic-slider-line-nudge-y));
	width: 1600px;
	height: 1116px;
}

.profic-testimonial-slider-line-bg.show-tablet {
	display: none;
	left: -340px;
	top: calc(344.5px + var(--profic-slider-line-nudge-y));
	width: 1600px;
	height: 1116px;
}

.profic-testimonial-slider-line-bg.show-mobile {
	display: none;
	left: -552px;
	top: calc(244.5px + var(--profic-slider-line-nudge-y));
	width: 1600px;
	height: 1116px;
}

/* Comillas — opacidad en el path del SVG (Figma), no en el contenedor */
.profic-testimonial-slider-quote {
	position: absolute;
	pointer-events: none;
	line-height: 0;
}

.profic-testimonial-slider-quote svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
}

/* Desktop 1280 — 1:871 @ 169,-15 · 1:874 @ 793,116 */
.profic-testimonial-slider-quote--left {
	left: 169px;
	top: -15px;
	width: 372px;
	height: 319px;
}

.profic-testimonial-slider-quote--right {
	left: 793px;
	top: 116px;
	width: 262px;
	height: 225px;
}

/* Tablet 800 — 1:1251 / 1:1254 */
@media (min-width: 768px) and (max-width: 1279px) {
	.profic-testimonial-slider-backgrounds {
		width: 800px;
		margin-left: -400px;
	}

	.profic-testimonial-slider-line-bg.show-desktop {
		display: none;
	}

	.profic-testimonial-slider-line-bg.show-tablet {
		display: block;
	}

	.profic-testimonial-slider-quote--left {
		left: 48px;
		top: -15px;
	}

	.profic-testimonial-slider-quote--right {
		left: 339px;
		top: 320px;
		width: 372px;
		height: 319px;
	}
}

/* Mobile 375 — 1:1616 / 1:1619 */
@media (max-width: 767px) {
	.profic-testimonial-slider-backgrounds {
		width: 375px;
		margin-left: -187.5px;
	}

	.profic-testimonial-slider-line-bg.show-desktop,
	.profic-testimonial-slider-line-bg.show-tablet {
		display: none;
	}

	.profic-testimonial-slider-line-bg.show-mobile {
		display: block;
	}

	.profic-testimonial-slider-quote--left {
		left: 169px;
		top: -14.75px;
		width: 372px;
		height: 318px;
	}

	.profic-testimonial-slider-quote--right {
		left: 798px;
		top: 113.25px;
		width: 372px;
		height: 318px;
	}
}

@media (min-width: 1280px) {
	.profic-testimonial-slider-line-bg.show-tablet,
	.profic-testimonial-slider-line-bg.show-mobile {
		display: none !important;
	}

	.profic-testimonial-slider-line-bg.show-desktop {
		display: block;
	}
}

/* Escenario del Carrusel */
.profic-testimonial-slider-stage {
	position: relative;
	width: 100%;
	height: 360px;
	margin-bottom: 24px;
	overflow: visible;
	touch-action: pan-y;
	z-index: 3;
}

@media (min-width: 768px) {
	.profic-testimonial-slider-stage {
		height: 420px;
	}
}

/* Tarjeta de Testimonio */
.profic-testimonial-card {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 88%;
	max-width: 600px;
	height: auto;
	min-height: 240px;
	display: flex;
	flex-direction: column;
	border-radius: 18px;
	box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
	background-color: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-sizing: border-box;
	cursor: grab;
	z-index: 10;
	transform-origin: center center;
	transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
				opacity 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.profic-testimonial-card:active {
	cursor: grabbing;
}

/* Tablet+ glass radius / sombra — el ancho mobile se define al final del archivo */
@media (min-width: 800px) {
	.profic-testimonial-card {
		border-radius: 24px;
		min-height: 220px;
		box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
	}
}

/* Capa estructural (el glass va en la card: blur + overflow hidden en el mismo nodo lo apaga) */
.profic-testimonial-card-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	pointer-events: none;
}

/* Capa de resplandor / hover */
.profic-testimonial-card-hover-glow {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	background-color: rgba(255, 255, 255, 0.02);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.profic-testimonial-card.active:hover .profic-testimonial-card-hover-glow {
	opacity: 1;
}

/* Contenedor de contenido — pad mobile 22; T/D 38 */
.profic-testimonial-card-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 22px;
	min-height: inherit;
	box-sizing: border-box;
	transition: opacity 0.45s ease;
}

@media (min-width: 800px) {
	.profic-testimonial-card-content {
		padding: 38px;
	}
}

/* Texto del testimonio — mobile-first lh 1.35 (Figma CARRU mobile) */
.profic-testimonial-card-text {
	flex-grow: 1;
	display: flex;
}

.profic-testimonial-card-text p {
	margin: 0;
	font-family: "Amsi Pro", sans-serif;
	font-weight: 300;
	font-size: 14px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 800px) {
	.profic-testimonial-card-text {
		margin-bottom: 24px;
	}

	.profic-testimonial-card-text p {
		font-size: 15.5px;
		line-height: 1.6;
	}
}

/* Autor info */
.profic-testimonial-card-author {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
}

@media (min-width: 800px) {
	.profic-testimonial-card-author {
		gap: 15px;
	}
}

/* Foto de perfil */
.profic-testimonial-card-photo {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
}

.profic-testimonial-card-photo-img {
	display: block;
	width: 100%;
	height: 100%;
	object-cover: cover;
	object-fit: cover;
}

@media (min-width: 800px) {
	.profic-testimonial-card-photo {
		width: 58px;
		height: 58px;
	}
}

/* Metadatos: nombre y cargo */
.profic-testimonial-card-meta {
	display: flex;
	flex-direction: column;
	justify-content: center;
	flex-grow: 1;
	min-width: 0;
}

.profic-testimonial-card-name {
	margin: 0 0 3px;
	font-family: "Amsi Pro", sans-serif;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	color: rgba(255, 255, 255, 0.95);
	/* Mobile: wrap. Ellipsis solo en tablet/desktop (≥800). */
	white-space: normal;
	overflow: visible;
}

.profic-testimonial-card-role {
	margin: 0;
	font-family: "Amsi Pro", sans-serif;
	font-weight: 300;
	font-size: 12px;
	line-height: 1.2;
	color: rgba(255, 255, 255, 0.65);
	white-space: normal;
	overflow: visible;
}

@media (min-width: 800px) {
	.profic-testimonial-card-name {
		font-size: 15px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.profic-testimonial-card-role {
		font-size: 13px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Logo de empresa — slot fijo Figma 82×24 (object-fit contain; no inline por card) */
.profic-testimonial-card-logo {
	flex: 0 0 82px;
	width: 82px;
	height: 24px;
	position: relative;
	opacity: 0.75;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	overflow: hidden;
}

.profic-testimonial-card-logo:hover {
	opacity: 0.95;
}

.profic-testimonial-card-logo-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: right center;
}

/* Flechas de navegación (Desktop/Tablet) */
.profic-testimonial-slider-arrow {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	z-index: 40;
	transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.profic-testimonial-slider-arrow svg {
	width: 22px;
	height: 22px;
}

.profic-testimonial-slider-arrow:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.3);
	color: #ffffff;
	transform: translateY(-50%) scale(1.08);
}

.profic-testimonial-slider-arrow:active {
	transform: translateY(-50%) scale(0.95);
}

.profic-testimonial-slider-arrow.arrow-prev {
	left: 20px;
}

.profic-testimonial-slider-arrow.arrow-next {
	right: 20px;
}

/* Flechas solo tablet + desktop (≥800). Mobile: solo dots / swipe. */
@media (min-width: 800px) and (max-width: 1279px) {
	.profic-testimonial-slider-arrow {
		display: flex;
	}
}

@media (min-width: 1280px) {
	.profic-testimonial-slider-arrow {
		display: flex;
		width: 56px;
		height: 56px;
	}
	/* Eje 1280 Figma: 40px del artboard, no del viewport */
	.profic-testimonial-slider-arrow.arrow-prev {
		left: max(40px, calc(50% - 640px + 40px));
	}
	.profic-testimonial-slider-arrow.arrow-next {
		right: max(40px, calc(50% - 640px + 40px));
	}
}

/* Indicadores de Puntos */
.profic-testimonial-slider-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 30px;
	z-index: 10;
}

.profic-testimonial-slider-dot {
	border: none;
	outline: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	padding: 0;
	transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.profic-testimonial-slider-dot:hover {
	background-color: rgba(255, 255, 255, 0.65);
}

.profic-testimonial-slider-dot.active {
	background-color: rgba(255, 255, 255, 0.95);
	transform: scale(1.2);
}

/* =============================================================================
   MOBILE ≤799 — al FINAL para ganar cascada (antes lo pisaban reglas base).
   Figma CARRU 202:4993 / Slider 202:4988
   ============================================================================= */
@media (max-width: 799px) {
	.profic-testimonial-slider-wrapper .profic-testimonial-slider-stage {
		margin-bottom: 8px;
		overflow: hidden;
		height: 560px;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card {
		width: 294px;
		max-width: min(294px, calc(100vw - 64px));
		min-height: 0;
		height: auto;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-content {
		padding: 20px;
		min-height: 0;
		justify-content: flex-start;
		gap: 18px;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-text {
		flex-grow: 0;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-text p {
		font-size: 13px;
		line-height: 1.35;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-author {
		gap: 10px;
		flex-wrap: nowrap;
		align-items: center;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-meta {
		flex: 1 1 auto;
		min-width: 0;
		max-width: 97px;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-name,
	.profic-testimonial-slider-wrapper .profic-testimonial-card-role {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-logo {
		flex: 0 0 92px;
		width: 92px !important;
		height: 33px !important;
		max-width: 92px;
		max-height: 33px;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-card-logo-img {
		width: 100%;
		height: 100%;
		max-width: none;
		max-height: none;
		object-fit: contain;
		object-position: right center;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-slider-arrow {
		display: none !important;
	}

	.profic-testimonial-slider-wrapper .profic-testimonial-slider-dots {
		margin-top: 16px;
	}
}
