/* Shared legal navigation and informational privacy dialog. */
:root {
  --site-header-height: 100px;
}

main > section:not(.legal-detail-page) {
  scroll-margin-top: var(--site-header-height);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 40px;
  padding-block: 30px;
}

.site-footer .footer-links {
  justify-content: flex-end;
  align-items: center;
  gap: 8px 24px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-transform: uppercase;
}

.site-footer .footer-copyright {
  max-width: none;
  font-size: 12px;
}

.footer-links a:focus-visible,
.reporting-portal-button:focus-visible,
.privacy-dialog a:focus-visible,
.privacy-dialog button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.legal-detail-page {
  padding-top: calc(var(--site-header-height) + 36px);
  padding-bottom: 72px;
  overflow-wrap: anywhere;
  scroll-margin-top: 0;
}

.legal-detail-page:focus {
  outline: none;
}

.legal-detail-page .tile-detail-return {
  position: static;
  min-height: 44px;
  margin-bottom: 28px;
}

.legal-detail-page .section-heading {
  display: block;
  max-width: none;
  margin-bottom: 42px;
}

.legal-detail-page .legal-kicker {
  margin: 0 0 12px;
  color: #b4d4de;
  font-size: 13px;
  font-weight: 700;
}

.legal-detail-page .section-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(30px, 4.3vw, 60px);
  line-height: 1.12;
  font-weight: 700;
}

.legal-detail-page .predicate-content {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(200px, 280px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(32px, 5vw, 80px);
  padding-top: 0;
}

.legal-detail-page .tile-detail-copy {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.75;
  white-space: normal;
  text-align: left;
  text-align-last: left;
}

.legal-detail-page .tile-detail-copy h3 {
  margin-top: 2em;
  font-size: 1.08em;
}

.legal-detail-page .tile-detail-copy > h3:first-child {
  margin-top: 0;
}

.legal-detail-page .tile-detail-copy p {
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
}

.impressum-legal-copy p {
  text-align: justify;
  text-align-last: left;
}

#datenschutz-details .privacy-detail-copy p,
#datenschutz-details .privacy-detail-copy li {
  text-align: justify;
  text-align-last: left;
}

#hinweisgeberschutz-details .tile-detail-copy p {
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.legal-detail-page .tile-detail-copy a {
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-footer .footer-links a,
.legal-detail-page .tile-detail-return {
  text-decoration: none;
}

.site-footer .footer-links a:hover,
.legal-detail-page .tile-detail-return:hover,
.legal-detail-page .tile-detail-copy a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.impressum-detail-page .tile-detail-return:hover,
.impressum-detail-page .tile-detail-return:focus-visible {
  text-decoration: none;
}

.legal-detail-page a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.legal-detail-page .tile-detail-visuals {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  margin: 0;
  padding: 0;
}

.legal-detail-page .tile-detail-card {
  width: 100%;
  height: 250px;
  transform: none;
  aspect-ratio: auto;
  border: 1px solid #417d91;
}

.legal-detail-page .tile-detail-card span {
  right: 20px;
  left: 20px;
  font-size: 22px;
  line-height: 1.3;
  white-space: normal;
}

.legal-detail-page .legal-intro-heading {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
}

.legal-detail-page .whistleblower-detail-card svg {
  display: block;
  width: 82px;
  height: 96px;
  margin: 26px 20px;
  color: #d5f1e7;
}

.legal-detail-page .whistleblower-detail-card span {
  top: auto;
  bottom: 24px;
  font-size: 20px;
}

.legal-detail-page .reporting-portal-action {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid #417d91;
  background: #0b202b;
}

.legal-detail-page .tile-detail-copy .reporting-portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 20px;
  color: #071d33;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.legal-detail-page .tile-detail-copy .reporting-portal-button:hover {
  background: #d5f1e7;
  text-decoration: underline;
}

.legal-detail-page .reporting-portal-action p {
  margin-top: 16px;
  font-size: 14px;
}

.privacy-dialog-open {
  overflow: hidden;
}

.privacy-dialog {
  position: fixed;
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(24px, 5vw, 40px);
  overflow-y: auto;
  border: 1px solid #477b8f;
  border-radius: 8px;
  background: #ffffff;
  color: #171b1f;
  box-shadow: 0 24px 100px #00000066;
  font-size: 16px;
  line-height: 1.65;
}

.privacy-dialog::backdrop {
  background: #00121db3;
}

.privacy-dialog form {
  margin: 0;
}

.privacy-dialog .privacy-dialog-close-form {
  position: absolute;
  top: 12px;
  right: 12px;
}

.privacy-dialog button {
  cursor: pointer;
  font: inherit;
}

.privacy-dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #235d72;
  font-size: 30px !important;
  line-height: 1;
}

.privacy-dialog .privacy-dialog-kicker {
  margin: 0 44px 18px 0;
  color: #235d72;
  font-size: 13px;
  font-weight: 700;
}

.privacy-dialog h2 {
  margin: 0 0 20px;
  color: #071d33;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
}

.privacy-dialog p {
  margin: 0 0 20px;
  text-align: justify;
  text-align-last: left;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.privacy-dialog-note {
  margin-bottom: 20px;
  padding: 20px;
  border-left: 3px solid #417d71;
  background: #eff5f4;
}

.privacy-dialog-note strong {
  display: block;
  margin-bottom: 8px;
}

.privacy-dialog-note p {
  margin: 0;
  font-size: 14px;
}

.privacy-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.privacy-dialog-policy {
  color: #235d72;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 4px;
}

.privacy-dialog-policy:hover {
  text-decoration: underline;
}

.privacy-dialog-done {
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid #235d72;
  background: #235d72;
  color: #ffffff;
  font-weight: 700 !important;
}

.privacy-dialog-done:hover {
  background: #071d33;
}

.analytics-consent .analytics-choice {
  flex: 1 1 200px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #235d72;
  border-radius: 3px;
  background: #235d72;
  color: #fff;
  font-weight: 400;
}
.analytics-consent .analytics-choice:hover { background: #071d33; }
.analytics-consent .analytics-choice:disabled { opacity: .5; cursor: default; }
.analytics-consent .privacy-dialog-actions { margin-bottom: 20px; }
.analytics-consent .privacy-dialog-policy { font-weight: 400; }

/* Keep job artwork and labels inside their cards on narrow screens. */
.career-slide-page .career-gallery-portrait-media .career-gallery-logo {
  max-width: calc(100% - 32px);
}

@media (max-width: 820px) {
  .legal-detail-page .predicate-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-detail-page .tile-detail-visuals {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-footer .footer-links {
    justify-content: flex-start;
    gap: 4px 20px;
  }

  .site-footer .footer-copyright {
    text-align: left;
  }

  .career-slide-page .career-display-frame {
    width: min(100%, 340px);
    aspect-ratio: 3 / 4;
  }

  .career-slide-page .career-gallery-portrait-media {
    width: 100%;
  }

  .career-slide-page .career-gallery-label,
  .career-slide-page .career-gallery-label-long,
  .career-slide-page .career-gallery-label-aligned {
    top: auto;
    right: 16px;
    bottom: 60px;
    left: 16px;
    font-size: 17px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .career-slide-page .career-gallery-label-long > span,
  .job-detail-page .job-detail-card-label-long > span {
    white-space: normal;
  }

  .career-slide-page .career-gallery-details {
    bottom: 12px;
    display: flex;
    align-items: center;
    min-height: 36px;
    font-size: 15px;
  }

  .career-slide-page .career-gallery-overlay {
    background: linear-gradient(to bottom, transparent 45%, #000000b3 100%);
  }
}

@media (max-width: 480px) {
  .legal-detail-page {
    padding-inline: 22px;
    padding-top: calc(var(--site-header-height) + 20px);
  }

  .legal-detail-page .section-heading h1 {
    font-size: 30px;
    hyphens: auto;
  }

  .legal-detail-page .tile-detail-copy {
    font-size: 16px;
  }

  .legal-detail-page .reporting-portal-action {
    padding: 18px;
  }
}

.legal-detail-page.impressum-detail-page .predicate-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(42px, 4vw, 62px);
}

.legal-detail-page.impressum-detail-page .tile-detail-visuals {
  order: 1;
  display: grid;
  width: auto;
  place-items: start;
}

.legal-detail-page.impressum-detail-page .tile-detail-card {
  width: auto;
  height: clamp(222px, 29.5vw, 393px);
  aspect-ratio: 4 / 5;
}

#impressum-details .impressum-detail-card span,
#datenschutz-details .privacy-detail-card span,
#hinweisgeberschutz-details .impressum-detail-card span {
  font-size: clamp(9px, 1.34vw, 17px);
  white-space: nowrap;
}

.legal-detail-page.impressum-detail-page .tile-detail-copy {
  order: 2;
  width: min(100%, 760px);
}
