/* Direktlinks wie /#kontakt: Höhe von Kopfzeile und Seitennavigation freihalten (zusammen mit 1rem scroll-padding; beim Klick rechnet SectionNav selbst). */
:root { --section-offset: 6.75rem; }
@media (min-width: 768px) { :root { --section-offset: 8.5rem; } }
@media (min-width: 1200px) { :root { --section-offset: 9.5rem; } }

.navigation-component[id],
#versicherungen {
  scroll-margin-top: var(--section-offset);
}

.service-hero {
  background: #002641;
  color: #fff;
}

.service-hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 9fr) minmax(0, 10fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.75rem, 5vw, 5.5rem);
}

.service-hero-copy h1 {
  font-size: clamp(2.75rem, 5.1vw, 5rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -.035em;
  margin: 0;
}

.service-hero-copy > p {
  margin-block: 1.5rem 0;
  max-width: 33rem;
  font-size: clamp(1.06rem, 1.55vw, 1.4rem);
  line-height: 1.5;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.service-hero-link {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  padding-block: .75rem;
  color: #fff;
  text-underline-offset: .22em;
}

.service-hero-link:hover,
.service-card a:hover {
  text-decoration: underline;
}

.service-hero-copy > .service-hero-address {
  color: #eae8fc;
  font-size: .95rem;
}

.service-hero-media {
  overflow: hidden;
  border-radius: 1.5rem;
  aspect-ratio: 4 / 3;
  box-shadow: 0 16px 50px #00192855;
}

.service-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-section {
  padding-block: clamp(2.5rem, 5vw, 5.5rem);
  color: #002641;
}

.service-tinted {
  background: #f4f3fc;
}

#versicherungen [data-pt-item] h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Aufgeklappte Auswahllisten der Produktübersicht laufen beim Scrollen unter Kopfzeile (z 50) und Seitennavigation (z 49). */
#versicherungen [data-select-listbox] {
  z-index: 40;
}

/* Produktkarten ab 1600 px: lange Knopftexte nicht zusammenquetschen, sondern umbrechen lassen. */
@media (min-width: 1600px) {
  #versicherungen [data-pt-item] .mt-auto:has(> a.btn) {
    flex-wrap: wrap;
  }

  #versicherungen [data-pt-item] .mt-auto > a.btn {
    flex: 1 1 auto;
  }

  #versicherungen [data-pt-item] .mt-auto > a.btn-primary-outline {
    white-space: nowrap;
  }
}

.service-section h2 {
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1.75rem;
}

.service-contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: clamp(1.15rem, 2.5vw, 2rem);
}

.service-card h3 {
  margin-bottom: .65rem;
  font-size: 1.3rem;
  font-weight: 500;
}

.service-card a {
  color: #004973;
  display: block;
  margin-top: .55rem;
  overflow-wrap: anywhere;
  text-underline-offset: .2em;
}

/* Ansprechpartner: Gruppenfoto steht auf der Unterkante der Sektion, die Personen flankieren es. */
.service-team {
  padding-bottom: 0;
}

.service-team-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr) minmax(0, 1fr);
  grid-template-areas: "left photo right";
  align-items: start;
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
}

.service-team-photo {
  grid-area: photo;
  align-self: end;
  display: block;
  width: 100%;
  max-width: 44rem;
  height: auto;
  margin-inline: auto;
}

.service-person--left { grid-area: left; }
.service-person--right { grid-area: right; }

.service-person {
  padding-block: clamp(0rem, 14vw - 9rem, 4rem) clamp(1.5rem, 3vw, 3rem);
}

.service-person h3 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
}

.service-person p {
  margin-top: .35rem;
  line-height: 1.5;
}

.service-person-position {
  display: none;
}

.service-person ul {
  margin-block: 1.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

.service-person li {
  padding-block: .65rem;
  border-top: 1px solid #cfccea;
  line-height: 1.4;
}

.service-person li:last-child {
  border-bottom: 1px solid #cfccea;
}

.service-person .btn {
  height: auto;
  max-width: 100%;
  padding-inline: 1.5rem;
  white-space: normal;
  text-align: center;
}

@media (max-width: 374px), (min-width: 901px) and (max-width: 1199px) {
  .service-person .btn {
    padding-inline: .85rem;
  }
}

.service-person a:focus-visible {
  outline: 2px solid #006b9d;
  outline-offset: 3px;
}

.service-card p,
.service-card address,
.service-intro p {
  font-style: normal;
  line-height: 1.55;
}

.service-intro p {
  max-width: 49rem;
  font-size: 1.12rem;
}
.service-contact-form {
  margin-top: 1.5rem;
  max-width: 55rem;
  margin-inline: auto;
  scroll-margin-top: 12rem;
}
.service-contact-form h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}
.service-contact-form input, .service-contact-form textarea, .service-contact-form select {
  min-width: 0;
}
.service-form-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.service-form-fields label {
  display: grid;
  gap: .4rem;
  font-weight: 500;
}
.service-form-wide {
  grid-column: 1 / -1;
}
.service-form-fields :is(input, select, textarea) {
  display: block;
  width: 100%;
  border: 1px solid #889eae;
  border-radius: .75rem;
  padding: .7rem .85rem;
  background: #fff;
  color: inherit;
  font-weight: 400;
}
.service-form-fields select { appearance: auto; }
.service-contact-form :is(input, select, textarea, button, a):focus-visible {
  outline: 2px solid #006b9d;
  outline-offset: 2px;
}
.service-form-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-block: 1.3rem;
  line-height: 1.55;
}
.service-form-consent input {
  appearance: auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .2rem;
  flex: 0 0 auto;
  accent-color: #006b9d;
}
.service-form-consent a {
  display: inline;
  text-decoration: underline;
}
#contact-form-status:not(:empty) { margin-top: .85rem; }
@media (max-width: 540px) {
  .service-form-fields { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .service-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .service-hero-media {
    aspect-ratio: 16 / 10;
    margin-top: .15rem;
  }

  .service-contact-grid {
    grid-template-columns: 1fr;
  }

  .service-team {
    padding-bottom: clamp(2.5rem, 5vw, 5.5rem);
  }

  .service-team-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "left" "right";
  }

  .service-team-photo {
    max-width: 34rem;
  }

  .service-person {
    padding: clamp(1.15rem, 4vw, 2rem);
    border-radius: 1.25rem;
    background: #fff;
  }

  .service-person--right {
    margin-top: 1rem;
  }

  .service-person-position {
    display: inline;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .service-hero-grid {
    padding-block: 2.3rem;
  }

  .service-hero-copy h1 {
    font-size: clamp(2.25rem, 9.5vw, 3rem);
  }
}


/* Kontaktformular als Fenster: auf der Startseite unsichtbar, öffnet über "Kontaktformular öffnen". */
.service-form-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  color: #002c45;
  box-shadow: 0 1.5rem 3.75rem rgba(0, 30, 50, .28);
  overflow: auto;
  overscroll-behavior: contain;
}
.service-form-dialog::backdrop {
  background: rgba(0, 30, 50, .55);
}
.service-form-dialog[open] {
  animation: service-form-in .22s cubic-bezier(.16, 1, .3, 1);
}
@keyframes service-form-in {
  from { opacity: 0; transform: translateY(.75rem) scale(.98); }
  to { opacity: 1; transform: none; }
}
.service-form-dialog .service-contact-form {
  margin: 0;
  max-width: none;
  padding: 1.4rem 1.5rem 1.5rem;
}
.service-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.service-form-dialog .service-contact-form h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
}
.service-form-dialog .service-contact-form > p {
  margin: .35rem 0 0;
  font-size: .92rem;
  line-height: 1.45;
}
.service-form-close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -.3rem -.4rem 0 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.service-form-close svg { width: 1.3rem; height: 1.3rem; }
.service-form-close:hover { background: #eef3f6; }
.service-form-close:focus-visible { outline: 2px solid #006b9d; outline-offset: 2px; }
.service-form-dialog .service-form-fields {
  gap: .7rem;
  margin-top: 1rem;
}
.service-form-dialog .service-form-fields label {
  gap: .25rem;
  font-size: .92rem;
}
.service-form-dialog .service-form-fields :is(input, select, textarea) {
  padding: .5rem .7rem;
  border-radius: .6rem;
}
.service-form-dialog .service-form-consent {
  margin-block: .9rem 1rem;
  font-size: .8rem;
  line-height: 1.45;
}
.service-form-dialog .service-form-consent input { margin-top: .1rem; }
@media (prefers-reduced-motion: reduce) {
  .service-form-dialog[open] { animation: none; }
}

/* Überschriften nie automatisch trennen (2026-12-04). */
.service-section h2 {
  -webkit-hyphens: manual;
  hyphens: manual;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* Service-Center am Bahnhofsplatz: Text links, Karte rechts (2026-12-04). */
.service-intro--map {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.service-intro-text h2 { margin-top: 0; }
.service-intro-address {
  margin: 1.5rem 0 1.25rem;
  font-style: normal;
  font-weight: 600;
  color: #002641;
}
.service-map { margin: 0; }
.service-map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #eae8fc;
  box-shadow: 0 1px 0 #00264112, 0 18px 44px -18px #00264155;
}
.service-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.service-map-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.service-map-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.service-map-label {
  position: relative;
  margin-top: 6rem;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  background: #002641;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color .2s ease, transform .2s ease;
}
.service-map-trigger:hover .service-map-sketch { transform: scale(1.03); }
.service-map-trigger:hover .service-map-label { background: #006b9d; }
.service-map-trigger:active .service-map-label { transform: scale(.97); }
.service-map-trigger:focus-visible { outline: 3px solid #006b9d; outline-offset: -3px; }
.service-map-note {
  margin: .75rem 0 0;
  color: #4a5b6b;
  font-size: .85rem;
  line-height: 1.45;
}
.service-map.is-loaded .service-map-note { display: none; }
.service-map-note a { color: #004973; text-decoration: underline; }
.service-map figcaption {
  margin-top: .75rem;
  font-size: .95rem;
}
.service-map figcaption a {
  color: #004973;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.service-map figcaption a::after { content: " \2197"; }
@media (min-width: 1024px) {
  .service-intro--map { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
@media (prefers-reduced-motion: reduce) {
  .service-map-sketch, .service-map-label { transition: none; }
}

/* Öffnungszeiten: volle Breite unter den drei Kontaktkarten (2026-12-04). */
.service-hours {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.25rem 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}
.service-hours h3 { margin-bottom: 0; }
.service-hours h4 {
  margin: 0 0 .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #004973;
}
.service-hours dl { margin: 0; }
.service-hours dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-top: 1px solid #00264122;
}
.service-hours dt { font-weight: 500; }
.service-hours dd { margin: 0; text-align: right; }
@media (min-width: 900px) {
  .service-hours { grid-template-columns: 12rem minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.service-intro-hours { margin: -.5rem 0 1.25rem; color: #002641; }
.service-intro-hours a { color: #004973; text-decoration: underline; text-underline-offset: .2em; }

/* Lange Wörter in Überschriften nur trennen, wenn sie nicht in eine Zeile passen (wortumbruch.py, 2026-12-04). */
.wort { display: inline-block; max-width: 100%; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; text-decoration: inherit; }
:is(h1,h2,h3,h4) { -webkit-hyphens: manual; hyphens: manual; }
:is(h1,h2,h3,h4).hyphens-auto, #versicherungen :is(h1,h2,h3,h4) { -webkit-hyphens: manual; hyphens: manual; }
#versicherungen [data-pt-item] h3 .wort { letter-spacing: -0.02em; }
