/* ============================================================
   Malerwerkstaetten Fuell - Header & Footer
   ============================================================ */

:root {
	--fuell-green:       #3a7d2c;
	--fuell-green-hover: #2e6422;
	--fuell-green-light: #e8f4e5;
	--fuell-brand:       #2d2d7e;
	--fuell-white:       #ffffff;
	--fuell-gray-100:    #f0f0f0;
	--fuell-gray-200:    #e0e0e0;
	--fuell-gray-700:    #444444;
	--fuell-dark:        #1a1a1a;
	--fuell-text:        #222222;
	--fuell-radius:      6px;
	--fuell-shadow-sm:   0 1px 4px rgba(0,0,0,0.08);
	--fuell-shadow-md:   0 4px 16px rgba(0,0,0,0.12);
	--fuell-trans:       0.22s ease;
}

/* Container - mirrors design spec */
.fuell-container {
	width: min(1140px, 100% - 2 * clamp(1rem, 4vw, 3rem));
	margin-inline: auto;
}

/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */

/* Sticky lives on the WP block-template-part wrapper so it can */
/* travel along the full document height, not just its own box. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
	margin-top: 0 !important;
}

.fuell-header {
	background: var(--fuell-white);
	border-bottom: 1px solid var(--fuell-gray-100);
	box-shadow: var(--fuell-shadow-sm);
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.fuell-header *,
.fuell-footer * {
	box-sizing: border-box;
}

.fuell-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	gap: 1.5rem;
}

.fuell-header__logo {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--fuell-brand);
	text-decoration: none;
	flex-shrink: 0;
}

.fuell-header__logo:hover {
	color: var(--fuell-brand);
	opacity: 0.85;
}

.fuell-header__logo img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	display: block;
}

.fuell-nav {
	display: flex;
	align-items: center;
}

.fuell-nav__list {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fuell-nav__list a {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fuell-text);
	text-decoration: none;
	transition: color var(--fuell-trans);
	white-space: nowrap;
}

.fuell-nav__list a:hover,
.fuell-nav__list li.is-current > a {
	color: var(--fuell-green);
}

/* Kontakt-Button im Nav */
.fuell-nav__list li.fuell-btn > a {
	background: var(--fuell-green);
	color: #fff;
	padding: 0.42rem 1rem;
	border-radius: var(--fuell-radius);
	font-size: 0.82rem;
	font-weight: 600;
	border: 2px solid var(--fuell-green);
	transition: background var(--fuell-trans), border-color var(--fuell-trans), transform var(--fuell-trans);
	display: inline-block;
	line-height: 1.4;
}

.fuell-nav__list li.fuell-btn > a:hover {
	background: var(--fuell-green-hover);
	border-color: var(--fuell-green-hover);
	color: #fff;
	transform: translateY(-1px);
}

/* Burger */
.fuell-nav__burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 4px;
	margin: 0;
}

.fuell-nav__burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--fuell-text);
	border-radius: 2px;
	transition: var(--fuell-trans);
}

.fuell-nav__burger:focus-visible,
.fuell-header__logo:focus-visible,
.fuell-nav__list a:focus-visible {
	outline: 2px solid var(--fuell-green);
	outline-offset: 3px;
}

@media (max-width: 820px) {
	.fuell-nav__list {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		background: var(--fuell-white);
		border-bottom: 1px solid var(--fuell-gray-100);
		padding: 1.25rem clamp(1rem, 4vw, 3rem);
		gap: 1rem;
		box-shadow: var(--fuell-shadow-md);
		z-index: 99;
	}

	.fuell-nav__list.open {
		display: flex;
	}

	.fuell-nav__list li.fuell-btn > a {
		display: inline-block;
	}

	.fuell-nav__burger {
		display: flex;
	}
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.fuell-footer {
	background: var(--fuell-dark);
	border-top: 1px solid rgba(255,255,255,0.07);
	color: rgba(255,255,255,0.55);
	padding-block: 2.5rem 1.25rem;
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.fuell-footer a {
	text-decoration: none;
	color: inherit;
}

.fuell-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
	margin-bottom: 2rem;
}

.fuell-footer__brand {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.75rem;
}

.fuell-footer__brand img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	filter: brightness(0) invert(1);
	opacity: 0.65;
	display: block;
}

.fuell-footer__brand strong {
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
}

.fuell-footer__addr {
	font-size: 0.82rem;
	font-style: normal;
	line-height: 1.8;
	color: rgba(255,255,255,0.55);
}

.fuell-footer__col-title {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 0.9rem 0;
}

.fuell-footer__links {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.fuell-footer__links a {
	font-size: 0.84rem;
	color: rgba(255,255,255,0.5);
	transition: color var(--fuell-trans);
}

.fuell-footer__links a:hover {
	color: #fff;
}

.fuell-footer__social a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	color: rgba(255,255,255,0.5);
	transition: color var(--fuell-trans);
}

.fuell-footer__social a:hover {
	color: #fff;
}

.fuell-footer__social svg {
	display: block;
}

.fuell-footer__bottom {
	border-top: 1px solid rgba(255,255,255,0.08);
	padding-top: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.78rem;
}

@media (max-width: 680px) {
	.fuell-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 420px) {
	.fuell-footer__grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------
   GLOBAL BUTTONS  – alle Buttons in Markengrün
   ------------------------------------------------------------ */
.wp-block-button__link,
.wp-element-button,
.wp-block-button > a {
	background-color: var(--fuell-green) !important;
	border-color: var(--fuell-green) !important;
	color: #fff !important;
	transition: background-color var(--fuell-trans), border-color var(--fuell-trans), transform var(--fuell-trans), outline-color var(--fuell-trans);
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.wp-block-button > a:hover {
	background-color: var(--fuell-green-hover) !important;
	border-color: var(--fuell-green-hover) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.wp-block-button__link:focus,
.wp-element-button:focus,
.wp-block-button > a:focus,
.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
	background-color: var(--fuell-green) !important;
	color: #fff !important;
	outline: 2px solid var(--fuell-green) !important;
	outline-offset: 3px !important;
}

.wp-block-button__link:active,
.wp-element-button:active,
.wp-block-button > a:active {
	background-color: var(--fuell-green-hover) !important;
	color: #fff !important;
	transform: translateY(0);
}

/* Outline-Variante: grüner Rand + grüne Schrift, beim Hover voll grün */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline > a {
	background-color: transparent !important;
	color: var(--fuell-green) !important;
	border: 2px solid var(--fuell-green) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline > a:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus,
.wp-block-button.is-style-outline > a:focus {
	background-color: var(--fuell-green) !important;
	border-color: var(--fuell-green) !important;
	color: #fff !important;
}

/* ------------------------------------------------------------
   PRIMARY-COLOR SCOPING
   Das Theme nutzt --wp--preset--color--primary (#381d92, lila)
   als Akzentfarbe. Die Klasse .has-primary-color taucht im Hero
   nicht nur auf der H1, sondern auch auf Wrapper-Divs und einem
   Paragraph auf -> der Fließtext wird dadurch lila. Wir behalten
   Lila NUR für Überschriften (h1-h6) und setzen alles andere auf
   die normale foreground-Farbe zurück.
   ------------------------------------------------------------ */

/* 1) has-primary-color direkt auf Nicht-Heading-Elementen
      (z.B. Wrapper-Divs, Paragraphen) -> Standardtextfarbe */
.has-primary-color:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
	color: var(--wp--preset--color--foreground) !important;
}

/* 2) Kinder eines has-primary-color-Wrappers erben sonst Lila ->
      explizit auf Standardfarbe zwingen, Überschriften ausgenommen */
.has-primary-color :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
	color: var(--wp--preset--color--foreground);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.fuell-header *,
	.fuell-footer *,
	.fuell-nav__list,
	.fuell-nav__burger span,
	.wp-block-button__link,
	.wp-element-button {
		transition: none !important;
		transform: none !important;
	}
}
