/* ═══ Subpage-spezifische Styles ═══
   Ergaenzt style.css fuer alle generierten Content-Seiten.
   Onepager bleibt davon unberuehrt.
*/

/* ─── Subpage Nav (ueber style.css-Nav gelegt) ─── */
.subpage-nav {
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  padding: 6.5rem 0 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-family: 'Geist Mono', monospace;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 0.3rem;
  color: var(--border-strong);
}

.breadcrumb li:last-child::after { content: none; }

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover { color: var(--green); }

/* ─── Article Layout ─── */
.article {
  padding: 2rem 0 clamp(4rem, 8vw, 7rem);
}

.article-header {
  max-width: 70ch;
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

.article-header .lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--fg-2);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--fg-muted);
  font-family: 'Geist Mono', monospace;
}

.article-meta a {
  color: var(--green);
  text-decoration: none;
}

.article-meta a:hover { text-decoration: underline; }

.article-body {
  max-width: 70ch;
}

.article-body h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
}

.article-body h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--fg-2);
  line-height: 1.7;
}

.article-body li { margin-bottom: 0.3rem; }

.article-body strong { color: var(--fg); font-weight: 600; }

.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover { color: var(--green-hover); }

/* ─── Tabellen in Artikeln ─── */
.article-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.article-body thead {
  background: var(--green-soft);
}

.article-body th {
  text-align: left;
  font-weight: 600;
  color: var(--fg);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.article-body td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  vertical-align: top;
  line-height: 1.55;
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:nth-child(even) td {
  background: var(--bg-2);
}

/* ─── Author Card (fuer Autorenseite) ─── */
.author-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.author-portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.author-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.25rem;
}

.author-role {
  font-family: 'Geist Mono', monospace;
  font-size: 0.88rem;
  color: var(--green);
  margin-bottom: 1rem;
}

.author-bio {
  line-height: 1.7;
  color: var(--fg-2);
  margin-bottom: 1.5rem;
}

.author-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.author-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--fg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: all 0.2s;
}

.author-links a:hover {
  border-color: var(--green);
  color: var(--green);
}

@media (max-width: 720px) {
  .author-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .author-portrait {
    max-width: 220px;
  }
}

/* ─── Fachgebiete-Tags ─── */
.expertise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}

.expertise-list li {
  padding: 0.4rem 0.8rem;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(26, 61, 44, 0.12);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ─── Related Links / Verwandte Begriffe ─── */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.related-links li a {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--fg-2);
  transition: all 0.2s;
  text-decoration: none;
}

.related-links li a:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

/* ─── CTA Block ─── */
.article-cta {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-cta p {
  margin-bottom: 1rem;
  color: var(--fg-2);
}

.article-cta .btn { margin-top: 0.5rem; }

/* ─── Hub Pages (Glossar-Hub, FAQ-Hub) ─── */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hub-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all 0.2s;
}

.hub-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.hub-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.hub-card h3 a {
  color: var(--fg);
  text-decoration: none;
}

.hub-card h3 a:hover { color: var(--green); }

.hub-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fg-muted);
}

.hub-category {
  margin-top: 3rem;
}

.hub-category h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--green);
  display: inline-block;
}

/* ─── Glossar Auto-Links ─── */
a.glossar-link {
  color: var(--green);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

a.glossar-link:hover {
  text-decoration-style: solid;
  color: var(--green-hover);
}

/* ─── Definition Box (Glossar Einzelseite) ─── */
.definition-box {
  padding: 1.5rem 2rem;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 2rem;
}

.definition-box p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg);
  margin: 0;
}

/* ─── Short Answer Box (FAQ Einzelseite) ─── */
.short-answer {
  padding: 1.5rem 2rem;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 2rem;
}

.short-answer p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--fg);
  margin: 0;
}

/* ─── 404-Seite ─── */
.error-page-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
}

.error-badge {
  font-family: 'Geist Mono', monospace;
  font-size: 0.82rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.error-page-header .lead {
  margin-top: 1rem;
}

.error-page-links {
  margin-top: 2.5rem;
}

/* ─── External Link Modal: URL-Box ─── */
.ext-modal-url {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.ext-modal-url code {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--fg-2);
  word-break: break-all;
}

/* ─── Subpage Footer (absolute Links) ─── */
.subpage-footer a {
  text-decoration: none;
  color: var(--fg-muted);
  transition: color 0.15s;
}

.subpage-footer a:hover { color: var(--fg); }
