/*
Theme Name:   Neve Child – Michael Bunge
Theme URI:    https://michaelbunge.de
Description:  Child-Theme von Neve für michaelbunge.de. Löst das nicht mehr gepflegte Theme „Bow“ ab und bildet dessen Erscheinungsbild nach: Vollbild-Startseite, Vollbild-Menü, Textseiten mit großem Bild, Galerie mit Filterleiste (über das Plugin „celloon Portfolio“).
Author:       celloon (AI supported)
Author URI:   https://celloon.de
Template:     neve
Version:      1.2.4
Requires PHP: 8.0
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  neve-child-michaelbunge
*/

/* ==========================================================================
   1. Grundwerte (überschreiben die Neve-Variablen)
   ========================================================================== */
:root {
	--mb-ink: #000;
	--mb-grey: #a3a3a3;      /* Fließtext-Grau aus Bow */
	--mb-light: #ccc;        /* inaktive Filter */
	--mb-rose: #c98b7d;      /* Akzent (Pfeil Startseite) */
	--mb-frame: #e1e1d4;     /* Passepartout-Ton der Großansicht */
	--mb-track: .3em;
	--mb-side: 50px;         /* Seitenrand Desktop */
	--mb-header-h: 117px;

	--nv-site-bg: #fff;
	--nv-text-color: var(--mb-grey);
	--nv-primary-accent: var(--mb-ink);
	--nv-secondary-accent: var(--mb-ink);
	--bodyfontfamily: "Nunito", Verdana, Geneva, sans-serif;
	--headingsfontfamily: "Nunito", Verdana, Geneva, sans-serif;
	--bodyfontsize: 14px;
	--bodylineheight: 1.6;
}

body {
	font-family: var(--bodyfontfamily);
	font-size: 14px;
	color: var(--mb-grey);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--mb-ink); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Neve-Container auf den eigenen Vorlagen neutralisieren */
.mb-home .neve-main,
.mb-textpage .neve-main,
.mb-gallery .neve-main { padding: 0; }

/* ==========================================================================
   2. Kopfzeile: Logo links, Menü-Symbol rechts
   ========================================================================== */
.header { position: relative; z-index: 1000; background: #fff; }
.mb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--mb-header-h);
	padding: 0 var(--mb-side);
}
.mb-logo { display: inline-block; line-height: 0; }
.mb-logo img { width: 186px; height: auto; max-height: 36px; }

.mb-menu-toggle {
	all: unset;
	cursor: pointer;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	position: relative;
	z-index: 1002;
}
.mb-menu-toggle:focus-visible { outline: 1px solid var(--mb-ink); outline-offset: 4px; }
/* Neve färbt Buttons bei :hover/:focus schwarz ein – hier abschalten */
.mb-header .mb-menu-toggle,
.mb-header .mb-menu-toggle:hover,
.mb-header .mb-menu-toggle:focus,
.mb-header .mb-menu-toggle:active {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	color: inherit !important;
}
.mb-burger { display: block; width: 28px; height: 18px; position: relative; }
.mb-burger span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--mb-grey);
	transition: transform .3s ease, opacity .3s ease, top .3s ease, background .3s ease;
}
.mb-burger span:nth-child(1) { top: 0; }
.mb-burger span:nth-child(2) { top: 8px; }
.mb-burger span:nth-child(3) { top: 16px; }
.mb-menu-toggle:hover .mb-burger span { background: var(--mb-ink); }
.mb-nav-open .mb-burger span { background: var(--mb-ink); }
.mb-nav-open .mb-burger span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.mb-nav-open .mb-burger span:nth-child(2) { opacity: 0; }
.mb-nav-open .mb-burger span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Vollbild-Menü */
.mb-nav {
	position: fixed;
	inset: 0;
	z-index: 1001;
	background: rgba(255, 255, 255, .95);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .3s ease;
}
.mb-nav.is-open { opacity: 1; }
.mb-nav[hidden] { display: none; }
.mb-nav__list { list-style: none; margin: 0; padding: 0; text-align: center; }
.mb-nav__list li { margin: 0; }
.mb-nav__list a {
	display: inline-block;
	padding: 0 10px;
	color: var(--mb-ink);
	font-size: 20px;
	line-height: 80px;      /* Zeilenabstand wie im Original */
	letter-spacing: .5em;
	margin-right: -.5em; /* Sperrung optisch zentrieren */
	text-transform: uppercase;
	text-decoration: none;
	transition: opacity .2s ease;
}
.mb-nav__list a:hover,
.mb-nav__list a:focus-visible { opacity: .5; }
/* Kein Fokusrahmen beim Öffnen per Maus; Tastatur-Fokus bleibt dezent sichtbar */
.mb-nav:focus,
.mb-nav__list a:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.mb-nav__list a:focus-visible { outline: 1px solid var(--mb-light); outline-offset: 6px; box-shadow: none; }
.mb-nav__list .current-menu-item > a { opacity: .45; }
.mb-nav__footer {
	position: absolute;
	bottom: 40px;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 12px;
	letter-spacing: var(--mb-track);
	text-transform: uppercase;
	color: var(--mb-grey);
}
body.mb-nav-open { overflow: hidden; }

/* ==========================================================================
   3. Startseite (Vorlage „Startseite mit Titelbild“)
   ========================================================================== */
.mb-home .header { position: absolute; top: 0; left: 0; right: 0; background: transparent; }
.mb-home .mb-logo { visibility: hidden; }   /* wie bisher: kein Logo auf der Startseite */

.mb-hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 420px;
	background-color: #adb1a0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.mb-hero__text { max-width: 640px; padding: 0 20px; color: var(--mb-ink); }

/* Hochformat (Handy): Titelbild nicht auf die Höhe ziehen, sondern so skalieren, dass der
   Schriftzug mit kleinem Rand links/rechts ganz sichtbar ist. Der Schriftzug belegt in
   TITEL.png (1600 px breit) etwa die mittleren 41 % der Breite → Faktor 1600 / 662 ≈ 2.42.
   Der Hintergrund hat denselben Farbton wie das Bild, Übergänge sind daher unsichtbar. */
@media (max-aspect-ratio: 1/1) {
	.mb-hero {
		background-color: #adb1a0;
		background-size: calc((100vw - 40px) * 2.42) auto;
		background-position: center 45%;
	}
}
.mb-hero__link {
	position: absolute;
	left: 50%;
	bottom: 10%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	color: var(--mb-ink);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .5em;
	font-size: 14px;
	opacity: .35;
	transition: opacity .3s ease;
}
.mb-hero__link span { margin-right: -.5em; }
.mb-hero__link svg { width: 44px; height: 30px; fill: var(--mb-rose); }
.mb-hero__link:hover,
.mb-hero__link:focus-visible { opacity: 1; }

/* Startseite: Hover umgekehrt – Menü-Symbol und „Galerie“ kräftig, beim Darüberfahren heller */
.mb-home .mb-hero__link { opacity: 1; }
.mb-home .mb-hero__link:hover,
.mb-home .mb-hero__link:focus-visible { opacity: .55; }
.mb-home:not(.mb-nav-open) .mb-burger span { background: var(--mb-ink); }
.mb-home:not(.mb-nav-open) .mb-menu-toggle:hover .mb-burger span,
.mb-home:not(.mb-nav-open) .mb-menu-toggle:focus-visible .mb-burger span { background: rgba(0, 0, 0, .45); }

/* ==========================================================================
   4. Textseiten (Vorlage „Textseite mit Bild“)
   Großes Bild, rechts darüber ein weißes, scrollbares Textfeld.
   ========================================================================== */
.mb-text__cover {
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}
.mb-text__panel { background: #fff; }
.mb-text__content {
	font-family: var(--bodyfontfamily);
	font-size: 15px;
	line-height: 1.75;
	color: var(--mb-ink);
	letter-spacing: .02em;
}
/* Inline-Farben aus dem alten Editor-Inhalt vereinheitlichen */
.mb-text__content span[style*="color"] { color: inherit !important; }
.mb-text__content h3 {
	font-size: 30px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: .075em;
	color: var(--mb-ink);
	margin: 0 0 8px;
}
.mb-text__content h4 {
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--mb-ink);
	margin: 1.8em 0 .5em;
}
.mb-text__content p,
.mb-text__content li { color: var(--mb-ink); }
.mb-text__content h4:empty,
.mb-text__content h4:has(> br:only-child) { display: none; }
.mb-text__content p { margin: 0 0 1em; }
.mb-text__content a { color: var(--mb-ink); text-decoration: underline; text-underline-offset: 3px; }
.mb-text__content img { max-width: 100%; height: auto; }
.mb-text__content .alignleft { float: none; display: block; margin: 0 0 1em; }

@media (min-width: 960px) {
	.mb-textpage .neve-main { overflow: hidden; }
	.mb-text__cover {
		position: relative;
		margin: 0 var(--mb-side);
		height: calc(100vh - var(--mb-header-h));
		height: calc(100svh - var(--mb-header-h));
		min-height: 480px;
	}
	/* Seiten ohne Beitragsbild (z. B. Datenschutz): schlichte, normal scrollende Textspalte */
	.mb-text:not(.has-image) .mb-text__cover { height: auto; min-height: 0; background: #fff; }
	.mb-text:not(.has-image) .mb-text__panel {
		position: static;
		max-width: 760px;
		margin: 0 auto;
		padding: 30px 0 80px;
		overflow: visible;
	}
	.mb-text:not(.has-image) .mb-text__content { max-width: none; }
	.mb-text__panel {
		position: absolute;
		top: 50px;
		bottom: 50px;
		left: 50%;
		right: 0;
		padding: 50px 30px 50px 50px;
		overflow-y: auto;
		scrollbar-width: thin;
		scrollbar-color: #bbb transparent;
	}
	.mb-text__content { max-width: 520px; }
}

@media (max-width: 959px) {
	/* Bow hat das Bild mobil ausgeblendet – hier bleibt es als Bildstreifen oben erhalten */
	.mb-text__cover { background-size: 0 0; }
	.mb-text.has-image .mb-text__cover::before {
		content: "";
		display: block;
		height: 38vh;
		margin: 0 20px 30px;
		background: inherit;
		background-size: cover;
	}
	.mb-text__panel { padding: 0 20px 50px; }
}

/* ==========================================================================
   5. Galerie (Vorlage „Galerie (Portfolio)“, Raster aus dem Plugin)
   ========================================================================== */
.mb-gallery-wrap {
	position: relative;
	padding: 0 var(--mb-side) 50px;
}
.celloon-portfolio {
	--cp-muted: var(--mb-grey);   /* wie die Linien des Menü-Symbols */
	--cp-hover: #555;
	--cp-ink: var(--mb-ink);
	--cp-track: var(--mb-track);
	--cp-gap: 25px;
	--cp-frame: var(--mb-frame);
}
.cp-filter button { font-size: 14px; line-height: 18px; }
.cp-lightbox { font-family: var(--bodyfontfamily); }

.mb-credit {
	display: block;
	margin-top: 30px;
	font-size: 12px;
	letter-spacing: var(--mb-track);
	text-transform: uppercase;
	color: var(--mb-grey);
	text-decoration: none;
}
.mb-credit:hover { color: var(--mb-ink); }

@media (min-width: 960px) {
	.mb-gallery .celloon-portfolio.has-filter { grid-template-columns: 200px 1fr; gap: 0 50px; }
	.mb-gallery .cp-filter { top: calc(var(--mb-header-h) + 0px); }
	.mb-credit {
		position: fixed;
		left: var(--mb-side);
		bottom: 50px;
		width: 200px;
		margin: 0;
	}
}

/* ==========================================================================
   6. Mobil
   ========================================================================== */
@media (max-width: 959px) {
	:root { --mb-side: 20px; --mb-header-h: 90px; }
	.mb-nav__list a { font-size: 16px; line-height: 54px; letter-spacing: .35em; margin-right: -.35em; padding: 0 10px; }
}
