/* A quieter reading layout, matching the contact page's DAM header and accents. */
.impressum-page {
  background: #f3f6fa;
  color: #26384c;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.impressum-page .topnav {
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.impressum-page .topnav .wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.impressum-back {
  align-items: center;
  min-height: 44px;
  color: white;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}

.impressum-main {
  box-sizing: border-box;
  max-width: 1164px;
  margin: 0 auto;
  padding: 120px 32px 56px;
}

.impressum-intro {
  margin-bottom: 28px;
}

.impressum-intro h1 {
  padding: 0;
  margin: 0;
  color: #00285f;
  font-size: 2.25rem;
  line-height: 1.25;
}

.impressum-intro h1::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--brand-accent);
}

:where(.impressum-main) a {
  color: #00285f;
  text-underline-offset: 4px;
}

/* Keep text readable on light surfaces; green is the underline/focus accent. */
.impressum-main a:is(:hover, :focus-visible) {
  color: #00285f;
  text-decoration-line: underline;
  text-decoration-color: var(--brand-accent);
  text-decoration-thickness: 3px;
}

.legal-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.legal-jump-links a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid #dbe3ed;
  border-radius: 6px;
  background: white;
  font-size: 0.875rem;
  text-decoration: none;
}

.legal-jump-links a:is(:hover, :focus-visible) {
  border-color: var(--brand-accent);
}

.impressum-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.impressum-card {
  box-sizing: border-box;
  min-width: 0;
  padding: 28px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 18px rgba(0, 40, 95, 0.035);
  overflow-wrap: anywhere;
}

.impressum-card h2 {
  margin: 0 0 24px;
  color: #00285f;
  font-size: 1.25rem;
  line-height: 1.35;
  scroll-margin-top: 104px;
}

.legal-company-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-company-list + .legal-company-list {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e4eaf1;
}

.legal-company-list li {
  margin-bottom: 4px;
}

.legal-company-list .legal-company-name {
  margin-bottom: 12px;
  color: #00285f;
  font-size: 1rem;
  font-weight: 900;
}

.legal-company-list a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
}

.section-dsgvo {
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.section-dsgvo h2 {
  font-size: 1.5rem;
  hyphens: auto;
  hyphenate-limit-chars: 8 4 4;
}

.section-dsgvo h3 {
  margin: 28px 0 12px;
  padding-top: 24px;
  border-top: 1px solid #e4eaf1;
  color: #00285f;
  font-size: 1.125rem;
  line-height: 1.5;
}

.section-dsgvo h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section-dsgvo p,
.section-dsgvo ul {
  max-width: 72ch;
  margin: 0 0 18px;
}

.section-dsgvo ul {
  padding-left: 20px;
}

.section-dsgvo li {
  margin-bottom: 8px;
}

.section-dsgvo li::marker {
  color: #71839b;
}

.section-dsgvo > :last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .impressum-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .legal-company-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .legal-company-list + .legal-company-list {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .legal-company-list:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    padding-top: 20px;
    border-top: 1px solid #e4eaf1;
  }
}

@media (max-width: 600px) {
  .impressum-page .topnav .wrapper {
    gap: 16px;
  }

  .impressum-page .topnav .logo {
    width: 120px;
  }

  .impressum-back {
    font-size: 0.8125rem;
  }

  .impressum-main {
    padding: 104px 16px 40px;
  }

  .impressum-intro h1 {
    font-size: 2rem;
  }

  .legal-jump-links {
    gap: 8px;
  }

  .legal-jump-links a {
    padding-inline: 12px;
  }

  .impressum-layout {
    gap: 16px;
  }

  .impressum-card {
    padding: 20px;
  }

  .section-dsgvo h2 {
    font-size: 1.25rem;
  }
}
