.lexikon-listing {
  padding: 32px 0;
  background: #fff;
}

/* =======================
 * Glossary hero (Figma)
 * ======================= */

.page-glossary {
  --listing-overlap: 0;
}

.hero-section--glossary {
  background-color: #e5f1ff;
  background-image: url("../assets/themen/az-frame-dull.svg");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 521px auto;
  min-height: 499px;
  padding: 48px 0 40px;
}

.hero-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  color: #1643d5;
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hero-back-link::before {
  content: "←";
}

.hero-back-link:hover {
  text-decoration: none;
  color: #002059;
}

.page-glossary .hero-label--eyebrow {
  font-family: "Source Serif Pro", "Source Serif 4", serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #535862;
  margin-bottom: 16px;
  padding-left: 42px;
  position: relative;
}

.page-glossary .hero-label--eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: #1643d5;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.page-glossary .hero-section h1 {
  font-family: "Source Serif 4", serif;
  font-size: 60px;
  line-height: 1.1;
  color: #000e26;
  margin-bottom: 24px;
}

.page-glossary .hero-subtitle {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  width: 50%;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.4;
  color: #535862;
  font-weight: 400;
  margin-bottom: 32px;
}

.page-glossary .hero-search {
  width: min(100%, 795px);
  --search-size: 48px;
  margin-bottom: 28px;
}

.page-glossary .hero-search .search-form__container {
  min-height: var(--search-size);
  border-color: #e9eaeb;
  border-radius: 12px;
}

.page-glossary .hero-search .search-form__field {
  height: var(--search-size);
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #535862;
  border-radius: 11px 0 0 11px;
}

.page-glossary .hero-search .search-form__button {
  width: var(--search-size);
  min-width: var(--search-size);
  height: var(--search-size);
  flex-shrink: 0;
  padding: 0;
  border-radius: 0 11px 11px 0;
}

.page-glossary .hero-alphabet-wrap {
  max-width: 795px;
}

.page-glossary .lexikon-alphabet-nav {
  margin: 0;
  max-width: none;
  gap: 0;
}

.page-glossary .lexikon-letter-link {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #2b2b2b;
}

.page-glossary .lexikon-letter-link.is-disabled {
  display: inline-block;
  color: #c5cad1;
  cursor: default;
}

.page-glossary .listing-section {
  margin-top: 0;
  padding-top: 0;
}

@media (max-width: 768px) {
  .hero-section--glossary {
    min-height: 0;
    padding: 24px 0 20px;
    background-size: 220px auto;
    background-position: calc(100% + 24px) -16px;
  }

  .page-glossary .hero-section h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .page-glossary .hero-label--eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.06em;
    padding-left: 36px;
  }

  .page-glossary .hero-label--eyebrow::before {
    width: 28px;
  }

  .page-glossary .hero-subtitle {
    width: 100%;
    font-size: 18px;
    margin-bottom: 20px;
  }

  .page-glossary .hero-search .search-form__container {
    overflow: hidden;
  }

  .page-glossary .hero-search .search-form__field {
    border-radius: 0;
  }

  .page-glossary .hero-search .search-form__button {
    border-radius: 0;
  }

  .page-glossary .hero-alphabet-wrap {
    max-width: 100%;
  }

  .page-glossary .lexikon-alphabet-nav {
    flex-wrap: wrap;
    gap: 4px 2px;
    justify-content: flex-start;
  }

  .page-glossary .lexikon-letter-link {
    font-size: 14px;
    min-width: 28px;
    padding: 6px 4px;
  }
}

.lexikon-loading .lexikon-grid,
.lexikon-loading .lexikon-load-more {
  opacity: 0.5;
  pointer-events: none;
}

.lexikon-loading::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 9999;
  pointer-events: none;
}

.lexikon-loading-spinner {
  border: 3px solid #e2e6ec;
  border-top-color: #1643D5;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: lexikon-spin 0.6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes lexikon-spin {
  to {
    transform: rotate(360deg);
  }
}

.lexikon-alphabet-nav {
  margin: var(--alphabet-gap, 24px) 0;
  padding: 0;
  max-width: 795px;
  gap: 0;
  display: flex;
  flex-wrap: wrap;
}

.lexikon-letter-link {
  font-family: "Source Serif 4", serif;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
  padding: 4px 6px;
  color: #2B2B2B;
  text-decoration: none;
}

.lexikon-letter-link.is-active {
  background-color: #1643D5;
  color: #fff;
}

.lexikon-letter-link:hover {
  color: #fff;
  background-color: #1643D5;
  text-decoration: none;
}

.lexikon-letter-link.is-active:hover {
  color: #fff;
  background-color: #1643D5;
}

.lexikon-letter-link.is-disabled {
  display: none;
}

.lexikon-section-heading {
  margin: 0 0 12px;
}

.lexikon-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lexikon-results-bar__main {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.lexikon-results-bar__letter {
  font-family: "Source Serif 4", serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  color: #000e26;
  margin: 0;
}

.lexikon-results-bar__letter--search {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 32px;
  line-height: 1.2;
}

.lexikon-results-bar__count {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #535862;
  margin: 0;
  white-space: nowrap;
}

.lexikon-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lexikon-sort__label {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  color: #535862;
}

.lexikon-sort__select {
  appearance: none;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23000E26' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center;
  padding: 0 20px 0 0;
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #000e26;
  cursor: pointer;
}

.lexikon-current-letter {
  font-size: 24px;
  margin: 0;
  color: #041423;
}

.lexikon-list,
.lexikon-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lexikon-card {
  border-radius: 12px;
  border: 1px solid #e9eaeb;
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.lexikon-card:hover {
  box-shadow: 0 4px 16px rgba(0, 14, 38, 0.06);
}

.lexikon-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.lexikon-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lexikon-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #000e26;
  background: #fff;
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: #000e26;
}

.lexikon-card-tag--letter {
  min-width: 36px;
  padding: 8px 12px;
  border-color: #e9eaeb;
  color: #535862;
}

.lexikon-card-heart {
  position: static;
  flex-shrink: 0;
  width: 21px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.lexikon-card-heart:hover {
  opacity: 0.7;
}

.lexikon-card-heart:hover svg path {
  stroke: #1643D5;
}

.lexikon-card-heart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lexikon-card-title {
  font-family: "Source Serif 4", serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: #000e26;
  padding-right: 0;
}

.lexikon-search-mark {
  background: #ffe481;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.lexikon-card-subtitle {
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #535862;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 0;
}

.lexikon-card__footer {
  display: flex;
  justify-content: flex-end;
}

.lexikon-card-link {
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
}

.lexikon-card-link:hover .lexikon-card-link-arrow {
  transform: translateX(2px);
}

.lexikon-card-link-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.15s ease-out;
}

.lexikon-card-link-arrow svg {
  width: 24px;
  height: 24px;
  display: block;
}

.lexikon-load-more-wrap {
  margin-top: 40px;
  text-align: center;
}

.lexikon-load-more {
  /* display: inline-block; */
  /* padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid #cbd2dd;
  background: #f5f7fb;
  font-size: 14px;
  color: #041423;
  text-decoration: none; */
}

.lexikon-load-more:hover {
  /* background: #e3e7f3; */
}

/* =======================
 * Single glossary entry
 * ======================= */

.lexikon-single {
  /* padding: 32px 0 60px; */
}

.lexikon-single-inner {
  /* max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px; */
}

.lexikon-single-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
}

.lexikon-single-back-link:hover {
  text-decoration: none;
}

.lexikon-single-back-icon {
  font-size: 14px;
  display: contents;
}

.lexikon-single-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.lexikon-single-forward-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-decoration: none;
  margin-left: auto;
}

.lexikon-single-forward-link:hover {
  text-decoration: none;
}

.lexikon-single-forward-icon {
  display: contents;
}

.lexikon-single-breadcrumbs {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 16px;
}

.lexikon-breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
}

.lexikon-breadcrumbs a:hover {
  text-decoration: underline;
}

.lexikon-single-hero-container {
  /* background: #EDF5FF;
  padding: 24px 0px; */
}

.lexikon-single-hero {
  display: flex;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 24px !important;
  margin-bottom: 32px;
  flex-direction: row !important;
  margin-bottom: 0;
}

.page-entry .lexikon-single-hero {
  display: block !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  margin-top: 0;
  margin-bottom: 0;
}

.lexikon-single-hero-main {
  display: flex;
  flex-direction: column;
  padding: 32px 0px 24px;
}

.page-entry .lexikon-single-hero-main {
  min-height: 0;
  padding: 0;
}

.lexikon-single-title {
  font-size: 32px;
  margin: 0 0 24px;
  color: #041423;
}

.lexikon-single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
}

.lexikon-single-tag {
  display: inline-flex;
  align-items: center;
  font-family: "Source Sans Pro", "Source Sans 3", sans-serif;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #000E26;
  background: #fff;
  font-weight: 400;
  color: #000E26;
  line-height: 1.3;
  white-space: nowrap;
}

.lexikon-single-tag-secondary {
  border: 1px solid #000E26;
  border-style: solid;
  background: #fff;
}

a.lexikon-single-tag-link {
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.lexikon-single-tag-link:hover,
a.lexikon-single-tag-link:focus-visible {
  background: #f0f4ff;
  border-color: #1643D5;
  color: #1643D5;
  outline: none;
}

.lexikon-single-hero-actions {
  display: flex;
  gap: 8px;
  display: none !important;
}

.lexikon-single-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #E9EAEB;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #4b5563;
  text-decoration: none;
  padding: 8px;
}

.lexikon-single-share-btn:hover {
  background: #edf0f7;
}

.lexikon-single-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-top: 40px;
}

.lexikon-single-toc {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 8px;
  /* Smooth scrolling for TOC when it overflows */
  scroll-behavior: smooth;
}

/* Smooth scroll behavior for TOC links */
html {
  scroll-behavior: smooth;
}

.lexikon-single-toc-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000E26;
  margin-bottom: 16px;
}

.lexikon-single-toc-icon svg {
  display: block;
}

.lexikon-single-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid #E5E9EE;
}

.lexikon-single-toc-item {
  margin-bottom: 10px;
  padding-left: 16px;
  border-left: 2px solid transparent;
  margin-left: -1.5px;
}

.lexikon-single-toc-item.active {
  border-left: 2px solid #000E26;
}

.lexikon-single-toc-item a {
  font-size: 14px;
  color: #535862 !important;
  text-decoration: none;
  line-height: 120%;
}

.lexikon-single-toc-item.active a {
  color: #000E26 !important;
}

.lexikon-single-toc-item a:hover {
  color: #0A0A0A;
  text-decoration: none;
}

.lexikon-single-toc-level-3 {
  margin-left: 0px;
}

.lexikon-single-toc-level-4 {
  margin-left: 20px;
}

.lexikon-single-content h2,
.lexikon-single-content h3,
.lexikon-single-content h4 {
  /* color: #041423; */
}

.lexikon-single-content p {
  /* color: #4b5563;
  line-height: 1.6; */
}

.lexikon-single-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.lexikon-single-nav-link {    
  border-radius: 12px;
  border: 1px solid #E9EAEB;
  padding: 16px;
  text-decoration: none;
  background: #ffffff;
  width: calc(33.333% - 13.333px);
}

.lexikon-single-nav-link.lexikon-single-nav-prev {
  flex-direction: row;
}

.lexikon-single-nav-link.lexikon-single-nav-next {
  flex-direction: row-reverse;
}

.lexikon-single-nav-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lexikon-single-nav-icon svg {
  display: block;
}

.lexikon-single-nav-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lexikon-single-nav-link.lexikon-single-nav-next {
  text-align: right;
}

.lexikon-single-nav-label {
  font-size: 12px;
  color: #1643D5;
  margin-bottom: 0px;
  line-height: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.lexikon-single-nav-link.lexikon-single-nav-next .lexikon-single-nav-label {
  justify-content: flex-end;
}

.lexikon-single-nav-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  line-height: 130%;
  margin-bottom: 7px;
}

.lexikon-single-nav-link:hover {
  background: #f5f7fb;
}

.lexikon-single-overview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 20px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #041423;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.lexikon-single-overview-btn:hover {
  background: #0b2140;
}

.lexikon-single-overview-btn-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lexikon-single-overview-btn-icon svg {
  display: block;
}

@media (max-width: 900px) {
  .lexikon-single-layout {
    grid-template-columns: 1fr;
  }
}

/* =======================
 * Related Glossary Items
 * ======================= */

.lexikon-related {
  margin: 40px 0;
}

.lexikon-related-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 24px;
  color: #041423;
}

.lexikon-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.lexikon-related-item {
  border-radius: 12px;
  border: 1px solid #e2e6ec;
  background: #ffffff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lexikon-related-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.lexikon-related-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.lexikon-related-item-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #041423;
  line-height: 1.4;
}

.lexikon-related-item-excerpt {
  font-size: 14px;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .lexikon-results-bar {
    align-items: flex-start;
  }

  .lexikon-results-bar__letter {
    font-size: 32px;
  }

  .lexikon-results-bar__letter--search {
    font-size: 24px;
  }

  .lexikon-list,
  .lexikon-grid {
    gap: 12px;
  }

  .lexikon-card {
    padding: 20px;
  }

  .lexikon-card-subtitle {
    -webkit-line-clamp: 3;
  }

  .lexikon-related-grid {
    grid-template-columns: 1fr;
  }
}

