/* ==========================================================================
   Elektriker Freiburg – main.css (mobile-first)
   Farben: Dunkelblau #101D2B, Gelb #F4B728, Weiß, Hellgrau
   Schrift: Systemschriften (keine externen Fonts, DSGVO-freundlich)
   ========================================================================== */

:root {
	--ef-navy: #101d2b;
	--ef-navy-2: #1a2c40;
	--ef-navy-3: #24394f;
	--ef-yellow: #f4b728;
	--ef-yellow-hover: #ffc845;
	--ef-white: #ffffff;
	--ef-grey-50: #f5f7f9;
	--ef-grey-100: #e8ecf0;
	--ef-grey-300: #c4ccd5;
	--ef-text: #101d2b;
	--ef-muted: #4a5868;
	--ef-on-navy: #f3f6f9;
	--ef-on-navy-muted: #b9c5d2;
	--ef-wa: #1a7f45;
	--ef-danger: #b3261e;
	--ef-success: #1a6b3c;
	--ef-radius: 8px;
	--ef-shadow: 0 1px 2px rgba(16, 29, 43, .06), 0 4px 16px rgba(16, 29, 43, .06);
	--ef-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ef-wrap: 1140px;
	--ef-gutter: 16px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	font-family: var(--ef-font);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ef-text);
	background: var(--ef-white);
}
body.has-mobile-cta { padding-bottom: 76px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: #1d4f8a; text-underline-offset: 3px; }
a:hover { color: var(--ef-navy); }
:focus-visible { outline: 3px solid var(--ef-yellow); outline-offset: 2px; border-radius: 2px; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.ef-skip {
	position: absolute; left: 8px; top: -60px; z-index: 1000;
	background: var(--ef-yellow); color: var(--ef-navy); padding: 10px 16px; font-weight: 700; border-radius: var(--ef-radius);
}
.ef-skip:focus { top: 8px; }
.ef-icon { width: 1.15em; height: 1.15em; flex: none; }

.ef-wrap {
	max-width: var(--ef-wrap);
	margin: 0 auto;
	padding-left: max(var(--ef-gutter), env(safe-area-inset-left, 0px));
	padding-right: max(var(--ef-gutter), env(safe-area-inset-right, 0px));
}
.ef-wrap--narrow { max-width: 820px; }
.ef-mt { margin-top: 1.5em; }

.ef-eyebrow {
	font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: #8a6400; margin-bottom: .5rem;
}
.ef-eyebrow--light { color: var(--ef-yellow); }

/* ---------- Buttons ---------- */
.ef-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 0 20px; border-radius: var(--ef-radius);
	font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
	border: 2px solid transparent; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ef-btn--sm { min-height: 40px; padding: 0 14px; font-size: .95rem; }
.ef-btn--lg { min-height: 54px; padding: 0 24px; font-size: 1.05rem; }
.ef-btn--primary { background: var(--ef-yellow); color: var(--ef-navy); }
.ef-btn--primary:hover { background: var(--ef-yellow-hover); color: var(--ef-navy); }
.ef-btn--ghost { background: var(--ef-white); color: var(--ef-navy); border-color: var(--ef-grey-300); }
.ef-btn--ghost:hover { border-color: var(--ef-navy); color: var(--ef-navy); }
.ef-btn--outline-light { background: transparent; color: var(--ef-white); border-color: rgba(255, 255, 255, .7); }
.ef-btn--outline-light:hover { background: rgba(255, 255, 255, .1); color: var(--ef-white); }
.ef-btn--wa { background: var(--ef-wa); color: var(--ef-white); }
.ef-btn--wa:hover { background: #156a39; color: var(--ef-white); }
.ef-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ef-actions--stack { flex-direction: column; align-items: stretch; margin: 1rem 0; }
.ef-link { font-weight: 700; color: #1d4f8a; }
.ef-link::after { content: " →"; }

/* ---------- Header ---------- */
.ef-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--ef-navy); color: var(--ef-on-navy);
	border-bottom: 1px solid var(--ef-navy-3);
}
.admin-bar .ef-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .ef-header { top: 32px; } }
.ef-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.ef-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ef-white); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.ef-logo:hover { color: var(--ef-white); }
.ef-logo__mark { width: 34px; height: 34px; border-radius: 6px; background: var(--ef-yellow); color: var(--ef-navy); display: grid; place-items: center; }
.ef-nav-toggle {
	display: inline-grid; place-items: center; width: 44px; height: 44px;
	background: transparent; color: var(--ef-white); border: 1px solid var(--ef-navy-3); border-radius: var(--ef-radius); cursor: pointer;
}
.ef-nav { display: none; width: 100%; padding-bottom: 16px; }
.ef-nav.is-open { display: block; }
.ef-nav ul { list-style: none; margin: 0; padding: 0; }
.ef-nav li a { display: block; padding: 12px 0; color: var(--ef-on-navy); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--ef-navy-3); }
.ef-nav li a:hover, .ef-nav .current-menu-item > a { color: var(--ef-yellow); }
.ef-nav__cta { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ef-header__phone { display: inline-flex; align-items: center; gap: 8px; color: var(--ef-white); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.ef-header__phone:hover { color: var(--ef-yellow); }
/* Ohne JavaScript bleibt die Navigation sichtbar. */
.no-js .ef-nav { display: block; }
.no-js .ef-nav-toggle { display: none; }

@media (min-width: 900px) {
	.ef-nav-toggle { display: none; }
	.ef-header__inner { flex-wrap: nowrap; }
	.ef-nav { display: flex !important; align-items: center; gap: 28px; width: auto; padding: 0; }
	.ef-nav ul { display: flex; gap: 24px; }
	.ef-nav li a { padding: 8px 0; border: 0; }
	.ef-nav__cta { flex-direction: row; align-items: center; gap: 18px; margin: 0; }
}

/* ---------- Hero ---------- */
.ef-hero { background: var(--ef-navy); color: var(--ef-on-navy); padding-block: 40px 48px; border-bottom: 6px solid var(--ef-yellow); }
.ef-hero h1 { color: var(--ef-white); }
.ef-hero__grid { display: grid; gap: 32px; align-items: center; }
.ef-hero__grid > * { min-width: 0; }
.ef-hero__lead { font-size: 1.15rem; color: var(--ef-on-navy-muted); max-width: 38em; }
.ef-hero__hours { color: var(--ef-on-navy); }
.ef-hero__facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ef-on-navy); font-weight: 600; font-size: .95rem; }
.ef-hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.ef-hero__facts .ef-icon { color: var(--ef-yellow); }
.ef-hero__img { display: block; width: 100%; border-radius: 12px; background: var(--ef-navy-2); aspect-ratio: 4 / 3; object-fit: cover; }
.ef-hero .ef-btn--ghost { background: transparent; color: var(--ef-white); border-color: rgba(255, 255, 255, .7); }
.ef-hero .ef-btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.ef-crumbs { font-size: .9rem; color: var(--ef-on-navy-muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ef-crumbs a { color: var(--ef-on-navy); }
@media (min-width: 900px) {
	.ef-hero { padding-block: 72px 80px; }
	.ef-hero__grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
	.ef-hero--sub .ef-hero__grid { grid-template-columns: 1.2fr .8fr; }
}

.ef-danger { background: var(--ef-white); color: var(--ef-text); border-radius: 12px; padding: 24px; border-top: 6px solid var(--ef-danger); }
.ef-danger__title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.25rem; color: var(--ef-danger); margin-bottom: .5rem; }
.ef-danger__number { font-size: 3.5rem; font-weight: 800; line-height: 1; margin: .25em 0; color: var(--ef-navy); font-variant-numeric: tabular-nums; }
.ef-danger__small { font-size: .9rem; color: var(--ef-muted); margin: 0; }

/* ---------- Abschnitte ---------- */
.ef-section { padding-block: 48px; }
.ef-section--alt { background: var(--ef-grey-50); border-block: 1px solid var(--ef-grey-100); }
.ef-section--form { background: var(--ef-grey-50); border-top: 1px solid var(--ef-grey-100); }
@media (min-width: 900px) { .ef-section { padding-block: 80px; } }

.ef-page-head { background: var(--ef-navy); color: var(--ef-on-navy); padding-block: 40px; border-bottom: 6px solid var(--ef-yellow); }
.ef-page-head h1 { color: var(--ef-white); margin: 0; }
.ef-page-head__lead { color: var(--ef-on-navy-muted); margin: .75em 0 0; max-width: 40em; }

.ef-split { display: grid; gap: 28px; align-items: start; }
.ef-split > * { min-width: 0; }
@media (min-width: 900px) { .ef-split { grid-template-columns: 1fr 1.1fr; gap: 56px; } }

/* ---------- Karten ---------- */
.ef-cards { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 820px) { .ef-cards { grid-template-columns: 1fr 1fr; } }
.ef-card { background: var(--ef-white); border: 1px solid var(--ef-grey-100); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ef-shadow); }
.ef-card__media { background: var(--ef-grey-50); }
.ef-card__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ef-card__body { padding: 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ef-card__body h3 { font-size: 1.4rem; }
.ef-card__body h3 a { color: var(--ef-navy); text-decoration: none; }
.ef-card__body h3 a:hover { text-decoration: underline; }
.ef-card__body p { color: var(--ef-muted); }
.ef-card__actions { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.ef-checks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.ef-checks li { position: relative; padding-left: 28px; }
.ef-checks li::before {
	content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
	background: var(--ef-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23101D2B' d='m9.5 16.2-4-4L4 13.7l5.5 5.5L20 8.7l-1.5-1.5z'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ef-checks--panel { background: var(--ef-white); border: 1px solid var(--ef-grey-100); border-radius: 12px; padding: 24px; gap: 12px; }

.ef-tiles { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 700px) { .ef-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .ef-tiles { grid-template-columns: repeat(3, 1fr); } .ef-tiles:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
.ef-tile { background: var(--ef-white); border: 1px solid var(--ef-grey-100); border-radius: 12px; padding: 22px; min-width: 0; }
.ef-section--alt .ef-tile { border-color: var(--ef-grey-300); }
.ef-tile h3 { font-size: 1.1rem; }
.ef-tile p { color: var(--ef-muted); margin: 0; }

/* ---------- Ablauf ---------- */
.ef-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 24px; counter-reset: ef-step; }
@media (min-width: 820px) { .ef-steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.ef-step { counter-increment: ef-step; min-width: 0; }
.ef-step::before {
	content: counter(ef-step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: var(--ef-navy); color: var(--ef-yellow); font-weight: 800; font-size: 1.15rem; margin-bottom: 14px;
}
.ef-step p { color: var(--ef-muted); margin: 0; }

.ef-numbered { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: ef-num; }
.ef-numbered li { counter-increment: ef-num; position: relative; padding-left: 52px; min-height: 36px; }
.ef-numbered li::before {
	content: counter(ef-num); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
	background: var(--ef-navy); color: var(--ef-yellow); display: grid; place-items: center; font-weight: 800;
}

/* ---------- Chips / Einsatzgebiet ---------- */
.ef-chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px; }
.ef-chips li { padding: 6px 12px; border-radius: 999px; background: var(--ef-grey-50); border: 1px solid var(--ef-grey-100); font-size: .95rem; font-weight: 500; }
.ef-chips--lg li { padding: 10px 14px; font-weight: 600; background: var(--ef-white); border-color: var(--ef-grey-300); }

/* ---------- Tabelle ---------- */
.ef-table-wrap { overflow-x: auto; border: 1px solid var(--ef-grey-300); border-radius: 12px; background: var(--ef-white); }
.ef-table { width: 100%; border-collapse: collapse; min-width: 420px; font-variant-numeric: tabular-nums; }
.ef-table th, .ef-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--ef-grey-100); vertical-align: top; }
.ef-table thead th { background: var(--ef-navy); color: var(--ef-white); }
.ef-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- FAQ ---------- */
.ef-faq { display: grid; gap: 10px; margin-top: 24px; }
.ef-faq__item { background: var(--ef-white); border: 1px solid var(--ef-grey-300); border-radius: var(--ef-radius); }
.ef-faq__item summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; position: relative; }
.ef-faq__item summary::-webkit-details-marker { display: none; }
.ef-faq__item summary::after {
	content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	font-size: 1.6rem; font-weight: 700; color: var(--ef-navy); line-height: 1;
}
.ef-faq__item[open] summary::after { content: "–"; }
.ef-faq__q { font-size: 1.05rem; margin: 0; }
.ef-faq__a { padding: 0 18px 16px; color: var(--ef-muted); }
.ef-faq__a p { margin: 0; }

/* ---------- CTA-Band ---------- */
.ef-cta-band { background: var(--ef-navy); color: var(--ef-on-navy); padding-block: 40px; }
.ef-cta-band h2 { color: var(--ef-white); }
.ef-cta-band__inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 900px) { .ef-cta-band__inner { grid-template-columns: 1fr auto; } }

/* ---------- Formular ---------- */
.ef-form-layout { display: grid; gap: 32px; }
.ef-form-layout > * { min-width: 0; }
@media (min-width: 960px) { .ef-form-layout { grid-template-columns: .8fr 1.2fr; gap: 56px; } }
.ef-related { margin-top: 1.5em; color: var(--ef-muted); }
.ef-linklist { list-style: none; padding: 0; display: grid; gap: 10px; }

.ef-form-wrap { background: var(--ef-white); border: 1px solid var(--ef-grey-100); border-radius: 12px; padding: 22px; box-shadow: var(--ef-shadow); }
@media (min-width: 700px) { .ef-form-wrap { padding: 32px; } }
.ef-form__title { font-size: 1.4rem; }
.ef-form__warn { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; background: #fdf3f2; border: 1px solid #f0c9c5; color: #6b1a14; padding: 12px 14px; border-radius: var(--ef-radius); }
.ef-form__warn .ef-icon { color: var(--ef-danger); margin-top: 2px; }
.ef-form { display: grid; gap: 18px; }
@media (min-width: 700px) { .ef-form { grid-template-columns: 1fr 1fr; } }
.ef-field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.ef-field--full { grid-column: 1 / -1; }
.ef-field label, .ef-field legend { font-weight: 600; font-size: .95rem; }
.ef-field input[type="text"], .ef-field input[type="email"], .ef-field input[type="tel"], .ef-field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--ef-text);
	padding: 12px 14px; min-height: 48px; border: 1px solid var(--ef-grey-300); border-radius: var(--ef-radius); background: var(--ef-white);
}
.ef-field textarea { min-height: 140px; resize: vertical; }
.ef-field input:focus, .ef-field textarea:focus { border-color: var(--ef-navy); outline: 3px solid rgba(244, 183, 40, .6); outline-offset: 0; }
.ef-field.has-error input, .ef-field.has-error textarea { border-color: var(--ef-danger); }
.ef-req { color: var(--ef-danger); }
.ef-error { color: var(--ef-danger); font-size: .9rem; margin: 0; font-weight: 600; }
.ef-types { display: grid; gap: 10px; }
.ef-types legend { margin-bottom: 8px; }
.ef-type { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ef-grey-300); border-radius: var(--ef-radius); cursor: pointer; font-weight: 600; }
.ef-type input { width: 20px; height: 20px; accent-color: var(--ef-navy); flex: none; }
.ef-type:has(input:checked) { border-color: var(--ef-navy); background: #fff8e6; box-shadow: inset 0 0 0 1px var(--ef-navy); }
.ef-type--stoerung:has(input:checked) { background: #fdf3f2; }
.ef-consent label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--ef-muted); }
.ef-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ef-navy); }
.ef-form__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ef-form__hint { margin: 0; font-size: .9rem; color: var(--ef-muted); }
.ef-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ef-notice { padding: 14px 16px; border-radius: var(--ef-radius); font-weight: 600; margin-bottom: 16px; }
.ef-notice--success { background: #e9f6ee; border: 1px solid #a9d8bb; color: var(--ef-success); }
.ef-notice--error { background: #fdf3f2; border: 1px solid #f0c9c5; color: #8c1d16; }

/* ---------- Inhalt & Rechtliches ---------- */
.ef-content > * + * { margin-top: 1em; }
.ef-content h2 { margin-top: 1.6em; }
.ef-content img { border-radius: var(--ef-radius); }
.ef-legal h2 { font-size: 1.3rem; }
.ef-placeholder { background: #fff1c7; color: #5c4300; padding: 0 4px; border-radius: 3px; font-weight: 600; }
.ef-list-item + .ef-list-item { margin-top: 2em; padding-top: 2em; border-top: 1px solid var(--ef-grey-100); }

/* ---------- Footer ---------- */
.ef-footer { background: var(--ef-navy); color: var(--ef-on-navy-muted); padding-top: 48px; font-size: .95rem; }
.ef-footer a { color: var(--ef-on-navy); }
.ef-footer a:hover { color: var(--ef-yellow); }
.ef-footer__grid { display: grid; gap: 32px; }
.ef-footer__grid > * { min-width: 0; }
@media (min-width: 820px) { .ef-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.ef-footer__brand { color: var(--ef-white); font-weight: 800; font-size: 1.15rem; }
.ef-footer__title { color: var(--ef-white); font-weight: 700; margin: 0 0 .5em; }
.ef-footer__title + * + .ef-footer__title, .ef-footer__links + .ef-footer__title { margin-top: 1.25em; }
.ef-footer__note { font-size: .88rem; }
.ef-footer__list, .ef-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ef-footer__list li { display: flex; align-items: center; gap: 8px; }
.ef-footer__list .ef-icon { color: var(--ef-yellow); }
.ef-footer__bottom { margin-top: 40px; padding-block: 18px; border-top: 1px solid var(--ef-navy-3); font-size: .85rem; }
.ef-footer__bottom p { margin: 0; }

/* ---------- Mobile CTA-Leiste ---------- */
.ef-mobile-cta {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px;
	padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
	background: var(--ef-navy); border-top: 1px solid var(--ef-navy-3);
}
@media (min-width: 900px) {
	.ef-mobile-cta { display: none; }
	body.has-mobile-cta { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
