/**
 * GM Theme – single blog post, templates/single.html.
 *
 * 4.0.4: built like the other article pages (e.g. Biografie): the site's
 * width (1200 px), title centred at the same place as the page titles,
 * category, date and reading time in one line below it, no main image at
 * the top (the original had none), text, headings and captions as in the
 * pages, no dividing lines. Related posts and comments follow below.
 * Works with a Site Editor copy of the template too (CSS only).
 */

.gm-post {
	--gm-post-fg: var(--gm-ink, #1d1d1f);
	--gm-post-soft-fg: var(--gm-ink-soft, #3a3a3c);
	--gm-post-muted: var(--gm-muted, #6e6e73);
	--gm-post-faint: var(--gm-faint, #86868b);
	--gm-post-line: var(--gm-line, #d2d2d7);
	--gm-post-soft: var(--gm-surface, #f5f5f7);
	--gm-post-col: var(--gm-wide, 1200px); /* same width as the pages */
	--gm-post-pad: var(--wp--preset--spacing--50, 1.5rem);

	margin-block-start: 0 !important;
	padding: 0 !important;
	background: none;
	color: var(--gm-post-fg);
}

.gm-post .wp-block-group {
	padding: 0;
	background: none;
}

/* Global styles give every Heading block 2.25rem padding (page content
   relies on it); the post layout sets its own spacing. */
.gm-post :is(.wp-block-heading, .wp-block-post-title) {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* The article column. */
.gm-post :is(.gm-post__head, .gm-post__content, .gm-post__foot, .gm-post__comments) {
	box-sizing: border-box;
	max-width: calc(var(--gm-post-col) + 2 * var(--gm-post-pad));
	margin-inline: auto;
	padding-inline: var(--gm-post-pad);
}

/* ---------- Head ---------- */

/* Title centred right below the header, like the page titles. Below it,
   as in professional magazines (4.0.7): the category as a quiet label,
   date and reading time with small icons. */
.gm-post .gm-post__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.6rem 1.25rem;
	padding-top: 0;
	padding-bottom: clamp(3rem, 6vw, 4.5rem);
	text-align: center;
}

.gm-post .gm-post__head .gm-post__title {
	order: 0;
	flex: 1 0 100%;
	margin: 0 0 0.85rem;
	padding: var(--wp--preset--spacing--40, 1rem) 0 0 !important;
	font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.018em;
	text-align: center;
	text-wrap: balance;
	color: var(--gm-post-fg);
}

/* Category: a small label (link to the category). */
.gm-post .gm-post__kicker {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.gm-post .gm-post__kicker a {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	background: var(--gm-post-soft);
	color: var(--gm-post-fg);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.gm-post .gm-post__kicker a:hover {
	background: #e8e8ed;
	color: var(--gm-post-fg);
}

.gm-post .gm-post__kicker a:focus-visible {
	outline: 2px solid var(--gm-post-fg);
	outline-offset: 2px;
}

.gm-post .gm-post__kicker .wp-block-post-terms__separator {
	display: none;
}

/* Template copies with the category above the title: show it below. */
.gm-post .gm-post__head > .gm-post__kicker {
	order: 1;
}

.gm-post .gm-post__meta {
	order: 2;
	align-items: center;
	gap: 0.6rem 1.25rem;
	justify-content: center !important;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--gm-post-muted);
}

.gm-post .gm-post__meta > * {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: 400;
	color: inherit;
}

/* Small icons: calendar at the date, clock at the reading time. */
.gm-post .gm-post__meta > :is(.gm-post__date, .gm-post__read)::before {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	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='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4'/%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='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gm-post .gm-post__meta > .gm-post__read::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}

.gm-post .gm-post__meta > :empty {
	display: none;
}

/* Phones: the category label on its own line above date and reading time. */
@media (max-width: 599.98px) {

	.gm-post .gm-post__meta > .gm-post__kicker {
		flex-basis: 100%;
		justify-content: center;
	}
}

/* No main image at the top (also when a template copy still has it). */
.gm-post .gm-post__hero {
	display: none;
}

/* ---------- Text and article content ---------- */

/* Text as in the pages (body size, typography.css line height). */
.gm-post .gm-post__content {
	font-size: var(--wp--preset--font-size--medium, 1rem);
	line-height: 1.7;
	color: var(--gm-post-fg);
}

/* Everything inside the article uses the column width – no break-outs. */
.gm-post .gm-post__content > *,
.gm-post .gm-post__content > .alignwide,
.gm-post .gm-post__content > .alignfull {
	max-width: none !important;
	width: auto;
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-top: 0;
	margin-bottom: 0;
}

.gm-post .gm-post__content > p {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-bottom: 1.35em;
	font-size: inherit !important;
}

/* Headings: sizes and alignment as in the pages (typography.css). */
.gm-post .gm-post__content > :is(h2, h3, h4, h5, h6) {
	margin-top: 2.4em;
	margin-bottom: 0.75em;
	padding: 0 !important;
}

/* Photos, image rows, galleries: full column width, calm spacing. */
.gm-post .gm-post__content > :is(.wp-block-image, .wp-block-columns, .wp-block-gallery, .wp-block-cover, .wp-block-video, .wp-block-embed, .gm-gallery, .wp-block-gm-gallery, [class*="gutenslider"], [class*="carousel"], figure) {
	margin-top: 2.25rem;
	margin-bottom: 2.25rem;
}

.gm-post .gm-post__content .wp-block-image {
	margin-left: 0;
	margin-right: 0;
}

.gm-post .gm-post__content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Image rows (Columns block with images): even gap as in the pages. */
.gm-post .gm-post__content > .wp-block-columns {
	gap: 1rem !important;
	padding: 0 !important;
}

.gm-post .gm-post__content > .wp-block-columns > .wp-block-column {
	padding: 0 !important;
}

.gm-post .gm-post__content > .wp-block-columns .wp-block-image {
	margin: 0;
}

/* Images side by side get the same height (cropped evenly). */
.gm-post .gm-post__content > .wp-block-columns:has(.wp-block-image) {
	align-items: stretch;
}

.gm-post .gm-post__content > .wp-block-columns:has(> .wp-block-column > .wp-block-image:only-child) > .wp-block-column > .wp-block-image,
.gm-post .gm-post__content > .wp-block-columns:has(> .wp-block-column > .wp-block-image:only-child) > .wp-block-column > .wp-block-image img {
	height: 100%;
}

.gm-post .gm-post__content > .wp-block-columns:has(> .wp-block-column > .wp-block-image:only-child) > .wp-block-column > .wp-block-image img {
	object-fit: cover;
}

/* Captions: small and centred below the photo, as in the pages. */
.gm-post .gm-post__content figcaption,
.gm-post .gm-post__content .wp-element-caption {
	margin: 0.65rem 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
	text-align: center;
}

/* Caption paragraphs below photos: close to the photo. */
.gm-post .gm-post__content > :is(.wp-block-columns, .wp-block-image, .wp-block-gallery) + p.has-text-align-center {
	margin-top: -1.6rem;
	margin-bottom: 2.25rem;
	font-size: 0.875rem !important; /* a little smaller than the text (4.0.7) */
	line-height: 1.5;
}

.gm-post .gm-post__content a:not(.wp-element-button) {
	color: inherit;
	overflow-wrap: anywhere; /* long source links on phones (4.0.1) */
}

.gm-post .gm-post__content > blockquote,
.gm-post .gm-post__content > .wp-block-quote,
.gm-post .gm-post__content > .wp-block-pullquote {
	margin-top: 2.25rem;
	margin-bottom: 2.25rem;
	padding: 0 0 0 1.25rem;
	border-left: 1px solid var(--gm-post-fg);
	font-size: 1.1875rem;
	font-style: normal;
	line-height: 1.6;
	color: var(--gm-post-soft-fg);
}

.gm-post .gm-post__content > :is(ul, ol) {
	margin-bottom: 1.35em;
	padding-left: 1.25em;
}

.gm-post .gm-post__content > :is(ul, ol) li + li {
	margin-top: 0.35em;
}

/* ---------- Tags + previous / next ---------- */

.gm-post .gm-post__foot {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.gm-post .gm-post__tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0 0 2.5rem;
	padding: 0;
	font-size: 0.8125rem;
}

.gm-post .gm-post__tags a {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--gm-post-line);
	border-radius: 999px;
	color: var(--gm-post-muted);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.gm-post .gm-post__tags a:hover {
	border-color: var(--gm-post-fg);
	color: var(--gm-post-fg);
}

.gm-post .gm-post__tags .wp-block-post-terms__separator {
	display: none;
}

.gm-post .gm-post__nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	padding-top: 0.5rem;
}

.gm-post .gm-post__nav > div {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin: 0;
	font-size: var(--gm-fs-base, 1rem);
}

.gm-post .gm-post__next {
	grid-column: 2;
	justify-content: flex-end;
	text-align: right;
}

.gm-post .gm-post__nav a {
	display: block;
	color: var(--gm-post-fg);
	text-decoration: none;
	font-weight: 500;
	line-height: 1.4;
}

.gm-post .gm-post__nav a:hover .post-navigation-link__title {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.gm-post .gm-post__nav .post-navigation-link__label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: var(--gm-fs-xs, 0.75rem);
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gm-post-muted);
}

.gm-post .gm-post__nav .wp-block-post-navigation-link__arrow-previous,
.gm-post .gm-post__nav .wp-block-post-navigation-link__arrow-next {
	margin: 1.35rem 0 0;
	font-size: 1rem;
	color: var(--gm-post-faint);
}

/* ---------- Related posts ---------- */

.gm-post .gm-related {
	box-sizing: border-box;
	max-width: calc(var(--gm-wide, 1200px) + 2 * var(--gm-post-pad));
	margin: clamp(4.5rem, 9vw, 7rem) auto 0;
	padding: 0 var(--gm-post-pad);
}

/* Centred like "Entdecke weitere …" on the pages (h3 size of the pages). */
.gm-post .gm-related__title {
	margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
	padding: 0;
	border: 0;
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.012em;
	text-align: center;
}

.gm-post .gm-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.5rem var(--gm-gap, 1.5rem);
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gm-post .gm-related__grid > li {
	position: relative;
	min-width: 0;
	margin: 0;
}

.gm-post .gm-related .gm-card__media {
	margin: 0 0 1rem;
	overflow: hidden;
	background: var(--gm-post-soft);
}

.gm-post .gm-related .gm-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gm-post .gm-related__grid > li:hover .gm-card__media img {
	transform: scale(1.03);
}

.gm-post .gm-related .gm-card__title {
	margin: 0 0 0.45rem;
	font-size: var(--gm-fs-md, 1.0625rem);
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.008em;
	text-align: left;
}

.gm-post .gm-related .gm-card__title a {
	color: var(--gm-post-fg);
	text-decoration: none;
}

.gm-post .gm-related .gm-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.gm-post .gm-related__grid > li:hover .gm-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.gm-post .gm-related .gm-card__title a:focus-visible {
	outline: none;
}

.gm-post .gm-related__grid > li:has(.gm-card__title a:focus-visible) {
	outline: 2px solid var(--gm-post-fg);
	outline-offset: 6px;
}

.gm-post .gm-related .gm-card__meta {
	gap: 0 0.5rem;
	font-size: 0.8125rem;
	color: var(--gm-post-faint);
}

.gm-post .gm-related .gm-card__meta > * {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: inherit;
	font-weight: 400;
	color: inherit;
}

.gm-post .gm-related .gm-card__meta > * + *::before {
	content: "·";
}

.gm-post .gm-related .gm-card__meta > :empty {
	display: none;
}

.gm-post .gm-related .gm-card__cat a {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
}

.gm-post .gm-related .gm-card__cat a:hover {
	color: var(--gm-post-fg);
	text-decoration: underline;
}

/* ---------- Comments ---------- */

.gm-post .gm-post__comments {
	margin-top: clamp(3.5rem, 7vw, 5rem);
	padding-bottom: clamp(2rem, 4vw, 3rem);
}

.gm-post .gm-post__comments .wp-block-comments-title,
.gm-post .gm-post__comments .comment-reply-title {
	margin: 0 0 1.25rem;
	padding: 0;
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
}

.gm-post .gm-post__comments .wp-block-post-comments-form {
	padding-top: 0 !important;
	text-align: left !important;
}

/* ---------- Share (assets/js/share.js) ---------- */

.gm-post .gm-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 1.25rem;
	margin: 0 0 2rem;
	font-size: 0.8125rem;
	color: var(--gm-post-faint);
}

.gm-post .gm-share__label {
	margin: 0;
}

.gm-post .gm-share__btn,
.gm-post .gm-share a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--gm-post-soft-fg);
	text-decoration: none;
	cursor: pointer;
}

.gm-post .gm-share__btn:hover,
.gm-post .gm-share a:hover {
	color: var(--gm-post-fg);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.gm-post .gm-share svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.gm-post .gm-share__status {
	color: var(--gm-post-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 1023.5px) {

	.gm-post .gm-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gm-post .gm-related__grid > li:nth-child(3) {
		display: none;
	}
}

@media (max-width: 767.5px) {

	.gm-post .gm-related__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.gm-post .gm-related__grid > li:nth-child(3) {
		display: block;
	}

	.gm-post .gm-post__nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.gm-post .gm-post__next {
		grid-column: 1;
		padding-top: 1rem;
	}

	/* Two photos side by side stay side by side. */
	.gm-post .gm-post__content > .wp-block-columns.is-not-stacked-on-mobile {
		flex-wrap: nowrap !important;
	}
}

@media (prefers-reduced-motion: reduce) {

	.gm-post .gm-related .gm-card__media img {
		transition: none;
	}

	.gm-post .gm-related__grid > li:hover .gm-card__media img {
		transform: none;
	}
}
