/* ===== Grid de conferencistas ===== */
.ce-grid {
	--ce-columnas: 4;
	display: grid;
	grid-template-columns: repeat(var(--ce-columnas), 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.ce-grid {
		--ce-columnas: 2;
	}
}

@media (max-width: 600px) {
	.ce-grid {
		--ce-columnas: 1;
	}
}

.ce-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ce-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ce-card-foto {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eee;
}

.ce-card-foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ce-card-foto-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e2e2e2, #cfcfcf);
}

.ce-card-body {
	padding: 18px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-grow: 1;
}

.ce-card-nombre {
	margin: 0;
	font-size: 1.15em;
	font-weight: 700;
}

.ce-card-cargo {
	margin: 0 0 8px;
	font-size: 0.9em;
	color: #666;
}

.ce-btn-info {
	margin-top: auto;
	align-self: center;
	padding: 10px 22px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.9em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.ce-btn-info:hover {
	background: #444;
}

.ce-sin-resultados {
	opacity: 0.7;
}

/* ===== Popup / Modal ===== */
.ce-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 100000;
}

.ce-popup-overlay[hidden] {
	display: none;
}

.ce-popup {
	background: #fff;
	max-width: 960px;
	width: 100%;
	max-height: 88vh;
	border-radius: 16px;
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: flex-start; /* evita que un panel "estire" al otro */
	overflow: hidden;
	animation: ce-popup-in 0.2s ease;
}

@keyframes ce-popup-in {
	from {
		opacity: 0;
		transform: scale(0.96);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.ce-popup-cerrar {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(255, 255, 255, 0.15);
	border: 2px solid currentColor;
	border-radius: 6px;
	width: 32px;
	height: 32px;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---- Panel izquierdo: foto (ratio editable desde Elementor, a partir del ancho) ---- */
.ce-popup-panel-foto {
	flex: 0 0 42%;
	aspect-ratio: 1 / 1; /* editable desde Elementor */
	background: #eee;
	position: relative;
	overflow: hidden;
}

.ce-popup-foto {
	width: 100%;
	height: 100%;
	object-fit: cover; /* la foto llena su panel sin deformarse */
	display: block;
	position: absolute;
	inset: 0;
}

/* ---- Panel derecho: contenido (fondo editable desde Elementor) ---- */
.ce-popup-panel-contenido {
	flex: 1 1 58%;
	background: #2fb3ac; /* Color por defecto, editable desde el widget de Elementor */
	color: #fff;
	max-height: 88vh; /* mismo límite que .ce-popup: si el texto es largo, este panel hace scroll en vez de estirar la foto */
	overflow-y: auto;
	display: flex;
}

.ce-popup-panel-contenido-scroll {
	padding: 44px 44px 40px;
	width: 100%;
}

.ce-popup-nombre {
	margin: 0 0 18px;
	font-size: 1.6em;
	font-weight: 800;
	color: inherit;
}

.ce-popup-cargo {
	margin: -12px 0 20px;
	font-weight: 700;
	font-size: 1.05em;
	color: inherit;
	opacity: 0.95;
}

.ce-popup-extracto {
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.5;
	margin: 0 0 20px;
	color: inherit;
}

.ce-popup-info {
	font-size: 0.98em;
	line-height: 1.6;
	color: inherit;
	opacity: 0.95;
}

.ce-popup-info p:first-child {
	margin-top: 0;
}

.ce-popup-linkedin {
	margin-top: 24px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: #0a66c2;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9em;
	transition: opacity 0.2s ease;
}

.ce-popup-linkedin:hover {
	opacity: 0.85;
	color: #fff;
}

.ce-popup-linkedin[hidden] {
	display: none;
}

@media (max-width: 760px) {
	.ce-popup {
		flex-direction: column;
		align-items: stretch;
		max-height: 90vh;
		overflow-y: auto;
	}

	.ce-popup-panel-foto {
		flex-basis: auto;
		width: 100%;
	}

	.ce-popup-panel-contenido {
		max-height: none; /* el scroll ya lo maneja .ce-popup en esta vista */
		overflow-y: visible;
	}

	.ce-popup-panel-contenido-scroll {
		padding: 32px 24px 28px;
	}
}

body.ce-popup-abierto {
	overflow: hidden;
}
