/*
Theme Name: Pepodemus
Theme URI: https://pepodemus.de
Author: Pepodemus
Description: Theme für Pepodemus: Kinderbücher, Malbücher sowie Bücher für Schule und Beruf von Pepodemus. Bücher werden unter „Bücher“ angelegt und erscheinen automatisch auf der Startseite und den Rubrikseiten, jeweils mit eigener Vorstellungsseite und Amazon-Button.
Version: 2.9.4
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pepodemus
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
[id] { scroll-margin-top: 90px; }
img { height: auto; }

/* ---------- Kopfbereich ---------- */
.pd-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--creme);
	border-bottom: 2px solid var(--wp--preset--color--sand);
}
.admin-bar .pd-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .pd-header { top: 46px; } }

.pd-header .wp-block-site-title { margin: 0; }
.pd-header .wp-block-site-title a {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
}
.pd-header .wp-block-site-title a::before,
.pd-footer .wp-block-site-title a::before {
	content: "";
	width: 2.6rem;
	height: 2.6rem;
	background: url("assets/images/logo-zeichen.svg") center / contain no-repeat;
	flex: none;
}
.pd-footer .wp-block-site-title a {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
}
.pd-footer .wp-block-site-title a::before {
	background-image: url("assets/images/logo-zeichen-dunkel.svg");
	width: 2.4rem;
}

/* ---------- Abschnitte ---------- */
.pd-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.pd-section--sand { background: var(--wp--preset--color--sand); }
.pd-section--weiss { background: var(--wp--preset--color--weiss); }

.pd-kicker {
	display: inline-block;
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--akzent-dunkel);
	margin-bottom: .4rem !important;
}
.pd-intro { max-width: 40rem; font-size: 1.125rem; }

/* ---------- Startbereich ---------- */
.pd-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.pd-hero h1 { margin-top: 0; }
.pd-hero h1 em { font-style: normal; color: var(--wp--preset--color--akzent); }
.pd-hero-lead { font-size: 1.2rem; max-width: 34rem; }
.pd-hero-bild img { width: 100%; max-width: 520px; display: block; margin-inline: auto; }

/* ---------- Buchkarten ---------- */

.pd-karte {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--weiss);
	border-radius: 18px;
	padding: 1rem 1rem 1.25rem;
	box-shadow: 0 2px 0 var(--wp--preset--color--sand), 0 10px 30px rgba(43, 42, 51, .07);
	transition: transform .2s ease, box-shadow .2s ease;
}
.pd-section--weiss .pd-karte { background: var(--wp--preset--color--creme); }
.pd-karte:hover {
	transform: translateY(-4px);
	box-shadow: 0 2px 0 var(--wp--preset--color--sand), 0 16px 36px rgba(43, 42, 51, .12);
}
.pd-karte > * { margin-block: 0; }
.pd-karte > * + * { margin-top: .55rem; }

.pd-karte .wp-block-post-featured-image {
	margin-bottom: .5rem;
	aspect-ratio: 2 / 3;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.pd-buchliste--malbuch .wp-block-post-featured-image { aspect-ratio: 1 / 1.29; }
.pd-karte .wp-block-post-featured-image a {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	height: 100%;
}
/* Cover vollständig zeigen (auch quadratische Bilderbücher), nichts abschneiden */
.pd-karte .wp-block-post-featured-image img:not(.pd-cover-platzhalter) {
	width: auto !important;
	height: auto !important;
	max-width: 100%;
	max-height: 100%;
	aspect-ratio: auto !important;
	object-fit: contain;
	border-radius: 10px;
	display: block;
	box-shadow: 0 6px 16px rgba(43, 42, 51, .15);
}
.pd-cover-platzhalter {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 10px;
	display: block;
	box-shadow: 0 6px 16px rgba(43, 42, 51, .15);
}
.pd-buchliste--malbuch .pd-cover-platzhalter { aspect-ratio: 1 / 1.29; }

.pd-karte .wp-block-post-terms {
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--akzent-dunkel);
}
.pd-karte .wp-block-post-terms a { text-decoration: none; color: inherit; }
.pd-karte .wp-block-post-title { font-size: 1.2rem; line-height: 1.25; }
.pd-buchliste--malbuch .pd-karte .wp-block-post-title { font-size: 1.05rem; }
.pd-karte .wp-block-post-title a { text-decoration: none; }
.pd-karte .wp-block-post-title a:hover { color: var(--wp--preset--color--akzent-dunkel); }
.pd-karte .wp-block-post-excerpt { font-size: .97rem; }
.pd-karte .wp-block-post-excerpt__excerpt { margin: 0; }
.pd-karte .wp-block-buttons { margin-top: auto !important; padding-top: .9rem; }
.pd-karte .wp-block-button,
.pd-karte .wp-block-button__link { width: 100%; text-align: center; }

/* Amazon-Button */


/* Leere Liste */
.pd-leer {
	background: var(--wp--preset--color--weiss);
	border: 2px dashed var(--wp--preset--color--sand-dunkel);
	border-radius: 18px;
	padding: 2rem;
	text-align: center;
}

/* ---------- Demnächst ---------- */
.pd-demnaechst {
	background: var(--wp--preset--color--taubenblau-hell);
	border-radius: 22px;
	padding: clamp(1.5rem, 4vw, 2.5rem);
}
.pd-demnaechst h3 { margin-top: 0; }
.pd-demnaechst ul { margin: 0; padding-left: 1.2rem; }
.pd-demnaechst li + li { margin-top: .4rem; }

/* ---------- Über mich ---------- */
.pd-autor-bild img { border-radius: 50%; width: 100%; max-width: 280px; display: block; margin-inline: auto; }

/* ---------- Einzelnes Buch ---------- */
.pd-buch-cover img,
.pd-buch-cover .pd-cover-platzhalter {
	width: 100%;
	max-width: 420px;
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(43, 42, 51, .18);
	display: block;
	margin-inline: auto;
}
.pd-buch-cover .pd-cover-platzhalter { aspect-ratio: 2 / 3; }
.pd-buch-info .wp-block-post-terms {
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: .85rem;
	color: var(--wp--preset--color--akzent-dunkel);
}
.pd-buch-info .wp-block-post-terms a { color: inherit; text-decoration: none; }
.pd-buch-info .wp-block-post-title { margin-top: .3rem; }
.pd-buch-info .wp-block-post-excerpt { font-size: 1.15rem; }

/* ---------- Fußbereich ---------- */
.pd-footer { background: var(--wp--preset--color--tinte); color: var(--wp--preset--color--creme); }
.pd-footer a { color: var(--wp--preset--color--creme); }
.pd-footer a:hover { color: var(--wp--preset--color--honig); }
.pd-footer .wp-block-site-title a { text-decoration: none; }
.pd-footer-klein { font-size: .9rem; opacity: .8; }

/* Umriss-Button: beim Darüberfahren gut lesbar */
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--tinte);
	border-color: var(--wp--preset--color--tinte);
	color: var(--wp--preset--color--weiss);
}

/* ---------- Newsletter ---------- */
.pd-section--salbei { background: var(--wp--preset--color--salbei-hell); }
.pd-formular-platzhalter {
	background: var(--wp--preset--color--weiss);
	border: 2px dashed var(--wp--preset--color--salbei);
	border-radius: 16px;
	padding: 1.5rem;
	color: #5d6560;
}

/* ---------- Kleinteile ---------- */
.pd-zurueck a { text-decoration: none; font-weight: 600; }
.pd-hinweis { color: #5f6168; margin-top: .6rem !important; }
.pd-buch-info .wp-block-buttons { margin-top: 1.5rem; }
.pd-buch-info .wp-block-button__link { font-size: 1.1rem; padding: .9rem 1.8rem; }
.wp-block-query-pagination { margin-top: 2.5rem; }

/* ---------- Altersangabe und Werbelink ---------- */
.pd-alter {
	display: inline-block;
	align-self: flex-start;
	background: var(--wp--preset--color--salbei-hell);
	color: #48603f;
	font-size: .82rem;
	font-weight: 700;
	border-radius: 999px;
	padding: .2rem .75rem;
}
.pd-buch-info .pd-alter { font-size: .95rem; margin-top: .6rem; }
.pd-werbelink { margin-left: .3em; font-weight: 700; color: var(--wp--preset--color--akzent-dunkel); }
.pd-karte .wp-block-button:has(.pd-werbelink) { display: flex; align-items: center; }

/* ---------- Ausführliche Buchvorstellung ---------- */
.single-buch .wp-block-post-content {
	background: var(--wp--preset--color--weiss);
	border-radius: 22px;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
	box-shadow: 0 10px 30px rgba(52, 54, 61, .06);
	max-width: 900px;
	margin-inline: auto !important;
}
.single-buch .wp-block-post-content h2 {
	font-size: 1.6rem;
	margin-top: 2.2rem;
	padding-bottom: .4rem;
	border-bottom: 3px solid var(--wp--preset--color--sand);
}
.single-buch .wp-block-post-content > h2:first-child { margin-top: 0; }
.single-buch .wp-block-gallery img { border-radius: 12px; }
.single-buch .wp-block-post-content ul { padding-left: 1.2rem; }
.single-buch .wp-block-post-content li + li { margin-top: .35rem; }

/* ---------- Feinschliff ---------- */
.pd-kicker.has-text-align-center { display: block; }
.pd-buchliste--malbuch .wp-block-button__link {
	font-size: .9rem;
	padding: .6rem .8rem;
	white-space: normal;
	line-height: 1.25;
	text-align: center;
}

/* ---------- Amazon-Button mit Einkaufswagen ---------- */
.wp-block-button.pd-amazon { display: inline-flex; align-items: center; }
.pd-karte .wp-block-button.pd-amazon { display: flex; }
.pd-karte .pd-amazon .wp-block-button__link { flex: 1; }
.pd-amazon .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	box-shadow: 0 4px 12px rgba(158, 79, 54, .25);
	transition: background-color .2s ease, transform .2s ease;
}
.pd-amazon .wp-block-button__link:hover { transform: translateY(-1px); }
.pd-amazon .wp-block-button__link::before {
	content: "";
	width: 1.15em;
	height: 1.15em;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6.2'/%3E%3Ccircle cx='10' cy='20.5' r='1.3'/%3E%3Ccircle cx='17' cy='20.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6.2'/%3E%3Ccircle cx='10' cy='20.5' r='1.3'/%3E%3Ccircle cx='17' cy='20.5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pd-amazon .wp-block-button__link::after { content: none; }

/* Kaufen-Kasten unter der Buchbeschreibung */
.pd-kaufbox {
	max-width: 900px;
	margin: 2rem auto 0 !important;
	background: var(--wp--preset--color--sand);
	border-radius: 22px;
	padding: clamp(1.5rem, 4vw, 2.5rem);
}
.pd-kaufbox h2 { margin-top: 0; font-size: 1.6rem; }

@media (max-width: 600px) {
	.pd-buchliste--malbuch .pd-karte { padding: .7rem .7rem 1rem; }
	.pd-buchliste--malbuch .wp-block-button__link {
		white-space: normal;
		font-size: .82rem;
		padding: .55rem .6rem;
		line-height: 1.25;
	}
	.pd-buchliste--malbuch .wp-block-post-excerpt { font-size: .88rem; }
}

/* Menü auf Tablets kompakter, damit alle Punkte in eine Zeile passen */
@media (max-width: 1000px) {
	.pd-header .wp-block-navigation { font-size: .92rem; }
	.pd-header .wp-block-navigation__container { gap: .9rem !important; }
	.pd-header .wp-block-site-title a::before { width: 2.2rem; height: 2.2rem; }
}
@media (max-width: 780px) {
	.pd-header .wp-block-navigation { font-size: .84rem; }
	.pd-header .wp-block-navigation__container { gap: .65rem !important; }
	.pd-header .wp-block-site-title { font-size: 1.3rem !important; }
}
@media (max-width: 680px) {
	.pd-header .wp-block-navigation { font-size: .78rem; }
	.pd-header .wp-block-navigation__container { gap: .5rem !important; }
}

/* ---------- Untermenü (Malbücher) ---------- */
.pd-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--weiss) !important;
	border: 1px solid var(--wp--preset--color--sand) !important;
	border-radius: 14px;
	padding: .4rem 0;
	box-shadow: 0 12px 30px rgba(52, 54, 61, .12);
	min-width: 190px !important;
}
.pd-header .wp-block-navigation .wp-block-navigation__submenu-container a {
	padding: .55rem 1.1rem !important;
}
.pd-header .wp-block-navigation .wp-block-navigation__submenu-container a:hover {
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--akzent-dunkel);
}

/* Handy-Menü: helle Fläche, gut lesbar */
.pd-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--creme) !important;
	padding: 1.5rem !important;
}
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	font-size: 1.15rem;
	gap: 1rem !important;
}
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	box-shadow: none;
	border: 0 !important;
	background: transparent !important;
	padding-left: 1rem !important;
	font-size: 1rem;
}
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.pd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: flex-start !important;
	text-align: left;
}

/* ---------- Startseite (Landingpage) ---------- */
.pd-landing-logo img { max-width: 400px; }
.pd-sparte { margin-top: clamp(2.5rem, 5vw, 3.5rem) !important; }
.pd-sparte-kopf {
	border-bottom: 3px solid var(--wp--preset--color--sand);
	padding-bottom: .8rem;
	margin-bottom: 1.5rem !important;
	gap: .5rem 2rem;
}
.pd-sparte-kopf h3 { margin: 0; font-size: 1.6rem; }
.pd-sparte-text { margin: .2rem 0 0 !important; color: #5f6168; }
.pd-sparte-link { margin: 0 !important; font-weight: 700; }
.pd-sparte-link a { text-decoration: none; }
.pd-pepo-foto img {
	width: 100%;
	max-width: 420px;
	display: block;
	margin-inline: auto;
	border-radius: 24px;
	box-shadow: 0 16px 40px rgba(52, 54, 61, .18);
}

/* ---------- Rubriken auf der Startseite ---------- */
.pd-rubrik-titel { font-size: var(--wp--preset--font-size--xxl) !important; margin-top: 0; }
.pd-rubrik-titel em { font-style: normal; color: var(--wp--preset--color--akzent); }
@media (min-width: 782px) {
	.pd-rubrik-kopf--gedreht { flex-direction: row-reverse; }
}
.pd-rubrik-zwischen {
	margin-top: clamp(2.5rem, 5vw, 3.5rem) !important;
	margin-bottom: 1.5rem !important;
	padding-bottom: .7rem;
	border-bottom: 3px solid var(--wp--preset--color--sand);
	font-size: 1.5rem;
}
.pd-section--sand .pd-rubrik-zwischen { border-bottom-color: var(--wp--preset--color--sand-dunkel); }

/* Blick ins Buch */
.pd-einblick { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.pd-einblick-titel { font-size: 1.3rem; margin: 0 0 1rem; }
.pd-einblick-titel a { text-decoration: none; color: var(--wp--preset--color--akzent-dunkel); }
.pd-einblick-bilder {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(.6rem, 2vw, 1.2rem);
}
.pd-einblick-bilder img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 12px;
	display: block;
	background: var(--wp--preset--color--weiss);
	box-shadow: 0 6px 18px rgba(52, 54, 61, .12);
	transition: transform .2s ease;
}
.pd-einblick-bilder a:hover img { transform: translateY(-3px); }
@media (max-width: 600px) {
	.pd-einblick-bilder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pd-einblick-platzhalter {
	aspect-ratio: 3 / 4;
	border-radius: 12px;
	border: 2px dashed var(--wp--preset--color--sand-dunkel);
	background: var(--wp--preset--color--weiss);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .3rem;
	padding: 1rem;
	text-align: center;
	color: #8a7a64;
}
.pd-einblick-platzhalter span { font-family: var(--wp--preset--font-family--rund); font-weight: 600; font-size: 1.05rem; }
.pd-einblick-platzhalter small { font-size: .8rem; line-height: 1.3; }

/* ---------- Alle Geräte: nichts verschiebt sich, alles gut antippbar ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
img, svg, video { max-width: 100%; }
h1, h2, h3, .wp-block-post-title, .wp-block-button__link { overflow-wrap: break-word; hyphens: auto; }

/* Menü-Symbol und Schließen-Knopf am Handy: große Tippfläche */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 48px;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }
.wp-block-navigation__responsive-container-open:focus-visible,
.wp-block-navigation__responsive-container-close:focus-visible {
	outline: 3px solid var(--wp--preset--color--honig);
	outline-offset: 2px;
}
/* Einträge im geöffneten Handy-Menü */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	min-height: 44px;
	display: inline-flex !important;
	align-items: center;
}

/* Jeder Button mindestens 44 Pixel hoch */
.wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 600px) {
	.pd-buchliste--malbuch .wp-block-button__link { min-height: 44px; }
	.wp-block-buttons > .wp-block-button { flex: 1 1 auto; }
	.wp-block-buttons > .wp-block-button .wp-block-button__link { width: 100%; }
}

/* Untermenü-Pfeil: dezent */
.pd-header .wp-block-navigation .wp-block-navigation__submenu-icon { width: .7em; height: .7em; margin-left: .25em; }
.pd-header .wp-block-navigation .wp-block-navigation__submenu-icon svg { width: 100%; height: 100%; }

/* Tablets mit Fingerbedienung: Menüpunkte und Untermenü-Pfeil groß genug */
@media (pointer: coarse) and (min-width: 600px) {
	.pd-header .wp-block-navigation-item__content { min-height: 44px; display: inline-flex; align-items: center; }
	.pd-header .wp-block-navigation-submenu__toggle { min-width: 36px; min-height: 44px; }
	.pd-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { min-height: 44px; }
}

/* =========================================================================
   Auflockerung: Pepo als Begleiter, Wellen, einladende Amazon-Buttons
   ========================================================================= */

/* ---------- Pepo als Begleiter ---------- */
.pd-begleiter-zeile {
	margin-top: clamp(2.5rem, 5vw, 3.5rem) !important;
	margin-bottom: 1.5rem !important;
	border-bottom: 3px solid var(--wp--preset--color--sand);
	gap: 1rem;
}
.pd-section--sand .pd-begleiter-zeile { border-bottom-color: var(--wp--preset--color--sand-dunkel); }
.pd-begleiter-zeile .pd-rubrik-zwischen {
	margin: 0 !important;
	padding-bottom: .7rem;
	border-bottom: 0;
}
.pd-begleiter {
	display: flex;
	align-items: flex-end;
	gap: .4rem;
	margin-bottom: -3px;
	flex: none;
}
.pd-begleiter img { width: 124px; height: auto; display: block; }
.pd-sprechblase {
	position: relative;
	margin: 0 0 3.2rem !important;
	max-width: 15rem;
	background: var(--wp--preset--color--weiss);
	border: 2px solid var(--wp--preset--color--sand-dunkel);
	border-radius: 18px;
	padding: .55rem .9rem;
	font-family: var(--wp--preset--font-family--rund);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.3;
	color: var(--wp--preset--color--tinte);
}
.pd-sprechblase::after {
	content: "";
	position: absolute;
	right: -9px;
	bottom: 14px;
	width: 14px;
	height: 14px;
	background: inherit;
	border-right: 2px solid var(--wp--preset--color--sand-dunkel);
	border-bottom: 2px solid var(--wp--preset--color--sand-dunkel);
	transform: rotate(-45deg);
}
@media (max-width: 600px) {
	.pd-begleiter img { width: 70px; }
	.pd-sprechblase { font-size: .82rem; max-width: 9.5rem; margin-bottom: 2.2rem !important; padding: .45rem .7rem; }
	.pd-begleiter-zeile .pd-rubrik-zwischen { font-size: 1.2rem; }
}
@media (max-width: 380px) {
	.pd-sprechblase { display: none; }
}

/* ---------- Weiche Wellen zwischen den Abschnitten ---------- */
.pd-section:not(.pd-section--weiss):not(.pd-section--sand):not(.pd-section--salbei),
.pd-hero { background-color: var(--wp--preset--color--creme); }
main > .pd-section,
main > .pd-hero { position: relative; }
main > .pd-section + .pd-section::before,
main > .pd-hero + .pd-section::before,
main > .pd-section + .pd-hero::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -28px;
	height: 30px;
	background: inherit;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 V18 C240 0 480 0 720 14 S1200 30 1440 10 V30 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 V18 C240 0 480 0 720 14 S1200 30 1440 10 V30 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	pointer-events: none;
}
.pd-footer { position: relative; }
.pd-footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -28px;
	height: 30px;
	background: var(--wp--preset--color--tinte);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 V12 C300 30 560 2 820 12 S1240 26 1440 8 V30 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'%3E%3Cpath d='M0 30 V12 C300 30 560 2 820 12 S1240 26 1440 8 V30 Z' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	pointer-events: none;
}

/* ---------- Einladende Amazon-Buttons und Karten ---------- */
.pd-amazon .wp-block-button__link {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.pd-amazon .wp-block-button__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
	transform: translateX(-120%);
	pointer-events: none;
}
.pd-karte .wp-block-post-featured-image img,
.pd-karte .pd-cover-platzhalter { transition: transform .35s ease, box-shadow .35s ease; }
.pd-karte:hover .wp-block-post-featured-image img,
.pd-karte:hover .pd-cover-platzhalter {
	transform: scale(1.025) rotate(-.6deg);
	box-shadow: 0 12px 26px rgba(52, 54, 61, .2);
}
.pd-karte:hover .pd-amazon .wp-block-button__link { background-color: var(--wp--preset--color--tinte); }

@media (prefers-reduced-motion: no-preference) {
	/* Glanz über den Button, sobald die Karte ins Bild kommt – und beim Darüberfahren */
	.pd-sichtbar .pd-amazon .wp-block-button__link::after { animation: pd-glanz 1.1s ease-out .35s 1 both; }
	.pd-amazon .wp-block-button__link:hover::after { animation: pd-glanz .9s ease-out 1 both; }

	/* Karten, Pepo und Kästen gleiten sanft herein (nur wenn das Skript läuft) */
	.pd-effekte .pd-karte,
	.pd-effekte .pd-begleiter,
	.pd-effekte .pd-kaufbox,
	.pd-effekte .pd-einblick {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity .6s ease, transform .6s ease;
	}
	.pd-effekte .pd-karte.pd-sichtbar,
	.pd-effekte .pd-begleiter.pd-sichtbar,
	.pd-effekte .pd-kaufbox.pd-sichtbar,
	.pd-effekte .pd-einblick.pd-sichtbar { opacity: 1; transform: none; }
	.pd-effekte .pd-karte.pd-sichtbar:hover { transform: translateY(-4px); }

	/* Pepo hüpft einmal kurz, wenn er erscheint */
	.pd-begleiter.pd-sichtbar img { animation: pd-hopser .7s ease-out .5s 1 both; }
}
@keyframes pd-glanz {
	from { transform: translateX(-120%); }
	to { transform: translateX(120%); }
}
@keyframes pd-hopser {
	0% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	70% { transform: translateY(0); }
	85% { transform: translateY(-3px); }
	100% { transform: translateY(0); }
}

/* Begleiter-Zeile: Überschrift darf umbrechen, nichts ragt über den Rand */
.pd-begleiter-zeile .pd-rubrik-zwischen { flex: 1 1 auto; min-width: 0; }
.pd-begleiter { min-width: 0; }
.pd-sprechblase { min-width: 0; }
@media (max-width: 480px) {
	.pd-sprechblase { display: none; }
}
html { overflow-x: clip; }

/* ---------- Inhaltsschutz für Besucher ---------- */
.pd-schutz img {
	-webkit-user-drag: none;
	user-select: none;
	-webkit-touch-callout: none;
}
/* Wasserzeichen über Innenseiten (Blick ins Buch, Galerien auf Buchseiten) */
.pd-schutz .pd-einblick-bilder a,
.pd-schutz.single-buch .wp-block-gallery .wp-block-image {
	position: relative;
	display: block;
}
.pd-schutz .pd-einblick-bilder a::after,
.pd-schutz.single-buch .wp-block-gallery .wp-block-image::after {
	content: "pepodemus.de   pepodemus.de   pepodemus.de";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	overflow: hidden;
	transform: rotate(-28deg) scale(1.25);
	font-family: var(--wp--preset--font-family--rund);
	font-weight: 700;
	font-size: clamp(.8rem, 1.6vw, 1.1rem);
	letter-spacing: .08em;
	color: rgba(52, 54, 61, .16);
	pointer-events: none;
	border-radius: 12px;
}
.pd-schutz .pd-einblick-bilder a,
.pd-schutz.single-buch .wp-block-gallery .wp-block-image { overflow: hidden; border-radius: 12px; }

/* ---------- Kontakt ---------- */
.pd-kontakt { text-align: center; }
.pd-kontakt-pepo img { width: 120px; height: auto; margin-inline: auto; }
.pd-kontakt-adresse {
	font-family: var(--wp--preset--font-family--rund);
	font-weight: 600;
	font-size: 1.15rem;
	color: var(--wp--preset--color--akzent-dunkel);
	margin-top: .8rem !important;
	overflow-wrap: anywhere;
}

/* ---------- Menüpunkt „Start“ mit kleinem Haus-Symbol ---------- */
.pd-nav-start .wp-block-navigation-item__content { display: inline-flex; align-items: center; gap: .35em; }
.pd-nav-start .wp-block-navigation-item__content::before {
	content: "";
	width: 1em;
	height: 1em;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 4l9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Aktuelle Seite im Menü hervorheben, damit man sieht, wo man ist */
.pd-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.pd-header .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--akzent-dunkel);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: .35em;
}

/* Schmale Tablets: oben links nur das Pepo-Logo, damit das Menü in eine Zeile passt */
@media (min-width: 600px) and (max-width: 900px) {
	.pd-header .wp-block-site-title a { font-size: 0 !important; gap: 0; }
	.pd-header .wp-block-site-title a::before { width: 2.8rem; height: 2.8rem; }
}

/* Neuvorstellungen auf der Startseite: zwei Reihen mit je drei Büchern */
.pd-neu .pd-neu-reihe {
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
	font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.pd-neu .pd-neu-reihe::after {
	content: "";
	flex: 1;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--sand-dunkel);
}
.pd-neu .pd-neu-reihe--pepo::before {
	content: "";
	width: 2.2rem;
	height: 2.2rem;
	flex: none;
	background: url("assets/images/logo-zeichen.svg") center / contain no-repeat;
}

/* Noch kein Amazon-Link: ruhiger Hinweis „Demnächst bei Amazon“ statt Kaufen-Button */
.pd-amazon.pd-amazon-bald .wp-block-button__link,
.pd-karte:hover .pd-amazon.pd-amazon-bald .wp-block-button__link {
	background-color: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--akzent-dunkel);
	border: 2px dashed var(--wp--preset--color--sand-dunkel);
	box-shadow: none;
	cursor: default;
	transform: none;
	justify-content: center;
}
.pd-amazon.pd-amazon-bald .wp-block-button__link::before { content: none; }
.pd-amazon.pd-amazon-bald .wp-block-button__link::after { content: none !important; animation: none !important; }

/* Hinweis „Ab … erhältlich“ in der Buchbeschreibung */
.pd-erscheint-hinweis {
	display: inline-block;
	background: var(--wp--preset--color--honig);
	color: var(--wp--preset--color--tinte);
	border-radius: 999px;
	padding: .35rem 1rem;
}

/* ---------- Kontaktformular ---------- */
.pd-kontaktformular {
	margin-top: 1.75rem;
	text-align: left;
	background: var(--wp--preset--color--weiss);
	border-radius: 22px;
	padding: clamp(1.25rem, 4vw, 2rem);
	box-shadow: 0 2px 0 var(--wp--preset--color--sand), 0 16px 36px rgba(43, 42, 51, .08);
}
.pd-kontaktformular p { margin: 0 0 1rem; }
.pd-kontakt-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0 1rem; }
.pd-kontaktformular label { display: block; font-weight: 600; margin-bottom: .35rem; }
.pd-kontaktformular input[type="text"],
.pd-kontaktformular input[type="email"],
.pd-kontaktformular textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: .7rem .9rem;
	font: inherit;
	font-size: 1rem;
	color: var(--wp--preset--color--tinte);
	background: var(--wp--preset--color--creme);
	border: 2px solid var(--wp--preset--color--sand-dunkel);
	border-radius: 12px;
}
.pd-kontaktformular textarea { resize: vertical; min-height: 9rem; }
.pd-kontaktformular input:focus,
.pd-kontaktformular textarea:focus {
	outline: 3px solid var(--wp--preset--color--taubenblau);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--taubenblau);
}
.pd-kontakt-zustimmung { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.pd-kontakt-zustimmung input { width: 1.4rem; height: 1.4rem; flex: none; margin-top: .15rem; accent-color: var(--wp--preset--color--akzent-dunkel); }
.pd-kontakt-zustimmung label { font-weight: 400; margin: 0; }
.pd-kontakt-senden { text-align: center; margin-bottom: 0 !important; }
.pd-kontakt-senden button { min-height: 48px; cursor: pointer; border: 0; }
.pd-kontakt-falle { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pd-kontakt-meldung { border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
.pd-kontakt-meldung--danke { background: var(--wp--preset--color--salbei-hell); }
.pd-kontakt-meldung--fehlt,
.pd-kontakt-meldung--fehler { background: #FBE9E3; color: var(--wp--preset--color--akzent-dunkel); }
.pd-kontakt-gesendet .pd-kontakt-zeile,
.pd-kontakt-gesendet .pd-kontakt-zeile ~ p:not(.pd-kontakt-meldung) { display: none; }

/* Newsletter-Formular (nutzt die Gestaltung des Kontaktformulars) */
.pd-newsletterformular { margin-top: 1.5rem; }
.pd-nl-meldung { border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
.pd-nl-meldung--pruefen,
.pd-nl-meldung--bestaetigt,
.pd-nl-meldung--abgemeldet { background: var(--wp--preset--color--salbei-hell); }
.pd-nl-meldung--fehlt,
.pd-nl-meldung--fehler,
.pd-nl-meldung--ungueltig { background: #FBE9E3; color: var(--wp--preset--color--akzent-dunkel); }
