/*
 * Mobile Ansicht felgenretter.de (bis 777px).
 * Alles ist unter #mshell gekapselt, damit die alten Desktop-Styles nicht hineinwirken.
 */

#mshell {
	--m-bg: #f3f3f1;
	--m-card: #ffffff;
	--m-text: #1b1b1d;
	--m-muted: #5f6066;
	--m-line: #e2e2de;
	--m-dark: #121214;
	--m-accent: #d4161e;
	--m-accent-dark: #ad0f16;
	--m-wa: #1c9e4f;
	--m-radius: 14px;
	--m-cta-h: 56px;
	display: none;
}

@media only screen and (min-width: 778px) {
	#mshell { display: none !important; }
}

@media only screen and (max-width: 777px) {
	/* Desktop-Ansicht und Altlasten ausblenden */
	#complete, #fuss, #footer, #mobilcomplete, #mobilcomplete481, #overlay { display: none !important; }

	html, body {
		background: #f3f3f1 !important;
		background-image: none !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow-x: hidden;
	}
	.gridContainer {
		width: auto !important;
		padding: 0 !important;
		margin: 0 !important;
		float: none !important;
	}

	#mshell {
		display: block;
		clear: both;
		width: 100%;
		min-height: 100vh;
		background: var(--m-bg);
		color: var(--m-text);
		font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
		-webkit-text-size-adjust: 100%;
		padding-top: 76px;
		padding-bottom: calc(var(--m-cta-h) + env(safe-area-inset-bottom, 0px));
	}
}

#mshell *, #mshell *::before, #mshell *::after { box-sizing: border-box; font-family: inherit; }
#mshell img { max-width: 100%; height: auto; display: block; border: 0; }
#mshell a { color: inherit; }
#mshell h1, #mshell h2, #mshell h3, #mshell p, #mshell ul, #mshell ol { margin: 0; padding: 0; }
#mshell h1, #mshell h2, #mshell h3 { font-family: inherit; color: inherit; text-transform: none; }
#mshell p, #mshell li, #mshell td, #mshell th { font-size: 1rem; line-height: 1.55; }
#mshell .m-hinweis p { font-size: .95rem; }
#mshell .m-main, #mshell .m-foot > p { max-width: 640px; margin-left: auto; margin-right: auto; }
#mshell ul, #mshell ol { list-style: none; }
#mshell :focus-visible { outline: 3px solid var(--m-accent); outline-offset: 2px; }

/* ---------- Kopf ---------- */
#mshell .m-head {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 76px;
	padding: 0 6px 0 14px;
	background: #000;
	box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 16px rgba(0,0,0,.25);
}
#mshell .m-logo {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 340px;
	margin: 0 auto 0 0;
	text-align: left;
}
#mshell .m-logo img { width: 100%; height: auto; }
#mshell .m-burger { flex: none; }
#mshell .m-burger {
	position: relative;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	cursor: pointer;
}
#mshell .m-burger span {
	position: absolute;
	left: 13px;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
#mshell .m-burger span:nth-child(1) { top: 17px; }
#mshell .m-burger span:nth-child(2) { top: 23px; }
#mshell .m-burger span:nth-child(3) { top: 29px; }
#mshell .m-burger[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
#mshell .m-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#mshell .m-burger[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

/* ---------- Menü ---------- */
#mshell .m-menu {
	position: fixed;
	z-index: 40;
	top: 76px;
	left: 0;
	right: 0;
	bottom: 0;
	overflow-y: auto;
	padding: 8px 16px calc(var(--m-cta-h) + 24px);
	background: var(--m-dark);
	color: #fff;
}
#mshell .m-menu[hidden] { display: none; }
#mshell .m-menu-main a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 4px;
	border-bottom: 1px solid rgba(255,255,255,.1);
	font-size: 1.2rem;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
}
#mshell .m-menu-main a::after { content: "›"; font-size: 1.5rem; line-height: 1; color: rgba(255,255,255,.4); }
#mshell .m-menu-main a[aria-current="page"] { color: #ff4d55; }
#mshell .m-menu-sub { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 22px 4px 0; }
#mshell .m-menu-sub a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .95rem; }
html.m-menu-offen, html.m-menu-offen body { overflow: hidden; }

/* ---------- Inhalt ---------- */
#mshell .m-main { padding-bottom: 8px; }
#mshell .m-section { padding: 28px 16px 8px; }
#mshell .m-section > h2 { font-size: 1.35rem; line-height: 1.25; margin-bottom: 14px; }
#mshell .m-lead { color: var(--m-muted); margin-bottom: 14px; }
#mshell .m-kicker {
	display: inline-block;
	margin-bottom: 8px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--m-accent);
}

/* Hero */
#mshell .m-hero { position: relative; background: var(--m-dark); color: #fff; }
#mshell .m-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; opacity: .72; }
#mshell .m-hero-text {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 48px 16px 18px;
	background: linear-gradient(to top, rgba(18,18,20,.95), rgba(18,18,20,0));
}
#mshell .m-hero h1 { font-size: 1.85rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
#mshell .m-hero p { margin-top: 6px; color: rgba(255,255,255,.85); font-size: 1rem; }
#mshell .m-hero .m-kicker { color: #ff5a61; }

/* Seitenkopf für Unterseiten */
#mshell .m-pagehead { padding: 26px 16px 4px; }
#mshell .m-pagehead h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
#mshell .m-pagehead p { margin-top: 8px; color: var(--m-muted); }
#mshell .m-pagehead-img { margin: 18px 16px 0; border-radius: var(--m-radius); overflow: hidden; }
#mshell .m-pagehead-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
#mshell .m-pagehead-img-original { max-width: 360px; }
#mshell .m-pagehead-img-original img { aspect-ratio: auto; }

/* Buttons */
#mshell .m-btns { display: grid; gap: 10px; padding: 18px 16px 4px; }
#mshell .m-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	text-align: center;
	background: #e7e7e4;
	color: var(--m-text) !important;
	border: 1px solid #d6d6d2;
}
#mshell .m-btn:active { background: #dcdcd8; }
#mshell .m-btn-ghost { background: var(--m-card); border-color: var(--m-line); }

/* Leistungs-Kacheln */
#mshell .m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#mshell .m-tile {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--m-radius);
	background: var(--m-card);
	box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
	text-decoration: none;
}
#mshell .m-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
#mshell .m-tile-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #2a2a2e, #121214);
	color: #fff;
}
#mshell .m-tile-icon svg { width: 44%; height: 44%; fill: none; stroke: currentColor; stroke-width: 1.5; }
#mshell .m-tile span { padding: 10px 12px 12px; font-weight: 700; font-size: .95rem; line-height: 1.25; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
#mshell .m-tile span small { display: block; margin-top: 2px; font-weight: 400; font-size: .8rem; color: var(--m-muted); }

/* Karten und Listen */
#mshell .m-card {
	padding: 18px;
	border-radius: var(--m-radius);
	background: var(--m-card);
	box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
#mshell .m-card + .m-card { margin-top: 12px; }
#mshell .m-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
#mshell .m-card p + p { margin-top: 10px; }
#mshell .m-text p + p { margin-top: 12px; }
#mshell .m-check li {
	position: relative;
	padding: 7px 0 7px 32px;
	border-bottom: 1px solid var(--m-line);
}
#mshell .m-check li:last-child { border-bottom: 0; }
#mshell .m-check li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 11px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--m-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
#mshell .m-hinweis {
	padding: 16px 18px;
	border-left: 4px solid var(--m-accent);
	border-radius: 0 var(--m-radius) var(--m-radius) 0;
	background: #fff4f4;
}
#mshell .m-hinweis h3 { font-size: 1rem; margin-bottom: 4px; }

/* Ablauf */
#mshell .m-steps { counter-reset: schritt; display: grid; gap: 12px; }
#mshell .m-steps li {
	counter-increment: schritt;
	position: relative;
	padding: 16px 16px 16px 64px;
	border-radius: var(--m-radius);
	background: var(--m-card);
}
#mshell .m-steps li::before {
	content: counter(schritt);
	position: absolute;
	left: 16px;
	top: 16px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--m-dark);
	color: #fff;
	font-weight: 800;
	text-align: center;
	line-height: 34px;
}
#mshell .m-steps strong { display: block; }
#mshell .m-steps span { color: var(--m-muted); font-size: .95rem; }

/* Vergleichstabelle */
#mshell .m-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--m-card); border-radius: var(--m-radius); overflow: hidden; }
#mshell .m-table th, #mshell .m-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--m-line); vertical-align: top; }
#mshell .m-table thead th { background: var(--m-dark); color: #fff; font-weight: 700; }
#mshell .m-table tbody th { font-weight: 600; }
#mshell .m-small { margin-top: 10px; font-size: .82rem; color: var(--m-muted); }

/* Kontakt-Liste */
#mshell .m-contact a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border-radius: var(--m-radius);
	background: var(--m-card);
	text-decoration: none;
}
#mshell .m-contact li + li { margin-top: 10px; }
#mshell .m-contact svg { flex: none; width: 36px; height: 36px; padding: 9px; border-radius: 50%; fill: var(--m-text); background: #ececea; }
#mshell .m-contact strong { display: block; }
#mshell .m-contact small { color: var(--m-muted); font-size: .88rem; }

/* Rechtstexte */
#mshell .m-legal h2 { font-size: 1.1rem; margin: 22px 0 6px; }
#mshell .m-legal p, #mshell .m-legal ul { margin-bottom: 10px; }
#mshell .m-legal ul { list-style: disc; padding-left: 22px; }
#mshell .m-legal a { color: var(--m-accent); }

/* ---------- Fuß ---------- */
#mshell .m-foot {
	margin-top: 32px;
	padding: 24px 16px 28px;
	background: var(--m-dark);
	color: rgba(255,255,255,.75);
	font-size: .9rem;
}
#mshell .m-foot p { color: #d6d6d9; }
#mshell .m-foot p + p { margin-top: 12px; }
#mshell .m-foot strong { color: #fff; }
#mshell .m-foot a { color: #fff; text-decoration: none; }

/* ---------- Kontaktleiste unten ---------- */
#mshell .m-cta {
	position: fixed;
	z-index: 60;
	left: 0; right: 0; bottom: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	padding: 0 4px env(safe-area-inset-bottom, 0px);
	background: rgba(12,12,14,.97);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-top: 1px solid rgba(255,255,255,.08);
}
#mshell .m-cta a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 56px;
	color: #cfcfd3;
	text-decoration: none;
	font-weight: 500;
	font-size: .7rem;
	letter-spacing: .02em;
}
#mshell .m-cta a { position: relative; }
#mshell .m-cta a + a::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: rgba(255,255,255,.1); }
#mshell .m-cta a:active { color: #fff; }
#mshell .m-cta svg { width: 19px; height: 19px; fill: currentColor; flex: none; opacity: .9; }

@media (prefers-reduced-motion: reduce) {
	#mshell * { transition: none !important; }
}
