/* ================================================================
   FensterLex — article.css
   Gemeinsame Styles für alle Lexikon- und News-Artikel-Seiten
   Einbinden: <link rel="stylesheet" href="/css/article.css">
   Voraussetzung: shared.css und styles.css müssen davor geladen sein
   ================================================================ */


/* ── BASIS ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}


/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { opacity: 0.4; }


/* ── SEITEN-LAYOUT (2-Spalten-Grid) ── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}


/* ── ARTIKEL-HEADER ── */
.article-header {
  margin-bottom: 2.5rem;
}

.entry-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

h1.entry-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.entry-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.entry-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2px 8px;
}


/* ── ARTIKEL-BODY TEXT ── */
.article-body h2 {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin: 1.75rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.1rem;
  color: var(--text);
}


/* ── INFOBOX ── */
.infobox {
  border-left: 3px solid var(--border-strong);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-card);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-dim);
}
.infobox.success { border-left-color: var(--good); }
.infobox.warning { border-left-color: var(--ok); }
.infobox.info    { border-left-color: var(--accent); }

.infobox-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.infobox.success .infobox-label { color: var(--good); }
.infobox.warning .infobox-label { color: var(--ok); }
.infobox.info    .infobox-label { color: var(--accent); }


/* ── BILD-PLATZHALTER ── */
.img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem 0;
  color: var(--text-dim);
}
.img-placeholder svg  { width: 36px; height: 36px; stroke: var(--text-dim); opacity: 0.5; }
.img-placeholder span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.5; }


/* ── DEFINITION TABLE ── */
.def-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.def-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--border-strong);
  font-weight: 400;
}
.def-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
.def-table td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  padding-right: 1.5rem;
  min-width: 160px;
}
.def-table tr:last-child td { border-bottom: none; }


/* ── 3D MODEL VIEWER ── */
.model-container {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  margin: 1.75rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* Platzhalter solange das Web Component noch nicht geladen ist */
model-viewer:not(:defined) {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg-card);
}

.background-blur {
  position: absolute;
  inset: 0;
  background: url('/assets/hdr/jpg/studio-blur.jpg') center/cover no-repeat;
  filter: blur(15px);
  transform: scale(1.1);
  z-index: 0;
}

model-viewer {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
  border-radius: var(--radius);
  background-color: transparent !important;
}

/* Vollbild */
.model-container:fullscreen,
.model-container:-webkit-full-screen {
  height: 100vh;
  border-radius: 0;
  background: var(--bg);
}
.model-container:fullscreen model-viewer,
.model-container:-webkit-full-screen model-viewer {
  height: 100vh;
  border-radius: 0;
}

/* Hinweis-Label */
.model-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.model-container:hover .model-hint { opacity: 1; }


/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;       /* wichtig: Grid-Zelle beginnt oben, nicht gestreckt */
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.sidebar-card h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}

.sidebar-kpi {
  display: grid;
  gap: 1rem;
}

.kpi {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.9rem;
}
.kpi:last-child { border-bottom: none; padding-bottom: 0; }

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.kpi-value {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 1.2;
}

.kpi-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.related-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  text-decoration: none;
}
.related-links a::before { content: "→"; font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.related-links a:hover   { color: var(--text); }

.norm-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.norm-list li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 6px 8px;
  background: var(--bg-surface);
  border-radius: 2px;
  border-left: 2px solid var(--border-strong);
}
.norm-list li span {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--text-dim);
  margin-top: 2px;
}


/* ── ARTIKEL-FOOTER (interner Artikel-Abschluss) ── */
.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}


/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem 4rem;
  }
  .sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 600px) {
  .page        { padding: 1.5rem 1rem 3rem; }
  .breadcrumb  { padding: 1rem 1rem 0; }

  h1.entry-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }

  .def-table   { font-size: 0.82rem; }

  .model-container { height: 220px; }
}
