/* ============================================
   AGB Styling — colourspace
   Branding: #1E9696 (Primär), #4D4D4D (Text), #B1B1B1 (Sekundär)
   ============================================ */

:root {
  --farbe-primaer: #1E9696;
  --farbe-text: #4D4D4D;
  --farbe-sekundaer: #B1B1B1;
  --farbe-hintergrund: #FFFFFF;
  --farbe-hintergrund-alt: #F7F9FA;
  --farbe-border: #E2E8F0;
  --farbe-akzent-hell: #E6F5F5;
  --schrift: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-breite: 820px;
}

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

body {
  font-family: var(--schrift);
  color: var(--farbe-text);
  background: var(--farbe-hintergrund);
  line-height: 1.7;
  font-size: 16px;
}

/* === Header === */
.agb-header {
  background: var(--farbe-primaer);
  color: white;
  padding: 2.5rem 2rem;
  text-align: center;
}
.agb-header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.agb-header .meta {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* === Navigation / Inhaltsverzeichnis === */
.agb-toc {
  max-width: var(--max-breite);
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background: var(--farbe-hintergrund-alt);
  border: 1px solid var(--farbe-border);
  border-radius: 8px;
}
.agb-toc h2 {
  font-size: 1rem;
  color: var(--farbe-primaer);
  margin-bottom: 0.75rem;
}
.agb-toc ol {
  padding-left: 1.5rem;
}
.agb-toc li {
  margin-bottom: 0.3rem;
}
.agb-toc a {
  color: var(--farbe-text);
  text-decoration: none;
  border-bottom: 1px dotted var(--farbe-sekundaer);
}
.agb-toc a:hover {
  color: var(--farbe-primaer);
  border-bottom-color: var(--farbe-primaer);
}

/* === Hauptinhalt === */
.agb-content {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* === Einzelner Baustein/Paragraph === */
.agb-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--farbe-border);
}
.agb-section:last-child {
  border-bottom: none;
}
.agb-section h2 {
  font-size: 1.2rem;
  color: var(--farbe-primaer);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--farbe-akzent-hell);
}
.agb-section h3 {
  font-size: 1rem;
  color: var(--farbe-text);
  margin: 1.2rem 0 0.5rem;
  font-weight: 600;
}

/* === Absätze und Listen === */
.agb-section p {
  margin-bottom: 0.8rem;
}
.agb-section ol,
.agb-section ul {
  margin: 0.5rem 0 1rem 1.5rem;
}
.agb-section li {
  margin-bottom: 0.4rem;
}

/* === Tabellen === */
.agb-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.agb-section th,
.agb-section td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--farbe-border);
  text-align: left;
}
.agb-section th {
  background: var(--farbe-hintergrund-alt);
  font-weight: 600;
  color: var(--farbe-primaer);
}
.agb-section tr:nth-child(even) td {
  background: var(--farbe-hintergrund-alt);
}

/* === Hinweisbox === */
.agb-hinweis {
  background: var(--farbe-akzent-hell);
  border-left: 4px solid var(--farbe-primaer);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
}

/* === Baustein-Marker (nur in Übersicht sichtbar) === */
.baustein-marker {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.marker-allgemein { background: #E6F5F5; color: #1E9696; }
.marker-laufend { background: #FEF3C7; color: #92400E; }
.marker-projekt { background: #DBEAFE; color: #1E40AF; }
.marker-bereich { background: #FCE7F3; color: #9D174D; }

/* === Zurück-Navigation === */
.agb-nav {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding: 1rem 2rem 0;
}
.agb-nav a {
  color: var(--farbe-primaer);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.agb-nav a:hover {
  text-decoration: underline;
}
@media print {
  .agb-nav { display: none; }
}

/* === Footer === */
.agb-footer {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--farbe-sekundaer);
  border-top: 1px solid var(--farbe-border);
}

/* === Print === */
@media print {
  .agb-header { background: white; color: var(--farbe-text); border-bottom: 2px solid var(--farbe-primaer); }
  .agb-toc { page-break-after: always; }
  .agb-section { page-break-inside: avoid; }
}

/* === Responsive === */
@media (max-width: 640px) {
  .agb-header { padding: 1.5rem 1rem; }
  .agb-header h1 { font-size: 1.3rem; }
  .agb-content, .agb-toc, .agb-footer { padding-left: 1rem; padding-right: 1rem; }
}

/* === Übersichtsseite spezifisch === */
.bereich-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.bereich-card {
  background: var(--farbe-hintergrund-alt);
  border: 1px solid var(--farbe-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}
.bereich-card h3 {
  color: var(--farbe-primaer);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.bereich-card .count {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--farbe-primaer);
}
.bereich-card .label {
  font-size: 0.8rem;
  color: var(--farbe-sekundaer);
}

.matrix-table th { font-size: 0.85rem; }
.matrix-table td { text-align: center; font-size: 0.9rem; }
.matrix-table td.active { background: var(--farbe-akzent-hell); }
