/* --- LOKALE SCHRIFTART --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('fonts/Inter.ttf') format('truetype');
}

:root {
    --primary-blue: #0076ba;
    --dark-blue: #003366;
    --light-blue: #66b3ff;
    --profit-green: #98c96b;
    --apple-black: #151515;
    --apple-bg: #f8f8f8;
    --text-main: #151515;
    --text-light: #444444;
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
}

/* =========================================
   BASIS DESIGN & BARRIEREFREIHEIT
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-stack); background-color: var(--apple-bg); 
    color: var(--text-main); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}

/* Skip-Link absolut unsichtbar gemacht, um den Streifen zu entfernen */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    clip: auto;
    padding: 15px;
    margin: 0;
    background: var(--primary-blue);
    color: white;
    z-index: 10000;
    outline: 3px solid #ffcc00;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--primary-blue); outline-offset: 3px; }

.container { max-width: 1200px; margin: 250px auto 60px; padding: 0 5%; }
h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -1px; margin-bottom: 20px; color: var(--apple-black); }
h1 span { color: var(--primary-blue); }
h2 { font-size: 28px; margin-bottom: 15px; letter-spacing: -0.5px; }
h3 { font-size: 22px; margin-bottom: 10px; }
p { margin-bottom: 20px; }

/* --- NAVIGATION --- */
nav { position: fixed; top: 0; width: 100%; height: 200px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05); }
.nav-logo { display: flex; flex-shrink: 0; align-items: center; text-decoration: none; }
.nav-logo img { height: 180px; width: auto; object-fit: contain; border-radius: 4px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-light); font-size: 16px; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-blue); font-weight: 600; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; background: none; border: none; padding: 10px; }
.hamburger .bar { width: 25px; height: 3px; background: var(--apple-black); transition: 0.3s; }

/* --- HERO SECTION (STARTSEITE) --- */
.hero { position: relative; margin-top: 200px; height: auto; min-height: max(650px, calc(100svh - 200px)); padding: 64px 0 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: var(--dark-blue); }
.video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
/* HIER WURDE object-fit ANGEPASST, DAMIT NICHTS MEHR ABGESCHNITTEN WIRD */
.video-background video { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 51, 102, 0.85) 0%, rgba(0, 118, 186, 0.7) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 20px; margin-top: 0; }
.hero-logo-large { width: 100%; max-width: 280px; max-height: 200px; object-fit: contain; background: #ffffff; padding: 10px; margin: 0 auto 30px auto; display: block; border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.3); }
.hero-content h1 { color: var(--white); font-size: clamp(28px, 4vw, 45px); margin-bottom: 20px; }
.hero-content span { color: var(--light-blue); }
.hero-content p { color: #f0f0f0; }
.btn-primary { display: inline-block; background: var(--white); color: var(--primary-blue); padding: 18px 36px; border-radius: 50px; text-decoration: none; font-weight: 600; margin-top: 20px; transition: transform 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.btn-primary:hover { transform: scale(1.05); }

/* --- GRID & CARDS --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { background: var(--white); padding: 40px; border-radius: 24px; box-shadow: var(--shadow-soft); transition: transform 0.3s ease; border: 1px solid rgba(0,0,0,0.02); height: 100%; }
.card:hover { transform: translateY(-5px); }
.card ul { margin-top: 20px; padding-left: 20px; color: var(--text-light); }
.card li { margin-bottom: 10px; font-weight: 500; font-size: 15px; }

/* --- FORMULARE --- */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--apple-black); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 15px; border: 2px solid #ddd; border-radius: 12px; font-family: inherit; font-size: 15px; background: var(--apple-bg); transition: 0.3s; color: var(--apple-black); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary-blue); background: #fff; }
.btn-submit { background: var(--primary-blue); color: #fff; border: none; padding: 16px 30px; border-radius: 50px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; transition: 0.3s; margin-top: 10px; }
.btn-submit:hover { background: var(--dark-blue); }

/* --- PREIS DIAGRAMM --- */
.donut-box { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; margin-top: 20px; }
.donut-svg { display: block; width: 180px; height: 180px; flex-shrink: 0; transform: rotate(-90deg); }
.donut-legend { flex: 1; min-width: 200px; }
.legend-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 15px; font-weight: 500; color: var(--apple-black); }
.legend-item:last-child { margin-bottom: 0; }
.legend-item .dot { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; display: inline-block; }
.legend-text { min-width: 0; }

/* --- FOOTER --- */
footer { text-align: center; padding: 40px 5%; margin-top: 80px; background: var(--white); border-top: 1px solid rgba(0,0,0,0.05); font-size: 14px; color: var(--text-light); }
footer a { color: var(--text-light); text-decoration: none; margin: 0 10px; font-weight: 500; }
footer a:hover { color: var(--primary-blue); text-decoration: underline; }

/* --- COOKIE BANNER --- */
#cookie-banner { position: fixed; bottom: -500px; left: 0; right: 0; background: #fff; box-shadow: 0 -10px 40px rgba(0,0,0,0.15); z-index: 9999; padding: 30px; transition: bottom 0.5s ease-out; border-top-left-radius: 20px; border-top-right-radius: 20px; max-width: 800px; margin: 0 auto; }
#cookie-banner.show { bottom: 0; }
.cookie-header { font-size: 20px; font-weight: 600; margin-bottom: 15px; color: var(--apple-black); }
.cookie-text { font-size: 14px; color: var(--text-light); margin-bottom: 20px; }
.cookie-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.btn-cookie { flex: 1; min-width: 150px; padding: 12px; text-align: center; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-size: 14px; }
.btn-accept { background: var(--primary-blue); color: #fff; }
.btn-deny { background: #eee; color: var(--apple-black); }

/* --- WIDGET --- */
.acc-floating-btn { position: fixed; bottom: 20px; left: 20px; background: var(--apple-black); color: #fff; border: 2px solid #fff; padding: 10px 18px; border-radius: 50px; cursor: pointer; z-index: 99999; font-weight: bold; font-size: 14px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform 0.2s; }
.acc-floating-btn:hover { transform: scale(1.05); }

/* --- BARRIEREFREI-MODUS: ruhige Farben und bessere Lesbarkeit --- */
body.accessibility-mode {
    --primary-blue: #164b70;
    --apple-bg: #f4f3ee;
    --text-main: #243447;
    --text-light: #37485a;
    background: var(--apple-bg);
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.75;
}
body.accessibility-mode nav, body.accessibility-mode footer,
body.accessibility-mode .card, body.accessibility-mode #cookie-banner {
    background: #ffffff !important;
    color: #243447 !important;
    border-color: #7b8b99 !important;
    box-shadow: none;
}
body.accessibility-mode nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
body.accessibility-mode .card { border-width: 1px; }
body.accessibility-mode h1, body.accessibility-mode h2,
body.accessibility-mode h3, body.accessibility-mode h4,
body.accessibility-mode h1 span, body.accessibility-mode .cookie-header {
    color: #164b70 !important;
    letter-spacing: normal;
}
body.accessibility-mode p, body.accessibility-mode li,
body.accessibility-mode label, body.accessibility-mode .legend-text,
body.accessibility-mode .cookie-text { color: #243447 !important; }
body.accessibility-mode .card p, body.accessibility-mode .card li,
body.accessibility-mode label, body.accessibility-mode .legend-item,
body.accessibility-mode .cookie-text, body.accessibility-mode footer { font-size: 16px !important; }
body.accessibility-mode a { color: #164b70 !important; text-decoration: underline !important; text-underline-offset: 3px; }
body.accessibility-mode .nav-logo { text-decoration: none !important; }
body.accessibility-mode .nav-links a { font-size: 18px; }
body.accessibility-mode .btn-primary, body.accessibility-mode .btn-submit,
body.accessibility-mode .btn-accept, body.accessibility-mode a[type="text/vcard"] {
    background: #164b70 !important;
    color: #ffffff !important;
    border: 2px solid #164b70 !important;
    text-decoration: none !important;
}
body.accessibility-mode .btn-deny {
    background: #e8edf1; color: #243447; border: 2px solid #617487;
}
body.accessibility-mode .form-group input,
body.accessibility-mode .form-group select,
body.accessibility-mode .form-group textarea {
    background: #ffffff; color: #243447; border-color: #617487; font-size: 18px;
}
body.accessibility-mode #map-placeholder, body.accessibility-mode #formStatus { background: #e8edf1 !important; }
body.accessibility-mode .hero { background: #163c57; }
body.accessibility-mode .hero-content h1, body.accessibility-mode .hero-content p { color: #ffffff !important; }
body.accessibility-mode .hero-content span { color: #b7ddf6 !important; }
body.accessibility-mode .video-background { display: none; }

body.accessibility-mode .donut-seg-1 { stroke: #164b70 !important; }
body.accessibility-mode .donut-seg-2 { stroke: #243447 !important; }
body.accessibility-mode .donut-seg-3 { stroke: #52697d !important; }
body.accessibility-mode .donut-seg-4 { stroke: #387544 !important; }
body.accessibility-mode .dot-1 { background: #164b70 !important; }
body.accessibility-mode .dot-2 { background: #243447 !important; }
body.accessibility-mode .dot-3 { background: #52697d !important; }
body.accessibility-mode .dot-4 { background: #387544 !important; }
body.accessibility-mode *, body.accessibility-mode *::before, body.accessibility-mode *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
body.accessibility-mode .card:hover, body.accessibility-mode .btn-primary:hover,
body.accessibility-mode .acc-floating-btn:hover { transform: none; }

/* Bedienbarkeit gilt auch im Standardmodus. */
[hidden] { display: none !important; }
html { scroll-padding-top: 220px; }
body { padding-bottom: 76px; }
a { color: #005581; }
main a { overflow-wrap: anywhere; }
main, .card, .grid > *, .donut-legend { min-width: 0; }
.grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.card { overflow-wrap: anywhere; }
.card > div[style*="min-width"], .card ul[style*="min-width"] { min-width: min(250px, 100%) !important; }
.card > div[style*="min-width: 300px"] { min-width: min(300px, 100%) !important; }
.form-group input, .form-group textarea, .form-group select { border-color: #77818b; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #536170; opacity: 1; }
.form-group input[type="radio"], .form-group input[type="checkbox"] {
    width: 20px; height: 20px; padding: 0; vertical-align: middle; accent-color: var(--primary-blue);
}
.form-group fieldset, fieldset.form-group { border: 0; min-width: 0; }
.form-group legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
body.accessibility-mode .form-group legend { font-size: 16px; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 3px solid #164b70; outline-offset: 3px; box-shadow: 0 0 0 3px #ffffff;
}
.skip-link:focus {
    position: fixed; top: 10px; left: 10px; z-index: 100000;
    outline: 3px solid #164b70;
}
.hamburger { min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
.acc-floating-btn { background: #164b70; min-height: 44px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
body.cookie-open .acc-floating-btn { visibility: hidden; }
#cookie-banner { max-height: 75svh; overflow-y: auto; }
footer a, footer button { display: inline-block; padding: 8px 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .card:hover, .btn-primary:hover, .acc-floating-btn:hover { transform: none; }
}

@media (max-width: 1024px) {
    .hero { margin-top: 144px; min-height: max(650px, calc(100svh - 144px)); padding: 48px 0 64px; }
    nav { height: 144px; }
    .nav-logo img { height: 124px; }
    .container { margin-top: 184px; }
    .hamburger { display: flex; }
    .nav-links { visibility: hidden; overflow-y: auto; position: fixed; top: 144px; left: -100%; width: 100%; height: calc(100vh - 144px); background: #fff; flex-direction: column; justify-content: flex-start; padding-top: 50px; align-items: center; transition: 0.3s; }
    .nav-links.active { left: 0; visibility: visible; }
    .nav-links a { font-size: 20px; margin-bottom: 20px; }
}

@media (max-width: 1024px) { html { scroll-padding-top: 164px; } }
@media (max-width: 600px) {
    .card { padding: 24px; }
    .donut-box { gap: 24px; }
    .donut-legend { min-width: 0; flex-basis: 100%; }
    .nav-logo img { max-width: calc(100vw - 95px); object-fit: contain; }
    .hero-content h1 { overflow-wrap: anywhere; }
    #cookie-banner { padding: 20px; }
    .acc-floating-btn { left: 12px; bottom: 12px; }
}

/* Lange Überschriften bleiben auch auf schmalen Displays lesbar. */
main { overflow-wrap: anywhere; }
.card[style*='background: var(--apple-black)'] li { color: inherit; }
.video-overlay { background: linear-gradient(135deg, rgba(0,51,102,.92), rgba(0,71,112,.90)); }

/* Leistungsauswahl in der Navigation */
.nav-links { align-items: center; }
.nav-services { position: relative; }
.services-toggle {
    display: flex; align-items: center; gap: 7px; min-height: 44px;
    border: 0; padding: 8px 0; background: transparent; color: var(--text-light);
    font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
}
.services-toggle:hover, .services-toggle.active { color: var(--primary-blue); font-weight: 600; }
.services-chevron { font-size: 19px; line-height: 1; }
.services-toggle[aria-expanded="true"] .services-chevron { transform: rotate(180deg); }
.services-submenu {
    position: absolute; top: 100%; left: -16px; width: 300px; max-width: calc(100vw - 32px);
    padding: 8px; background: #ffffff; border: 1px solid #77818b; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 1001;
}
.nav-links .services-submenu a {
    display: block; padding: 11px 12px; min-height: 44px; margin: 0; font-size: 16px;
    border-radius: 6px; white-space: normal;
}
.services-submenu a:hover, .services-submenu a:focus-visible { background: #e8edf1; }
body.accessibility-mode .services-toggle { color: #164b70; font-size: 18px; }
body.accessibility-mode .services-submenu { border-color: #617487; box-shadow: none; }
body.accessibility-mode .nav-links .services-submenu a { font-size: 18px; }

/* Ganze Leistungskarten sind als Link bedienbar. */
a.service-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text-main); }
a.service-card p { color: var(--text-main); }
a.service-card h2, a.service-card h3 { color: var(--primary-blue); }
.service-card-more { display: block; margin-top: auto; padding-top: 16px; color: var(--primary-blue); font-size: 16px; font-weight: 600; }
a.service-card:hover .service-card-more, a.service-card:focus-visible .service-card-more { text-decoration: underline; text-underline-offset: 3px; }
body.accessibility-mode a.service-card { text-decoration: none !important; color: #243447 !important; }
.service-intro { max-width: 780px; font-size: 20px; color: var(--text-light); }
.service-section { margin-top: 30px; }
.service-steps { padding-left: 24px; }
.service-steps li { padding-left: 6px; margin-bottom: 24px; }
.service-steps li:last-child { margin-bottom: 0; }
.service-steps h3 { color: var(--primary-blue); font-size: 20px; }
.service-steps p { margin-bottom: 0; }
.service-actions { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.service-actions .btn-submit { display: inline-block; width: auto; margin: 0; text-decoration: none; text-align: center; }
.service-actions a:not(.btn-submit) { padding: 10px 0; }
.service-back { display: inline-block; margin-bottom: 20px; }
@media (max-width: 1024px) {
    .nav-links { padding-top: 28px; padding-bottom: 100px; gap: 12px; }
    .nav-services { width: min(320px, 90vw); text-align: center; }
    .services-toggle { margin: 0 auto; font-size: 20px; }
    .services-submenu { position: static; width: 100%; margin: 8px auto 0; text-align: left; box-shadow: none; }
    .nav-links > a { margin-bottom: 12px; }
}

/* Fotos auf der Wallbox-Seite */
.wallbox-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.wallbox-photo { min-width: 0; }
.wallbox-photo img { display: block; width: 100%; height: auto; border-radius: 16px; background: #e8edf1; }
.wallbox-photo figcaption { padding: 16px 2px 0; color: var(--text-main); }
.wallbox-photo figcaption strong { display: block; font-size: 17px; margin-bottom: 5px; }
.wallbox-photo figcaption span { display: block; color: var(--text-light); font-size: 15px; }
body.accessibility-mode .wallbox-photo figcaption span { font-size: 16px; }
@media (max-width: 600px) { .wallbox-photo-grid { grid-template-columns: 1fr; gap: 28px; } }
