/* Medien.Bayern Autoren (12022) — byline, author box, profile head.
   Typography and colors inherit from the theme; only layout and quiet accents here. */

:root {
	--mb-author-line: rgba(0, 0, 0, 0.12);
	--mb-author-muted: rgba(0, 0, 0, 0.62);
	--mb-author-chip: rgba(0, 0, 0, 0.05);
	--mb-author-gap: 24px;
}

/* Old hand-written byline column inside the WPBakery content: replaced by the profile. */
.mb-has-author .wpb_text_column.author {
	display: none !important;
}

/* ---- Avatar ---------------------------------------------------------- */
.mb-author-avatar {
	display: block;
	border-radius: 0;
	max-width: none;
	object-fit: cover;
	background: var(--mb-author-chip);
	flex: 0 0 auto;
}
/* Author box photo: at least as tall as the text block beside it (name + function + link ≈ 118px) */
.mb-author-avatar--s { width: 120px; height: 120px; }
.mb-author-avatar--l { width: 160px; height: 160px; }

.mb-author-avatar--initials {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: var(--mb-author-muted);
	letter-spacing: 0.02em;
}
.mb-author-avatar--s.mb-author-avatar--initials { font-size: 22px; }
.mb-author-avatar--l.mb-author-avatar--initials { font-size: 48px; }

/* Organizations: logo, not cropped to a circle */
.mb-author-box--organization .mb-author-avatar,
.mb-author-head--organization .mb-author-avatar {
	border-radius: 0;
	object-fit: contain;
	background: transparent;
}

/* ---- Byline (bottom info row) ---------------------------------------- */
/* "Von" stays for screen readers and crawlers, visually hidden (name chip only) */
.mb-author-byline__label {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap;
}
.mb-author-byline__link { text-decoration: none; }
.mb-author-byline__link:hover,
.mb-author-byline__link:focus-visible { text-decoration: none !important; }
.mb-author-byline__link { text-decoration: none !important; }
/* Name chip and date chip on one line, vertically centered */
.mb-has-author .qodef-info--bottom .qodef-e-info-left { align-items: center; }
/* Same type size as the date item (otherwise body 22/36px shifts the name chip down) */
.medienbayern .qodef-e-info-item.mb-author-byline {
	/* mirrors the child theme scale of .qodef-e-info-date (20-layout-1/-2.css) */
	font-size: calc(12px + (18 - 12) * ((100vw - 1001px) / (1968 - 1001)) * var(--scalefactor-font-size, 1));
	line-height: calc((16px + (24 - 16) * ((100vw - 1001px) / (1968 - 1001))) * var(--scalefactor-line-height, 1));
}
@media (min-width: 1968px) {
	.medienbayern .qodef-e-info-item.mb-author-byline { font-size: calc(18px * var(--scalefactor-font-size, 1)); line-height: calc(24px * var(--scalefactor-line-height, 1)); }
}
@media (max-width: 1000px) {
	.medienbayern .qodef-e-info-item.mb-author-byline { font-size: calc(10px + (12 - 10) * ((100vw - 769px) / (1000 - 769)) * var(--scalefactor-font-size, 1)); line-height: calc((14px + (16 - 14) * ((100vw - 769px) / (1000 - 769))) * var(--scalefactor-line-height, 1)); }
}
@media (max-width: 768px) {
	.medienbayern .qodef-e-info-item.mb-author-byline { font-size: calc(10px * var(--scalefactor-font-size, 1)); line-height: calc(14px * var(--scalefactor-line-height, 1)); }
}

/* ---- Author box below the post --------------------------------------- */
.mb-author-box {
	display: flex;
	align-items: center;
	gap: var(--mb-author-gap);
	margin: 96px 0 0;
	padding: 24px 0;
	border-top: 3px solid var(--mb-author-line);
	border-bottom: 3px solid var(--mb-author-line);
}
.mb-author-box__media { line-height: 0; }
.mb-author-box__body p { margin: 0; }
.mb-author-box__name { font-weight: 700; font-size: 1.1em; }
.mb-author-box__name a { text-decoration: none; color: inherit; }
.mb-author-box__role { color: var(--mb-author-muted); margin-top: 2px !important; }
.mb-author-box__more { margin-top: 8px !important; font-size: 0.9em; }

/* ---- Profile head on /autor/<slug>/ ---------------------------------- */
.mb-author-head {
	display: flex;
	align-items: flex-start;
	gap: 40px;
	margin: 0 0 48px;
	max-width: 960px;
}
.mb-author-head__name { margin: 0 0 8px; }
/* Same look as the theme page titles (uppercase, 500, dark blue); body/h1 prefix beats the theme h1 rules */
body .mb-author-head h1.mb-author-head__name { font-size: clamp(32px, 3.3vw, 64px); line-height: 1.3; font-weight: 500; text-transform: uppercase; color: var(--mb-bluedark, #1c345e); margin: 0 0 12px; }
/* The name is the H1 inside the profile head (next to the photo); hide the title-area H1 of the theme */
body.mb-author-profile .qodef-page-title .qodef-m-title { display: none; }
/* Photo column must not shrink (otherwise the image is squeezed to a sliver) */
.mb-author-head__media,
.mb-author-box__media { flex: 0 0 auto; line-height: 0; }
/* Page title (H1) flush with the text column next to the photo: photo 160px + gap 40px */
@media (min-width: 681px) {
	/* body. raises specificity above the child theme rule .medienbayern .qodef-page-title .qodef-m-title */
	/* (name moved into the profile head next to the photo, see below) */
}
.mb-author-head__body > :first-child { margin-top: 0; }
.mb-author-head__role { margin: 0 0 20px; color: var(--mb-author-muted); font-size: 1.1em; }
.mb-author-head__bio p { margin: 0 0 12px; }
.mb-author-head__principles { margin: 4px 0 0; font-weight: 600; }
.mb-author-head__principles a { color: var(--mb-bluedark, #1c345e); text-decoration: none; }
/* Arrow = theme icon (elegant icons arrow_carrot-right, as in the pagination) */
.mb-author-head__principles .qodef-icon-elegant-icons,
.mb-principles-link .qodef-icon-elegant-icons { margin-left: 2px; vertical-align: -0.12em; }
/* Arrow vertically centred to the text */
.mb-principles-link,
.mb-author-head__principles a { display: inline-flex; align-items: baseline; gap: 6px; }
.mb-principles-link .qodef-icon-elegant-icons,
.mb-author-head__principles a .qodef-icon-elegant-icons { margin: 0; vertical-align: middle; line-height: 1; transform: translateY(0.36em); }
/* The theme glyph ">" (MediaSquareCode03 at 2x size) sits on the baseline with its ink twice the cap height:
   baseline alignment + 0.36em shift puts its centre on the centre of the capitals */
/* Plugin links never underlined (also not on hover) */
.mb-principles-link, .mb-principles-link:hover, .mb-principles-link:focus,
.mb-author-head__principles a:hover, .mb-author-head__principles a:focus,
.mb-author-box__name a:hover, .mb-author-box__more a, .mb-author-box__more a:hover, .mb-author-box__more a:focus,
.mb-author-grid__link:hover, .mb-author-grid__link:focus { text-decoration: none !important; }
.mb-principles-link { font-weight: 600; color: var(--mb-bluedark, #1c345e); }

.mb-author-head__topics,
.mb-author-head__links {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.mb-author-head__topics li {
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--mb-author-chip);
	font-size: 0.85em;
}
.mb-author-head__links li { margin: 0; }
.mb-author-head__links a {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--mb-author-line);
	border-radius: 999px;
	font-size: 0.85em;
	text-decoration: none;
}
.mb-author-head__links a:hover,
.mb-author-head__links a:focus-visible { background-color: var(--mb-bluedark, #1c345e); border-color: var(--mb-bluedark, #1c345e); color: var(--mb-white, #fff); text-decoration: none; }

/* Profile links: same shape as the theme's outlined button (.qodef-button.qodef-layout--outlined), neutral color */
.mb-author-head__links a {
	padding: 4px 14px;
	border: 3px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 18px;
	font-weight: 600;
	line-height: 36px;
	text-transform: uppercase;
	transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.mb-author-posts-title { margin: 0 0 24px; }

/* ---- Grid element [mb_author_grid] ----------------------------------- */
.mb-author-avatar--m { width: 180px; height: 180px; }
.mb-author-avatar--m.mb-author-avatar--initials { font-size: 36px; }

.mb-author-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px var(--mb-author-gap);
}
.mb-author-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mb-author-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mb-author-grid__item { margin: 0; }
.mb-author-grid__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
}
.mb-author-grid__link .mb-author-avatar { margin-bottom: 10px; }
.mb-author-grid__item--organization .mb-author-avatar { border-radius: 0; object-fit: contain; background: transparent; }
.mb-author-grid__name { font-weight: 700; }
.mb-author-grid__role { color: var(--mb-author-muted); font-size: 0.9em; }
.mb-author-grid__link:hover .mb-author-grid__name,
.mb-author-grid__link:focus-visible .mb-author-grid__name { text-decoration: none; }

/* Cards analog to the team-lead cards on the initiative pages, laid out horizontally:
   dark blue panel, photo left, function (white) above name (light blue, bold), 24px padding, left aligned */
.mb-author-grid,
.mb-author-grid--cols-2,
.mb-author-grid--cols-3,
.mb-author-grid--cols-4 { grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr)); gap: 24px; }
.mb-author-grid__item { display: flex; }
.mb-author-grid__link {
	flex: 1 1 auto;
	flex-direction: row;
	align-items: stretch;
	text-align: left;
	gap: 0;
	background: var(--mb-bluedark, #1c345e);
	color: var(--mb-white, #fff);
}
.mb-author-grid__link .mb-author-avatar { margin: 0; }
.mb-author-grid__text { display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 24px; min-width: 0; }
.mb-author-grid__role { order: -1; color: var(--mb-white, #fff); font-size: 22px; line-height: 36px; font-weight: 400; }
.mb-author-grid__role,
.mb-author-grid__name { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: break-word; } /* no auto hyphenation (splits proper names like "Media Lab"); break only words that do not fit */
.mb-author-grid__name { color: var(--mb-bluelight, #9bd5e8); font-size: 26px; line-height: 35px; font-weight: 700; }
.mb-author-grid__link:hover .mb-author-grid__name,
.mb-author-grid__link:focus-visible .mb-author-grid__name { color: var(--mb-white, #fff); }

@media (max-width: 1024px) {
	/* cards: column count comes from auto-fill (min 480px per card) */
}
@media (max-width: 680px) {
	.mb-author-grid,
	.mb-author-grid--cols-3,
	.mb-author-grid--cols-4 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.mb-author-grid__text { padding: 16px; }
	.mb-author-grid__role { font-size: 16px; line-height: 1.35; }
	.mb-author-grid__name { font-size: 20px; line-height: 1.25; }
	.mb-author-avatar--m { width: 120px; height: 120px; }
}

/* ---- Mobile ---------------------------------------------------------- */
@media (max-width: 680px) {
	/* Mobile profile head: photo + function side by side, bio/topics/links full width below */
	.mb-author-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; row-gap: 0; align-items: center; margin-top: 16px; }
	.mb-author-head__body { display: contents; }
	.mb-author-head__media { grid-column: 1; grid-row: 1 / span 2; }
	.mb-author-head__name { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 4px; }
	.mb-author-head__role { grid-column: 2; grid-row: 2; align-self: start; margin: 0; }
	.mb-author-head:not(:has(.mb-author-head__media)) .mb-author-head__name,
	.mb-author-head:not(:has(.mb-author-head__media)) .mb-author-head__role,
	.mb-author-head__bio,
	.mb-author-head__topics,
	.mb-author-head__links,
	.mb-author-head__principles { grid-column: 1 / -1; }
	.mb-author-head__bio { margin-top: 20px; }
	body .mb-author-head h1.mb-author-head__name { font-size: 22px; line-height: 1.2; margin: 0 0 6px; }
	body .mb-author-head .mb-author-head__role { font-size: 16px; line-height: 1.35; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: break-word; }
	.mb-author-avatar--l { width: 96px; height: 96px; }
	.mb-author-avatar--l.mb-author-avatar--initials { font-size: 36px; }
	/* Mobile author box: photo beside name + function (≈108px), link full width below */
	.mb-author-box { display: grid; grid-template-columns: 108px minmax(0, 1fr); column-gap: 16px; align-items: center; margin-top: 72px; }
	.mb-author-box__body { display: contents; }
	.mb-author-box__media { grid-column: 1; grid-row: 1 / span 2; }
	.mb-author-box__name { grid-column: 2; grid-row: 1; align-self: end; }
	.mb-author-box__role { grid-column: 2; grid-row: 2; align-self: start; }
	.mb-author-box__more { grid-column: 1 / -1; margin-top: 16px !important; }
	.mb-author-box:not(:has(.mb-author-box__media)) { grid-template-columns: minmax(0, 1fr); }
	.mb-author-box:not(:has(.mb-author-box__media)) .mb-author-box__name,
	.mb-author-box:not(:has(.mb-author-box__media)) .mb-author-box__role { grid-column: 1; }
	.mb-author-avatar--s { width: 108px; height: 108px; }
}
