/**
 * Ficha de caso de éxito (single-casos-de-exito.php).
 * Ajusta los widgets de portada (Hero caso de éxito) y cierre (Carrusel de casos)
 * a una página por caso: mismas medidas para todos los clientes, sin importar la imagen que suban.
 *
 * Grilla: portada, artículo y carrusel comparten la columna central de 1040px.
 * --ficha-mw / --ficha-mh llegan del template (misma superficie visual para laptop, tablet o celular).
 */

/* ── Header: sin degradé negro encima del contenido claro ── */
body.single-casos-de-exito .profic-menu-wrapper::before {
	display: none;
}

body.single-casos-de-exito .elementor-location-header .profic-header-wrap {
	background: transparent !important;
}

/* ── Portada ── */
.profic-caso-single .profic-hce-section {
	min-height: 0;
	padding: 170px 0 110px;
}

.profic-caso-single .profic-hce-section .profic-hce-card {
	align-items: center;
	column-gap: 40px;
	padding: 0;
}

.profic-caso-single .profic-hce-section .profic-hce-content {
	flex: 0 0 440px;
	width: 440px;
	max-width: 440px;
	gap: 28px;
}

.profic-caso-single .profic-hce-section .profic-hce-title {
	font-size: 40px;
	line-height: 1.15;
}

.profic-caso-single .profic-hce-section .profic-hce-visual {
	flex: 0 0 560px;
	width: 560px;
	min-width: 560px;
	height: 480px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
}

.profic-caso-single .profic-hce-section .profic-hce-chart {
	display: none;
}

.profic-caso-single .profic-hce-section .profic-hce-card .profic-hce-mockup {
	position: static;
	width: var(--ficha-mw, 560px);
	height: var(--ficha-mh, 354px);
	transform: none;
	object-fit: contain;
}

.profic-caso-single .profic-hce-stats:not(:has(.profic-hce-stat-val:not(:empty))) {
	display: none;
}

/* ── Artículo ── */
.profic-caso-single .profic-post {
	padding: 100px 0 110px;
}

/* Texto en 860px centrado; en tablet y mobile, mismo ancho que la card de la portada */
.profic-caso-single .profic-post .profic-post-body {
	box-sizing: border-box;
	max-width: 1100px;
	padding: 0 120px;
}

.profic-caso-single .profic-post .profic-post-body > :first-child {
	margin-top: 0;
}

/* ── Carrusel de cierre ── */
body.single-casos-de-exito .profic-cde-section {
	padding: 120px 0 220px;
}

/* Logos del CPT son blancos (para la portada oscura); la card es blanca */
.profic-caso-single .profic-cde-card .profic-cde-logo {
	filter: brightness(0);
}

/* Todas las cards con el mismo marco: columna de texto idéntica y mockups del mismo peso */
.profic-caso-single .profic-cde-card .profic-cde-frame-b,
.profic-caso-single .profic-cde-card .profic-cde-frame-b:has(.profic-cde-mockup--phone) {
	width: 413px;
	height: 413px;
}

.profic-caso-single .profic-cde-card .profic-cde-mockup-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.profic-caso-single .profic-cde-card .profic-cde-mockup--phone .profic-cde-mockup-img {
	width: 80%;
}

.profic-caso-single .profic-cde-card .profic-cde-title {
	font-size: 30px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.profic-caso-single .profic-cde-card .profic-cde-desc {
	font-size: 17px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* ── Tablet ── */
@media (min-width: 768px) and (max-width: 1279px) {
	.profic-caso-single .profic-hce-section {
		padding: 150px 0 90px;
		justify-content: flex-start;
	}

	.profic-caso-single .profic-hce-section .profic-hce-content {
		flex: 0 0 338px;
		width: 338px;
		max-width: 338px;
		gap: 20px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-card {
		column-gap: 32px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-title {
		font-size: 30px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-visual {
		flex: 0 0 410px;
		width: 410px;
		min-width: 410px;
		height: 352px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-card .profic-hce-mockup {
		width: calc(var(--ficha-mw, 560px) * 0.73);
		height: calc(var(--ficha-mh, 354px) * 0.73);
	}

	.profic-caso-single .profic-post {
		padding: 80px 0 90px;
	}

	.profic-caso-single .profic-post .profic-post-body {
		max-width: 860px;
		padding: 0 40px;
	}

	body.single-casos-de-exito .profic-cde-section {
		padding: 100px 0 200px;
	}
}

@media (min-width: 800px) and (max-width: 1279px) {
	.profic-caso-single .profic-cde-card .profic-cde-frame-b,
	.profic-caso-single .profic-cde-card .profic-cde-frame-b:has(.profic-cde-mockup--phone) {
		width: 260px;
		height: 260px;
	}

	.profic-caso-single .profic-cde-card .profic-cde-title {
		font-size: 19px;
	}

	.profic-caso-single .profic-cde-card .profic-cde-desc {
		font-size: 11px;
	}
}

/* ── Mobile ── */
@media (max-width: 767px) {
	.profic-caso-single .profic-hce-section {
		padding: 150px 14px 70px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-card {
		padding: 0;
		row-gap: 36px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-content {
		flex: none;
		width: 100%;
		max-width: none;
		gap: 20px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-title {
		font-size: 28px;
	}

	.profic-caso-single .profic-hce-section .profic-hce-visual {
		flex: none;
		width: 100%;
		min-width: 0;
		height: auto;
	}

	.profic-caso-single .profic-hce-section .profic-hce-card .profic-hce-mockup {
		width: min(calc(var(--ficha-mw, 560px) * 0.6), 100%);
		height: calc(var(--ficha-mh, 354px) * 0.6);
	}

	.profic-caso-single .profic-post {
		padding: 56px 0 64px;
	}

	.profic-caso-single .profic-post .profic-post-body {
		padding: 0 20px;
	}

	body.single-casos-de-exito .profic-cde-section {
		padding: 80px 0 170px;
	}
}

/* Carrusel mobile (su breakpoint es 799px) */
@media (max-width: 799px) {
	.profic-caso-single .profic-cde-card .profic-cde-frame-b,
	.profic-caso-single .profic-cde-card .profic-cde-frame-b:has(.profic-cde-mockup--phone) {
		width: 100%;
		max-width: 268px;
		height: 266px;
	}

	.profic-caso-single .profic-cde-card .profic-cde-title {
		font-size: 24px;
	}

	.profic-caso-single .profic-cde-card .profic-cde-desc {
		display: none;
	}
}
