.nav-link:hover,
.nav-link:focus,
.nav-item.active {
  text-decoration: none;
  color: #ac70c3 !important;
  font-weight: 700;
}

.wil-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.step {
  font-family: sans-serif;
  display: none;
  background: #eeeeee;
  padding: 15px;
  border-radius: 0;
  font-size: 1rem;
  opacity: 1;
  max-height: 500px;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.step.active {
  display: block;
  background: #f4f4f4;
  border-bottom: 5px solid white;
}

.step.completed {
  display: block;
}

.step.inactive {
  opacity: 0.6;
}

.step.removing {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
}

button.selected {
  background-color: #007bff;
  color: white;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

button.secondary {
  font-size: 0.75rem;
  color: grey;
  border-color: grey;
  padding: 5px 7px;
}

.step .info {
  padding: 7px;
  margin-top: 10px;
}

label {
  margin-bottom: 10px;
  display: block;
  padding: 7px;
}

.button {
  font-size: 1rem;
  padding: 15px 22px;
  margin: 5px;
  cursor: pointer;
  border: 1px solid #e07047;
  color: #e07047;
  background: none;
  display: inline-block;
  border-radius: 3px;
}

.button.selected,
.button.active {
  background: #e07047;
  color: white;
}

body {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

.content-article {
  margin-bottom: 1.4em;
  background: white;
  font-family: 'Fira Sans', sans-serif;
  font-weight: 300;
  font-size: 1.2em;
  line-height: 1.5;
}

.content-article:last-child {
  margin-bottom: 0;
}

.content-article h1 {
  font-family: 'CalebGrotesk-Medium', sans-serif;
  font-weight: 500;
  font-size: 18pt;
  margin-bottom: 1em;
  line-height: 1.2;
}

.result-content .content-article h2,
.content-article h2 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 500;
  font-size: calc(1.2em + 4pt);
  text-transform: uppercase;
  margin-bottom: 1.35em;
  line-height: 1.35;
}

.content-article h3 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 500;
  font-size: calc(1.2em + 2pt);
  text-transform: none;
  line-height: 1.5;
  margin-bottom: 0;
}

.content-article h4 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 500;
  font-size: inherit;
  line-height: 1.5;
  margin-bottom: 0;
}

.main-content h2,
.main-content h3,
.main-content h4 {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .main-content h2,
  .main-content h3,
  .main-content h4 {
    max-width: calc(100% - 250px - 8%);
  }
}

.content-article h5 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600;
  font-size: 1em !important;
  line-height: 1.5;
  margin-top: 0.5em;
  margin-bottom: 0;
}

.content-article a {
  color: rgb(172, 112, 195);
  text-decoration: none;
  transition: color 0.3s ease;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.content-article a:hover {
  color: #5a4c99;
  text-decoration: underline;
}

.result-container {
  margin-top: 20px;
}

.result-header h2 {
  margin-top: 0;
  margin-bottom: 2em;
  font-size: 18pt;
}

.frame.frame-default.frame-type-text:has(h1:first-of-type),
.frame:has(h1:first-of-type) {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
  margin-bottom: 28px;
}

.frame.frame-default.frame-type-text:has(h1:first-of-type)::before,
.frame:has(h1:first-of-type)::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(-50vw + 50%);
  width: 100vw;
  height: 70%;
  background-color: #f5f5f5;
  z-index: -1;
}

.bundesland-header-wrapper,
.bundesland-title-section,
.bundesland-header-container,
.content-header,
.page-header {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
  margin-bottom: 40px;
}

.bundesland-header-wrapper::before,
.bundesland-title-section::before,
.bundesland-header-container::before,
.content-header::before,
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(-50vw + 50%);
  width: 100vw;
  height: 200px;
  background-color: #f5f5f5;
  z-index: -1;
}

.bundesland-select-wrapper ~ *:has(h1:first-of-type):has(svg),
.bundesland-select-wrapper ~ *:has(h1:first-of-type):has(img) {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
  margin-bottom: 30px;
}

.bundesland-select-wrapper ~ *:has(h1:first-of-type):has(svg)::before,
.bundesland-select-wrapper ~ *:has(h1:first-of-type):has(img)::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(-50vw + 50%);
  width: 100vw;
  height: 200px;
  background-color: #f5f5f5;
  z-index: -1;
}

.frame:has(h1:first-of-type) h1:first-of-type,
.bundesland-select-wrapper ~ h1:first-of-type,
h1:first-of-type {
  position: relative;
  margin-top: 0;
}

.frame:has(h1:first-of-type) svg,
.frame:has(h1:first-of-type) img,
h1:first-of-type + svg,
h1:first-of-type + img {
  position: relative;
  z-index: 0;
  display: inline-block;
  vertical-align: bottom;
  margin: 0;
  margin-left: 1rem;
}

.frame:has(h1:first-of-type) h1:first-of-type {
  font-size: 2.75em;
  margin-bottom: 1em;
  display: inline-block;
  vertical-align: bottom;
}

h1:first-of-type:has(+ svg) h1,
h1:first-of-type:has(+ img) h1,
h1:first-of-type {
  margin-bottom: 1em;
}

.frame:has(h1:first-of-type) svg,
.frame:has(h1:first-of-type) img {
  vertical-align: top;
}

.layout {
  display: flex;
  align-items: stretch;
  gap: 8%;
  background: white !important;
}

.text-content {
  flex: 2;
}

/* Ohne Sidebar: Text auf gleiche Spaltenbreite begrenzen wie mit Sidebar */
.layout:not(:has(.sidebar)) .text-content {
  max-width: calc(100% - 250px - 8%);
}

.text-content p {
  margin-top: 1em;
  margin-bottom: 0;
}

.text-content p:first-child {
  margin-top: 0;
}

.text-content h2 + p,
.text-content h3 + p,
.text-content h4 + p {
  margin-top: 0.3em;
}

.sidebar {
  flex: 0 0 250px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: left;
  color: rgb(11, 13, 111);
}

.sidebar > * {
  width: 100%;
}

.sidebar,
.sidebar blockquote,
.sidebar blockquote.marginal {
  color: rgb(11, 13, 111);
  margin-top: 0;
}

.sidebar blockquote.marginal + blockquote.marginal {
  margin-top: 0.6em;
}

.sidebar blockquote.marginal .label {
  font-weight: 300;
  font-style: normal;
}

.sidebar a,
.sidebar blockquote.marginal a {
  color: rgb(172, 112, 195);
  font-weight: 300;
  font-style: italic;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.sidebar .external-link-icon,
.sidebar blockquote.marginal .external-link-icon,
.main-content .text-content .external-link-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  color: currentColor;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.sidebar a:hover,
.sidebar blockquote.marginal a:hover {
  text-decoration: underline;
}

.sidebar a:hover .external-link-icon,
.sidebar blockquote.marginal a:hover .external-link-icon,
.main-content .text-content a:hover .external-link-icon {
  opacity: 1;
}

/* Debug-Block: Tags + MD-Datei (nur bei ?debug=1 oder window.WIL_DEBUG_TAGS) */
.wil-debug-block {
  margin-top: 0.6em;
  padding: 0.5em 0.8em;
  background: rgba(232, 232, 232, 0.6);
  border-left: 3px solid rgb(172, 112, 195);
  font-size: 0.8rem;
  color: #555;
}
.wil-debug-block code {
  background: rgba(255,255,255,0.8);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  font-size: 0.9em;
}

blockquote {
  position: relative;
  padding: 0 !important;
  border-left: none;
  margin: 0;
}

select {
  font-size: 1rem;
  border: none;
  padding: 4px 20px 4px 8px;
  color: white;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: auto;
  min-width: fit-content;
  display: inline-block;
  vertical-align: baseline;
  margin: 0 2px;
  line-height: 1.6;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 14px;
}

select.select {
  display: inline-flex;
}

.select.purple {
  background-color: #527fe2;
  border-radius: 0;
}

.select.orange {
  background-color: #e27046;
  border-radius: 9999px;
}

.select.blue {
  background-color: #527fe2;
  border-radius: 0;
  color: white;
}

.select.green {
  background: #31a46e;
  color: white;
  clip-path: polygon(0 0, 95% 0, 100% 50%, 95% 100%, 0 100%);
  border: none;
}

.select-finder {
  background-color: #527fe2;
  border-radius: 0;
}

select::-ms-expand {
  display: none;
}

.tab {
  background-color: #f1f1f1;
  display: none;
}

.tab.active {
  display: block;
}

.meta {
  font-size: 1rem !important;
  font-weight: 500;
}

.personas-tableau {
  display: grid;
  grid-template-columns: 1fr 212px;
  gap: 20px;
  align-items: start;
  font-family: sans-serif;
}

.personas-portrait {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 20px;
  background-color: #f1f1f1;
  border-radius: 5px;
  min-height: 408px;
}

.portrait-left img {
  width: 100%;
  max-width: 200px;
  border-radius: 10px;
}

.info-right {
  flex: 1;
}

.persona-head h2 {
  font-size: 1.8rem;
  margin: 0 0 0.3em;
}

.persona-head .subline {
  font-style: italic;
  color: #777;
}

.text {
  margin-top: 1em;
  line-height: 1.5;
}

.persona-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 5px;
  background-color: white;
  border-left: 5px solid white;
  max-height: none;
  overflow: visible;
  border-bottom: 5px solid white;
}

.persona.selected {
  display: none !important;
}

.persona {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f1f1f1;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 5px;
}

.persona img {
  width: 80px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.persona:hover img {
  filter: none !important;
}

.persona span {
  display: block;
  margin-top: 0.5em;
  font-size: 0.9rem;
  color: #333;
}

.recommendation {
  padding: 15px;
  border-radius: 4px;
  border-top: 5px solid white;
  background-color: white;
}

.recommendation .distinction {
  font-weight: bold;
  color: #e07047;
}

.tab-buttons {
  display: flex;
  background-color: white;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-bottom: 2px solid #f1f1f1;
  font-size: 1rem;
}

.button-tab {
  padding: 10px 20px;
  margin: 0;
  border: none;
  background-color: white;
  cursor: pointer;
  border-right: 4px solid white;
  font-weight: bold;
  color: #333;
  transition: background 0.2s ease;
  border-radius: 3px;
}

.button-tab:last-child {
  border-right: none;
}

.button-tab:hover {
  font-weight: 700;
  background-color: #e07047;
  color: white;
}

.button-tab.active {
  background-color: #f1f1f1;
  border-bottom: 2px solid #f1f1f1;
  color: #e07047;
}

.article-tags {
  margin-top: 0.75em;
  margin-bottom: 1.5em;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
}

#finder-tags {
  display: none;
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  background-color: rgba(232, 232, 232, 0.5);
  color: #333;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.4;
  transition: background-color 0.3s ease;
}

.tag-pill:hover {
  background-color: rgba(232, 232, 232, 0.95);
}

@media (max-width: 480px) {
  .article-tags {
    margin-top: 0.5em;
    margin-bottom: 1em;
  }
}

/* ========== Bundesland Sprungmenü (< 1200px eingeklappt) ========== */
.bundesland-jump-wrap {
  position: fixed !important;
  right: 0 !important;
  top: 350px !important;
  z-index: 1000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}

.bundesland-jump-hamburger {
  width: 50px !important;
  height: 40px !important;
  padding: 0 !important;
  border: none !important;
  background: #e8e8e8 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.bundesland-jump-hamburger span {
  display: block !important;
  width: 12px !important;
  height: 2px !important;
  background: #333 !important;
  transition: transform 0.25s ease, opacity 0.25s ease !important;
}

.bundesland-jump-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg) !important;
}

.bundesland-jump-hamburger.open span:nth-child(2) {
  opacity: 0 !important;
}

.bundesland-jump-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) !important;
}

.bundesland-jump-menu {
  position: relative !important;
  background: rgba(255,255,255,0.95) !important;
  padding: 1.5rem 1rem !important;
  max-width: 250px !important;
  max-height: calc(100vh - 370px) !important;
  overflow-y: auto !important;
  z-index: 1000 !important;
  border-radius: 4px 0 0 4px !important;
}

.bundesland-jump-menu ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.bundesland-jump-menu li {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.bundesland-jump-menu li:last-child {
  border-bottom: none !important;
}

.bundesland-jump-menu a {
  display: block !important;
  padding: 0.75rem 0.5rem !important;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
}

.bundesland-jump-menu a:hover {
  background: #f5f5f5 !important;
  color: #0b0d6f !important;
  width: 100% !important;
}

.bundesland-jump-menu .jump-menu-h2-wrap {
  display: flex !important;
  align-items: center !important;
}

.bundesland-jump-menu .jump-menu-h2-link {
  text-transform: uppercase !important;
}

.bundesland-jump-menu .jump-menu-toggle {
  cursor: pointer !important;
  padding: 0.25rem 0 !important;
  font-size: 0.7rem !important;
  color: #666 !important;
  user-select: none !important;
}

.bundesland-jump-menu .jump-menu-toggle:hover {
  color: #0b0d6f !important;
}

.bundesland-jump-menu .jump-menu-sub {
  margin-left: 0.5rem !important;
  padding-left: 0.5rem !important;
  border-left: 1px solid #e0e0e0 !important;
  display: none !important;
}

.bundesland-jump-menu .jump-menu-sub.open {
  display: block !important;
}

.bundesland-jump-menu .jump-menu-sub a {
  padding: 0.4rem 0.5rem !important;
  font-size: 0.85rem !important;
}

/* > 1200px: Wrap weiter oben */
@media (min-width: 1201px) {
  .bundesland-jump-wrap {
    top: 71px;
  }
}

/* Hamburger animiert zu X wenn offen. < 1200px: Menü bleibt eingeklappt */
.bundesland-jump-hamburger {
  display: flex !important;
}

.bundesland-jump-menu {
  display: none !important;
}

.bundesland-jump-menu.open {
  display: block !important;
}


/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    gap: 20px;
  }
  .layout:not(:has(.sidebar)) .text-content {
    max-width: none;
  }
  .sidebar {
    flex: 0 0 100%;
  }
  .personas-tableau {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .personas-portrait {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .portrait-left img {
    margin: 0 auto;
  }
  .persona-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
  }
  .frame.frame-default.frame-type-text:has(h1:first-of-type)::before,
  .frame:has(h1:first-of-type)::before {
    height: auto;
  }
  .frame:has(h1:first-of-type) {
    display: flex;
    flex-direction: column;
  }
  .frame:has(h1:first-of-type) svg,
  .frame:has(h1:first-of-type) img {
    order: -1;
    margin-bottom: 1rem;
    align-self: flex-start;
  }
  .frame:has(h1:first-of-type) h1:first-of-type {
    order: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
  .personas-portrait {
    padding: 15px;
    min-height: auto;
  }
  .step {
    padding: 15px;
  }
  .button-group {
    flex-direction: column;
  }
  .button {
    width: 100%;
  }
  .frame.frame-default.frame-type-text:has(h1:first-of-type)::before,
  .frame:has(h1:first-of-type)::before {
    display: none;
  }
  .frame.frame-default.frame-type-text:has(h1:first-of-type),
  .frame:has(h1:first-of-type) {
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .frame:has(h1:first-of-type) {
    display: flex;
    flex-direction: column;
  }
  .frame:has(h1:first-of-type) svg,
  .frame:has(h1:first-of-type) img {
    order: -1;
    margin-bottom: 1rem;
    align-self: flex-start;
  }
  .frame:has(h1:first-of-type) h1:first-of-type {
    order: 0;
  }
}
