/* ============================================================
   Fitness-Centrum Husum — Datenschutz Styles (BG2 Unified)
   Apple-like minimal · Darkmode · Große Textmengen optimiert
   ============================================================ */
html, body {
  height: 100%;
  overflow-y: auto;
}

.legal-wrap,
.legal-layout,
.legal-content,
.toc,
.hero {
  overflow-y: visible !important;
}
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

* {
  box-sizing: border-box;       /* verhindert Berechnungsfehler bei width */
}

body > * {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Einheitlicher Hintergrund */
body,
.legal-wrap,
.hero,
.legal-layout,
.legal-content,
.toc {
  background: var(--bg-2);
  color: var(--ink-2);
}

.legal-wrap, .legal-layout, .legal-content, .toc, .hero {
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}

.hero,
.legal-content,
.toc {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.container {
  width: 100% !important;
  max-width: 100% !important;
  padding-inline: clamp(1rem, 4vw, 2rem) !important;
  margin-inline: auto !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* ================================
   HERO / TITLE
   ================================ */
.hero {
  border-bottom: 1px solid var(--line-1);
  padding-top: var(--s-9);
  padding-bottom: var(--s-6);
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.hero h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-semibold);
  color: var(--ink-1);
}

.hero .lead {
  margin-top: var(--s-3);
  color: var(--ink-3);
  max-width: 65ch;
}


/* ================================
   PAGE LAYOUT
   ================================ */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-7);
  padding-top: var(--s-7);
  padding-bottom: var(--s-9);
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}


.legal-layout {
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.legal-layout, .legal-layout * {
  max-width: 100%;
}

/* ================================
   TABLE OF CONTENTS (TOC)
   ================================ */
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc a {
  display: block;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  color: var(--ink-2);
  transition: background .25s ease;
}

.toc a:hover {
  background: var(--bg-3);
  color: var(--ink-1);
}

.toc a.active {
  color: var(--brand);
  font-weight: var(--fw-semibold);
}


/* ================================
   CONTENT (HEADLINES, TEXT, LISTS)
   ================================ */
.legal-content section {
  margin-bottom: var(--s-9);
}

.legal-content h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--s-3);
  color: var(--ink-1);
  font-weight: var(--fw-semibold);
}

.legal-content h3 {
  font-size: var(--fs-h3);
  margin-top: var(--s-7);
  margin-bottom: var(--s-2);
  color: var(--ink-1);
  font-weight: var(--fw-medium);
}

.legal-content p {
  margin-bottom: var(--s-4);
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.legal-content ul {
  padding-left: var(--s-4);
  margin-bottom: var(--s-5);
}

.legal-content ul li {
  margin-bottom: var(--s-2);
  color: var(--ink-2);
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}


/* ================================
   TABLES (Cookie-Tabellen)
   ================================ */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--s-4);
  margin-bottom: var(--s-6);
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cookie-table th,
.cookie-table td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  font-size: var(--fs-body);
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-1);
}

.cookie-table th {
  background: var(--bg-4);
  color: var(--ink-1);
  font-weight: var(--fw-semibold);
}

.cookie-table tbody tr:hover {
  background: var(--bg-4);
}

.cookie-table tr:last-child td {
  border-bottom: none;
}


/* ================================
   BACK TO TOP LINK
   ================================ */
.back a {
  display: inline-block;
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink-2);
  transition: background .25s ease;
}

.back a:hover {
  background: var(--bg-3);
}


/* ============================================================
   FCH LEGAL — MOBILE & TABLET FIX (Overflow + Text Cutoff)
   ============================================================ */

/* ============================
   0–480px MOBILE PORTRAIT
============================ */
@media (max-width: 480px) {

  /* HERO */
  .hero {
    width: 94% !important;
    margin-inline: auto !important;
    padding-top: var(--s-7) !important;
    padding-bottom: var(--s-5) !important;
    text-align: left !important;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 6vw, 2.1rem) !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
  }

  .hero .lead {
    font-size: 1rem !important;
    max-width: 100% !important;
  }

  /* GLOBAL LAYOUT */
  .legal-layout {
    grid-template-columns: 1fr !important;
    width: 94% !important;
    margin-inline: auto !important;
    gap: var(--s-5) !important;
    padding-top: var(--s-6) !important;
    padding-bottom: var(--s-8) !important;
  }

  /* TOC */
  .toc {
    width: 100% !important;
  }

  .toc a {
    padding: var(--s-3) var(--s-3) !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  /* CONTENT TEXT — FIX RIGHT CUT-OFF */
  .legal-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 0 !important;
    margin-right: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  .legal-content section {
    margin-bottom: var(--s-7) !important;
  }

  .legal-content h2 {
    font-size: clamp(1.4rem, 5vw, 1.7rem) !important;
    max-width: 100% !important;
  }

  .legal-content h3 {
    font-size: clamp(1.1rem, 4.4vw, 1.3rem) !important;
    max-width: 100% !important;
  }

  .legal-content p,
  .legal-content ul,
  .legal-content li {
    font-size: 0.95rem !important;
    line-height: 1.62 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  /* TABLE FIX – no overflow cut */
  .cookie-table {
    width: 100% !important;
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;          /* scroll instead of cut */
    -webkit-overflow-scrolling: touch;
    font-size: 0.85rem !important;
  }

  .cookie-table th,
  .cookie-table td {
    white-space: nowrap !important;
    padding: var(--s-2) var(--s-3) !important;
  }

  .legal-layout, .legal-content, .hero, .toc {
    overflow-x: visible !important;
    max-width: 100% !important;
  }
}


/* ============================
   480–768px (MOBILE LANDSCAPE / SMALL TABLET)
============================ */
@media (min-width: 480px) and (max-width: 768px) {

  .hero,
  .legal-layout {
    width: 92% !important;
    margin-inline: auto !important;
  }

  .legal-layout {
    grid-template-columns: 1fr !important;
    gap: var(--s-6) !important;
  }

  .legal-content p,
  .legal-content ul li {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }

  .cookie-table {
    overflow-x: auto !important;
  }
}


/* ============================
   768–900px — TABLET
============================ */
@media (min-width: 768px) and (max-width: 900px) {

  .legal-layout {
    grid-template-columns: 1fr !important;
    width: 92% !important;
    margin-inline: auto !important;
    gap: var(--s-7) !important;
  }

  .legal-content p,
  .legal-content ul li {
    max-width: 100% !important;
  }
}