/*
 * Duftzweck Editorial – content.css (Beiträge, Seiten, Plugin-Ansichten)
 *
 * Lesetypografie für .entry-content, Tabellen, Listen, Kommentare,
 * Autorenbox, verwandte Beiträge.
 *
 * Wichtig
 * -------
 * - Element-Regeln innerhalb von .entry-content stehen in :where(…) und haben
 *   damit Spezifität 0: Jede Klassenregel eines Plugins (Duft-Finder,
 *   Inhaltsverzeichnis, Formulare, Kadence, Spectra) gewinnt automatisch.
 * - Keine Regeln für iframe, keine Abstände per ".entry-content > *":
 *   Von Mediavine eingefügte Elemente bleiben unberührt.
 * - Listen bleiben einspaltige Blockelemente (kein flex/grid/columns, kein
 *   overflow auf ul/li): Anzeigen werden auch innerhalb langer Listen eingefügt.
 */

/* ---------- Artikelkopf ---------- */
.entry-header {
	margin-bottom: clamp(18px, 3vw, 28px);
}

.entry-header .entry-title {
	margin: 0 0 0.35em;
	font-size: clamp(1.8125rem, 1.25rem + 2.6vw, 2.75rem);
	line-height: 1.14;
	letter-spacing: -0.005em;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 0;
	font-size: 0.9375rem;
	color: var(--dze-muted);
}

.entry-meta .posted-on {
	display: contents;
}

.entry-meta .dze-meta__item:not(:last-child)::after,
.entry-meta .byline:not(:last-child) .dze-meta__item::after {
	content: "·";
	margin: 0 0.55em;
	color: var(--dze-champagne-ink);
}

.entry-meta a {
	color: var(--dze-ink);
	font-weight: 600;
}

.featured-image {
	margin: 0 0 clamp(20px, 3vw, 32px);
}

.featured-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--dze-radius);
}

.rank-math-breadcrumb,
.dze-breadcrumbs {
	margin-bottom: 14px;
	font-size: 0.875rem;
	color: var(--dze-muted);
}

.rank-math-breadcrumb p {
	margin: 0;
}

/* ---------- Lesetypografie ---------- */
.entry-content {
	font-size: 1.125rem; /* 18 px */
	line-height: 1.7;
	overflow-wrap: break-word;
}

@media (min-width: 1200px) {
	.single .entry-content,
	.page:not(.home) .entry-content {
		font-size: 1.1875rem; /* 19 px bei 748 px Spaltenbreite */
	}
}

:where(.entry-content) :where(p, ul, ol, dl, blockquote, pre, figure, table, details) {
	margin-top: 0;
	margin-bottom: 1.35em;
}

:where(.entry-content) :where(h2, h3, h4, h5, h6) {
	margin: 1.9em 0 0.55em;
	/* Sprungziele (Inhaltsverzeichnis) nicht am oberen Rand kleben lassen. */
	scroll-margin-top: 20px;
}

:where(.entry-content) :where(h2 [id], h3 [id], h4 [id]) {
	scroll-margin-top: 20px;
}

:where(.entry-content) h2 {
	padding-top: 0.85em;
	border-top: 1px solid var(--dze-line);
	font-size: clamp(1.5rem, 1.25rem + 1.1vw, 1.875rem);
}

:where(.entry-content) h3 {
	font-size: clamp(1.25rem, 1.12rem + 0.6vw, 1.4375rem);
}

:where(.entry-content) h4 {
	font-family: var(--dze-sans);
	font-size: 1.125rem;
	font-weight: 700;
}

:where(.entry-content) :where(h5, h6) {
	font-family: var(--dze-sans);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--dze-muted);
}

:where(.entry-content) > :where(h2, h3, h4):first-child {
	margin-top: 0;
}

:where(.entry-content) :where(h2, h3, h4) a {
	text-decoration-color: var(--dze-champagne);
}

:where(.entry-content) :where(strong, b) {
	font-weight: 700;
}

/* ---------- Listen: gut scanbar, aber strukturell unverändert ---------- */
:where(.entry-content) :where(ul, ol) {
	padding-left: 1.3em;
}

:where(.entry-content) :where(li) {
	margin: 0.42em 0;
	padding-left: 0.2em;
}

:where(.entry-content) :where(ul > li)::marker {
	color: var(--dze-champagne-ink);
}

:where(.entry-content) :where(ol > li)::marker {
	color: var(--dze-champagne-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

:where(.entry-content) :where(li > ul, li > ol) {
	margin-bottom: 0.4em;
}

/* ---------- Tabellen ---------- */
/*
 * Block-Tabellen stecken in <figure class="wp-block-table">: Nur dieser
 * Wrapper scrollt horizontal, nie die ganze Seite. Die Tabellen-Semantik
 * (thead/th/td) bleibt unangetastet – kein display:block auf table.
 */
.entry-content .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

:where(.entry-content) :where(table) {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375em;
	line-height: 1.5;
}

:where(.entry-content) :where(th, td) {
	padding: 0.65em 0.8em;
	border: 1px solid var(--dze-line);
	text-align: left;
	vertical-align: top;
	overflow-wrap: break-word;
	hyphens: auto;
}

:where(.entry-content) :where(thead th) {
	background: var(--dze-accent-soft);
	border-bottom: 2px solid var(--dze-champagne);
	font-family: var(--dze-sans);
	font-size: 0.875em;
	letter-spacing: 0.03em;
	color: var(--dze-ink);
}

/* Der Tabellen-Block des Kerns setzt eigene Rahmen (currentColor, 3 px unter dem Kopf) – hier dezent angleichen. */
.entry-content .wp-block-table :is(th, td) {
	border-color: var(--dze-line);
}

.entry-content .wp-block-table thead {
	border-bottom: 2px solid var(--dze-champagne);
}

.entry-content .wp-block-table tfoot {
	border-top: 2px solid var(--dze-champagne);
}

:where(.entry-content) :where(tbody tr:nth-child(even)) {
	background: rgba(255, 255, 255, 0.55);
}

:where(.entry-content) :where(.wp-block-table figcaption, .wp-element-caption, figcaption) {
	margin-top: 0.6em;
	font-size: 0.875rem;
	color: var(--dze-muted);
	text-align: left;
}

/* ---------- Weitere Inhaltselemente ---------- */
:where(.entry-content) :where(img) {
	border-radius: var(--dze-radius-sm);
}

:where(.entry-content) :where(blockquote) {
	margin-left: 0;
	margin-right: 0;
	padding: 0.2em 0 0.2em 1.1em;
	border-left: 3px solid var(--dze-champagne);
	font-family: var(--dze-serif);
	font-size: 1.08em;
}

:where(.entry-content) :where(blockquote > :last-child) {
	margin-bottom: 0;
}

:where(.entry-content) :where(pre) {
	max-width: 100%;
	padding: 1em;
	overflow-x: auto;
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius-sm);
	font-size: 0.875em;
}

:where(.entry-content) :where(hr) {
	height: 1px;
	margin: 2em 0;
	border: 0;
	background: var(--dze-line);
}

:where(.entry-content) :where(.wp-block-button__link, .wp-element-button) {
	background-color: var(--dze-accent);
	color: #fff;
	border-radius: var(--dze-radius-sm);
	font-weight: 600;
}

:where(.entry-content) :where(.alignwide, .alignfull) {
	max-width: 100%;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

/* Inhaltsverzeichnis (LuckyWP): nur Rahmen und Fläche angleichen, Funktion bleibt beim Plugin. */
.entry-content .lwptoc .lwptoc_i {
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
	background: var(--dze-paper);
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 2em 0 0;
	font-weight: 600;
}

.page-links .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius-sm);
	background: var(--dze-paper);
	text-decoration: none;
}

.page-links .post-page-numbers.current {
	background: var(--dze-accent);
	border-color: var(--dze-accent);
	color: #fff;
}

/* ---------- Artikelfuß ---------- */
.entry-footer {
	margin-top: 2em;
	padding-top: 1em;
	border-top: 1px solid var(--dze-line);
	font-size: 0.9375rem;
	color: var(--dze-muted);
}

.entry-footer p {
	margin: 0 0 0.3em;
}

.dze-label {
	font-weight: 700;
	color: var(--dze-ink);
}

/* ---------- Autorenbox ---------- */
.dze-author {
	display: flex;
	gap: 18px;
	margin-top: 36px;
	padding: 20px;
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
}

.dze-author__avatar {
	flex: none;
}

.dze-author__avatar img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.dze-author__body {
	min-width: 0;
}

.dze-author__label {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dze-champagne-ink);
}

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

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

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

.dze-author__bio {
	font-size: 0.9688rem;
	color: var(--dze-muted);
}

.dze-author__bio > :last-child {
	margin-bottom: 0;
}

/* ---------- Verwandte Beiträge ---------- */
.dze-related {
	margin-top: 48px;
}

.dze-related .dze-section__title {
	margin-bottom: 18px;
}

.dze-related .dze-card__title {
	font-size: 1.0625rem;
}

/* ---------- Vor/Zurück ---------- */
.post-navigation {
	margin-top: 40px;
}

.post-navigation .nav-links {
	display: grid;
	gap: 12px;
}

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

	.post-navigation .nav-next {
		grid-column: 2;
		text-align: right;
	}
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 14px 16px;
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
	background: var(--dze-paper);
	text-decoration: none;
}

.post-navigation a:hover {
	border-color: var(--dze-accent);
}

.dze-postnav__label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dze-champagne-ink);
}

.dze-postnav__title {
	display: block;
	margin-top: 2px;
	font-family: var(--dze-serif);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--dze-ink);
}

/* ---------- Kommentare ---------- */
.comments-area {
	margin-top: 48px;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-left: clamp(12px, 4vw, 32px);
}

.dze-comment__body {
	margin: 0 0 16px;
	padding: 16px 18px;
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
}

.dze-comment__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin-bottom: 8px;
	font-size: 0.9375rem;
}

.dze-comment__meta .avatar {
	border-radius: 50%;
}

.dze-comment__date {
	color: var(--dze-muted);
	font-size: 0.875rem;
}

.dze-comment__content {
	overflow-wrap: break-word;
}

.dze-comment__content > :last-child {
	margin-bottom: 0;
}

.dze-comment__pending {
	font-style: italic;
	color: var(--dze-muted);
}

.comments-area .reply {
	margin-top: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
}

.comment-respond {
	margin-top: 32px;
	padding: clamp(18px, 3vw, 28px);
	background: var(--dze-paper);
	border: 1px solid var(--dze-line);
	border-radius: var(--dze-radius);
}

.comment-reply-title {
	margin: 0 0 0.4em;
	font-size: 1.5rem;
}

.comment-reply-title small {
	margin-left: 10px;
	font-family: var(--dze-sans);
	font-size: 0.875rem;
	font-weight: 400;
}

.comment-notes,
.logged-in-as {
	font-size: 0.9375rem;
	color: var(--dze-muted);
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9375rem;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #8d806c;
	border-radius: var(--dze-radius-sm);
	background: #fff;
	color: var(--dze-ink);
	font: inherit;
	font-size: 1rem;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.comment-form .comment-form-cookies-consent input {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 3px;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-form .form-submit {
	margin: 0;
}

.comment-form .submit {
	min-height: 46px;
	padding: 8px 22px;
	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;
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--dze-accent-dark);
	border-color: var(--dze-accent-dark);
}

/* Schmale Bildschirme: Meta-Angaben untereinander statt mit Trennpunkten. */
@media (max-width: 600px) {
	.entry-meta {
		flex-direction: column;
	}

	.entry-meta .dze-meta__item::after {
		content: none !important;
	}
}
