/* EquiΦ / PhiX / Docspell Viewer Landing Pages – schlicht, modern */

:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-text-muted: #555555;
  --color-border: #e5e5e5;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

[id="was-ist-equiphi"],
[id="was-ist-phix"],
[id="was-ist-docspell"],
[id="features"],
[id="about"],
[id="demo"],
[id="programmlizenz"],
[id="download"],
[id="git-repo"],
[id="registrieren"],
[id="unterstuetzung"],
[id="kontakt"] {
  scroll-margin-top: 3.5rem;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 3.5rem;
  padding: 0 1.5rem;
}

.header-back {
  position: absolute;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.header-back:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

.header-back svg {
  width: 20px;
  height: 20px;
}

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.25rem;
}

.logo-img {
  width: 24px;
  height: 24px;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-lang {
  position: relative;
  z-index: 1;
}

.header-lang-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.header-lang-flag {
  display: block;
  width: 1.25rem;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  flex-shrink: 0;
}

.header-lang-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

.header-lang-link--active {
  color: var(--color-text);
}

.header-lang-sep {
  color: var(--color-border);
  user-select: none;
  font-size: 0.875rem;
}

.header-action,
.header-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.header-action-btn {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.header-action:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

.header-action svg {
  width: 20px;
  height: 20px;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero-logo-img {
  display: block;
  margin: 0 auto 1rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-logo {
  color: var(--color-text);
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-weight: 500;
}

.hero-description {
  max-width: 36rem;
  margin: 1.5rem auto 2rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s, background 0.2s;
}

.btn:hover {
  background: #f5f5f5;
}

/* Dunklerer Hintergrund für Funktionen & Programmlizenz */
.section--dunkel {
  background: #f0f0f0;
}

.section--dunkel .section-title {
  color: var(--color-text);
}

.section--dunkel .section-intro {
  color: #444444;
}

.section--dunkel .feature-card-front,
.section--dunkel .feature-card-back {
  background: var(--color-bg);
  border-color: #e0e0e0;
}

.section--dunkel .feature-card-back p {
  color: #444444;
}

.section--dunkel .feature-card-front h3 {
  color: var(--color-text);
}

.section--dunkel .lizenz-karte {
  background: var(--color-bg);
  border-color: #e0e0e0;
}

.section--dunkel .lizenz-karte p {
  color: #444444;
}

.section--dunkel .lizenz-karte h3,
.section--dunkel .lizenz-preis {
  color: var(--color-text);
}

/* Features */
.features {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.section-intro {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

.section-intro--kompakt {
  margin-bottom: 0.75rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  perspective: 1000px;
  min-height: 240px;
  cursor: pointer;
}

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.feature-card:hover .feature-card-inner,
.feature-card.feature-card--flipped .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card-front,
.feature-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 240px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.feature-card-front {
  background: var(--color-bg);
}

.feature-card-back {
  background: var(--color-bg);
  transform: rotateY(180deg);
}

.feature-card-front .feature-icon {
  margin-bottom: 0.5rem;
}

.feature-card-front h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}

.feature-card-back p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-text);
}

.feature-card:hover .feature-card-front,
.feature-card.feature-card--flipped .feature-card-front {
  border-color: #999;
}

.feature-card:hover .feature-card-back,
.feature-card.feature-card--flipped .feature-card-back {
  border-color: #999;
}

/* Typische Fragen */
.phix-fragen,
.equiphi-fragen {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.phix-fragen li,
.equiphi-fragen li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.phix-fragen li::before,
.equiphi-fragen li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 4px;
  height: 4px;
  background: var(--color-border);
  border-radius: 50%;
}


/* About */
.about {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.about-content {
  max-width: 100%;
}

.about-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.about-content p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content code {
  background: #f5f5f5;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.about-content .btn {
  margin-top: 0.5rem;
}

.about-spende-wrap {
  text-align: center;
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.phix-register-lines {
  text-align: center;
  margin: 1.5rem 0;
}

.phix-register-lines strong {
  font-weight: 700;
  color: var(--color-text);
}

.section--dunkel .phix-register-lines strong {
  color: var(--color-text);
}

.impressum-content {
  font-size: 0.9rem;
}

.impressum-content .about-subtitle {
  margin-top: 1.75rem;
}

.impressum-content .about-subtitle:first-of-type {
  margin-top: 0;
}

.impressum-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

/* PayPal-ähnlicher Schaltflächenstil (Markenfarben: Gold / Dunkelblau) */
.btn-spende {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.85rem;
  min-width: 220px;
  background: #ffc439;
  color: #003087;
  border: 1px solid #e6a937;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-spende:hover {
  background: #f5b53a;
  border-color: #d99b2a;
  color: #002c6d;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.btn-spende:active {
  transform: scale(0.98);
}

.btn-spende:focus-visible {
  outline: 3px solid #009cde;
  outline-offset: 2px;
}

/* Buy Me a Coffee – offizieller Button (CDN) */
.btn-bmc {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-bmc:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.btn-bmc:focus-visible {
  outline: 3px solid #ffdd00;
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-bmc img {
  display: block;
  width: 217px;
  max-width: 100%;
  height: auto;
}

/* Demo – hervorgehobener Bereich */
.demo-section {
  padding: 4rem 0;
}

.demo-box {
  background: #f8f8f8;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}

.demo-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.demo-text {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.btn-demo {
  display: inline-block;
  padding: 0.15em 0.3em;
  width: 13em;
  height: 4.2em;
  background-color: var(--color-bg);
  border: 2px solid #999;
  border-radius: 0.3em;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.btn-demo-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4em;
  bottom: 0.4em;
  width: 8.25em;
  height: 2.5em;
  margin: 0 auto;
  background-color: var(--color-bg);
  border-radius: 0.2em;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  border: 2px solid #999;
  box-shadow: 0 0.4em 0 0.08em #999;
  transition: all 0.3s ease;
}

.btn-demo-logo {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-demo:hover .btn-demo-inner {
  transform: translate(0, 0.4em);
  box-shadow: 0 0 0 0 #999;
}

.demo-hinweise {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.demo-hinweise p {
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.demo-hinweis-klein {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Download-Bereich */
.download-section {
  padding: 4rem 0;
  border-top: 1px solid var(--color-border);
}

.download-box {
  background: #f8f8f8;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}

.download-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.download-text {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.download-hinweise {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: left;
}

.download-hinweise p {
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Download-Karten (PhiX – mehrere Varianten) */
.download-section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.download-section-intro {
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.download-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 2rem 0 0.85rem;
}

.download-group-title:first-of-type {
  margin-top: 0;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.download-grid--server {
  max-width: 720px;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1.125rem;
  background: #f8f8f8;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.download-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.download-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
}

.download-card-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.download-card-title {
  font-size: 0.975rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  line-height: 1.35;
  color: var(--color-text);
}

.download-card-tag {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.35;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: auto;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--color-bg);
}

.btn-download svg {
  width: 1rem;
  height: 1rem;
}

.btn-download:disabled {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.download-footer-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.download-footer-note a {
  color: var(--color-text);
}

/* Git-Repo – kompakter Bereich */
.git-repo-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.download-box .section-title {
  margin-bottom: 0.75rem;
}

.download-hinweise p:last-child {
  margin-bottom: 0;
}

.download-hinweise a {
  color: var(--color-text);
  font-weight: 500;
}

.logo-img--svg {
  object-fit: contain;
}

/* Programmlizenz – Hinweis unter Überschrift */
.lizenz-hinweis-kasten {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lizenz-hinweis-kasten p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.lizenz-hinweis-kasten p:last-child {
  margin-bottom: 0;
}

.lizenz-hinweis-kasten a {
  color: var(--color-text);
  font-weight: 500;
}

.section--dunkel .lizenz-hinweis-kasten {
  border-color: #d0d0d0;
}

.section--dunkel .lizenz-hinweis-kasten p {
  color: #444444;
}

/* Programmlizenz – Karten im uiverse-Stil */
.lizenz-uebersicht {
  margin-top: 1.5rem;
}

.lizenz-zeile {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.lizenz-zeile:last-child {
  margin-bottom: 0;
}

.lizenz-zeile--zwei {
  flex-wrap: wrap;
}

.lizenz-zeile--zwei .lizenz-karte {
  flex: 1;
  min-width: 280px;
}

.lizenz-karte {
  flex: 1;
  border-radius: 16px;
  padding: 10px;
  background-color: var(--color-bg);
  color: var(--color-text-muted);
  box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.15);
}


.lizenz-karte-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px;
  padding-top: 2.5rem;
  background-color: #f5f5f5;
  border-radius: 12px;
  position: relative;
  border: 1px solid var(--color-border);
}

.lizenz-preis-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e8e8e8;
  border-radius: 99em 0 0 99em;
  display: flex;
  align-items: center;
  padding: 0.5em 0.75em;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
}

.lizenz-preis-badge small {
  color: var(--color-text-muted);
  font-size: 0.75em;
  font-weight: 500;
  margin-left: 0.25em;
}

.lizenz-titel {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.lizenz-info {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  flex: 1;
}

/* Zwei Dauerlizenz-Karten: Beschreibung exakt 3 Zeilen, gleiche Kartenhöhe */
.lizenz-info--3zeilen {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: calc(3 * 1.5em);
  flex: 1 0 auto;
  margin-bottom: 1.25rem;
}

.lizenz-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  margin-left: 0.15em;
}

.lizenz-tooltip svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-text-muted);
}

.lizenz-tooltip:hover svg {
  stroke: var(--color-text);
}

.lizenz-tooltip-text {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.8rem;
  line-height: 1.4;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  z-index: 10;
}

.lizenz-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-text);
}

.lizenz-tooltip:hover .lizenz-tooltip-text {
  opacity: 1;
  visibility: visible;
}

.lizenz-action {
  display: flex;
  width: 100%;
}

.btn-kaufen {
  width: 100%;
  cursor: not-allowed;
  opacity: 0.7;
}

.section--dunkel .lizenz-karte-inner {
  background-color: #fafafa;
  border-color: #e0e0e0;
}

.section--dunkel .lizenz-preis-badge {
  background-color: #e5e5e5;
  color: var(--color-text);
}

.section--dunkel .lizenz-info {
  color: #444444;
}

.section--dunkel .about-content p {
  color: #444444;
}

.section--dunkel .impressum-content .about-subtitle {
  color: var(--color-text);
}

.legal-page {
  flex: 1;
  width: 100%;
  padding: 1.5rem 0 3rem;
}

.legal-back {
  margin: 0 0 1.25rem;
}

.legal-back-link {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.legal-back-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.footer-sep {
  color: var(--color-border);
  user-select: none;
}

/* Layout mit Sidebar */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 3.5rem;
  bottom: 0;
  z-index: 40;
  width: 200px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: #fafafa;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar--collapsed {
  width: 56px;
}

.sidebar-header {
  display: flex;
  height: 3rem;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid var(--color-border);
  padding: 0 0.5rem;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.sidebar-toggle:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

.sidebar--collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.5rem;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.sidebar-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-link.active {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.08);
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar--collapsed .sidebar-label {
  display: none;
}

.sidebar--collapsed .sidebar-link {
  justify-content: center;
  padding: 0.5rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.5rem 0;
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-x: hidden;
  margin-left: 200px;
  transition: margin-left 0.2s ease;
}

.sidebar--collapsed ~ .main-content {
  margin-left: 56px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.mobile-overlay--open {
  pointer-events: auto;
}

.mobile-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.mobile-overlay--open .mobile-overlay-backdrop {
  opacity: 1;
}

.mobile-overlay-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 16rem;
  max-width: 85vw;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.mobile-overlay--open .mobile-overlay-sidebar {
  transform: translateX(0);
}

.mobile-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  gap: 0.5rem;
}

.mobile-overlay-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mobile-overlay-header button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 4px;
}

.mobile-overlay-header button:hover {
  color: var(--color-text);
}

.mobile-overlay-header svg {
  width: 20px;
  height: 20px;
}

.mobile-overlay-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  overflow-y: auto;
}

.mobile-nav-link {
  padding: 0.75rem 1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.mobile-nav-link:hover {
  background: #f5f5f5;
}

/* Such-Overlay */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  pointer-events: none;
}

.search-overlay--open {
  display: flex;
  pointer-events: auto;
}

.search-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.search-overlay--open .search-overlay-backdrop {
  opacity: 1;
}

.search-overlay-box {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 1.25rem;
  z-index: 1;
}

.search-overlay-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.search-overlay-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.search-overlay-nav {
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.search-overlay-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
}

.search-overlay-input:focus {
  outline: none;
  border-color: var(--color-text);
}

.search-overlay-result {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  min-height: 1.4em;
}

.search-overlay-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 4px;
}

.search-overlay-close:hover {
  color: var(--color-text);
}

.search-overlay-close svg {
  width: 20px;
  height: 20px;
}

mark.search-highlight {
  background: #fef08a;
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}

mark.search-highlight--current {
  background: #facc15;
  outline: 2px solid var(--color-text);
  outline-offset: 1px;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .sidebar {
    display: none;
  }

  .main-content,
  .sidebar--collapsed ~ .main-content {
    margin-left: 0;
    padding-bottom: 5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-overlay {
    display: block;
  }

  .header-container {
    padding: 0 3.25rem;
  }

  .logo {
    max-width: calc(100% - 6.5rem);
  }

  .logo-text {
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  .hero-description {
    font-size: 1rem;
    margin: 1.25rem auto 1.5rem;
    padding: 0 0.25rem;
  }

  .about,
  .features,
  .download-section,
  .git-repo-section {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .section-intro {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card,
  .feature-card-inner,
  .feature-card-front,
  .feature-card-back {
    min-height: 200px;
  }

  .download-box {
    padding: 1.5rem 1rem;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-grid--server {
    max-width: none;
  }

  .download-section-intro {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
  }

  .download-title,
  .download-box .section-title {
    font-size: 1.35rem;
  }

  .download-text {
    font-size: 0.95rem;
  }

  .download-box .btn,
  .about-content .btn {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.4;
  }

  .about-content code {
    word-break: break-all;
  }

  .mobile-nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0.5rem 1rem;
  }

  .legal-page {
    padding: 1.25rem 0 2.5rem;
  }

  .impressum-content .about-subtitle {
    font-size: 1rem;
  }

  .impressum-content p,
  .impressum-content a {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .demo-section {
    padding: 2.5rem 0;
  }

  .demo-box {
    padding: 1.5rem 1rem;
  }

  .demo-title {
    font-size: 1.35rem;
  }

  .demo-text {
    font-size: 0.95rem;
  }

  .demo-hinweise {
    text-align: left;
  }

  .demo-hinweise code {
    word-break: break-all;
  }

  .lizenz-zeile {
    flex-direction: column;
    gap: 1rem;
  }

  .lizenz-zeile--zwei .lizenz-karte {
    min-width: 0;
    width: 100%;
  }

  .lizenz-karte-inner {
    padding: 1.25rem;
    padding-top: 2.25rem;
  }

  .lizenz-preis-badge {
    font-size: 1rem;
  }

  .lizenz-titel {
    font-size: 1.05rem;
  }

  .lizenz-tooltip-text {
    max-width: min(16rem, 70vw);
  }

  .btn-spende {
    min-width: 0;
    width: 100%;
    max-width: 280px;
  }

  .btn-bmc img {
    width: 100%;
    max-width: 217px;
  }

  .header-container:has(.header-actions) {
    padding-right: 1rem;
  }

  .modal-box {
    padding: 1.25rem;
    max-height: 85vh;
  }

  .modal-box h2,
  .modal-box h3 {
    font-size: 1.15rem;
    padding-right: 2rem;
  }
}

@media (max-width: 380px) {
  .logo-text {
    font-size: 0.875rem;
  }

  .hero-logo-img {
    width: 56px;
    height: 56px;
  }
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.modal-overlay--open {
  display: flex;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-overlay--open .modal-backdrop {
  opacity: 1;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  z-index: 1;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
}

.modal-overlay--open .modal-box {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-text);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}
