/* ==========================================================================
   Blasy + Mader 2026 - Haupt-Stylesheet
   ========================================================================== */

/* ---- Design-Tokens (gespiegelt aus theme.json) ---- */
:root {
	--bm-blue:        var(--wp--preset--color--bm-blue, #004280);
	--bm-blue-dark:   var(--wp--preset--color--bm-blue-dark, #002a52);
	--bm-blue-light:  var(--wp--preset--color--bm-blue-light, #e9f1f8);
	--bm-accent:      var(--wp--preset--color--bm-accent, #d08236);
	--bm-grey:        var(--wp--preset--color--bm-grey, #f5f6f8);
	--bm-text:        var(--wp--preset--color--bm-text, #2a2f35);
	--bm-text-soft:   var(--wp--preset--color--bm-text-soft, #6b7279);
	--bm-border:      var(--wp--preset--color--bm-border, #e5e7ea);
	--bm-footer:      var(--wp--preset--color--bm-footer, #0a1726);
	--maxw: 1320px;
	--header-h: 92px;
}

/* ---- Reset / Basis ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--bm-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Layout-Helfer ---- */
.container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 40px;
}

/* ---- Topbar ---- */
.topbar {
	background: var(--bm-blue-dark);
	color: #fff;
	font-size: 13px;
	padding: 8px 0;
	text-align: center;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: transparent;
	transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.scrolled {
	background: rgba(255,255,255,0.96);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 -1px 0 var(--bm-border);
}
.header-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 18px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* ---- Logo (zwei Versionen, CSS-Hintergrund, portabel) ---- */
.logo {
	position: relative;
	display: block;
	flex-shrink: 0;
	width: 265px;
	height: 56px;
}
.logo-img {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
	transition: opacity 0.3s;
}
.logo-weiss { background-image: url('../img/logo-weiss.png'); opacity: 1; }
.logo-blau  { background-image: url('../img/logo-blau.png');  opacity: 0; }
.site-header.scrolled .logo-weiss { opacity: 0; }
.site-header.scrolled .logo-blau  { opacity: 1; }

/* ---- Navigation ---- */
.main-nav > ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 36px;
}
.main-nav > ul > li { position: relative; }
.main-nav a {
	font-size: 15px;
	font-weight: 500;
	color: #fff;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	position: relative;
	transition: color 0.2s;
}
.site-header.scrolled .main-nav a { color: var(--bm-text); }
.main-nav a:hover { color: rgba(255,255,255,0.7); }
.site-header.scrolled .main-nav a:hover { color: var(--bm-blue); }
.main-nav a.active::after {
	content: '';
	position: absolute;
	left: 0; right: 0;
	bottom: -6px;
	height: 2px;
	background: var(--bm-accent);
}
.site-header.scrolled .main-nav a.active { color: var(--bm-blue); }
.has-mega > a::after {
	content: '▾';
	font-size: 10px;
	position: relative;
	top: -1px;
	transition: transform 0.2s;
}
.has-mega:hover > a::after { transform: rotate(180deg); }

/* ---- Header-CTA ---- */
.header-cta {
	flex-shrink: 0;
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.5);
	padding: 9px 22px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.25s;
}
.header-cta:hover { background: rgba(255,255,255,0.25); border-color: #fff; }
.site-header.scrolled .header-cta {
	background: var(--bm-blue);
	border-color: var(--bm-blue);
	color: #fff;
}
.site-header.scrolled .header-cta:hover {
	background: var(--bm-blue-dark);
	border-color: var(--bm-blue-dark);
}

/* ---- Megamenü ---- */
.megamenu {
	position: fixed;
	top: 110px;
	left: 0; right: 0;
	background: #fff;
	box-shadow: 0 20px 40px rgba(0,0,0,0.08);
	border-top: 1px solid var(--bm-border);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
	z-index: 99;
}
.has-mega:hover .megamenu,
.megamenu:hover {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.has-mega::before {
	content: '';
	position: absolute;
	top: 100%; left: 0; right: 0;
	height: 40px;
}
.megamenu-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 32px 40px;
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 18px;
}
.mega-item {
	display: flex;
	flex-direction: column;
	text-align: center;
	transition: transform 0.2s;
}
.mega-item:hover { transform: translateY(-3px); }
.mega-img {
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	background-color: #ddd;
	background-size: cover;
	background-position: center;
	position: relative;
	overflow: hidden;
}
.mega-img::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 50%, rgba(0,42,82,0.25) 100%);
}
.mega-img--abwasser    { background-image: url('../img/fb-abwasser.jpg'); }
.mega-img--altlasten   { background-image: url('../img/fb-altlasten.jpg'); }
.mega-img--baugrund    { background-image: url('../img/fb-baugrund.jpg'); }
.mega-img--bausubstanz { background-image: url('../img/fb-bausubstanz.jpg'); }
.mega-img--grundwasser { background-image: url('../img/fb-grundwasser.jpg'); }
.mega-img--monitoring  { background-image: url('../img/fb-monitoring.jpg'); }
.mega-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--bm-blue);
	margin-top: 12px;
	line-height: 1.3;
}

/* ---- Mobile-Toggle ---- */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px; height: 44px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 0;
}
.nav-toggle span {
	display: block;
	width: 24px; height: 2px;
	background: #fff;
	margin: 0 auto;
	transition: background 0.3s;
}
.site-header.scrolled .nav-toggle span { background: var(--bm-text); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
	background: var(--bm-footer);
	color: rgba(255,255,255,0.7);
	padding: 70px 0 30px;
	font-size: 14px;
}
.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 60px;
	margin-bottom: 50px;
}
.footer-logo {
	display: block;
	width: 200px;
	height: 44px;
	background: url('../img/logo-weiss.png') left center / contain no-repeat;
	margin-bottom: 22px;
}
.footer-col--brand p { max-width: 320px; margin: 0; }
.footer-heading {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin: 0 0 20px;
}
.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-contact-spacer { margin-top: 10px; }

.social-icons {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}
.social-icons a {
	width: 40px; height: 40px;
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,0.7);
	transition: all 0.2s;
}
.social-icons a:hover {
	color: #fff;
	background: var(--bm-accent);
	border-color: var(--bm-accent);
}
.social-icons svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	padding-top: 24px;
	display: flex;
	justify-content: space-between;
	font-size: 13px;
}
.footer-legal a { color: rgba(255,255,255,0.7); margin-left: 20px; }
.footer-legal a:hover { color: #fff; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 32px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 500;
	transition: all 0.2s;
	cursor: pointer;
	border: 0;
}
.btn-primary { background: #fff; color: var(--bm-blue); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-outline {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-solid-blue { background: var(--bm-blue); color: #fff; }
.btn-solid-blue:hover {
	background: var(--bm-blue-dark);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0,66,128,0.25);
}

/* ==========================================================================
   SEKTIONEN - Basis
   ========================================================================== */
.section { padding: 120px 0; }
.section--grey { background: var(--bm-grey); }
.eyebrow {
	color: var(--bm-accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin-bottom: 16px;
}
.eyebrow--on-blue { color: rgba(255,255,255,0.7); }
.section h2,
.ref-banner h2,
.contact-cta h2 {
	font-size: clamp(32px, 4vw, 52px);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--bm-blue);
	margin: 0 0 24px;
}
.section h2 strong,
.ref-banner h2 strong,
.contact-cta h2 strong { font-weight: 600; }
.lead {
	font-size: 18px;
	color: var(--bm-text-soft);
	max-width: 680px;
	line-height: 1.7;
	margin: 0;
}
.lead--spaced { margin-top: 16px; }
.section-head { text-align: center; margin-bottom: 80px; }
.section-head .lead { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
	position: relative;
	height: 88vh;
	min-height: 620px;
	overflow: hidden;
	color: #fff;
	margin-top: calc(-1 * var(--header-h));
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
	position: absolute; inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
	animation: heroZoom 12s ease-in-out infinite alternate;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
@keyframes heroZoom {
	from { transform: scale(1); }
	to   { transform: scale(1.08); }
}
.hero-slide--1 { background-image: url('../img/fb-baugrund.jpg'); }
.hero-slide--2 { background-image: url('../img/fb-altlasten.jpg'); }
.hero-slide--3 { background-image: url('../img/fb-abwasser.jpg'); }
.hero-slide--4 { background-image: url('../img/fb-monitoring.jpg'); }
.hero-slide--5 { background-image: url('../img/fb-bausubstanz.jpg'); }
.hero-slides::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,42,82,0.5) 0%, rgba(0,42,82,0.8) 100%);
	z-index: 2;
}
.hero-content {
	position: relative;
	z-index: 5;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding-top: var(--header-h);
}
.hero-eyebrow {
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	opacity: 0.85;
	margin-bottom: 24px;
}
.hero h1 {
	font-size: clamp(40px, 6vw, 80px);
	font-weight: 300;
	line-height: 1.05;
	letter-spacing: -0.02em;
	max-width: 900px;
	margin: 0 0 28px;
	color: #fff;
}
.hero h1 strong { font-weight: 600; }
.hero-sub {
	font-size: 20px;
	font-weight: 300;
	max-width: 640px;
	margin: 0 0 40px;
	opacity: 0.95;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-dots {
	position: absolute;
	bottom: 34px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 5;
}
.hero-dot {
	width: 32px; height: 3px;
	background: rgba(255,255,255,0.3);
	border: 0; padding: 0;
	cursor: pointer;
	transition: background 0.3s;
}
.hero-dot.is-active { background: #fff; }
.hero-dot:hover { background: rgba(255,255,255,0.6); }

/* ==========================================================================
   LEISTUNGEN-GRID
   ========================================================================== */
.leistungen-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}
.leistung-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.3s, box-shadow 0.3s;
	color: var(--bm-text);
}
.leistung-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px rgba(0,66,128,0.12);
}
.leistung-img {
	display: block;
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	transition: transform 0.5s;
}
.leistung-card:hover .leistung-img { transform: scale(1.06); }
.leistung-img--abwasser    { background-image: url('../img/fb-abwasser.jpg'); }
.leistung-img--altlasten   { background-image: url('../img/fb-altlasten.jpg'); }
.leistung-img--baugrund    { background-image: url('../img/fb-baugrund.jpg'); }
.leistung-img--bausubstanz { background-image: url('../img/fb-bausubstanz.jpg'); }
.leistung-img--grundwasser { background-image: url('../img/fb-grundwasser.jpg'); }
.leistung-img--monitoring  { background-image: url('../img/fb-monitoring.jpg'); }
.leistung-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 28px 28px 32px;
}
.leistung-title {
	font-size: 22px;
	font-weight: 600;
	color: var(--bm-blue);
	margin-bottom: 12px;
}
.leistung-text {
	color: var(--bm-text-soft);
	font-size: 15px;
	margin-bottom: 20px;
	flex: 1;
}
.leistung-link {
	color: var(--bm-blue);
	font-weight: 500;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: gap 0.2s, color 0.2s;
}
.leistung-card:hover .leistung-link { gap: 12px; color: var(--bm-accent); }

/* ==========================================================================
   UNTERNEHMEN-SEKTION
   ========================================================================== */
.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 80px;
	align-items: center;
}
.about-image {
	aspect-ratio: 4 / 5;
	border-radius: 10px;
	background: url('../img/fb-monitoring.jpg') center / cover no-repeat;
}
.about-text p {
	font-size: 16px;
	color: var(--bm-text-soft);
	margin: 0 0 16px;
	line-height: 1.7;
}
.stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin-top: 48px;
	padding-top: 40px;
	border-top: 1px solid var(--bm-border);
}
.stat-number {
	font-size: 42px;
	font-weight: 300;
	color: var(--bm-blue);
	line-height: 1;
	margin-bottom: 6px;
}
.stat-label {
	font-size: 13px;
	color: var(--bm-text-soft);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ==========================================================================
   ZULASSUNGEN-BANNER
   ========================================================================== */
.ref-banner {
	background: var(--bm-blue);
	color: #fff;
	padding: 90px 0;
	text-align: center;
}
.ref-banner h2 { color: #fff; }
.ref-banner .lead {
	color: rgba(255,255,255,0.85);
	margin: 0 auto 40px;
}

/* ==========================================================================
   KONTAKT-CTA
   ========================================================================== */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 80px;
	align-items: center;
}
.contact-info {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.contact-item {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 16px;
}
.contact-icon {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--bm-blue-light);
	color: var(--bm-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 20px;
}
.contact-label {
	display: block;
	font-size: 13px;
	color: var(--bm-text-soft);
}
.contact-cta .btn-solid-blue { margin-top: 16px; align-self: flex-start; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
	.megamenu-inner { grid-template-columns: repeat(3, 1fr); }
	.leistungen-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
	.container { padding: 0 24px; }
	.header-inner { padding: 14px 24px; }
	.nav-toggle { display: flex; }
	.header-cta { display: none; }
	.main-nav {
		position: fixed;
		top: var(--header-h);
		left: 0; right: 0;
		background: #fff;
		box-shadow: 0 20px 40px rgba(0,0,0,0.12);
		padding: 16px 24px 24px;
		display: none;
	}
	.main-nav.open { display: block; }
	.main-nav > ul { flex-direction: column; gap: 0; }
	.main-nav > ul > li { border-bottom: 1px solid var(--bm-border); }
	.main-nav a { color: var(--bm-text); padding: 14px 0; width: 100%; }
	.main-nav a.active::after { display: none; }
	.megamenu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border-top: 0;
		display: none;
	}
	.has-mega.open .megamenu { display: block; }
	.megamenu-inner { grid-template-columns: repeat(2, 1fr); padding: 8px 0 16px; }
	.footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
	.footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
	.footer-legal a { margin: 0 10px; }

	/* Startseite */
	.section { padding: 80px 0; }
	.section-head { margin-bottom: 48px; }
	.leistungen-grid { grid-template-columns: 1fr; }
	.about-grid { grid-template-columns: 1fr; gap: 40px; }
	.contact-grid { grid-template-columns: 1fr; gap: 40px; }
	.hero { height: auto; min-height: 0; padding: 160px 0 110px; }
	.hero-content { height: auto; padding-top: 0; }
}
@media (max-width: 560px) {
	.footer-grid { grid-template-columns: 1fr; }
	.megamenu-inner { grid-template-columns: 1fr 1fr; }
	.stats { grid-template-columns: 1fr; gap: 20px; }
}
