/*
 * Mühldorfer Group – Pre-Header, Footer-Schlusszeile, Impressum-Block.
 * Vorgaben: CI-Guides „PreHeader-Websites“ und „Footer-and-Imprint Websites“.
 * Markup: template-parts/muehldorfer-group/, Einbindung: inc/muehldorfer-group.php
 */

/* Rethink Sans (variabel 400–800, SIL OFL 1.1) – lokal gehostet
---------------------------------------------------------------------------- */

@font-face {
	font-family: "Rethink Sans";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/rethink-sans/RethinkSans-Variable-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Rethink Sans";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/rethink-sans/RethinkSans-Variable-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--mhg-green: #002a18;
	--mhg-preheader-bg: #f9f9f9;
}

.mhg-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Pre-Header
---------------------------------------------------------------------------- */

.mhg-preheader {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	height: 73px;
	margin: 0;
	padding: 0 30px;
	background-color: var(--mhg-preheader-bg);
	color: var(--mhg-green);
	font-family: "Rethink Sans", sans-serif;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.24px;
	line-height: 1.25;
}

/* Abstand der Blöcke (blockGap) nicht zwischen Pre-Header und Header. */
.wp-site-blocks > .mhg-preheader + * {
	margin-block-start: 0;
}

.mhg-preheader__member {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.mhg-preheader__text {
	white-space: nowrap;
	text-align: left;
}

.mhg-preheader a {
	color: inherit;
	text-decoration: none;
}

.mhg-preheader__logo {
	display: block;
	flex: none;
	line-height: 0;
}

.mhg-preheader__logo img {
	display: block;
	width: 185px;
	height: auto;
}

.mhg-preheader__url {
	white-space: nowrap;
	text-align: right;
}

.mhg-preheader__url:hover,
.mhg-preheader__url:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mhg-preheader a:focus-visible {
	outline: 2px solid var(--mhg-green);
	outline-offset: 3px;
}

@media (max-width: 781px) {
	.mhg-preheader {
		padding: 0 20px;
	}
}

/* Schmal: Adresse ausblenden – das Logo verlinkt weiterhin auf die Group. */
@media (max-width: 600px) {
	.mhg-preheader__url {
		display: none;
	}
}

@media (max-width: 359px) {
	.mhg-preheader {
		font-size: 14px;
	}

	.mhg-preheader__logo img {
		width: 150px;
	}
}

/* Footer – Schlusszeile
---------------------------------------------------------------------------- */

.mhg-footer-line {
	border-top: 1px solid rgba(40, 24, 6, 0.12);
}

.mhg-footer-line__inner {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 30px;
	max-width: calc(var(--wp--style--global--wide-size, 1200px) + var(--wp--style--root--padding-left, 30px) + var(--wp--style--root--padding-right, 30px));
	margin: 0 auto;
	padding: 18px var(--wp--style--root--padding-right, 30px) 18px var(--wp--style--root--padding-left, 30px);
	color: var(--wp--preset--color--secondary, #7b6a58);
	font-size: 14px;
	line-height: 1.5;
}

.mhg-footer-line__inner p {
	margin: 0;
}

.mhg-footer-line__inner a {
	color: inherit;
}

.mhg-footer-line__inner a:hover,
.mhg-footer-line__inner a:focus-visible {
	color: var(--wp--preset--color--contrast, #281806);
}

@media (max-width: 600px) {
	.mhg-footer-line__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Impressum – Logo und Zugehörigkeit
---------------------------------------------------------------------------- */

:root .mhg-imprint {
	margin-block-start: var(--wp--preset--spacing--medium, 60px);
	margin-block-end: var(--wp--preset--spacing--small, 40px);
	font-size: 16px;
	line-height: 1.6;
}

.mhg-imprint__logo {
	display: inline-block;
	line-height: 0;
}

.mhg-imprint__logo img {
	display: block;
	width: 300px;
	max-width: 100%;
	height: auto;
}

.mhg-imprint p {
	margin: 0;
}

.mhg-imprint .mhg-imprint__member {
	margin-top: 20px;
	font-weight: 600;
}

.mhg-imprint__member a {
	color: var(--mhg-green);
	text-decoration: none;
}

.mhg-imprint__member a:hover,
.mhg-imprint__member a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.mhg-imprint a:focus-visible {
	outline: 2px solid var(--mhg-green);
	outline-offset: 3px;
}
