/* Edición impresa: flipbook del PDF en lugar de la imagen destacada. */

body.blogsy-news-single-flipbook .single-hero-1 .image-container {
	height: auto !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	padding: 0 !important;
	overflow: visible !important;
	background: none !important;
}

.aep-flipbook {
	--aep-ratio: 1.33;
	position: relative;
	margin: 0 0 20px;
	padding: 12px;
	border-radius: 8px;
	background: #ecebe7;
}

.aep-flipbook__toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.aep-flipbook__spacer {
	flex: 1;
}

.aep-flipbook__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 0;
	border-radius: 6px;
	background: #3a3e41;
	color: #fff !important;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.aep-flipbook__btn:hover,
.aep-flipbook__btn:focus-visible {
	background: #c9a751;
}

.aep-flipbook__download {
	font-size: 13px;
}

.aep-flipbook__pages {
	min-width: 120px;
	color: #3a3e41;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.aep-flipbook__stage {
	position: relative;
	display: flex;
	justify-content: center;
	min-height: 320px;
}

.aep-flipbook__book {
	width: 100%;
	margin: 0 auto;
}

.aep-flipbook__page {
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.aep-flipbook__page canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.aep-flipbook__loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #3a3e41;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.aep-flipbook__spinner {
	width: 36px;
	height: 36px;
	border: 4px solid rgba(58, 62, 65, 0.2);
	border-top-color: #c9a751;
	border-radius: 50%;
	animation: aep-spin 0.9s linear infinite;
}

.aep-flipbook__loading.is-error .aep-flipbook__spinner {
	display: none;
}

@keyframes aep-spin {
	to {
		transform: rotate(360deg);
	}
}

.aep-flipbook__hint {
	margin: 10px 0 0;
	color: #6b6f72;
	font-size: 12px;
	text-align: center;
}

/* Pantalla completa: el libro ocupa el alto disponible. */
.aep-flipbook:fullscreen {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 16px;
	border-radius: 0;
	background: #2a2d2f;
}

.aep-flipbook:fullscreen .aep-flipbook__pages,
.aep-flipbook:fullscreen .aep-flipbook__hint {
	color: #eee;
}

.aep-flipbook:fullscreen .aep-flipbook__stage {
	flex: 1;
	align-items: center;
}

.aep-flipbook:fullscreen .aep-flipbook__book {
	width: min(100%, calc((100vh - 110px) / var(--aep-ratio) * 2));
}

@media (orientation: portrait) {
	.aep-flipbook:fullscreen .aep-flipbook__book {
		width: min(100%, calc((100vh - 110px) / var(--aep-ratio)));
	}
}

html[scheme="dark"] .aep-flipbook {
	background: #2a2d2f;
}

html[scheme="dark"] .aep-flipbook__pages,
html[scheme="dark"] .aep-flipbook__loading,
html[scheme="dark"] .aep-flipbook__hint {
	color: #e6e6e6;
}

@media (max-width: 767px) {
	.aep-flipbook {
		padding: 8px;
	}

	.aep-flipbook__btn {
		min-width: 32px;
		height: 32px;
		padding: 0 10px;
	}

	.aep-flipbook__pages {
		min-width: 0;
		font-size: 13px;
	}

	.aep-flipbook__download {
		font-size: 12px;
	}
}
