/* Blätter-Flyer (Galerie-Stil „Blätter-Flyer“) */

/* Original-Galerie bleibt für die Lightbox im Dokument, ist aber unsichtbar */
.wp-block-gallery.ms-heft-quelle {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	margin: 0 !important;
}

.ms-heft { margin: 1.5em 0; outline: none; }
.ms-heft:focus-visible .ms-heft-buehne { outline: 2px solid #4a7b8a; outline-offset: 4px; }

.ms-heft-buehne {
	display: flex;
	justify-content: center;
	gap: 0;
	perspective: 1600px;
	max-width: 680px;
	margin: 0 auto;
}
.ms-heft-blatt { flex: 0 1 50%; max-width: 50%; cursor: zoom-in; }
.ms-heft-blatt:empty { display: none; }
.ms-heft-blatt img {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
/* Doppelseite: wie ein aufgeschlagenes Heft mit leichter Falz */
.ms-heft-links img { border-radius: 6px 0 0 6px; }
.ms-heft-rechts img { border-radius: 0 6px 6px 0; }
.ms-heft-rechts { position: relative; }
.ms-heft-rechts::before {
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 0;
	width: 18px;
	background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent);
	pointer-events: none;
	z-index: 1;
}
/* Einzelseite (Titel bzw. Handy): mittig, nicht zu breit */
.ms-heft.ist-einzeln .ms-heft-blatt { flex-basis: auto; max-width: min(100%, 360px); }
.ms-heft.ist-einzeln .ms-heft-links img { border-radius: 6px; }

/* Umblättern */
.ms-heft.blaettert-vor .ms-heft-buehne > .ms-heft-blatt:last-child:not(:empty),
.ms-heft.blaettert-vor.ist-einzeln .ms-heft-links { animation: ms-heft-vor .45s ease-out; transform-origin: left center; }
.ms-heft.blaettert-zurueck .ms-heft-links { animation: ms-heft-zurueck .45s ease-out; transform-origin: right center; }
@keyframes ms-heft-vor { from { transform: rotateY(-75deg); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes ms-heft-zurueck { from { transform: rotateY(75deg); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.ms-heft .ms-heft-blatt { animation: none !important; }
}

/* Leiste mit Pfeilen und Seitenstand */
.ms-heft-leiste { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.ms-heft-leiste button {
	display: flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; margin: 0;
	border: 1px solid #c9d6da; border-radius: 50%;
	background: #fff; color: #2c4a52; cursor: pointer;
}
.ms-heft-leiste button:hover:not(:disabled) { background: #eef4f5; }
.ms-heft-leiste button:disabled { opacity: .35; cursor: default; }
.ms-heft-stand { min-width: 5em; text-align: center; font-size: 14px; color: #555; }
