.wp-block-cmr-tourismus-baum,
.ctb-block {
  color: #262626;
  font-family: inherit;
}

html.ctb-overlay-scroll-locked,
body.ctb-overlay-scroll-locked {
  overflow: hidden !important;
}

.ctb-scroll-driver {
  position: relative;
}

.ctb-sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 48px 0 64px;
}

.ctb-tree-wrap {
  /* Kompakter als die volle 8-Spalten-Breite, aber ohne hoehenbasierte Schrumpfung. */
  width: clamp(480px, 36vw, 700px);
  max-width: 94vw;
  margin: 0 auto;
  position: relative;
  display: flex;
  justify-content: center;
}

.ctb-scroll-hint {
  position: static;
  transform: none;
  z-index: 8;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
  text-align: left;
  width: min(430px, calc(100vw - 40px));
  margin: 0 auto 34px;
  padding: 16px 18px 16px 16px;
  border: 1px solid rgba(0, 31, 71, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(0, 31, 71, 0.12);
  color: #001f47;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ctb-scroll-hint-icon {
  grid-row: 1 / span 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #21b5ea;
}

.ctb-scroll-hint-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  color: #ffffff;
  transform: rotate(90deg);
}

.ctb-scroll-hint-title {
  font-family: "MuseoSlab700", "Museo Slab", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.08;
}

.ctb-scroll-hint-text {
  color: #143b66;
  font-size: 15px;
  line-height: 1.45;
}

.ctb-click-hint-text {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  color: #007db8;
}

.ctb-tree-wrap svg {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.ctb-tree-wrap svg *:focus {
  outline: 0 !important;
}

.ctb-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.ctb-cluster-label-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ctb-cluster-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #001f47;
  font-family: "MuseoSlab700", "Museo Slab", Georgia, serif;
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.95),
    0 0 7px rgba(255, 255, 255, 0.9),
    0 1px 10px rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  opacity: var(--ctb-cluster-label-opacity, 0);
  transform: translate(-50%, -50%) translateY(var(--ctb-cluster-label-y, 0));
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.ctb-cluster-label.is-hovered {
  --ctb-cluster-label-y: -2px;
}

.ctb-overlay-active .ctb-cluster-label {
  opacity: 0 !important;
}

.ctb-hotspot {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: none;
  touch-action: manipulation;
}

.ctb-hotspot-small {
  border-radius: 8px;
}

.ctb-hotspot:focus {
  outline: none;
  box-shadow: none;
}

.ctb-hotspot:focus-visible {
  outline: 2px solid #001f47;
  outline-offset: 2px;
}

.ctb-hotspot:focus:not(:focus-visible),
.ctb-overlay-close:focus:not(:focus-visible) {
  outline: 0 !important;
  box-shadow: none !important;
}

.ctb-tree-wrap .wordmark {
  opacity: 0;
  font-family: "MuseoSans700", sans-serif !important;
  font-weight: 700;
}

.ctb-tree-wrap #block-attraktiv,
.ctb-tree-wrap #block-infrastruktur,
.ctb-tree-wrap #block-oekonomisch,
.ctb-tree-wrap #block-umsatzeffekte,
.ctb-tree-wrap #block-standort {
  opacity: 0;
}

.ctb-tree-wrap .trunk-block-attraktiv,
.ctb-tree-wrap .trunk-block-infrastruktur,
.ctb-tree-wrap .trunk-block-oekonomisch,
.ctb-tree-wrap .trunk-block-umsatzeffekte,
.ctb-tree-wrap .trunk-block-standort {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

.ctb-tree-wrap .solid-shape {
  opacity: 0;
  transform-origin: 50% 80%;
  transform: scale(0.02);
  pointer-events: all;
  cursor: pointer;
}

.ctb-tree-wrap .leaf-label-white {
  opacity: 0;
}

.ctb-tree-wrap .leaf-small-wrap {
  opacity: 0;
  transform: scale(0);
}

.ctb-tree-wrap .leaf-label-dark,
.ctb-tree-wrap .big-leaf-text,
.ctb-tree-wrap .small-leaf-text,
.ctb-tree-wrap .leaf-text-element {
  opacity: 0;
  font-family: "MuseoSans500", "Source Sans Pro", "Segoe UI", Arial, sans-serif !important;
  font-weight: 500;
  text-rendering: geometricPrecision;
}

.ctb-tree-wrap .leaf-label-white,
.ctb-tree-wrap text {
  font-family: "MuseoSans500", "Source Sans Pro", "Segoe UI", Arial, sans-serif !important;
}

.ctb-tree-wrap text.small-leaf-text {
  font-family: "MuseoSans-300", "Museo Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif !important;
  font-weight: 300 !important;
}

.ctb-tree-wrap #block-attraktiv .solid-shape,
.ctb-tree-wrap #block-attraktiv .leaf-small-inner {
  fill: #708197 !important;
}

.ctb-tree-wrap #block-infrastruktur .solid-shape,
.ctb-tree-wrap #block-infrastruktur .leaf-small-inner {
  fill: #008ecf !important;
}

.ctb-tree-wrap #block-oekonomisch .solid-shape,
.ctb-tree-wrap #block-oekonomisch .leaf-small-inner {
  fill: #21b5ea !important;
}

.ctb-tree-wrap #block-umsatzeffekte .solid-shape,
.ctb-tree-wrap #block-umsatzeffekte .leaf-small-inner {
  fill: #6BBFA3 !important;
}

.ctb-tree-wrap #block-standort .solid-shape,
.ctb-tree-wrap #block-standort .leaf-small-inner {
  fill: #d3ddf2 !important;
}

.ctb-tree-wrap #block-standort .leaf-label-white,
.ctb-tree-wrap #block-standort .big-leaf-text {
  fill: #001947 !important;
}

.ctb-mode-bereich .ctb-tree-wrap .small-leaf-text,
.ctb-mode-bereich .ctb-tree-wrap .leaf-text-element,
.ctb-mode-bereich .ctb-tree-wrap g[id^="block-"] text,
.ctb-mode-bereich .ctb-tree-wrap .leaf-label-white,
.ctb-mode-bereich .ctb-tree-wrap .leaf-label-dark,
.ctb-mode-bereich .ctb-tree-wrap .big-leaf-text,
.ctb-mode-bereich .ctb-tree-wrap .ctb-runtime-big-text {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ctb-tree-wrap .ctb-shape-hover {
  filter: drop-shadow(0 6px 14px rgba(0, 31, 71, 0.22)) brightness(1.06);
}

.ctb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 31, 71, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease-in-out;
}

.ctb-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ctb-overlay-inner {
  background: #ffffff;
  width: min(740px, 90vw);
  max-height: 88vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow:
    0 24px 60px rgba(0, 31, 71, 0.32),
    0 4px 12px rgba(0, 31, 71, 0.12);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  overflow: hidden;
  transition:
    transform 0.32s cubic-bezier(.2, .7, .2, 1),
    opacity 0.28s ease-out;
}

.ctb-overlay.is-open .ctb-overlay-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ctb-overlay-head {
  position: relative;
  padding: 36px 40px 22px;
  flex: 0 0 auto;
}

.ctb-overlay-title {
  margin: 0;
  padding-right: 56px;
  color: #001f47;
  font-family: "MuseoSlab700", "Museo Slab", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
}

.ctb-overlay-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #001f47;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.2s ease;
}

.ctb-overlay-close:hover {
  background: #d3ddf2;
}

.ctb-overlay-close:focus {
  outline: none;
  box-shadow: none;
}

.ctb-overlay-close:focus-visible {
  outline: 2px solid #008ecf;
  outline-offset: 2px;
}

.ctb-overlay-close svg {
  width: 18px;
  height: 18px;
}

.ctb-overlay-body {
  padding: 10px 40px 30px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.ctb-overlay-lead {
  max-width: 60ch;
  margin: 0 0 22px;
  color: #001f47;
  font-family: "MuseoSans300", "Museo Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.55;
}

.ctb-overlay-lead > :first-child,
.ctb-overlay-card-text > :first-child {
  margin-top: 0;
}

.ctb-overlay-lead > :last-child,
.ctb-overlay-card-text > :last-child {
  margin-bottom: 0;
}

.ctb-overlay-count {
  margin: 0 0 18px;
  color: #001f47;
  display: flex;
  align-items: center;
  gap: 16px;
}

.ctb-overlay-count::after {
  content: "";
  display: block;
  flex: 1 1 auto;
  height: 1px;
  background: #d3ddf2;
}

.ctb-overlay-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ctb-overlay-card {
  background: #eaf1fb;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
}

.ctb-overlay-card-title {
  color: #001f47;
  font-family: "MuseoSans700", "MuseoSans", "Museo Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.22;
  font-synthesis: none;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ctb-overlay-card-text {
  color: #001f47;
  font-family: "MuseoSans300", "Museo Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  opacity: 1;
}

.ctb-overlay-foot {
  /* Der Abstand gehoert zum Overlay-Layout, nicht zum wiederverwendeten Hub-Button. */
  padding: 28px 40px 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 0;
  background: #ffffff;
  flex: 0 0 auto;
}

.ctb-overlay-cta {
  text-decoration: none;
}

.ctb-overlay-cta:focus-visible {
  outline: 2px solid #001f47;
  outline-offset: 3px;
}

.ctb-overlay-cta svg {
  width: 14px;
  height: 14px;
}

.ctb-tree-wrap [class*="trunk-block-"],
.ctb-tree-wrap .leaf-text-element,
.ctb-tree-wrap .small-leaf-text,
.ctb-tree-wrap .leaf-label-dark,
.ctb-tree-wrap .leaf-label-white,
.ctb-tree-wrap .big-leaf-text,
.ctb-tree-wrap .ctb-original-big-text,
.ctb-tree-wrap .wordmark,
.ctb-tree-wrap text {
  pointer-events: none;
}

.ctb-tree-wrap .solid-shape,
.ctb-tree-wrap .leaf-small-wrap,
.ctb-tree-wrap .leaf-small-inner {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 0.28s cubic-bezier(.2, .7, .2, 1),
    filter 0.28s ease;
}

.ctb-leaf-chip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 31, 71, 0.9);
  color: #fff;
  padding: 8px 14px 8px 15px;
  border-radius: 50px;
  font-family: "MuseoSans500", "Museo Sans", "Source Sans Pro", "Segoe UI", Arial, sans-serif;
  font-weight: 500;
  font-size: 12px !important;
  line-height: 1 !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 31, 71, 0.14);
  transform: translate(9px, calc(-100% - 7px));
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ctb-leaf-chip .ctb-leaf-chip-label {
  display: inline-block;
  font-size: 12px !important;
  line-height: 1 !important;
  transform-origin: center;
}

.ctb-leaf-chip.is-visible {
  opacity: 1;
  transform: translate(10px, calc(-100% - 8px));
}

.ctb-leaf-chip-arrow {
  display: inline-flex;
  align-items: center;
  width: 13px;
  height: 13px;
  color: #21b5ea;
}

.ctb-leaf-chip-arrow svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 991px) {
  .ctb-sticky {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 42px 0 42px;
    overflow: visible;
  }

  .ctb-scroll-hint {
    position: static;
    transform: none;
    order: -1;
    width: min(94vw, 430px);
    margin: 0 auto 10px;
    padding: 13px 15px;
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .ctb-scroll-hint-icon {
    width: 36px;
    height: 36px;
  }

  .ctb-scroll-hint-icon svg {
    width: 23px;
    height: 23px;
  }

  .ctb-tree-wrap {
    width: min(
      740px,
      96vw,
      calc((100vh - 122px) * 0.88)
    );
    max-width: 96vw;
  }

  .ctb-tree-wrap svg {
    max-height: calc(100vh - 122px);
  }

  .ctb-scroll-hint-title {
    font-size: 15px;
  }

  .ctb-scroll-hint-text {
    font-size: 14px;
  }

  .ctb-click-hint-text {
    font-size: 13px;
  }

  .ctb-overlay-inner {
    width: 92vw;
    max-height: 84vh;
  }

  .ctb-overlay-head {
    padding: 28px 28px 16px;
  }

  .ctb-overlay-body {
    padding: 8px 28px 24px;
  }

  .ctb-overlay-foot {
    padding: 24px 28px 22px;
  }

  .ctb-overlay-title {
    font-size: 24px;
    padding-right: 58px;
  }

  .ctb-overlay-lead {
    font-size: 16px;
  }

  .ctb-overlay-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ctb-overlay-head {
    padding: 24px 68px 16px 22px;
  }

  .ctb-overlay-body {
    padding: 8px 22px 22px;
  }

  .ctb-overlay-foot {
    padding: 22px 22px 22px;
  }

  .ctb-overlay-title {
    padding-right: 0;
    font-size: 22px;
    line-height: 1.14;
  }

  .ctb-overlay-close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }
}
