/* ==========================================================================
   AutoTec Coban – Theme
   ========================================================================== */

/* DESIGN-TOKENS */
:root {
	--brand: #1d5592;
	--brand-dark: #12365f;
	--brand-darker: #0c2643;
	--brand-tint: #e8eff7;
	--accent: #f2b300;
	--accent-dark: #d99f00;
	--ink: #17202b;
	--text: #3a4554;
	--muted: #6b7686;
	--line: #e2e7ee;
	--surface: #ffffff;
	--surface-muted: #f5f7fa;
	--bg: #eef1f5;
	--focus: #f2b300;

	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 16px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(16, 30, 54, .04), 0 8px 24px rgba(16, 30, 54, .07);
	--container: 1200px;
	--gutter: 20px;
	--header-h: 76px;
}

/* GENERAL */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

select, input, textarea, button {
	font: inherit;
}

img {
	max-width: 100%;
}

.wrapper {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
	position: relative;
}

a:link, a:visited {
	color: var(--brand);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
a:hover, a:focus {
	color: var(--brand-dark);
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 1000;
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	background: var(--ink);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
}
.skip-link:focus {
	top: 12px;
}

.button,
article input[type="submit"],
article input[type="button"],
article button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--brand);
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, transform .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.button:hover,
article input[type="submit"]:hover,
article input[type="button"]:hover,
article button:hover {
	background: var(--brand-dark);
}
.button:active,
article input[type="submit"]:active,
article input[type="button"]:active {
	transform: translateY(1px);
}


/* TOPBAR */
.topbar {
	background: var(--brand-darker);
	color: rgba(255, 255, 255, .78);
	font-size: 13.5px;
	line-height: 1.4;
}
.topbar .wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.topbar a:link, .topbar a:visited {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.topbar a:hover, .topbar a:focus {
	color: var(--accent);
}


/* HEADER */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .96);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 2px 12px rgba(16, 30, 54, .06);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
	backdrop-filter: saturate(180%) blur(8px);
}
.site-header .wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--header-h);
}

/* HEADER: logo */
.site-header .brand {
	flex: none;
	display: block;
	line-height: 0;
}
.site-header img#coban_logo {
	display: block;
	width: auto;
	height: 54px;
}

/* HEADER: navigation */
#main-nav {
	display: flex;
	align-items: center;
	gap: 16px;
}
#main-nav ul {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
#main-nav li a {
	position: relative;
	display: block;
	padding: 10px 13px;
	border-radius: var(--radius-sm);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
#main-nav li a:link,
#main-nav li a:visited {
	color: var(--ink);
	text-decoration: none;
}
#main-nav li a:hover,
#main-nav li a:focus {
	background: var(--surface-muted);
	color: var(--brand);
}
#main-nav li.current a {
	color: var(--brand);
}
#main-nav li.current a::after {
	content: "";
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 2px;
	height: 3px;
	border-radius: 2px;
	background: var(--accent);
}

.button-call {
	flex: none;
	background: var(--accent);
	color: var(--ink) !important;
	text-decoration: none !important;
}
.button-call:hover {
	background: var(--accent-dark);
}

/* HEADER: Menü-Schalter (nur mobil) */
.nav-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle-bars {
	position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }


/* HERO: Slideshow und Seitenbild */
.hero {
	margin-top: 24px;
}
.hero > .gallery-cycle,
.hero > #headerimage {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

#headerimage {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 950 / 400;
	object-fit: cover;
	background: var(--surface-muted);
}

/* Die Galerie bringt feste Pixelmaße mit, hier auf volle Breite skalieren */
.hero .gallery-cycle {
	width: 100% !important;
	height: auto !important;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--brand-darker);
}
.hero .gallery-cycle .gallery-container {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: var(--gallery-ratio, 950 / 400);
}
.hero .gallery-cycle .gallery-slide {
	width: 100% !important;
	height: 100% !important;
}
.hero .gallery-cycle .gallery-image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	background: transparent;
}
.hero .gallery-cycle .gallery-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero .gallery-cycle .gallery-text {
	width: auto !important;
	left: 0;
	right: 0;
	padding: 72px clamp(20px, 4vw, 40px) clamp(18px, 3vw, 32px);
	background: linear-gradient(to top, rgba(8, 22, 40, .88) 0%, rgba(8, 22, 40, .55) 55%, rgba(8, 22, 40, 0) 100%) !important;
	color: #fff;
}
.hero .gallery-cycle .gallery-text h2 {
	margin: 0 0 6px;
	color: #fff;
	font-size: clamp(1.35rem, .9rem + 2vw, 2.4rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.02em;
}
.hero .gallery-cycle .gallery-text p {
	max-width: 62ch;
	margin: 0;
	font-size: clamp(.95rem, .85rem + .35vw, 1.1rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, .9);
}
.hero .gallery-cycle .gallery-text a:link,
.hero .gallery-cycle .gallery-text a:visited {
	color: var(--accent);
	font-weight: 700;
}
.hero .gallery-cycle .prev,
.hero .gallery-cycle .next {
	width: 15%;
	height: 56%;
	top: 22%;
}


/* BODY CONTENT */
.bodycontent {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	align-items: start;
	margin-top: 28px;
	margin-bottom: 56px;
}

article {
	min-width: 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
article section {
	padding: clamp(22px, 4vw, 44px);
	color: var(--text);
	font-size: 16px;
	line-height: 1.7;
}

article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
	color: var(--ink);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
}
article section > h1:first-child {
	margin: 0 0 28px;
	color: var(--brand-dark);
	font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.02em;
}
article section > h1:first-child::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 14px;
	border-radius: 2px;
	background: var(--accent);
}
article h1 {
	margin: 0 0 .6em;
	color: var(--brand);
	font-size: 1.6rem;
}
article h2 {
	margin: 1.6em 0 .5em;
	font-size: 1.45rem;
}
article h3 {
	margin: 1.4em 0 .5em;
	color: var(--brand);
	font-size: 1.2rem;
}
article h4 {
	margin: 1.6em 0 .4em;
	font-size: 1.08rem;
}
article h5,
article h6 {
	margin: 1.2em 0 .4em;
	font-size: 1rem;
}
article h6 {
	color: var(--muted);
}
article section > h1:first-child + h1,
article section > h1:first-child + h2,
article section > h1:first-child + h3,
article section > h1:first-child + h4,
article td > :first-child {
	margin-top: 0;
}

article section p {
	margin: 0 0 1.1em;
}
article section strong,
article section b {
	color: var(--ink);
}

article section ul,
article section ol {
	margin: 0 0 1.4em;
	padding: 0;
}
article section ol {
	padding-left: 1.4em;
}
article section ul {
	list-style: none;
}
article section ul > li {
	position: relative;
	margin: 0 0 4px;
	padding-left: 30px;
}
article section ul > li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .5em;
	width: 6px;
	height: 11px;
	border-right: 2.5px solid var(--brand);
	border-bottom: 2.5px solid var(--brand);
	transform: rotate(45deg);
}
article section ul ul,
article section ol ol,
article section ul ol,
article section ol ul {
	margin: 4px 0 0;
}

article section img {
	height: auto;
	border-radius: var(--radius-sm);
}

article section hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--line);
}

article section code {
	padding: 1px 5px;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: var(--surface-muted);
	font-size: .875em;
}
article section pre {
	margin: 0 0 1.5em;
	padding: 16px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
	font-size: 13px;
	line-height: 1.5;
}
article section pre code {
	padding: 0;
	border: 0;
	background: none;
}
article section blockquote {
	margin: 0 0 1.5em;
	padding: 4px 0 4px 18px;
	border-left: 4px solid var(--accent);
	color: var(--muted);
	font-style: italic;
}
article section .footer {
	margin-top: 40px;
	padding-top: 15px;
	border-top: 1px dashed var(--line);
	color: var(--muted);
	font-size: 13px;
}
article section .footer p {
	margin: 0 0 10px;
}

/* Tabellen aus dem Editor (z. B. Autohaus) */
article section table {
	width: 100% !important;
	max-width: 100%;
	margin: 0 0 1.5em;
	border: 1px solid var(--line);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 12px;
	overflow: hidden;
}
article section td,
article section th {
	padding: 22px 24px;
	border: 0;
	border-top: 1px solid var(--line);
	vertical-align: top;
	text-align: left;
}
article section tr:first-child > td,
article section tr:first-child > th {
	border-top: 0;
}
article section td + td,
article section th + th {
	border-left: 1px solid var(--line);
}
article section th {
	background: var(--surface-muted);
	color: var(--ink);
}
article section td h2 {
	font-size: 1.2rem;
	color: var(--brand);
}
article section td p:last-child {
	margin-bottom: 0;
}

/* Formulare */
article input[type="text"],
article input[type="email"],
article input[type="tel"],
article input[type="number"],
article input[type="password"],
article input[type="url"],
article input[type="date"],
article select,
article textarea {
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid #cdd5df;
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--ink);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}
article input:focus,
article select:focus,
article textarea:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(29, 85, 146, .18);
	outline: none;
}
article select[disabled] {
	background: var(--surface-muted);
	color: var(--muted);
}
article input[type="file"] {
	max-width: 100%;
	font-size: .95rem;
}
article input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	border: 1px solid #cdd5df;
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
	color: var(--ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
article input[type="file"]::file-selector-button:hover {
	background: var(--brand-tint);
}
article label {
	color: var(--ink);
	font-weight: 600;
}

/* Kontaktformular */
.captchaimg img {
	border: 1px solid var(--line);
	border-radius: 6px;
}

/* Galerie im Inhalt */
article .gallery-container h2 {
	color: #fff;
}

/* IFRAME FAHRZEUGBESTAND */
#mobileintegration {
	display: block;
	width: 100%;
	height: 900px;
	border: 0;
	border-radius: 12px;
	background: var(--surface-muted);
}


/* SIDEBAR */
aside {
	min-width: 0;
}
aside .section {
	margin: 0 0 20px;
	padding: 24px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	color: var(--text);
	font-size: 15px;
	line-height: 1.6;
}
aside .section p {
	margin: 0 0 12px;
}
aside .section h2 {
	margin: 22px 0 10px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	color: var(--brand);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .09em;
	text-transform: uppercase;
}
aside .section h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}
aside .section ul,
aside .section ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
aside .section li {
	margin: 0;
}

/* SIDEBAR: socialmedia */
aside #socialmedia {
	display: none; /* erstmal nicht anzeigen */
}

/* SIDEBAR: Auto News */
.rss_newslist {
	margin: 0 !important;
}
.rss_newslist li + li {
	border-top: 1px solid var(--line);
}
a.rss_newslink {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	text-decoration: none !important;
}
.rss_newslist li:first-child a.rss_newslink {
	padding-top: 4px;
}
.rss_newslist li:last-child a.rss_newslink {
	padding-bottom: 0;
}
.rss_newspicture {
	flex: none;
	width: 84px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
}
.rss_newspicture img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}
.rss_newstitle {
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}
a.rss_newslink:hover .rss_newstitle,
a.rss_newslink:focus .rss_newstitle {
	color: var(--brand);
	text-decoration: underline;
}
a.rss_newslink:hover .rss_newspicture img {
	transform: scale(1.06);
}


/* FOOTER */
.site-footer {
	margin-top: auto;
	color: rgba(255, 255, 255, .75);
	font-size: 14px;
}

/* FOOTER: Markenlaufband */
.trade_slider {
	position: relative;
	overflow: hidden;
	padding: 20px 0;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.trade_slider-track {
	display: flex;
	width: max-content;
	animation: trade-slider 90s linear infinite;
}
.trade_slider:hover .trade_slider-track {
	animation-play-state: paused;
}
.trade_slider img.cartrades {
	flex: none;
	display: block;
	width: auto;
	max-width: none;
	height: 48px;
}
@keyframes trade-slider {
	to { transform: translateX(-50%); }
}

.footer-bottom {
	margin-top: 32px;
	padding: 22px 0;
	background: var(--brand-darker);
}
.footer-bottom .wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}
.footer-links {
	display: flex;
	gap: 20px;
}
.site-footer a:link,
.site-footer a:visited {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}
.site-footer a:hover,
.site-footer a:focus {
	color: var(--accent);
	text-decoration: underline;
}
.footer-note {
	color: rgba(255, 255, 255, .55);
}


/* ZUSATZKLASSEN */
.spacer {
	width: 0;
	height: 5px;
	display: inline-block;
}

.cursor {
	cursor: pointer;
}

.plausi_meldung {
	color: #c0392b;
	font-size: .9rem;
	font-weight: 600;
}

/* Karte (Leaflet) */
.leaflet-container {
	font-family: var(--font) !important;
}


/* RESPONSIVE */
@media (max-width: 1080px) {
	:root {
		--header-h: 68px;
	}

	.site-header img#coban_logo {
		height: 46px;
	}

	.nav-toggle {
		display: none;
	}
	.js .nav-toggle {
		display: inline-flex;
	}

	/* Ohne JavaScript bleibt die Navigation umbrechend sichtbar */
	.site-header .wrapper {
		flex-wrap: wrap;
	}
	#main-nav {
		flex-wrap: wrap;
		width: 100%;
		padding-bottom: 12px;
	}
	#main-nav ul {
		flex-wrap: wrap;
	}

	.js #main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 12px var(--gutter) 20px;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 16px 24px rgba(16, 30, 54, .12);
	}
	.js .nav-open #main-nav {
		display: flex;
	}
	.js #main-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.js #main-nav li + li {
		border-top: 1px solid var(--line);
	}
	.js #main-nav li a {
		padding: 14px 8px;
		font-size: 16px;
		border-radius: 0;
	}
	.js #main-nav li.current a::after {
		left: 0;
		right: auto;
		top: 12px;
		bottom: 12px;
		width: 3px;
		height: auto;
	}
	.js #main-nav li.current a {
		padding-left: 16px;
	}
}

@media (max-width: 960px) {
	.bodycontent {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

@media (max-width: 640px) {
	:root {
		--gutter: 16px;
		--radius: 12px;
	}

	.topbar-item:not(.topbar-phone) {
		display: none;
	}
	.topbar .wrapper {
		justify-content: center;
	}

	.hero {
		margin-top: 16px;
	}
	.hero .gallery-cycle .gallery-text {
		padding-top: 48px;
	}
	.hero .gallery-cycle .gallery-text p {
		display: none;
	}

	.bodycontent {
		margin-top: 16px;
		margin-bottom: 32px;
	}

	/* Layout-Tabellen untereinander statt nebeneinander */
	article section table,
	article section tbody,
	article section tr,
	article section td {
		display: block;
		width: auto !important;
	}
	article section td + td {
		border-left: 0;
		border-top: 1px solid var(--line);
	}
	article section td {
		padding: 18px;
	}

	article input[type="text"],
	article input[type="email"],
	article input[type="tel"],
	article select,
	article textarea {
		width: 100%;
	}

	.trade_slider img.cartrades {
		height: 36px;
	}
	.footer-bottom .wrapper {
		flex-direction: column;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trade_slider-track {
		animation: none;
	}
	.trade_slider {
		overflow-x: auto;
	}
	*, *::before, *::after {
		transition: none !important;
	}
}

@media print {
	.topbar,
	.site-header nav,
	.nav-toggle,
	.hero,
	aside,
	.trade_slider,
	.skip-link {
		display: none !important;
	}
	.site-header {
		position: static;
		box-shadow: none;
	}
	body {
		background: #fff;
	}
	.bodycontent {
		display: block;
	}
	article {
		border: 0;
		box-shadow: none;
	}
	.footer-bottom {
		background: none;
		color: #000;
	}
}
