:root {
  --bg: #f4f7f9;
  --card-bg: #ffffff;
  --primary: #cb0c9f;
  --text: #344767;
  --muted: #67748e;
  --brand: #2563eb;
  --gradient: linear-gradient(310deg, #7928ca, #ff0080);
  --radius: 16px;
  --shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
  --gap: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a; /* Tieferes Dunkelblau für besseren Karten-Kontrast */
    --card-bg: #1e293b; /* Heller als der Hintergrund, aber dunkel genug */
    --text: #f1f5f9; /* Fast Weiß (Slate 100) für maximale Lesbarkeit */
    --muted: #cbd5e1; /* Deutlich heller (Slate 300) statt des alten Grays */
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    /*--primary: #ff0080;*/ /* Helleres Pink für bessere Sichtbarkeit */
    --primary: #ff61b0; /* Helleres Pink für bessere Sichtbarkeit */
  }

  /* Das Logo braucht im Dunkeln volle Strahlkraft */
  .logo {
    color: #ffffff !important;
  }

  /* Die Pills: Hier liegt meist der Fehler */
  .pill {
    background: #334155 !important; /* Dunkleres Blau-Grau */
    border-color: #475569 !important; /* Sichtbarer Rahmen */
    color: #ffffff !important; /* Reinweiß für harten Kontrast */
  }

  .pill:hover {
    background: #475569 !important;
    border-color: var(--primary) !important;
  }

  /* Quick-Nav Zahlen (Zellen oben) */
  .quick-nav a {
    background: #334155 !important;
    color: #60a5fa !important; /* Ein helles Blau statt Pink für Zahlen-Kontrast */
  }

  /* Modal-Felder: Müssen sich klar vom Modal-Hintergrund abheben */
  .modal-form input,
  .modal-form textarea {
    background: #0f172a !important; /* Sehr dunkler Input-Grund */
    border-color: #334155 !important;
    color: #ffffff !important;
  }

  /* Related Links im Footer */
  .related {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
  }
  .related a {
    color: var(
      --primary
    ) !important; /* Ein helleres "Neon-Pink" für bessere Sichtbarkeit auf Dunkelblau */
  }

  /* Lemmaordnung: Hier war es oft zu dunkel */
  .lemma-columns a {
    color: #94a3b8 !important; /* Slate 400 - gut lesbar auf Dunkel */
  }
  .lemma-columns a:hover {
    color: #ffffff !important;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Open Sans",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto 30px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: #141727;
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

.bento-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--gap); /* Kleiner Puffer für Mobile */
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.solution-block {
  scroll-margin-top: 100px;
}

.solution-block,
.bento-card {
  display: block;
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Suchbereich */
/* .search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 14px;
    border: 1px solid #d2d6da;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
} */

/* Suchbereich */
.search-box {
  position: relative; /* wichtig: Anker für Dropdown */
}

/* Input + Button in einer Zeile */
.search-input-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

/* Dein bisheriges Input-Styling */
.search-box input {
  flex: 1;
  padding: 14px;
  border: 1px solid #d2d6da;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
}

/* Dropdown */
.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* Eintrag */
.search-suggestions .suggest-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  /* color: inherit; */
  line-height: 1.25;
  text-transform: uppercase;
}

/* Hover / Active */
.search-suggestions .suggest-item:hover,
.search-suggestions .suggest-item.active {
  background: rgba(0, 0, 0, 0.05);
}

.search-suggestions a {
  display: block;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  color: var(--primary);
}

.search-suggestions a.active {
  background: rgba(0, 0, 0, 0.05);
}

/* Mobile: Button unter Input */
@media (max-width: 640px) {
  .search-input-wrap {
    flex-direction: column;
  }
}

.btn-gradient {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.btn-gradient:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Titel & Quick-Nav */
h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  overflow-x: auto; /* Erlaubt horizontales Scrollen auf dem Handy */
  padding-bottom: 5px;
  scrollbar-width: none; /* Versteckt Scrollbar in Firefox */
}

.quick-nav::-webkit-scrollbar {
  display: none; /* Versteckt Scrollbar in Chrome/Safari */
}

.quick-nav a {
  /* Dein neues Farbschema */
  background: #334155 !important;
  color: #93c5fd !important; /* Etwas helleres Blau für Kontrast-100er */

  /* Original Styling */
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;

  /* Accessibility Fix: Klickfläche vergrößern ohne das Design zu sprengen */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px; /* Verhindert zu schmale Buttons bei einstelligen Zahlen */
  min-height: 44px; /* DAS ist der Schlüssel für die 100 Punkte */
  padding: 0 14px; /* Seitliches Padding bleibt wie im Original */

  transition: transform 0.1s ease;
}

.quick-nav a:active {
  transform: scale(0.95); /* haptisches Feedback beim Tippen */
}

/* Das Solutions Grid (Einheitliche Kacheln) */
.solutions-grid {
  display: grid;
  /* Erzeugt automatisch Spalten mit mind. 300px Breite */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

h2,
h3 {
  margin-top: 0;
  color: var(--muted);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

/* Der Container: Erlaubt das Nebeneinanderstehen und Umbrechen */
.word-pills {
  display: flex;
  flex-wrap: wrap; /* Wichtig: Zeilenumbruch, wenn kein Platz mehr ist */
  flex-direction: row;
  gap: 12px; /* Moderner Abstand zwischen den Pills (horizontal & vertikal) */
  margin-top: 10px;
}

/* Die Pill: Muss sich wie ein Inline-Block verhalten */
.pill {
  display: inline-flex; /* Sorgt dafür, dass sie nebeneinander stehen können */
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 10px 18px; /* Innenabstand: oben/unten 10px, links/rechts 18px */
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  white-space: nowrap; /* Verhindert, dass ein Wort in der Pill umbricht */
  transition: all 0.2s ease-in-out;
}

/* Hover-Effekt für bessere UX */
.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.pill.highlight,
.highlight {
  background: var(--gradient);
  color: white;
  border: none;
}

/* Footer Bereich */
.footer-area {
  margin-top: 20px;
}

.footer-area p {
  margin: 0;
  font-weight: 600;
}

.related {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related span {
  width: 100%;
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  color: var(--muted);
}

.related a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;

  padding: 10px 15px;
  background: color-mix(in srgb, var(--primary), transparent 90%);
  border-radius: 10px;
  font-size: 0.8rem;
  transition: all 0.2s ease;

  display: inline-block;
}

.related a:hover {
  background: rgba(203, 12, 159, 0.1);
  transform: translateY(-1px);
}

/* Dark Mode Korrektur für Kontrast */
@media (prefers-color-scheme: dark) {
  .related a {
    background: rgba(
      244,
      114,
      182,
      0.1
    ); /* Hellere Pink-Variante für Dark Mode */
    color: #f472b6;
  }
}

/* Mobile Anpassung */
@media (max-width: 600px) {
  .search-box {
    flex-direction: column;
  }
  .solutions-grid {
    grid-template-columns: 1fr;
  }
  body {
    padding: 15px;
  }
}

/* Modal Hintergrund (Overlay) */
/* 1. Das Overlay wird zum Flex-Container */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0; /* Deckt top, left, right, bottom: 0 ab */
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);

  /* Der magische Teil für die Zentrierung: */
  display: none; /* Wird per JS auf 'flex' gesetzt */
  align-items: center; /* Vertikal zentrieren */
  justify-content: center; /* Horizontal zentrieren */
  padding: 20px; /* Sicherheitsabstand für Mobile */
}

/* 2. Das Fenster selbst (Kein transform/top/left mehr nötig!) */
.modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 500px;
  position: relative; /* Nur für den Close-Button */
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slide {
  from {
    transform: translate(-50%, -40%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.close-button {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.modal-form input,
.modal-form textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}

.disclaimer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
/* Container für die Lemma-Sektion im Footer */
.footer-lemma-section {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 10px 0px 10px;
  margin-top: 20px;
}

.footer-title {
  /* color: #ffffff; */
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Zeitungslayout für die Links */
.lemma-columns {
  column-count: 3;
  column-gap: 30px;
}

.lemma-columns a {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s ease;
  /* Verhindert, dass Links am Spaltenende umbrechen */
  break-inside: avoid;
}

.lemma-columns a:hover {
  color: var(--primary);
}

.lemma-columns a.active {
  color: #ffffff;
  font-weight: 700;
}

/* RESPONSIVE ANPASSUNGEN */

/* Tablet: 2 Spalten */
@media (max-width: 992px) {
  .lemma-columns {
    column-count: 2;
  }
}

/* Smartphone: 1 Spalte */
@media (max-width: 600px) {
  .lemma-columns {
    column-count: 1;
  }
  .footer-lemma-section {
    text-align: left;
  }
}

/* Container für den Service-Bereich */
.footer-service-section {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.service-title {
  /* color: #ffffff; */
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Die Navigations-Links */
.service-nav {
  display: flex;
  gap: 25px;
}

.service-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.service-nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Branding & Zeitstempel */
.footer-branding {
  text-align: right;
}

.brand-text {
  margin: 0;
  color: #ffffff;
  font-size: 0.9rem;
}

.brand-text strong {
  color: var(--primary);
}

.timestamp {
  display: block;
  font-size: 0.7rem;
  color: var(--text);
  margin-top: 5px;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .service-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .service-nav {
    flex-direction: column;
    gap: 12px;
  }

  .footer-branding {
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    width: 100%;
  }
}

/* Container Begrenzung */
.word-pills.limit-height {
  max-height: 180px; /* Entspricht ca. 3-4 Reihen Pills */
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease-in-out;
}

/* Der "Ausfader" Effekt am unteren Rand der Kachel */
/* Der Verlauf wird NUR angezeigt, wenn die Klasse 'limit-height' aktiv ist */
.word-pills.limit-height {
  max-height: 180px; /* Deine gewünschte Höhe */
  overflow: hidden;
}

.word-pills.limit-height::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px; /* Etwas höherer Verlauf für weicheren Übergang */
  background: linear-gradient(transparent, var(--card-bg));
  pointer-events: none; /* Man kann durch den Verlauf hindurchklicken */
}

/* Wenn die Klasse entfernt wird, alles anzeigen */
.word-pills.expanded {
  max-height: none;
}
.word-pills.expanded::after {
  display: none;
}

/* Der Button Style */
.show-more-btn {
  margin-top: 15px;
  background: none;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.show-more-btn:hover {
  background: var(--primary);
  color: white;
}

/* Modernes Design für den Header-Button & Footer-Link */
.btn-secondary {
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none; /* Falls es ein <a> Tag ist */
  display: inline-block;
  margin-left: 2em;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(203, 12, 159, 0.2);
  transform: translateY(-1px);
  border-color: rgba(203, 12, 159, 0.3);
}



/* Verhindert das Springen der info-area */
.info-area {
  min-height: 120px; /* Pass den Wert so an, dass h1 + quick-nav genau reinpassen */
}

/* Platzhalter für AdSense (falls du Auto-Ads nutzt) */
ins.adsbygoogle {
  display: block !important;
  /* min-height: 280px; */
}

/* Container für die Anzeige unter den Buttons/Info-Area */
.info-area + ins.adsbygoogle {
  display: block !important;
  min-height: 280px; /* Typische Höhe eines Mobile-Banners */
  margin: 15px 0;
  background: transparent;
}

.ad-wrapper-info {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 125px;
  max-height: 125px; /* Optional: Verhindert auch das Wachsen nach unten */
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden; /* Verhindert, dass zu große Ads den Rahmen sprengen */
}

/* Speziell für mobile Geräte, falls dort ein höherer Block geladen wird */
@media (max-width: 600px) {
  .ad-wrapper-info {
    min-height: 250px;
  }
}

.ad-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: #94a3b8; /* Dezentes Schiefergrau */
  text-align: center;
  margin-bottom: 5px;
  font-weight: 600;
}

.question-stack {
  display: flex;
  flex-direction: column;
  gap: 1px; /* Erzeugt feine Trennlinien */
  background: #e2e8f0; /* Farbe der Trennlinie */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.question-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.2s;
  min-height: 48px; /* Tap Target Standard! */
}

.question-link:hover {
  background: #f8fafc;
  color: #2563eb;
}

.q-text {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}

.q-arrow {
  color: #cbd5e1;
  font-weight: bold;
}

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 320px;
}

.alpha-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.alpha-nav a:hover {
  color: #2563eb;
}

/* Hero Texte */
.hero-area h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.lead-text {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 800px;
}

/* Tool Styling */
.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  background: color-mix(in srgb, var(--primary), transparent 85%);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Hilfsklassen */
.text-xs {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.mt-3 {
  margin-top: 20px;
}

/* Dark Mode spezifisch für Hero */
@media (prefers-color-scheme: dark) {
  .lead-text {
    color: var(--muted);
  }
}

.bento-grid-2-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
}

@media (max-width: 768px) {
  .bento-grid-2-col {
    grid-template-columns: 1fr; /* Auf dem Handy untereinander */
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.insights-area .top-search-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.insights-area .top-search-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.insights-area .top-search-list a {
  font-weight: 600;
  text-decoration: none;
}

.insights-area .top-search-list a:hover {
  text-decoration: underline;
}

.insights-area .top-search-count {
  color: #6c757d;
  font-size: 0.9rem;
  white-space: nowrap;
}

.insights-area .top-search-empty {
  margin: 0.5rem 0 0;
  color: #6c757d;
}

/* .search-suggestions {
  position: absolute;
  z-index: 20;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  margin-top: .5rem;
  width: 100%;
}

.search-suggestions a {
  display: block;
  padding: .6rem .9rem;
  text-decoration: none;
}

.search-suggestions a.active {
  background: rgba(0,0,0,.05);
} */
