:root {
  --navy: #0E2A43;
  --navy-2: #163C5C;
  --blue: #1D6FA5;
  --blue-light: #EAF3FA;
  --white: #FFFFFF;
  --ink: #1F2933;
  --ink-soft: #52626E;
  --line: #CBDCE8;

  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

* { box-sizing: border-box; }

/* Bootstrap-Row-Standardabstände (negative Margins) deaktiviert,
   um unerwünschtes horizontales Überlaufen zu vermeiden */
.row {
  margin-right: 0;
  margin-left: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 0.5rem;
}

a { text-decoration: none; }

img { max-width: 100%; }

/* ============ COOKIE-HINWEIS ============ */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  z-index: 1050;
  background: var(--navy);
  color: #C9D9E3;
  padding: 1.1rem 1.25rem;
  transition: bottom 0.4s ease;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
}

.cookie-banner.is-visible { bottom: 0; }

.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner-text { flex: 1 1 380px; font-size: 0.88rem; margin: 0; }
.cookie-banner-text a { color: #fff; text-decoration: underline; }

.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-btn {
  border: none;
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.cookie-btn-necessary {
  background: transparent;
  color: #C9D9E3;
  border: 1px solid rgba(255,255,255,0.4);
}

.cookie-btn-necessary:hover { border-color: #fff; color: #fff; }

.cookie-btn-all {
  background: var(--blue);
  color: #fff;
}

.cookie-btn-all:hover { background: #2478ad; }

/* ============ RECHTLICHE SEITEN (Impressum/Datenschutz) ============ */
.legal-page {
  padding: 3rem 0 4rem;
  max-width: 820px;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2.2rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}

.legal-page h3 {
  font-size: 1.05rem;
  margin-top: 1.6rem;
  color: var(--navy);
}

.legal-page h4 {
  font-size: 0.95rem;
  margin-top: 1.2rem;
  color: var(--navy);
}

.legal-page h1, .legal-page h2, .legal-page h3, .legal-page h4,
.legal-page p, .legal-page li {
  overflow-wrap: break-word;
  word-break: break-word;
}

.legal-page p, .legal-page li {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-page ul { padding-left: 1.2rem; }

.legal-page a { color: var(--blue); }
.legal-page a:hover { text-decoration: underline; }

.legal-back {
  margin-top: 2.5rem;
  font-weight: 600;
}

/* ============ NAV ============ */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
  will-change: transform;
  transform: translateZ(0);
}

.navbar-brand-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.brand-logo {
  height: 50px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: #1C3A94;
  margin-top: 0.35rem;
  letter-spacing: 0.01em;
}

.nav-link {
  color: var(--ink);
  font-weight: 500;
  padding: 0.4rem 0.7rem !important;
}

.nav-link:hover { color: var(--blue); }
.nav-link.active-link { color: var(--blue); font-weight: 700; }

.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-phone:hover { background: var(--blue); color: #fff; }

/* ============ INTRO / HERO-BEREICH ============ */
.content-area { padding: 2.25rem 0 3rem; }

.intro-block { margin-bottom: 2.5rem; }

.hero-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  color: var(--navy);
}

.hero-text {
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
}

.btn-primary-blue {
  background: var(--blue);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.65rem 1.6rem;
}

.btn-primary-blue:hover { background: var(--navy-2); color: #fff; }

.intro-image {
  border: 1px solid var(--line);
  margin-top: 1.75rem;
  width: 100%;
}

/* ============ CONTENT ============ */
.content-section { margin-bottom: 2.75rem; scroll-margin-top: 96px; }

.section-title {
  font-size: 1.45rem;
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
  padding-bottom: 0.3rem;
}

.section-subtitle {
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.section-image {
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

.section-image--side {
  border-radius: 10px;
  height: 260px;
  width: 100%;
  object-fit: cover;
}

/* Leistungen: zwei Bilder untereinander, auf kleinen Bildschirmen nebeneinander */
.leistungen-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leistungen-images .section-image {
  margin-top: 0;
  height: 215px;
}

.leistungen-images .section-image:nth-child(2) { object-position: 68% 50%; }

@media (max-width: 767.98px) {
  .leistungen-images { flex-direction: row; gap: 0.75rem; }
  .leistungen-images .section-image {
    flex: 1 1 0;
    min-width: 0;
    width: 50%;
    height: 170px;
  }
}

.leistungen-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.leistungen-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.leistungen-list li:first-child { border-top: 1px solid var(--line); }

.check-icon {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Warum-Grid */
.warum-card {
  background: var(--white);
  border: 1px solid var(--line);
  height: 100%;
  padding-bottom: 1.1rem;
}

.warum-card img { width: 100%; height: 170px; object-fit: cover; display: block; }

.warum-card h3 {
  font-size: 1.02rem;
  margin: 0.9rem 1rem 0.4rem;
}

.warum-card p {
  margin: 0 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Kontaktformular */
.kontakt-form { max-width: 560px; }

.form-label { font-weight: 600; color: var(--navy); }

.form-control {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.6rem 0.75rem;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,111,165,0.18);
}

.form-feedback {
  margin-top: 0.9rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.form-feedback.ok { color: #2E7D4F; }
.form-feedback.err { color: #B3402A; }

/* Für Menschen unsichtbares Spam-Schutzfeld */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ SIDEBAR / PROFILKARTE ============ */
.profile-card {
  background: var(--blue-light);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: sticky;
  top: 116px;
  overflow: hidden;
  box-shadow: 0 12px 28px -18px rgba(14,42,67,0.45);
  will-change: transform;
  transform: translateZ(0);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.profile-photo-small {
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 10px;
  object-fit: cover;
  object-position: 50% 22%;
  box-shadow: 0 4px 10px rgba(14,42,67,0.18);
}

.profile-header-text { min-width: 0; }

.profile-body { padding: 0.8rem 1.1rem 1rem; }

.profile-name { font-size: 1.1rem; margin-bottom: 0.1rem; }

.profile-role {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.profile-regnr {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--blue);
}

.profile-regnr a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.profile-regnr a:hover { color: var(--navy-2); }

/* Kontaktdaten kompakt: alle Einträge untereinander */
.profile-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 0.7rem;
}

.profile-contact li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.contact-label {
  display: block;
  font-size: 0.68rem;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 0.05rem;
}

.contact-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.contact-value a { color: var(--navy); }
.contact-value a:hover { color: var(--blue); text-decoration: underline; }

.contact-sep { color: var(--ink-soft); font-weight: 400; }

.profile-about { padding: 0; }

.profile-about h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }

.profile-about p {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
}

/* Mitgliedschaften: schmale Zeile mit VDE-Badge */
.profile-memberships { margin-top: 0.7rem; }

.profile-memberships h4 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}

.membership-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.membership-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.membership-badge {
  flex: none;
  min-width: 38px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  padding: 0.28rem 0.4rem;
}

.membership-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

/* Niedrige Bildschirme (z. B. Laptops): Karte noch etwas enger,
   damit sie samt Foto komplett ins Fenster passt */
@media (min-width: 992px) and (max-height: 820px) {
  .profile-header { padding: 0.65rem 1rem; }
  .profile-photo-small { width: 84px; height: 84px; }
  .profile-body { padding: 0.6rem 1rem 0.8rem; }
  .profile-contact li { padding: 0.25rem 0; }
  .profile-contact { margin-bottom: 0.5rem; }
  .profile-about p { font-size: 0.76rem; line-height: 1.35; }
  .profile-memberships { margin-top: 0.5rem; }
}

/* ============ EINSATZGEBIET ============ */
.service-area-band {
  background: var(--navy);
  padding: 3rem 0;
}

.service-area-band p {
  color: #C9D9E3;
  margin: 0 auto;
  max-width: 900px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.4;
}

.service-area-band strong { color: #fff; }

/* ============ UNABHÄNGIGKEIT ============ */
.unabhaengigkeit-band {
  background: var(--blue-light);
  padding: 3rem 0;
}

.unabhaengigkeit-band .section-title,
.unabhaengigkeit-band .section-subtitle { display: block; }

.unabhaengigkeit-band .section-title { border-bottom: none; }

.unabhaengigkeit-band p { color: var(--ink-soft); }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy);
  color: #C9D9E3;
  padding: 2.75rem 0 1.5rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.site-footer p { margin: 0; }

.footer-logo { max-width: 180px; }

.site-footer hr {
  border-color: rgba(255,255,255,0.15);
  margin: 2rem 0 1.2rem;
}

.footer-bottom { font-size: 0.85rem; }

.footer-links a {
  color: #C9D9E3;
  margin-left: 1.2rem;
}

.footer-links a:hover { color: #fff; }

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
  .profile-card { position: static; }
  .content-area { padding: 1.75rem 0 2.25rem; }
}

@media (max-width: 767.98px) {
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Footer auf dem Handy zentriert */
  .site-footer .container { text-align: center; }
  .site-footer .row > div { display: flex; flex-direction: column; align-items: center; }
  .footer-logo { margin: 0 auto; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .footer-links a { margin: 0 0.6rem; }
}

@media (max-width: 575.98px) {
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }
  .content-area { padding: 1.25rem 0 1.75rem; }
  .content-section { margin-bottom: 2rem; }
  .section-title { font-size: 1.25rem; }
  .hero-text { font-size: 0.98rem; }
  .btn-primary-blue { width: 100%; text-align: center; }
  .kontakt-form { max-width: 100%; }

  /* Profilkarte kompakt, Bildgröße bleibt geräteunabhängig gleich (siehe .profile-photo) */
  .brand-logo { height: 38px; }
  .brand-name { font-size: 0.82rem; }


  /* Impressum/Datenschutz auf kleinen Bildschirmen */
  .legal-page { padding: 1.75rem 0 2.5rem; }
  .legal-page h1 { font-size: 1.4rem; }
  .legal-page h2 { font-size: 1.1rem; margin-top: 1.7rem; }
  .legal-page h3 { font-size: 1rem; margin-top: 1.3rem; }
  .legal-page h4 { font-size: 0.9rem; }
  .legal-page p, .legal-page li { font-size: 0.9rem; }
}
