.afd-svg-map {
  --afd-hellblau: #00a2df;
  --afd-blau: #006699;
  --afd-dunkel: #173557;
  width: 100%;
  max-width: 610px;
  margin: -86px auto 0;
}

.afd-svg-map svg {
  display: block;
  width: 100%;
  height: auto;
}

.afd-svg-map .afd-map-link,
.afd-svg-map .afd-map-link:visited,
.afd-svg-map .afd-map-link:hover,
.afd-svg-map .afd-map-link:focus {
  text-decoration: none;
  outline: none;
}

.afd-svg-map .map-region {
  fill: url("#afd-map-grey");
  stroke: rgba(23, 53, 87, 0.52);
  stroke-width: 0.8;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 1;
  transition: fill 180ms ease, stroke 180ms ease, transform 180ms ease, filter 180ms ease;
}

.afd-svg-map .map-region[data-type="stadtverband"] {
  fill: #006699;
  stroke: #173557;
}

.afd-svg-map .afd-map-link:hover .map-region,
.afd-svg-map .afd-map-link:focus .map-region {
  filter: brightness(1.03);
  transform: scale(1.016);
  stroke-width: 1.35;
}

.afd-svg-map .afd-map-link:hover .map-region[data-type="stadtverband"],
.afd-svg-map .afd-map-link:focus .map-region[data-type="stadtverband"] {
  fill: #173557;
  stroke: #00a2df;
}

.afd-svg-map .afd-map-link:hover .map-region[data-type="aufbau"],
.afd-svg-map .afd-map-link:focus .map-region[data-type="aufbau"] {
  fill: #e7eef5;
  stroke: #173557;
}

.afd-svg-map.is-mobile-navigating {
  animation: afd-map-mobile-map-confirm 900ms ease-out both;
}

.afd-svg-map .afd-map-link.is-mobile-selected-link .map-region,
.afd-svg-map .map-region.is-mobile-selected {
  animation: afd-map-mobile-select 900ms ease-out both;
  fill: #f2c300 !important;
  filter: drop-shadow(0 0 16px rgba(242, 195, 0, 0.95)) drop-shadow(0 0 24px rgba(0, 162, 223, 0.75));
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
}

.afd-svg-map .afd-map-label {
  fill: #14283d;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
  opacity: 1;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 0.6;
  stroke-linejoin: round;
}

.afd-svg-map .afd-map-label[data-type="stadtverband"] {
  fill: #ffffff;
  stroke: rgba(23, 53, 87, 0.42);
}

.afd-svg-map.is-visible .map-region {
  animation: afd-map-region-in 520ms ease both;
}

.afd-svg-map.is-visible .afd-map-label {
  animation: afd-map-label-in 520ms ease both;
}

.afd-map-panel {
  --afd-hellblau: #00a2df;
  --afd-blau: #006699;
  --afd-dunkel: #173557;
  --afd-text: #4a5560;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-left: 9px solid var(--afd-dunkel);
  border-image: linear-gradient(180deg, var(--afd-dunkel) 0%, var(--afd-blau) 48%, var(--afd-hellblau) 100%) 1;
  border-radius: 0 16px 16px 0;
  box-shadow: 0 18px 36px rgba(23, 53, 87, 0.12);
  color: var(--afd-text);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  padding: 24px 22px 24px 28px;
  min-height: 500px;
}

.afd-map-panel::before {
  content: none;
}

.afd-map-panel::after {
  background:
    linear-gradient(90deg, rgba(0, 162, 223, 0), rgba(0, 162, 223, 0.24), rgba(242, 195, 0, 0.26), rgba(255, 255, 255, 0));
  box-shadow: 0 0 34px rgba(0, 162, 223, 0.2);
  content: "";
  height: 130%;
  left: -64%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) skewX(-18deg);
  width: 58%;
  z-index: 1;
}

.afd-map-transfer-swoosh {
  background:
    linear-gradient(90deg, rgba(0, 162, 223, 0), rgba(0, 162, 223, 0.7), rgba(242, 195, 0, 0.72), rgba(255, 255, 255, 0));
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(0, 162, 223, 0.42);
  height: 7px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transform-origin: left center;
  z-index: 9999;
  animation: afd-map-transfer-swoosh 680ms ease-out both;
}

.afd-map-panel.is-receiving::after {
  animation: afd-panel-data-swoosh 620ms ease-out both;
}

.afd-map-panel.is-receiving {
  animation: afd-panel-receive-glow 620ms ease-out both;
}

.afd-panel-body {
  position: relative;
  z-index: 2;
}

.afd-panel-kicker {
  color: var(--afd-hellblau);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.afd-map-panel h3 {
  color: var(--afd-dunkel);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 8px;
  min-height: 76px;
}

.afd-panel-status {
  color: var(--afd-blau);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 18px;
  min-height: 24px;
}

.afd-panel-person {
  align-items: flex-start;
  border-top: 1px solid rgba(23, 53, 87, 0.12);
  border-bottom: 1px solid rgba(23, 53, 87, 0.12);
  display: grid;
  gap: 16px;
  grid-template-columns: 128px minmax(0, 1fr);
  margin: 0 0 18px;
  padding: 16px 0;
}

.afd-panel-image-wrap {
  aspect-ratio: 4 / 5;
  background: #f4f7fa;
  border: 4px solid var(--afd-dunkel);
  border-radius: 14px;
  margin: 0;
  max-width: 128px;
  overflow: hidden;
  width: 100%;
}

.afd-panel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.afd-panel-person-copy {
  min-width: 0;
}

.afd-panel-person-name {
  color: var(--afd-dunkel);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.16;
  margin: 0 0 4px;
}

.afd-panel-person-role {
  color: var(--afd-blau);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 10px;
}

.afd-panel-person-text {
  color: var(--afd-text);
  font-size: 15px;
  line-height: 1.42;
  margin: 0;
}

.afd-panel-text {
  color: var(--afd-text);
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 18px;
  min-height: 72px;
}

.afd-panel-lists {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 0 20px;
}

.afd-panel-list-column h4 {
  color: var(--afd-dunkel);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
}

.afd-panel-list-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.afd-panel-list-column li {
  color: var(--afd-text);
  font-size: 14px;
  line-height: 1.22;
  margin: 0 0 7px;
  padding-left: 14px;
  position: relative;
}

.afd-panel-list-column li::before {
  background: var(--afd-hellblau);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0.55em;
  width: 5px;
}

.afd-panel-hint {
  border-top: 1px solid rgba(23, 53, 87, 0.16);
  color: var(--afd-dunkel);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: auto;
  padding-top: 16px;
}

.afd-panel-body.is-changing {
  animation: none;
}

.afd-panel-body.is-changing .afd-panel-kicker,
.afd-panel-body.is-changing h3,
.afd-panel-body.is-changing .afd-panel-status,
.afd-panel-body.is-changing .afd-panel-person,
.afd-panel-body.is-changing .afd-panel-image-wrap,
.afd-panel-body.is-changing .afd-panel-text,
.afd-panel-body.is-changing .afd-panel-lists,
.afd-panel-body.is-changing .afd-panel-hint {
  animation: afd-panel-item-in 280ms ease both;
}

.afd-panel-body.is-changing h3 {
  animation-delay: 35ms;
}

.afd-panel-body.is-changing .afd-panel-status {
  animation-delay: 70ms;
}

.afd-panel-body.is-changing .afd-panel-image-wrap {
  animation-delay: 105ms;
}

.afd-panel-body.is-changing .afd-panel-person {
  animation-delay: 105ms;
}

.afd-panel-body.is-changing .afd-panel-text {
  animation-delay: 140ms;
}

.afd-panel-body.is-changing .afd-panel-lists {
  animation-delay: 175ms;
}

.afd-panel-body.is-changing .afd-panel-hint {
  animation-delay: 210ms;
}

.afd-svg-map.is-visible .afd-map-link:nth-child(1) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(1) { animation-delay: 20ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(2) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(2) { animation-delay: 80ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(3) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(3) { animation-delay: 140ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(4) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(4) { animation-delay: 200ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(5) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(5) { animation-delay: 260ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(6) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(6) { animation-delay: 320ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(7) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(7) { animation-delay: 380ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(8) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(8) { animation-delay: 440ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(9) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(9) { animation-delay: 500ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(10) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(10) { animation-delay: 560ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(11) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(11) { animation-delay: 620ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(12) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(12) { animation-delay: 680ms; }
.afd-svg-map.is-visible .afd-map-link:nth-child(13) .map-region,
.afd-svg-map.is-visible .afd-map-label:nth-child(13) { animation-delay: 740ms; }

@keyframes afd-map-region-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes afd-map-label-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes afd-panel-item-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes afd-panel-data-swoosh {
  0% {
    left: -64%;
    opacity: 0;
  }
  18% {
    opacity: 0.95;
  }
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes afd-panel-receive-glow {
  0% {
    box-shadow: 0 18px 36px rgba(23, 53, 87, 0.12);
  }
  34% {
    box-shadow: 0 18px 36px rgba(23, 53, 87, 0.12), 0 0 0 4px rgba(0, 162, 223, 0.12), 0 0 32px rgba(0, 162, 223, 0.22);
  }
  100% {
    box-shadow: 0 18px 36px rgba(23, 53, 87, 0.12);
  }
}

@keyframes afd-map-transfer-swoosh {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 100%);
    opacity: 0;
  }
}

@keyframes afd-map-mobile-select {
  0% {
    fill: #f2c300;
    filter: drop-shadow(0 0 0 rgba(0, 162, 223, 0));
    opacity: 1;
    transform: scale(1);
  }
  18% {
    fill: #ffffff;
    filter: drop-shadow(0 0 14px rgba(242, 195, 0, 0.95));
    opacity: 1;
    transform: scale(1.045);
  }
  36% {
    fill: #f2c300;
    filter: drop-shadow(0 0 4px rgba(0, 162, 223, 0.35));
    opacity: 1;
    transform: scale(1);
  }
  58% {
    fill: #00a2df;
    filter: drop-shadow(0 0 18px rgba(0, 162, 223, 0.95));
    opacity: 1;
    transform: scale(1.052);
  }
  100% {
    fill: #006699;
    filter: drop-shadow(0 0 10px rgba(242, 195, 0, 0.7));
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes afd-map-mobile-map-confirm {
  0% {
    filter: none;
    transform: scale(1);
  }
  45% {
    filter: drop-shadow(0 0 18px rgba(0, 162, 223, 0.32));
    transform: scale(1.018);
  }
  100% {
    filter: none;
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  .afd-map-panel {
    display: none !important;
  }

  .afd-svg-map {
    margin-top: 0;
  }

  .afd-svg-map .map-region {
    -webkit-tap-highlight-color: transparent;
  }

  .afd-panel-person {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .afd-panel-image-wrap {
    max-width: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .afd-svg-map.is-visible .map-region,
  .afd-svg-map.is-visible .afd-map-label,
  .afd-map-panel.is-receiving,
  .afd-map-panel.is-receiving::after,
  .afd-map-transfer-swoosh,
  .afd-svg-map .map-region.is-mobile-selected,
  .afd-svg-map.is-mobile-navigating {
    animation: none;
  }

  .afd-svg-map .map-region {
    transition: fill 120ms ease, stroke 120ms ease;
  }

  .afd-panel-body.is-changing {
    animation: none;
  }
}

.afd-town-sign {
  --afd-sign-blue: #0066a6;
  --afd-sign-dark: #173557;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 8px auto 0;
  max-width: 420px;
  min-height: 280px;
  perspective: 900px;
}

.afd-town-sign__plate {
  background: linear-gradient(180deg, #fff8bf 0%, #f2c300 100%);
  border: 8px solid #111827;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(23, 53, 87, 0.2);
  color: #111827;
  padding: 24px 28px 22px;
  position: relative;
  text-align: center;
  transform: rotate(-1.5deg);
  width: min(100%, 380px);
}

.afd-town-sign__plate::before {
  border: 3px solid rgba(17, 24, 39, 0.62);
  border-radius: 3px;
  content: "";
  inset: 7px;
  pointer-events: none;
  position: absolute;
}

.afd-town-sign__plate p {
  color: var(--afd-sign-blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.afd-town-sign__plate strong {
  color: #111827;
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
}

.afd-town-sign__plate span {
  border-top: 2px solid rgba(17, 24, 39, 0.46);
  color: var(--afd-sign-dark);
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 12px;
  padding-top: 8px;
}

.afd-town-sign__post {
  background: linear-gradient(90deg, #6b7280, #d1d5db, #6b7280);
  box-shadow: 0 12px 20px rgba(23, 53, 87, 0.16);
  height: 92px;
  margin-top: -2px;
  width: 22px;
}

.afd-town-sign {
  container-type: inline-size;
  display: block;
  margin: 50px auto 0;
  max-width: 460px;
  min-height: 0;
  position: relative;
  width: 100%;
}

.afd-town-sign__image {
  border-radius: 20px;
  display: block;
  filter: drop-shadow(0 18px 34px rgba(23, 53, 87, 0.18));
  height: auto;
  width: 100%;
}

.afd-town-sign__text {
  align-items: center;
  color: #111827;
  display: flex;
  flex-direction: column;
  justify-content: center;
  left: 13%;
  line-height: 1.05;
  position: absolute;
  right: 13%;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 232, 92, 0.34);
  top: 25%;
}

.afd-town-sign__text strong {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.afd-town-sign__text span {
  border-top: 2px solid rgba(17, 24, 39, 0.52);
  color: #173557;
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 1.9vw, 17px);
  font-weight: 800;
  line-height: 1.2;
  margin-top: 10px;
  padding-top: 7px;
}

.afd-town-sign__name {
  align-items: center;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  max-width: 100%;
}

.afd-town-sign__name span {
  border-top: 0;
  color: #111827;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  line-height: 0.92;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.afd-town-sign__name--lines-1 span {
  font-size: clamp(24px, 3.4vw, 38px);
}

.afd-town-sign__name--langenberg span,
.afd-town-sign__name--steinhagen span {
  font-size: clamp(21px, 2.75vw, 30px);
}

.afd-town-sign__name--lines-2 span {
  font-size: clamp(19px, 2.65vw, 29px);
}

.afd-town-sign__name--lines-3 span {
  font-size: clamp(18px, 2.55vw, 27px);
}

.afd-town-sign__district {
  border-top: 2px solid rgba(17, 24, 39, 0.52);
  color: #173557;
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 1.45vw, 14px);
  font-weight: 800;
  line-height: 1.2;
  margin-top: 8px;
  padding-top: 6px;
}

@media (max-width: 980px) {
  .afd-town-sign__name--lines-1 span {
    font-size: clamp(20px, 6vw, 32px);
  }

  .afd-town-sign__name--langenberg span,
  .afd-town-sign__name--steinhagen span {
    font-size: clamp(19px, 5.4vw, 30px);
  }

  .afd-town-sign__name--lines-2 span {
    font-size: clamp(17px, 5vw, 27px);
  }

  .afd-town-sign__district {
    font-size: clamp(10px, 3vw, 13px);
  }
}

@container (max-width: 420px) {
  .afd-town-sign__name--lines-1 span {
    font-size: clamp(19px, 8cqw, 31px);
  }

  .afd-town-sign__name--langenberg span,
  .afd-town-sign__name--steinhagen span {
    font-size: clamp(18px, 7.2cqw, 28px);
  }

  .afd-town-sign__name--lines-2 span {
    font-size: clamp(16px, 6.5cqw, 25px);
  }

  .afd-town-sign__district {
    font-size: clamp(10px, 3.2cqw, 12px);
  }
}
