/**
 * Typografie & Layout: Impressum, Datenschutz, AGB (CMS aus DB), Sitemap
 */

/* CMS-Rechtstexte */
.legal-page {
  --legal-text: #1e293b;
  --legal-muted: #64748b;
  --legal-link: #c2410c;
  --legal-link-hover: #9a3412;
}

.legal-page__header {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.legal-page__header--brandbar {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(90deg, #0f2744 0%, #153e6e 55%, #1a5080 100%);
  box-shadow: 0 2px 10px rgba(15, 39, 68, 0.25);
}

.legal-page__header--brandbar .legal-page__title {
  color: #ff8a00;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.legal-page__title {
  font-family: var(--heading-font, "EB Garamond", Georgia, serif);
  font-size: clamp(1.85rem, 4.5vw, 2.4rem);
  font-weight: 600;
  color: var(--heading-color, #1a1a1a);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0;
}

.legal-page__subtitle {
  font-size: 0.95rem;
  color: var(--legal-muted);
  margin-top: 0.75rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.legal-page__sheet {
  border-radius: 12px !important;
  background: var(--surface-color, #fff);
}

.legal-prose {
  font-family: var(--default-font, system-ui, sans-serif);
  font-size: 1.125rem;
  line-height: 1.72;
  color: var(--legal-text);
  text-align: left;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Impressum & Datenschutz: volle Kartenbreite wie die Karte darunter (nicht schmaler Spalte) */
.legal-page--datenschutz .legal-prose,
.legal-page--impressum .legal-prose {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.legal-page--agb .legal-prose {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.legal-page--other .legal-prose {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
}

.legal-prose > *:first-child {
  margin-top: 0 !important;
}

.legal-prose > *:last-child {
  margin-bottom: 0 !important;
}

.legal-prose p {
  margin-bottom: 1rem;
}

.legal-prose h2,
.legal-prose h3,
.legal-prose h4 {
  font-family: var(--heading-font, "EB Garamond", Georgia, serif);
  font-weight: 600;
  color: var(--heading-color, #0f172a);
  line-height: 1.25;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
}

.legal-prose h2 {
  font-size: 1.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e2e8f0;
}

.legal-prose h3 {
  font-size: 1.28rem;
  margin-top: 1.5rem;
}

.legal-prose h4 {
  font-size: 1.12rem;
}

.legal-prose ul,
.legal-prose ol {
  margin: 0 0 1rem 0;
  padding-left: 1.35rem;
}

.legal-prose li {
  margin-bottom: 0.4rem;
}

.legal-prose li::marker {
  color: var(--legal-muted);
}

.legal-prose a {
  color: var(--legal-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.legal-prose a:hover {
  color: var(--legal-link-hover);
}

.legal-prose strong,
.legal-prose b {
  font-weight: 600;
  color: #0f172a;
}

.legal-prose small {
  font-size: 0.9em;
  color: var(--legal-muted);
}

.legal-prose blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem 0.75rem 1rem;
  border-left: 4px solid #fed7aa;
  background: #fffbeb;
  font-size: 0.98rem;
  color: #78350f;
}

.legal-prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
}

.legal-prose table {
  width: 100%;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  border-collapse: collapse;
}

.legal-prose th,
.legal-prose td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.legal-prose th {
  background: #f8fafc;
  font-weight: 600;
}

.legal-page__map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.legal-page__map .card-body,
.legal-page__map.card {
  padding: 0 !important;
}

.legal-page__map #map {
  min-height: 320px;
}

@media (max-width: 576px) {
  .legal-prose {
    font-size: 1.0625rem;
    line-height: 1.68;
  }
}

/* Sitemap (Fragment in index) */
.sitemap-page {
  max-width: min(100%, 72rem);
  margin-left: auto;
  margin-right: auto;
}

.sitemap-page__header {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.sitemap-page__header--brandbar {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(90deg, #0f2744 0%, #153e6e 55%, #1a5080 100%);
  box-shadow: 0 2px 10px rgba(15, 39, 68, 0.25);
}

.sitemap-page__header--brandbar .sitemap-page__title {
  color: #ff8a00;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sitemap-page__title {
  font-family: var(--heading-font, "EB Garamond", Georgia, serif);
  font-size: clamp(1.85rem, 4.5vw, 2.4rem);
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.sitemap-page__lead {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--legal-muted);
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1.75rem;
}

.sitemap-page .sitemap-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
}

@media (min-width: 768px) {
  .sitemap-page .sitemap-card {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

.sitemap-page .sitemap-card h2 {
  font-family: var(--heading-font, "EB Garamond", Georgia, serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: #c2410c;
  margin: 0 0 1rem 0;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid #ffedd5;
  text-align: left;
}

.sitemap-page .sitemap-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.sitemap-page .sitemap-links li {
  border-bottom: 1px solid #f1f5f9;
}

.sitemap-page .sitemap-links li:last-child {
  border-bottom: none;
}

.sitemap-page .sitemap-links a {
  display: block;
  padding: 0.65rem 0.35rem 0.65rem 0;
  color: #1e293b;
  text-decoration: none;
  font-size: 1.0625rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.sitemap-page .sitemap-links a:hover {
  color: #c2410c;
  padding-left: 0.35rem;
}

.sitemap-page .sitemap-update {
  font-size: 0.9rem;
  color: var(--legal-muted);
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.sitemap-page .sitemap-update time {
  font-weight: 600;
  color: #334155;
}
