/*
Theme Name: FF Himmelgeist/Itter
Description: Eigenständiges One-Pager-Theme für die Löschgruppe Himmelgeist/Itter der Freiwilligen Feuerwehr Düsseldorf. Mit Fahrzeugverwaltung, Customizer-Texten und eingebautem Kontaktformular – ohne zusätzliche Plugins.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Author: Löschgruppe Himmelgeist/Itter
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ffhi
*/

/* ---------- Grundwerte ---------- */
:root {
	--ffhi-accent: #A3121A;
	--ffhi-accent-dark: #7A0D13;
	--ffhi-ink: #1B1D1F;
	--ffhi-text: #3A3A3A;
	--ffhi-muted: #5A5A5A;
	--ffhi-bg: #F5F3EF;
	--ffhi-white: #FFFFFF;
	--ffhi-line: #E2DED7;
	--ffhi-field: #8F897F;
	--ffhi-dark: #1B1D1F;
	--ffhi-darker: #111214;
	--ffhi-on-dark: #E4E2DE;
	--ffhi-on-dark-muted: #C9C6C0;
	--ffhi-accent-on-dark: #FF8A80;

	--font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

	--container: 1200px;
	--gutter: 24px;
	--section-y: 96px;
	--radius: 6px;
}

@media (max-width: 720px) {
	:root {
		--gutter: 16px;
		--section-y: 64px;
	}
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

/* Platz für den fixierten Header beim Springen zu Ankern */
[id] { scroll-margin-top: 88px; }

body {
	margin: 0;
	background: var(--ffhi-bg);
	color: var(--ffhi-ink);
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--ffhi-accent); }
a:hover { color: var(--ffhi-accent-dark); }

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

h1, h2, h3 {
	font-family: var(--font-display);
	color: inherit;
	margin: 0;
	text-wrap: balance;
	overflow-wrap: break-word;
	hyphens: auto;
}

h2 { font-size: clamp(36px, 4.5vw, 48px); font-weight: 700; line-height: 1; }
h3 { font-size: 24px; font-weight: 700; line-height: 1.1; }
p { margin: 0; }

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.container--narrow { max-width: calc(800px + 2 * var(--gutter)); }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 1000;
	background: var(--ffhi-white);
	padding: 12px 16px;
	border-radius: 4px;
}
.skip-link:focus { left: 8px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 14px 28px;
	border-radius: 4px;
	border: 1px solid transparent;
	font-family: var(--font-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--ffhi-accent); color: var(--ffhi-white); }
.btn--primary:hover { background: var(--ffhi-accent-dark); color: var(--ffhi-white); }
.btn--ghost { background: transparent; color: var(--ffhi-white); border-color: rgba(255,255,255,.65); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: var(--ffhi-white); }
.btn--light { background: var(--ffhi-white); color: var(--ffhi-ink); }
.btn--light:hover { background: var(--ffhi-on-dark); color: var(--ffhi-ink); }
.btn--start { align-self: flex-start; margin-top: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ffhi-white);
	border-bottom: 1px solid var(--ffhi-line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.brand {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ffhi-ink);
	text-decoration: none;
	min-width: 0;
}
.brand:hover { color: var(--ffhi-ink); }
.brand-logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.brand-logo--placeholder {
	display: flex; align-items: center; justify-content: center;
	border-radius: var(--radius);
	background: var(--ffhi-accent);
	color: var(--ffhi-white);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.brand-sub { font-size: 13px; color: var(--ffhi-muted); }

.nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 22px;
}
.nav-menu a {
	display: inline-block;
	padding: 12px 0;
	color: var(--ffhi-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: var(--ffhi-accent); }
.nav-menu .menu-cta a,
.nav-menu .menu-cta a:hover {
	background: var(--ffhi-accent);
	color: var(--ffhi-white);
	padding: 12px 20px;
	border-radius: 4px;
}
.nav-menu .menu-cta a:hover { background: var(--ffhi-accent-dark); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
	.js-nav .nav-toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		min-height: 44px;
		padding: 8px 14px;
		border: 1px solid var(--ffhi-line);
		border-radius: 4px;
		background: var(--ffhi-white);
		color: var(--ffhi-ink);
		font: 600 15px/1 var(--font-body);
		cursor: pointer;
	}
	.nav-toggle-bars,
	.nav-toggle-bars::before,
	.nav-toggle-bars::after {
		display: block;
		width: 20px;
		height: 2px;
		background: currentColor;
		position: relative;
		transition: transform .15s ease;
	}
	.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); }

	.js-nav .brand { flex: 1 1 0; }
	.js-nav .main-nav { display: none; width: 100%; }
	.js-nav.nav-open .main-nav { display: block; }
	.main-nav { width: 100%; }
	.nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
	.nav-menu li { border-top: 1px solid var(--ffhi-line); }
	.nav-menu a { display: block; padding: 14px 0; font-size: 17px; }
	.nav-menu .menu-cta { border-top: 0; margin-top: 8px; }
	.nav-menu .menu-cta a { text-align: center; }
}

@media (max-width: 480px) {
	.brand-logo { width: 40px; height: 40px; }
	.brand-logo--placeholder { font-size: 17px; }
	.brand-name { font-size: 18px; }
	.brand-sub { font-size: 12px; }
	.nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background-color: var(--ffhi-dark);
	background-image: repeating-linear-gradient(135deg, #24272A 0, #24272A 14px, #1F2124 14px, #1F2124 28px);
	color: var(--ffhi-white);
}
.hero--image {
	background-image: linear-gradient(rgba(17,18,20,.72), rgba(17,18,20,.72)), var(--hero-image);
	background-size: cover;
	background-position: center;
}
.hero-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-top: clamp(72px, 10vw, 128px);
	padding-bottom: clamp(64px, 8vw, 104px);
}
.hero-title {
	font-weight: 800;
	font-size: clamp(44px, 7vw, 88px);
	line-height: .95;
	max-width: 900px;
}
.hero-text { font-size: 20px; line-height: 1.5; max-width: 640px; color: var(--ffhi-on-dark); }

.notruf { position: relative; background: var(--ffhi-accent); color: var(--ffhi-white); }
.notruf-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}
.notruf-number { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.notruf-text { font-size: 16px; font-weight: 600; line-height: 1.4; }

/* ---------- Abschnitte ---------- */
.section { padding: var(--section-y) 0; }
.section--white { background: var(--ffhi-white); border-top: 1px solid var(--ffhi-line); border-bottom: 1px solid var(--ffhi-line); }
.section--dark { background: var(--ffhi-dark); color: var(--ffhi-white); }
.section--dark p { color: var(--ffhi-on-dark); }
.section--dark .eyebrow { color: var(--ffhi-accent-on-dark); }

.eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ffhi-accent);
}

.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack > p, .section-head > p { color: var(--ffhi-text); }
.section--dark .stack > p { color: var(--ffhi-on-dark); }

.split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 56px;
	align-items: center;
}
.split--media-first { align-items: start; }
@media (max-width: 860px) {
	.split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.split--media-first > .media { order: 2; }
}

.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: 40px; }

/* ---------- Bilder ---------- */
.media { border-radius: var(--radius); overflow: hidden; background: #E6E2DB; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-16-10 { aspect-ratio: 16 / 10; border-radius: 0; }
.media-placeholder {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--ffhi-muted);
	background: repeating-linear-gradient(135deg, #E6E2DB 0, #E6E2DB 12px, #DEDAD2 12px, #DEDAD2 24px);
}
.section--dark .media { background: #2A2D30; }
.section--dark .media-placeholder {
	color: var(--ffhi-on-dark-muted);
	background: repeating-linear-gradient(135deg, #2A2D30 0, #2A2D30 12px, #24272A 12px, #24272A 24px);
}

/* ---------- Über uns: Kennzahlen ---------- */
.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 12px 0 0;
}
.stat { border-top: 3px solid var(--ffhi-accent); padding-top: 12px; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.1; }
.stat-label { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ffhi-muted); }

/* ---------- Fahrzeuge ---------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}
@media (max-width: 360px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }
.card {
	display: flex;
	flex-direction: column;
	background: var(--ffhi-bg);
	border: 1px solid var(--ffhi-line);
	border-radius: var(--radius);
	overflow: hidden;
}
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 26px; }
.card-body h3 { font-size: 26px; line-height: 1.05; }
.card-body p { font-size: 16px; line-height: 1.6; color: var(--ffhi-text); }
.badge {
	align-self: flex-start;
	background: var(--ffhi-ink);
	color: var(--ffhi-white);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.3;
	padding: 4px 10px;
	border-radius: 3px;
}
.specs {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	margin: 6px 0 0;
	font-size: 14px;
}
.specs dt { color: var(--ffhi-muted); }
.specs dd { margin: 0; font-weight: 600; }

/* ---------- Einsatzabteilung ---------- */
.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 8px;
}
.info-box { background: var(--ffhi-white); border: 1px solid var(--ffhi-line); border-radius: var(--radius); padding: 20px; }
.info-box h3 { font-size: 22px; margin-bottom: 6px; }
.info-box p { font-size: 15px; line-height: 1.55; color: var(--ffhi-text); }
.list-title { margin-top: 12px; }
.check-list { margin: 0; padding: 0; list-style: none; color: var(--ffhi-text); font-size: 17px; }
.check-list li { position: relative; padding: 4px 0 4px 30px; }
.check-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 13px;
	width: 14px;
	height: 8px;
	border-left: 3px solid var(--ffhi-accent);
	border-bottom: 3px solid var(--ffhi-accent);
	transform: rotate(-45deg);
}

/* ---------- Jugendfeuerwehr ---------- */
.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin: 0;
}
.fact { border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 18px; }
.fact dt { font-size: 13px; color: var(--ffhi-on-dark-muted); }
.fact dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; color: var(--ffhi-white); }

/* ---------- Kontakt ---------- */
.contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 56px;
	align-items: start;
}
@media (max-width: 960px) { .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.icon-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.5; }
.icon-list li { display: flex; gap: 12px; align-items: flex-start; }
.icon-list svg { flex: none; color: var(--ffhi-accent); margin-top: 1px; }
.icon-list a { word-break: break-word; }

.notice {
	background: var(--ffhi-white);
	border-left: 4px solid var(--ffhi-accent);
	padding: 16px 18px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ffhi-text);
}

.contact-form-wrap { min-width: 0; }
.contact-form {
	background: var(--ffhi-white);
	border: 1px solid var(--ffhi-line);
	border-radius: var(--radius);
	padding: 32px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
@media (max-width: 600px) {
	.contact-form { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea {
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--ffhi-field);
	border-radius: 4px;
	background: var(--ffhi-white);
	color: var(--ffhi-ink);
	font: 400 16px/1.5 var(--font-body);
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--ffhi-accent); box-shadow: 0 0 0 3px rgba(163,18,26,.2); }
.field [aria-invalid="true"] { border-color: var(--ffhi-accent); }
.field-error { font-size: 14px; color: var(--ffhi-accent); font-weight: 600; }

.field--check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ffhi-accent); flex: none; }
.field--check label { flex: 1 1 0; font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--ffhi-text); }
.field--check .field-error { flex-basis: 100%; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.form-hint { font-size: 13px; color: var(--ffhi-muted); }

.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-message { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; font-size: 16px; line-height: 1.5; }
.form-message h3 { margin-bottom: 6px; }
.form-message--ok { background: var(--ffhi-white); border: 1px solid var(--ffhi-line); border-left: 4px solid #2E7D32; padding: 32px; }
.form-message--error { background: #FBEAEA; border: 1px solid #E8B4B6; color: #6E0B11; }

/* ---------- Unterseiten (Impressum, Datenschutz, Beiträge) ---------- */
.page-title { font-weight: 800; font-size: clamp(38px, 5vw, 56px); line-height: 1; margin-bottom: 28px; }
.entry + .entry { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--ffhi-line); }
.entry-title { font-size: 32px; margin-bottom: 6px; }
.entry-title a { color: var(--ffhi-ink); text-decoration: none; }
.entry-title a:hover { color: var(--ffhi-accent); }
.entry-meta { font-size: 14px; color: var(--ffhi-muted); margin-bottom: 16px; }
.entry-image { margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; }
.entry-content { color: var(--ffhi-text); }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { font-size: 32px; margin-top: 1.5em; color: var(--ffhi-ink); }
.entry-content h3 { margin-top: 1.4em; color: var(--ffhi-ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.nav-links { display: flex; gap: 16px; margin-top: 48px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ffhi-darker); color: var(--ffhi-on-dark-muted); }
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding-top: 36px;
	padding-bottom: 36px;
	font-size: 14px;
}
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-menu a { color: var(--ffhi-on-dark); }
.footer-menu a:hover { color: var(--ffhi-white); }
