/*
 * Duftzweck Editorial – base.css (global)
 *
 * Inhalt: Design-Tokens · Grundlagen · Layout · Kopf · Navigation · Karten ·
 *         Seitennavigation · Formulare des Themes · Seitenleiste · Fuß
 *
 * Regeln für diese Datei
 * ----------------------
 * 1. Komponenten-Styles sind auf .dze-* bzw. die Theme-Container begrenzt.
 *    Keine pauschalen Regeln für button, input, table oder iframe – Plugins
 *    (Duft-Finder, Formulare, Consent, Anzeigen) behalten ihr eigenes Aussehen.
 * 2. Auf #page, #content, #primary, #main, article, .inside-article,
 *    .entry-content, #right-sidebar und .inside-right-sidebar gibt es KEIN
 *    overflow, transform, filter, contain oder position:sticky. Diese Elemente
 *    sind Vorfahren von Anzeigenplätzen (siehe docs/MEDIAVINE.md).
 */

/* ---------- Design-Tokens ---------- */
:root {
	--dze-bg: #faf6ef;          /* warmes Elfenbein */
	--dze-ink: #26222a;         /* Anthrazit mit Pflaumenton – 14.5:1 auf Elfenbein */
	--dze-accent: #5e1f3d;      /* tiefe Pflaume – 11.2:1 auf Elfenbein */
	--dze-champagne: #c7a56a;   /* nur dekorativ (Linien, Marker) */

	/* Abgeleitete Töne; folgen automatisch, wenn die vier Grundfarben im Customizer geändert werden. */
	--dze-paper: #fffdf9;
	--dze-muted: #5f5762;       /* mind. 6.4:1 auf Elfenbein */
	--dze-line: #e6dccb;
	--dze-accent-soft: #f4ebee;
	--dze-accent-dark: #47162d;
	--dze-champagne-ink: #76582e; /* Champagner als Textfarbe – mind. 5.2:1 */

	--dze-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
	--dze-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;

	--dze-radius: 10px;
	--dze-radius-sm: 6px;
	--dze-wrap: 1160px;
	--dze-read: 748px;
	--dze-sidebar: 300px;
	/* Mobil schmal halten: bei 320 px Breite bleiben 300 px für Inhalt und Anzeigen. */
	--dze-gutter: max(10px, min(4.4vw - 4px, 28px));

	/* Kompatibilität: Farbvariablen des bisherigen Themes, falls Inhalte sie nutzen. */
	--contrast: var(--dze-ink);
	--contrast-2: var(--dze-muted);
	--contrast-3: #b5ab9c;
	--base: #efe7d9;
	--base-2: var(--dze-bg);
	--base-3: var(--dze-paper);
	--accent: var(--dze-accent);
}

@supports (color: color-mix(in srgb, red, blue)) {
	:root {
		--dze-paper: color-mix(in srgb, var(--dze-bg) 35%, #fff);
		--dze-muted: color-mix(in srgb, var(--dze-ink) 76%, var(--dze-bg));
		--dze-line: color-mix(in srgb, var(--dze-champagne) 32%, var(--dze-bg));
		--dze-accent-soft: color-mix(in srgb, var(--dze-accent) 7%, var(--dze-bg));
		--dze-accent-dark: color-mix(in srgb, var(--dze-accent) 78%, #000);
		--dze-champagne-ink: color-mix(in srgb, var(--dze-champagne) 52%, #2a1c08);
	}
}

/* Farbklassen des bisherigen Themes (Block-Editor-Palette), damit bestehende Inhalte ihre Auszeichnung behalten. */
.has-contrast-color { color: var(--contrast); }
.has-contrast-2-color { color: var(--contrast-2); }
.has-contrast-3-color { color: var(--contrast-3); }
.has-base-color { color: var(--base); }
.has-base-2-color { color: var(--base-2); }
.has-base-3-color { color: var(--base-3); }
.has-accent-color { color: var(--accent); }
.has-contrast-background-color { background-color: var(--contrast); }
.has-contrast-2-background-color { background-color: var(--contrast-2); }
.has-contrast-3-background-color { background-color: var(--contrast-3); }
.has-base-background-color { background-color: var(--base); }
.has-base-2-background-color { background-color: var(--base-2); }
.has-base-3-background-color { background-color: var(--base-3); }
.has-accent-background-color { background-color: var(--accent); }

/* ---------- Grundlagen ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--dze-bg);
	color: var(--dze-ink);
	font-family: var(--dze-sans);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--dze-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--dze-accent-dark);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--dze-accent);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--dze-serif);
	font-weight: 600;
	line-height: 1.22;
	color: var(--dze-ink);
	margin: 0 0 0.5em;
	/* Lange deutsche Komposita und Produktnamen umbrechen statt die Seite zu sprengen. */
	overflow-wrap: break-word;
	text-wrap: balance;
}

@media (max-width: 480px) {
	h1,
	h2,
	h3 {
		hyphens: auto;
	}
}

p {
	margin: 0 0 1.2em;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 18px;
	clip: auto;
	clip-path: none;
	background: var(--dze-accent);
	color: #fff;
	border-radius: var(--dze-radius-sm);
	text-decoration: none;
}

.dze-icon {
	flex: none;
	vertical-align: middle;
}

/* ---------- Layout ---------- */
.site-content {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: var(--dze-wrap);
	margin-inline: auto;
	padding: clamp(20px, 3.5vw, 40px) var(--dze-gutter) clamp(48px, 7vw, 80px);
}

/* min-width:0 verhindert, dass breite Inhalte (Tabellen, Code, lange Wörter) die Spalte aufdrücken. */
.content-area {
	flex: 1 1 auto;
	min-width: 0;
}

.sidebar {
	flex: none;
	width: 100%;
	max-width: 420px;
	margin-inline: auto;
}

/*
 * Ab 1000 px steht die Seitenleiste neben dem Inhalt (feste 300 px).
 * Der Umbruchpunkt entspricht der Mediavine-Einstellung für Seitenleistenanzeigen
 * dieser Website (sidebar_minimum_width = 1000).
 */
@media (min-width: 1000px) {
	.site-content {
		flex-direction: row;
		gap: clamp(32px, 4vw, 56px);
	}

	.sidebar {
		width: var(--dze-sidebar);
		min-width: var(--dze-sidebar);
		max-width: none;
		margin-inline: 0;
	}
}

/* Ohne Seitenleiste: Lesespalte zentrieren (Beiträge, Seiten, 404). */
.dze-no-sidebar.single .site-main > *,
.dze-no-sidebar.page:not(.home) .site-main > *,
.error404 .site-main > * {
	max-width: var(--dze-read);
	margin-inline: auto;
}

/* ---------- Kopf ---------- */
.site-header {
	background: var(--dze-paper);
	border-bottom: 1px solid var(--dze-line);
}

.dze-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	max-width: var(--dze-wrap);
	margin-inline: auto;
	padding: 10px var(--dze-gutter);
}

.site-branding {
	margin-right: auto;
	min-width: 0;
}

.custom-logo-link {
	display: flex;
	align-items: center;
	min-height: 44px;
	line-height: 0;
}

.custom-logo {
	display: block;
	width: auto;
	max-width: min(200px, 52vw);
	max-height: 44px;
}

.site-title {
	margin: 0;
	font-family: var(--dze-serif);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
}

.site-title a {
	color: var(--dze-ink);
	text-decoration: none;
}

.dze-header__tools {
	display: flex;
	align-items: center;
	gap: 6px;
	order: 2;
}

/* Suche: <details> – funktioniert ohne JavaScript. */
.dze-search {
	position: relative;
}

.dze-search__toggle,
.dze-nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--dze-radius-sm);
	background: none;
	color: var(--dze-ink);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.dze-search__toggle::-webkit-details-marker {
	display: none;
}

.dze-search__toggle:hover,
.dze-nav-toggle:hover,
.dze-search[open] > .dze-search__toggle,
.dze-nav-toggle[aria-expanded="true"] {
	background: var(--dze-accent-soft);
	border-color: var(--dze-line);
	color: var(--dze-accent);
}

.dze-search__panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 50;
	width: min(360px, calc(100vw - 2 * var(--dze-gutter)));
	padding: 12px;
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
	box-shadow: 0 10px 30px rgba(38, 34, 42, 0.12);
}

/* Menü-Schalter gibt es nur mit JavaScript; ohne Skript ist das Menü immer sichtbar. */
.dze-nav-toggle {
	display: none;
}

/* ---------- Navigation ---------- */
.main-navigation {
	order: 3;
	flex: 1 0 100%;
}

.dze-menu,
.dze-menu ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dze-menu a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 6px 4px;
	color: var(--dze-ink);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
}

.dze-menu a:hover,
.dze-menu .current-menu-item > a,
.dze-menu .current-menu-ancestor > a,
.dze-menu .current-post-ancestor > a {
	color: var(--dze-accent);
}

.dze-menu > li {
	border-top: 1px solid var(--dze-line);
}

.dze-menu .sub-menu {
	padding: 0 0 8px 14px;
	border-left: 2px solid var(--dze-champagne);
	margin: 0 0 8px 4px;
}

.dze-menu .sub-menu a {
	min-height: 40px;
	font-weight: 500;
	font-size: 0.9688rem;
}

.dze-sub-toggle {
	display: none;
}

@media (max-width: 899.98px) {
	.js .dze-nav-toggle {
		display: inline-flex;
	}

	.js .main-navigation:not(.is-open) {
		display: none;
	}
}

@media (min-width: 900px) {
	.main-navigation {
		order: 1;
		flex: 0 1 auto;
	}

	.dze-menu {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0 6px;
	}

	.dze-menu > li {
		position: relative;
		display: flex;
		align-items: center;
		border-top: 0;
	}

	.dze-menu > li > a {
		padding: 6px 10px;
		border-radius: var(--dze-radius-sm);
	}

	.dze-menu > li > a:hover {
		background: var(--dze-accent-soft);
	}

	.dze-menu .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 40;
		display: none;
		min-width: 260px;
		margin: 0;
		padding: 8px;
		background: var(--dze-paper);
		border: 1px solid var(--dze-line);
		border-radius: var(--dze-radius);
		box-shadow: 0 10px 30px rgba(38, 34, 42, 0.12);
	}

	.dze-menu li:hover > .sub-menu,
	.dze-menu li:focus-within > .sub-menu,
	.dze-menu li.is-open > .sub-menu {
		display: block;
	}

	.dze-menu .sub-menu a {
		padding: 6px 10px;
		border-radius: var(--dze-radius-sm);
	}

	.dze-menu .sub-menu a:hover {
		background: var(--dze-accent-soft);
	}

	.dze-sub-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 28px;
		height: 44px;
		margin-left: -8px;
		padding: 0;
		border: 0;
		border-radius: var(--dze-radius-sm);
		background: none;
		color: var(--dze-muted);
		cursor: pointer;
	}

	.dze-sub-toggle .dze-icon {
		width: 16px;
		height: 16px;
	}

	.dze-menu li.is-open > .dze-sub-toggle .dze-icon {
		transform: rotate(180deg);
	}
}

/* ---------- Überschriften von Bereichen und Archivseiten ---------- */
.page-header {
	margin-bottom: clamp(20px, 3vw, 32px);
}

.page-title {
	font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
	margin: 0 0 0.3em;
}

.taxonomy-description {
	max-width: 46em;
	color: var(--dze-muted);
}

.taxonomy-description > :last-child {
	margin-bottom: 0;
}

.dze-kicker,
.dze-card__kicker {
	display: inline-block;
	margin: 0 0 10px;
	font-family: var(--dze-sans);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dze-champagne-ink);
	text-decoration: none;
}

a.dze-kicker:hover {
	color: var(--dze-accent);
	text-decoration: underline;
}

.dze-section__title {
	position: relative;
	margin: 0 0 0.2em;
	padding-top: 14px;
	font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
}

.dze-section__title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 2px;
	background: var(--dze-champagne);
}

/* ---------- Karten und Raster ---------- */
.dze-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px 24px;
}

@media (min-width: 600px) {
	.dze-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.dze-grid--3,
	.dze-no-sidebar .dze-grid--archive {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.dze-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
	overflow: hidden;
}

.dze-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--dze-accent-soft);
}

.dze-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dze-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	padding: 16px 18px 18px;
	/* Sehr lange Wörter in Titel und Auszug umbrechen statt abschneiden. */
	overflow-wrap: anywhere;
	hyphens: auto;
}

.dze-card__kicker {
	margin-bottom: 6px;
	font-size: 0.75rem;
}

.dze-card__title {
	margin: 0 0 8px;
	font-size: 1.1875rem;
	line-height: 1.3;
	text-wrap: pretty;
}

.dze-card__title a {
	color: var(--dze-ink);
	text-decoration: none;
}

.dze-card__title a:hover {
	color: var(--dze-accent);
	text-decoration: underline;
}

.dze-card__excerpt {
	margin: 0 0 12px;
	font-size: 0.9688rem;
	line-height: 1.55;
	color: var(--dze-muted);
}

.dze-card__meta {
	margin: auto 0 0;
	padding-top: 4px;
	font-size: 0.8438rem;
	color: var(--dze-muted);
}

/* ---------- Seitennavigation ---------- */
.dze-pagination,
.comments-pagination {
	margin-top: 40px;
}

.dze-pagination .nav-links,
.comments-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dze-pagination .page-numbers,
.comments-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius-sm);
	background: var(--dze-paper);
	color: var(--dze-ink);
	font-weight: 600;
	text-decoration: none;
}

.dze-pagination a.page-numbers:hover,
.comments-pagination a.page-numbers:hover {
	border-color: var(--dze-accent);
	color: var(--dze-accent);
}

.dze-pagination .page-numbers.current,
.comments-pagination .page-numbers.current {
	background: var(--dze-accent);
	border-color: var(--dze-accent);
	color: #fff;
}

.dze-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
	min-width: 24px;
	padding: 0;
}

/* ---------- Formulare und Schaltflächen des Themes ---------- */
.dze-searchform {
	display: flex;
	gap: 8px;
	max-width: 520px;
}

.dze-searchform__input {
	flex: 1;
	min-width: 0;
	min-height: 46px;
	padding: 8px 14px;
	border: 1px solid #8d806c;
	border-radius: var(--dze-radius-sm);
	background: #fff;
	color: var(--dze-ink);
	font: inherit;
	font-size: 1rem;
}

.dze-searchform__button,
.dze-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 8px 18px;
	border: 1px solid var(--dze-accent);
	border-radius: var(--dze-radius-sm);
	background: var(--dze-accent);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.dze-searchform__button:hover,
.dze-button:hover {
	background: var(--dze-accent-dark);
	border-color: var(--dze-accent-dark);
	color: #fff;
}

.dze-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 600;
	white-space: nowrap;
}

.dze-more .dze-icon {
	width: 18px;
	height: 18px;
}

.dze-none__text {
	max-width: 40em;
	font-size: 1.125rem;
}

.dze-none .dze-searchform {
	margin-bottom: 28px;
}

.dze-none .dze-section__title {
	margin: 40px 0 20px;
}

/* ---------- Seitenleiste ---------- */
.inside-right-sidebar > .widget {
	margin: 0 0 28px;
	font-size: 0.9688rem;
}

.widget-title {
	margin: 0 0 12px;
	font-size: 1.125rem;
}

/* Such-Block (WordPress-Kern) in der Seitenleiste an die Markenfarben angleichen. */
.sidebar .wp-block-search__input {
	min-height: 46px;
	border: 1px solid #8d806c;
	border-radius: var(--dze-radius-sm);
	background: #fff;
}

.sidebar .wp-block-search__button {
	min-width: 46px;
	min-height: 46px;
	border: 1px solid var(--dze-accent);
	border-radius: var(--dze-radius-sm);
	background: var(--dze-accent);
	color: #fff;
}

/* ---------- Fuß ---------- */
.site-footer {
	background: var(--dze-ink);
	color: #e9e2d6;
	font-size: 0.9688rem;
}

.site-footer a {
	color: #fff;
}

.dze-footer {
	display: grid;
	gap: 28px 48px;
	max-width: var(--dze-wrap);
	margin-inline: auto;
	padding: 44px var(--dze-gutter) 32px;
}

@media (min-width: 800px) {
	.dze-footer {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr);
	}
}

.dze-footer__name {
	margin: 0 0 6px;
	font-family: var(--dze-serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.dze-footer__name a {
	text-decoration: none;
}

.dze-footer__tagline {
	margin: 0;
	color: #cfc6b8;
}

.dze-footer__widgets .widget {
	margin: 0 0 16px;
}

.dze-footer__widgets p {
	margin: 0 0 0.8em;
	line-height: 1.55;
	color: #cfc6b8;
}

.dze-footer__widgets .widget-title,
.dze-footer__bar .widget-title {
	/* Bestehende Widget-Titel in der Footer-Leiste waren bisher unsichtbar – so bleibt es. */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.dze-footer__menu,
.dze-footer__bar .menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dze-footer__menu a,
.dze-footer__bar .menu a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	text-decoration: none;
}

.dze-footer__menu a:hover,
.dze-footer__bar .menu a:hover {
	text-decoration: underline;
}

.site-info {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-info p {
	max-width: var(--dze-wrap);
	margin: 0 auto;
	/* Unten etwas mehr Luft, damit die Zeile nicht hinter einer fixierten Fußanzeige verschwindet. */
	padding: 16px var(--dze-gutter) 28px;
	font-size: 0.875rem;
	color: #cfc6b8;
}

/*
 * Bewegung: Das Theme verwendet keine Animationen oder Übergänge. Es gibt
 * deshalb bewusst keine pauschale prefers-reduced-motion-Regel mit "*" –
 * sie würde auch Plugin- und Anzeigen-Elemente treffen.
 */
