/* ============================================================
   Die Letzte Akte — Hauptstylesheet
   ============================================================ */

:root {
  --primary:       #1a3860;
  --primary-light: #2a5298;
  --accent:        #c0392b;
  --text:          #1a1a1a;
  --text-muted:    #555;
  --bg:            #f4f5f7;
  --bg-white:      #ffffff;
  --border:        #dde1e7;
  --link:          #1a5276;
  --link-hover:    #c0392b;
  --infobox-bg:    #eaf0fb;
  --font:          system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:     ui-monospace, "SFMono-Regular", Consolas, monospace;
  --max-width:     1180px;
  --radius:        6px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--link-hover); }
ul, ol { padding-left: 1.5rem; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }

/* ── Layout wrapper ─────────────────────────────────────────── */
.wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { left: 0.5rem; }

/* ── Site Header ────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.site-logo span { color: var(--accent); }

/* ── Navigation ─────────────────────────────────────────────── */
.site-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.site-nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Ad slots ───────────────────────────────────────────────── */
.ad-slot {
  background: #f0f1f3;
  border: 1px dashed #c0c4cc;
  text-align: center;
  padding: 1rem;
  margin: 1.25rem 0;
  color: #aaa;
  border-radius: var(--radius);
  position: relative;
  font-size: 0.8rem;
}
.ad-slot::before {
  content: "Anzeige";
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.ad-slot-leaderboard { min-height: 90px; }
.ad-slot-rectangle   { min-height: 250px; }
.ad-slot-sidebar     { min-height: 200px; }

/* ── Main content ───────────────────────────────────────────── */
main { flex: 1; }
.page-content { padding: 2rem 0 3rem; }

/* ── Two-column layout (article + sidebar) ──────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 880px) {
  .content-grid { grid-template-columns: 1fr; }
}

/* ── Article ────────────────────────────────────────────────── */
.article-header  { margin-bottom: 1.5rem; }
.article-category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.article-title {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.article-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.article-teaser {
  font-size: 1.05rem;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.article-body { max-width: 720px; }
.article-body h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin: 2rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: 1.05rem;
  color: var(--primary-light);
  margin: 1.4rem 0 0.5rem;
}
.article-body p  { margin-bottom: 1rem; }
.article-body ul,
.article-body ol { margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.3rem; }

/* ── Infobox ────────────────────────────────────────────────── */
.infobox {
  background: var(--infobox-bg);
  border: 1px solid #b8cce4;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  float: right;
  clear: right;
  width: 280px;
  margin-left: 1.5rem;
}
@media (max-width: 640px) {
  .infobox { float: none; width: 100%; margin-left: 0; }
}
.infobox-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #b8cce4;
  text-align: center;
}
.infobox-figure {
  margin-bottom: 0.8rem;
  background: #dae4f0;
  border-radius: 4px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5578a0;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem;
  line-height: 1.4;
}
.infobox table  { width: 100%; border-collapse: collapse; }
.infobox td     { padding: 0.3rem 0; vertical-align: top; font-size: 0.88rem; }
.infobox td:first-child {
  font-weight: 600;
  width: 48%;
  padding-right: 0.5rem;
  color: var(--text-muted);
}

/* ── Table of Contents ──────────────────────────────────────── */
.toc {
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  min-width: 200px;
  max-width: 360px;
}
.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.toc ol { margin: 0; }
.toc li { margin-bottom: 0.25rem; }
.toc a  { font-size: 0.88rem; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ── Sources / Quellen ──────────────────────────────────────── */
.sources {
  border-top: 2px solid var(--border);
  padding-top: 1.2rem;
  margin-top: 2.5rem;
}
.sources h2 {
  font-size: 1.05rem !important;
  margin-bottom: 0.8rem !important;
  color: var(--primary) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
.sources ol  { margin: 0; }
.sources li  { font-size: 0.84rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.sources a   { color: var(--link); word-break: break-all; }

/* ── Article footer note ─────────────────────────────────────── */
.article-footnote {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

/* ── Opinion badge ───────────────────────────────────────────── */
.opinion-badge {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-left: 4px solid #f9a825;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #7a5c00;
  line-height: 1.4;
}

/* ── Cards grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}
.card-category {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.card-title { font-size: 1rem; color: var(--primary); margin-bottom: 0.5rem; font-weight: 700; }
.card-title a { text-decoration: none; color: inherit; }
.card-title a:hover { color: var(--accent); text-decoration: underline; }
.card-excerpt { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 0.8rem; line-height: 1.5; }
.card-meta    { font-size: 0.77rem; color: #aaa; }
.card-link    { font-size: 0.85rem; font-weight: 600; color: var(--primary-light); text-decoration: none; }
.card-link:hover { text-decoration: underline; color: var(--accent); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
}
.sidebar-box h3 {
  font-size: 0.93rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-box ul { list-style: none; padding: 0; }
.sidebar-box li { margin-bottom: 0.4rem; border-bottom: 1px solid #f0f0f0; padding-bottom: 0.4rem; }
.sidebar-box li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-box a  { font-size: 0.88rem; text-decoration: none; }
.sidebar-box a:hover { text-decoration: underline; color: var(--accent); }

/* ── Page hero (inner pages) ─────────────────────────────────── */
.page-hero {
  background: var(--primary);
  color: #fff;
  padding: 2rem 0 1.5rem;
}
.page-hero-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  margin-bottom: 0.4rem;
  color: #fff;
}
.page-hero-lead {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.75);
  max-width: 640px;
}
.breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}
.breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.3rem; }

/* ── Homepage hero ───────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a3860 0%, #2a5298 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
}
.hero-inner { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.hero-text { flex: 1; min-width: 240px; }
.hero-tag {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.hero-title {
  font-size: clamp(1.45rem, 3.5vw, 2.3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  color: #fff;
}
.hero-excerpt {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1.2rem;
  max-width: 580px;
  line-height: 1.6;
}
.hero-image-slot {
  width: 280px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem;
  line-height: 1.4;
  border: 1px dashed rgba(255,255,255,0.25);
}
@media (max-width: 680px) { .hero-image-slot { display: none; } }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  line-height: 1.4;
}
.btn:hover { opacity: 0.87; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff !important;
}
.btn-outline:hover { border-color: #fff; }

/* ── Prose (legal pages) ─────────────────────────────────────── */
.prose h2 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 1rem; color: var(--primary-light); margin: 1.2rem 0 0.4rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul,
.prose ol { margin-bottom: 1rem; }
.prose li { margin-bottom: 0.3rem; }
.prose a  { word-break: break-all; }
.prose .placeholder {
  background: #fff8e1;
  border: 1px dashed #f9a825;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: #b36200;
}

/* ── Section heading ─────────────────────────────────────────── */
.section-heading {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 800;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #111a2e;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.8rem;
}
@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}
.footer-brand {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}
.footer-disclaimer {
  font-size: 0.76rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.45);
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.7rem;
  font-weight: 700;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a  { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.87rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.38);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ── Cookie Banner ───────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #12192c;
  color: rgba(255,255,255,0.9);
  padding: 1rem 1.5rem;
  z-index: 9000;
  border-top: 2px solid var(--accent);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
}
#cookie-banner.hidden { display: none; }
.cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.87rem;
  line-height: 1.55;
}
.cookie-text a { color: #7eb8f7; }
.cookie-text strong { color: #fff; }
.cookie-buttons {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.cookie-btn.accept {
  background: var(--accent);
  border-color: var(--accent);
}
.cookie-btn:hover { opacity: 0.85; }

/* ── Utility ─────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ── Responsive fine-tuning ──────────────────────────────────── */
@media (max-width: 600px) {
  .article-body h2 { font-size: 1.1rem; }
  .infobox { font-size: 0.85rem; }
  .toc { max-width: 100%; }
  .cookie-btn { width: 100%; text-align: center; }
}
