/* ==========================================================================
   Freiwillige Feuerwehr Fridingen – Template-Stylesheet
   Angelehnt an das Layout von feuerwehr-steisslingen.de
   ========================================================================== */

/* Self-hosted fonts (variable woff2 from Google Fonts, SIL OFL) – no request
   to Google, so no visitor data leaves the site for typography. */
@font-face {
	font-family: 'Archivo';
	font-style: normal;
	font-weight: 700 900;
	font-display: swap;
	src: url('../fonts/archivo-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: 'Archivo';
	font-style: normal;
	font-weight: 700 900;
	font-display: swap;
	src: url('../fonts/archivo-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;
}
@font-face {
	font-family: 'Source Sans 3';
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url('../fonts/source-sans-3-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: 'Source Sans 3';
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url('../fonts/source-sans-3-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 {
	--color-primary: #6b6660;
	--color-primary-dark: #46423d;
	--color-primary-soft: #ece8e3;
	--color-ink: #201f1d;
	--color-paper: #faf9f7;
	--color-line: #e7e2db;
	--color-accent: #f2a900;
	--font-display: 'Archivo', system-ui, sans-serif;
	--font-body: 'Source Sans 3', system-ui, sans-serif;
	--max-width: 1180px;
	--radius: 16px;
	--radius-pill: 999px;
	--ease: cubic-bezier(.16, 1, .3, 1);
	--color-surface: #fff;
	--color-muted: #4a4744;
	--color-alert: #b5121b;
	--color-alert-soft: #f7e3e2;
	/* Brand red for interactive elements and small accents. The logo red
	   (#f70a0a) is too light for text on white (4.2:1), so the UI uses the
	   same hue darkened: brand 5.4:1, brand-dark 7.9:1. */
	--color-brand: #d40d12;
	--color-brand-dark: #a50e15;
	--color-brand-soft: #fdecea;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--color-ink);
	background: var(--color-paper);
	line-height: 1.6;
}

img { max-width: 100%; display: block; }

.wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: var(--color-primary);
	color: var(--color-surface);
	padding: 10px 16px;
	z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

a { color: var(--color-primary-dark); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	margin: 0 0 0.5em;
}

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.82);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	border-bottom: 1px solid rgba(32,31,29,.08);
	border-top: 3px solid var(--color-brand);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.site-header { background: var(--color-surface); }
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 76px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--color-ink);
}
.brand-logo { height: 46px; width: auto; }
/* logo.png already contains the wordmark, so the text label is
   screen-reader-only to avoid a visible duplicate next to the image */
.brand-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
}
.nav-toggle span {
	display: block;
	height: 2px;
	background: var(--color-ink);
	border-radius: 2px;
	transition: transform .25s var(--ease), opacity .2s var(--ease);
}
/* Open state: the three bars turn into an "X" (bar pitch = 2px + 5px gap) */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
}
/* Top-level items keep their natural, text-based width (default flex
   sizing) rather than being stretched to an equal share. */
.main-nav a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 14px;
	text-decoration: none;
	color: var(--color-ink);
	font-weight: 600;
	font-size: 15px;
	border-bottom: 3px solid transparent;
	transition: border-color .2s var(--ease), color .2s var(--ease);
}
/* Tighten the gap to the dropdown arrow for items that have one. */
.main-nav a:has(+ .mod-menu__toggle-sub) { padding-right: 4px; }
.main-nav a:hover,
.main-nav li.active > a {
	color: var(--color-brand);
	border-bottom-color: var(--color-brand);
}
/* Submenus */
/* display:flex on <li> keeps the label and the dropdown-toggle arrow
   button on one line instead of the arrow wrapping below (the arrow's
   <button> is a sibling of <a>, not nested inside it). */
.main-nav li {
	position: relative;
	display: flex;
	align-items: center;
}
/* Inside dropdowns (not the top-level bar), let the link fill the row
   so hover highlighting covers the full width, not just the text. */
.main-nav ul ul li > a { flex: 1 1 auto; }
.main-nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--color-surface);
	border: 1px solid rgba(32,31,29,.08);
	border-radius: var(--radius);
	min-width: 220px;
	box-shadow: 0 2px 8px rgba(32,31,29,.06), 0 20px 40px rgba(32,31,29,.14);
	flex-direction: column;
	padding: 6px;
}
.main-nav ul ul a {
	display: flex;
	align-items: center;
	min-height: 44px;
	border-bottom: none;
	padding: 0 12px;
	border-radius: calc(var(--radius) - 6px);
}
.main-nav ul ul a:hover { background: var(--color-paper); color: var(--color-brand); }
/* From the 3rd level down (e.g. Ausrüstung > Fahrzeuge > KdoW), open as a
   side flyout instead of dropping down again — otherwise it lands on top
   of the 2nd-level panel it belongs to and covers it. */
.main-nav ul ul ul {
	top: -6px;
	left: calc(100% + 8px);
	border-radius: var(--radius);
}
/* Desktop only: reveal dropdowns with a soft fade + slide instead of a hard
   display cut, and give the flyout a small floating gap (Apple-style
   floating menu) instead of sitting flush against its parent. */
@media (min-width: 881px) {
	/* Closing is delayed by .3s (hover intent) and only visibility switches
	   interactivity, so a submenu stays usable while the pointer briefly
	   leaves its parent – e.g. moving diagonally from "Fahrzeuge" to the side
	   flyout across "Feuerwehrmagazin". (pointer-events:none used to cut it
	   off instantly, so the flyout could not be reached.) */
	.main-nav ul ul {
		display: flex;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity .18s var(--ease) .3s, transform .18s var(--ease) .3s, visibility 0s linear .48s;
	}
	.main-nav ul ul ul { transform: translateX(-6px); }
	.main-nav li:hover > ul,
	.main-nav li:focus-within > ul,
	.main-nav li > ul.show-menu {
		opacity: 1;
		visibility: visible;
		transform: translate(0, 0);
		transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s;
	}
	/* Invisible bridge across the 8px gap between the dropdown and the side
	   flyout, so the parent item stays hovered on the way over. */
	.main-nav ul ul ul::before {
		content: "";
		position: absolute;
		top: 0;
		bottom: 0;
		left: -16px;
		width: 16px;
	}
}

/* Joomla's mod_menu ships a "Weitere Informationen: X" label for screen readers
   inside .visually-hidden — that class only works if Bootstrap's CSS is loaded,
   which this template doesn't include, so it was rendering as visible text. */
.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
/* The dropdown-toggle button + chevron icon from mod_menu also need styling,
   since no icon font/Bootstrap CSS is loaded for them either. */
.main-nav .mod-menu__toggle-sub {
	background: none;
	border: none;
	padding: 0 4px 0 0;
	margin: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}
.main-nav .icon-chevron-down {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid var(--color-ink);
	opacity: .6;
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background-image: linear-gradient(180deg, rgba(15,5,4,.35), rgba(110,10,16,.55)), url('../images/hero-fire.jpg');
	background-size: cover;
	background-position: center 62%;
	color: var(--color-surface);
	padding: 130px 24px 150px;
	text-align: center;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.12), transparent 55%);
	pointer-events: none;
}
.hero-eyebrow {
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 14px;
	opacity: .9;
	margin: 0 0 10px;
}
.hero-title {
	font-size: clamp(28px, 4.5vw, 46px);
	margin: 0 0 18px;
	font-weight: 800;
	text-transform: none;
	letter-spacing: -.01em;
}
.hero-text {
	max-width: 620px;
	margin: 0 auto;
	font-size: 17px;
	opacity: .95;
}
.hero-actions {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 26px;
	border-radius: var(--radius-pill);
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
/* White with red text: a red button would blend into the red-tinted hero photo. */
.btn-primary { background: var(--color-surface); color: var(--color-brand); }
.btn-primary:hover { background: var(--color-brand-soft); color: var(--color-brand-dark); }
.btn-ghost { color: var(--color-surface); border-color: rgba(255,255,255,.85); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
/* The default dark focus ring would disappear on the dark hero photo. */
.hero a:focus-visible { outline-color: var(--color-surface); }
@media (max-width: 480px) {
	.hero-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-inline: auto; }
}
/* On wide screens the hero's fixed padding-based height creates a very
   wide/short box; background-size:cover then has to crop most of the
   (near-square) photo's height, leaving mostly ceiling flame visible and
   cropping out the firefighters. A viewport-height floor keeps the box
   proportionally closer to the photo, so more of it stays visible. */
@media (min-width: 881px) {
	.hero { min-height: 56vh; }
}

/* ---------- Teaser cards ---------- */
.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: -64px;
	position: relative;
	z-index: 5;
	align-items: stretch;
}
.card {
	background: var(--color-surface);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: var(--color-ink);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover {
	transform: translateY(-6px);
	box-shadow: 0 4px 12px rgba(32,31,29,.10), 0 24px 48px rgba(32,31,29,.18);
}
/* Placeholder icon standing in for a future photo per card */
.card-icon {
	width: 60px;
	height: 60px;
	margin: 24px 0 4px 22px;
	border-radius: 50%;
	background: var(--color-primary-soft);
	color: var(--color-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform .3s var(--ease);
}
.card:hover .card-icon { transform: scale(1.06); }
/* Photo across the top of a teaser card (replaces the placeholder icon) */
.card-photo { aspect-ratio: 3 / 2; overflow: hidden; background: var(--color-primary-soft); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card-photo img { transform: scale(1.04); }
.card-body {
	padding: 16px 22px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.card-body h3 { font-size: 19px; margin-bottom: 8px; }
.card-body p { margin: 0 0 16px; font-size: 15px; color: var(--color-muted); }
.card-link {
	margin-top: auto;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	font-size: 14px;
	color: var(--color-brand-dark);
	background: var(--color-brand-soft);
	padding: 10px 18px;
	border-radius: var(--radius-pill);
	text-transform: none;
	letter-spacing: normal;
	transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.card:hover .card-link {
	background: var(--color-brand);
	color: var(--color-surface);
	transform: translateX(2px);
}

/* ---------- Main content ---------- */
.site-main { padding: 56px 24px 72px; }
.site-main.has-top-space { padding-top: 40px; }
.content-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}
.content-grid:has(.content-sidebar) { grid-template-columns: 2fr 1fr; }
.content-main a:not([class]) { color: var(--color-brand-dark); }
/* In-page sections (e.g. Mitmachen): keep anchored headings clear of the
   sticky header, and lay the jump buttons out in a row. */
.content-main [id] { scroll-margin-top: 100px; }
.jump-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.com-content-article__body > h2:not(:first-child) { margin-top: 1.6em; }
/* Short red bar under page titles and section headings */
.page-header h1::after,
.section-heading::after,
.com-content-article__body > h2:first-child::after {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	margin-top: 12px;
	border-radius: 2px;
	background: var(--color-brand);
}

/* ---------- Breadcrumbs (subpages, mod_breadcrumbs) ---------- */
.mod-breadcrumbs__wrapper { margin: 0 0 20px; }
.mod-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 0;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: var(--color-muted);
}
/* mod_breadcrumbs ships an icon "divider" and a "Aktuelle Seite:" label meant
   for Bootstrap; neither is wanted here (the nav already has an aria-label). */
.mod-breadcrumbs__divider,
.mod-breadcrumbs__here { display: none; }
.mod-breadcrumbs__item + .mod-breadcrumbs__item::before {
	content: "›";
	margin: 0 8px;
	color: var(--color-line);
	font-weight: 700;
}
.mod-breadcrumbs__item a { color: var(--color-muted); text-decoration: none; }
.mod-breadcrumbs__item a:hover { color: var(--color-brand-dark); text-decoration: underline; }
.mod-breadcrumbs__item.active { color: var(--color-ink); font-weight: 600; }

/* ---------- Instagram feed (home page only) ---------- */
.instagram-section { padding: 8px 24px 56px; }
.section-heading { font-size: 26px; margin: 0 0 24px; text-align: left; }
/* Latest posts, served locally (images/instagram, see index.php): square
   crops like the Instagram grid, with date and first caption line. */
.insta-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.insta-post { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--color-ink); }
.insta-post__img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	margin-bottom: 6px;
	border-radius: var(--radius);
	background: var(--color-primary-soft);
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
}
.insta-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.insta-post:hover .insta-post__img img { transform: scale(1.04); }
.insta-post__date { font-size: 13px; font-weight: 600; color: var(--color-muted); }
.insta-post__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}
.insta-post:hover .insta-post__title { color: var(--color-brand-dark); }
.insta-more { margin: 24px 0 0; }
/* News page: all fetched posts, 3 per row (6 posts = 2 even rows) */
.news-insta { margin-top: 28px; }
.news-insta .insta-grid { grid-template-columns: repeat(3, 1fr); }
.btn-outline { color: var(--color-brand-dark); border-color: var(--color-brand-dark); }
.btn-outline:hover { background: var(--color-brand-soft); }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--color-paper);
	color: var(--color-muted);
	border-top: 1px solid var(--color-line);
	margin-top: 40px;
}
.footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px;
	padding: 48px 24px 32px;
}
.footer-col h3 {
	color: var(--color-ink);
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: 14px;
}
/* The one place on the site that keeps the fire-brand red: a genuine
   emergency number deserves the semantically correct alarm colour, unlike
   the neutral grey used for ordinary calls-to-action elsewhere. */
.emergency-badge {
	display: inline-block;
	background: var(--color-alert-soft);
	color: var(--color-alert);
	font-weight: 700;
	padding: 10px 20px;
	border-radius: var(--radius-pill);
	margin: 0 0 14px;
}
/* tel: link fills the whole pill so the full badge is the tap target. */
.footer-col .emergency-badge a {
	display: block;
	margin: -10px -20px;
	padding: 10px 20px;
	border-radius: inherit;
	color: inherit;
	text-decoration: none;
}
.footer-address { font-style: normal; margin: 0 0 10px; }
.footer-address strong { color: var(--color-ink); }
.footer-col a { color: var(--color-muted); }
.footer-col a:hover { color: var(--color-brand-dark); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.social-links { display: flex; gap: 12px; }
.social-links li { margin-bottom: 0; }
.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-primary-soft);
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.social-link svg { width: 20px; height: 20px; }
.footer-col .social-link:hover {
	background: var(--color-brand);
	color: var(--color-surface);
}
.footer-bottom {
	border-top: 1px solid var(--color-line);
	padding: 18px 24px;
	font-size: 13px;
	color: var(--color-muted);
}

/* ---------- Vehicle detail pages (Fahrzeugseiten) ---------- */
.veh-lede { margin: 4px 0 24px; color: var(--color-muted); font-size: 16px; }
.veh-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 28px; }
.veh-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 13px;
	color: var(--color-primary);
	background: var(--color-primary-soft);
	padding: 8px 16px;
	border-radius: var(--radius-pill);
}
.veh-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 36px;
}
.veh-stat {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 16px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.veh-stat-icon {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--color-primary-soft);
	color: var(--color-brand);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.veh-stat-icon svg { width: 20px; height: 20px; }
.veh-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); font-weight: 700; }
.veh-stat-value { font-size: 15px; font-weight: 700; line-height: 1.3; }
.veh-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.veh-section { margin-bottom: 32px; }
.veh-section h2 { font-size: 21px; margin: 0 0 12px; }
.veh-section h3 { font-size: 16px; margin: 0 0 12px; }
.veh-lead-text { font-size: 15.5px; line-height: 1.65; }
.veh-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.veh-checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.4; }
.veh-checklist li svg { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; color: var(--color-brand); }
.veh-abcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.veh-abcard {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 18px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;
	color: var(--color-ink);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.veh-abcard:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(32,31,29,.10), 0 24px 48px rgba(32,31,29,.18); }
.veh-abcard-title { font-weight: 700; font-size: 14px; }
.veh-abcard-desc { font-size: 12.5px; color: var(--color-muted); line-height: 1.4; }
.veh-side { display: flex; flex-direction: column; gap: 20px; }
.veh-card {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 20px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
}
.veh-standort { display: flex; gap: 12px; align-items: flex-start; }
.veh-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08); }
.veh-photo-inner {
	height: 200px;
	background: var(--color-primary-soft);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: var(--color-primary);
}
.veh-photo-inner svg { width: 32px; height: 32px; }
.veh-photo-inner span { font-size: 13px; font-weight: 600; }
.veh-navlist { list-style: none; margin: 0; padding: 0; }
.veh-navlist li { border-bottom: 1px solid var(--color-line); }
.veh-navlist li:last-child { border-bottom: none; }
.veh-navlist a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 0;
	font-weight: 600;
	font-size: 14px;
	color: var(--color-ink);
	text-decoration: none;
}
.veh-navlist a:hover { color: var(--color-brand); }
.veh-navlist svg { color: var(--color-brand); flex-shrink: 0; }
.veh-backlink { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--color-brand-dark); text-decoration: none; }
.veh-backlink:hover { color: var(--color-brand); }
.veh-info-box {
	background: var(--color-surface);
	border-left: 4px solid var(--color-accent);
	border-radius: 12px;
	padding: 22px 24px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
}
.veh-info-box .veh-stat-icon { background: transparent; color: var(--color-accent); width: auto; height: auto; }
.veh-note {
	border: 1.5px dashed var(--color-line);
	border-radius: 12px;
	padding: 16px 20px;
	font-size: 14px;
	color: var(--color-muted);
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 24px;
}
.veh-note svg { flex-shrink: 0; margin-top: 1px; width: 18px; height: 18px; color: var(--color-muted); }

/* ---------- Vehicle overview page (Fahrzeugübersicht) ---------- */
.veh-overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 8px; }
.veh-overview-card {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-decoration: none;
	color: var(--color-ink);
	transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.veh-overview-card:hover { transform: translateY(-6px); box-shadow: 0 4px 12px rgba(32,31,29,.10), 0 24px 48px rgba(32,31,29,.18); }
.veh-overview-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--color-primary-soft);
	color: var(--color-brand);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: transform .3s var(--ease);
}
.veh-overview-icon svg { width: 26px; height: 26px; }
.veh-overview-card:hover .veh-overview-icon { transform: scale(1.06); }
.veh-overview-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.veh-overview-sub { font-size: 14px; color: var(--color-muted); margin-top: -8px; }
.veh-overview-arrow { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--color-brand-dark); }
.veh-overview-arrow svg { transition: transform .2s var(--ease); }
.veh-overview-card:hover .veh-overview-arrow { color: var(--color-brand-dark); }
.veh-overview-card:hover .veh-overview-arrow svg { transform: translateX(3px); }
.veh-overview-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Vehicle photo at the top of overview / Abrollbehälter cards, bleeding to
   the card edges (negative margins cancel the card padding). */
.veh-thumb {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--color-primary-soft);
	border-radius: var(--radius) var(--radius) 0 0;
}
.veh-overview-card .veh-thumb { margin: -24px -24px 0; }
.veh-abcard .veh-thumb { margin: -18px -18px 0; }
.veh-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.veh-overview-card:hover .veh-thumb img,
.veh-abcard:hover .veh-thumb img { transform: scale(1.04); }
.veh-thumb--placeholder { display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
	.veh-thumb img, .card-photo img, .insta-post__img img { transition: none; }
}

/* ---------- Real photos inside veh-photo (Über uns pages) ---------- */
.veh-photo img { width: 100%; height: auto; display: block; }
.veh-photo-caption { padding: 12px 16px; font-size: 13px; color: var(--color-muted); background: var(--color-surface); }

/* ---------- Vehicle photo thumbnail + lightbox ---------- */
.veh-photo-link { display: block; position: relative; cursor: zoom-in; }
.veh-photo-link img { aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s var(--ease); }
.veh-photo-link:hover img { transform: scale(1.03); }
.veh-photo-zoom {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,.9);
	color: var(--color-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(32,31,29,.2);
}
.veh-photo-zoom svg { width: 18px; height: 18px; }
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(20,19,18,.88);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.5); cursor: default; }
.lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255,255,255,.15);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-close:focus-visible { outline-color: #fff; }
body.lightbox-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
	.veh-photo-link img { transition: none; }
}

/* ---------- Person / contact cards (Über uns pages) ---------- */
.person-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.person-card {
	background: var(--color-surface);
	border-radius: var(--radius);
	padding: 18px 20px;
	box-shadow: 0 1px 3px rgba(32,31,29,.06), 0 8px 20px rgba(32,31,29,.08);
}
.person-role { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); font-weight: 700; margin-bottom: 4px; }
.person-name { font-size: 16px; font-weight: 700; font-family: var(--font-display); }
.person-phone { font-size: 14px; color: var(--color-primary-dark); margin-top: 6px; }
.person-phone a { color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
	.nav-toggle { display: flex; }
	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-surface);
		border-bottom: 1px solid var(--color-line);
		/* The page behind is locked while the menu is open, so a long submenu
		   (Fahrzeuge) has to scroll inside the menu itself. */
		max-height: calc(100vh - 80px);
		max-height: calc(100dvh - 80px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.main-nav.is-open { display: block; }
	/* Open menu: dim the page and stop it from scrolling; a tap on the dimmed
	   area closes the menu (js/script.js). */
	body.nav-open { overflow: hidden; }
	/* The translucent header would let the dimming show through */
	body.nav-open .site-header { background: var(--color-surface); }
	body.nav-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 90;
		background: rgba(20,19,18,.4);
	}
	.main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
	/* Each li lays its link + toggle button out as a row (unchanged from
	   desktop), but a nested submenu is also a direct flex child of that
	   same li — without wrapping it would try to sit beside the link
	   instead of below it. flex-wrap + a full-width basis on the child ul
	   forces the submenu onto its own line while keeping the link/button
	   row intact. */
	.main-nav li { flex-wrap: wrap; }
	.main-nav li > ul { flex: 1 1 100%; }
	.main-nav ul ul { position: static; box-shadow: none; border: none; padding-left: 12px; display: none; }
	/* Link fills the row and navigates; the arrow button on the right is a
	   full 44px tap target that toggles the submenu (.show-menu is set by
	   Joomla's menu.js). */
	.main-nav li > a { flex: 1 1 auto; }
	.main-nav .mod-menu__toggle-sub { width: 44px; height: 44px; padding: 0; justify-content: center; flex-shrink: 0; }
	.main-nav .icon-chevron-down { border-left-width: 6px; border-right-width: 6px; border-top-width: 7px; transition: transform .2s var(--ease); }
	.main-nav .mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down { transform: rotate(180deg); }
	.main-nav li > ul.show-menu { display: flex; }
	/* Footer links: comfortable 44px tap height on touch screens */
	.footer-col li { margin-bottom: 0; }
	.footer-col li a { display: inline-flex; align-items: center; min-height: 44px; }
	.social-link { width: 44px; height: 44px; }
	/* Vehicle pages: show the photo right below the title block instead of
	   after the whole text column. The grid and sidebar wrappers dissolve
	   (display: contents) so their children can be reordered in one column. */
	.com-content-article__body:has(> .veh-grid .veh-photo-link) { display: flex; flex-direction: column; }
	.com-content-article__body:has(> .veh-grid .veh-photo-link) > .veh-grid,
	.com-content-article__body:has(> .veh-grid .veh-photo-link) .veh-side { display: contents; }
	.com-content-article__body:has(> .veh-grid .veh-photo-link) > .veh-lede,
	.com-content-article__body:has(> .veh-grid .veh-photo-link) > .veh-badges { order: -2; }
	.com-content-article__body:has(> .veh-grid .veh-photo-link) .veh-photo { order: -1; margin-bottom: 28px; }
	.com-content-article__body:has(> .veh-grid .veh-photo-link) .veh-card { margin-bottom: 20px; }
	.com-content-article__body:has(> .veh-grid .veh-photo-link) .veh-backlink { align-self: flex-start; }
	.cards { grid-template-columns: 1fr; margin-top: 24px; }
	.hero { padding: 90px 20px 100px; }
	.footer-grid { grid-template-columns: 1fr; }
	.content-grid:has(.content-sidebar) { grid-template-columns: 1fr; }
	.veh-grid { grid-template-columns: 1fr; }
	.veh-stats { grid-template-columns: repeat(2, 1fr); }
	/* Odd number of stat tiles: let the last one span the full row instead
	   of standing alone in the left column. */
	.veh-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.insta-grid,
	.news-insta .insta-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
	.veh-checklist { grid-template-columns: 1fr; }
	.veh-abcards { grid-template-columns: repeat(2, 1fr); }
	.veh-overview-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.card, .card-icon, .card-link, a, .main-nav ul ul, .main-nav .icon-chevron-down, .nav-toggle span { transition: none; }
	.btn:hover { transform: none; }
}

/* Keyboard focus */
/* Uses primary-dark rather than the accent colour so it can't be mistaken
   for the "Notfall" badge. The footer used to sit on a dark background and
   needed its own lighter outline override; now that it shares the page's
   light background, the default works everywhere. */
a:focus-visible, button:focus-visible {
	outline: 3px solid var(--color-primary-dark);
	outline-offset: 2px;
}
