/* Bayernklar – Stylesheet
   Palette: Hintergrund #f7fafc · Text #1a2a33 · Seeblau #1e7fa6 · Tannengrün #2f6b4f · Eisblau #dceef5
   Fonts: Manrope (Überschriften) · Nunito Sans (Fließtext) */

:root {
  --bg: #f7fafc;
  --text: #1a2a33;
  --text-soft: #4a5c66;
  --lake: #1e7fa6;
  --lake-dark: #15607e;
  --fir: #2f6b4f;
  --ice: #dceef5;
  --ice-soft: #ecf5f9;
  --white: #ffffff;
  --line: #d7e3ea;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(26, 42, 51, 0.06), 0 2px 6px rgba(26, 42, 51, 0.04);
  --font-head: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;
  --max: 1120px;
  --measure: 68ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

a { color: var(--lake); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lake-dark); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--lake); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
p, li, dd { max-width: var(--measure); }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: 0.35em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--white);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { left: 8px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--white);
  transition: color .3s ease;
}
.brand svg { width: 30px; height: 30px; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color .2s ease, color .3s ease;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.22); }

.site-header.is-solid,
.site-header.is-page {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid .brand,
.site-header.is-page .brand,
.site-header.is-solid .site-nav a,
.site-header.is-page .site-nav a { color: var(--text); }
.site-header.is-solid .site-nav a:hover,
.site-header.is-page .site-nav a:hover { background: var(--ice); color: var(--lake-dark); }
.site-header.is-solid .site-nav a[aria-current="page"],
.site-header.is-page .site-nav a[aria-current="page"] { background: var(--ice); color: var(--lake-dark); }
.site-header.is-solid .brand svg .fill,
.site-header.is-page .brand svg .fill { fill: var(--lake); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--white);
  border-radius: 10px;
  transition: color .3s ease;
}
.site-header.is-solid .nav-toggle,
.site-header.is-page .nav-toggle { color: var(--text); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(26, 42, 51, 0.12);
    display: none;
    padding: 0.75rem 1rem 1.25rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.1rem; }
  .site-nav a { color: var(--text); padding: 0.8rem 0.9rem; border-radius: 10px; font-size: 1.05rem; }
  .site-nav a:hover { background: var(--ice); color: var(--lake-dark); }
  .site-nav a[aria-current="page"] { background: var(--ice); color: var(--lake-dark); }
  .site-header.menu-open { background: var(--white); box-shadow: 0 1px 0 var(--line); }
  .site-header.menu-open .brand,
  .site-header.menu-open .nav-toggle { color: var(--text); }
  .site-header.menu-open .brand svg .fill { fill: var(--lake); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  padding: 7rem 1rem 5rem;
  overflow: hidden;
  isolation: isolate;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 40, 55, 0.45) 0%, rgba(20, 40, 55, 0.25) 45%, rgba(26, 42, 51, 0.55) 100%);
}
.hero-content { max-width: 760px; margin: 0 auto; }
.hero-content h1 { color: var(--white); margin-bottom: 1rem; }
.hero-content p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: 0 auto 2rem;
  max-width: 34em;
  color: rgba(255, 255, 255, 0.92);
}
.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: var(--white);
}
.hero-mark svg { width: 18px; height: 18px; }
.hero-credit {
  position: absolute;
  right: 1rem;
  bottom: 0.75rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  z-index: 1;
  margin: 0;
}
.hero-credit a { color: rgba(255, 255, 255, 0.9); }

/* Page hero (Unterseiten) */
.page-hero {
  position: relative;
  min-height: 52vh;
  display: grid;
  align-items: end;
  color: var(--white);
  padding: 8rem 1rem 3rem;
  overflow: hidden;
  isolation: isolate;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 40, 55, 0.35) 0%, rgba(26, 42, 51, 0.7) 100%);
}
.page-hero .inner { max-width: var(--max); margin: 0 auto; width: 100%; text-align: center; }
.page-hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-hero .lead {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  max-width: 36em;
  margin: 0 auto;
}
.page-hero .hero-credit { position: static; text-align: center; margin-top: 1.25rem; }

.page-plain {
  padding: 8rem 1rem 1rem;
  text-align: center;
}
.page-plain .inner { max-width: var(--max); margin: 0 auto; }
.page-plain .lead { color: var(--text-soft); font-size: 1.15rem; max-width: 36em; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn-light { background: var(--white); color: var(--text); }
.btn-light:hover { background: var(--ice); color: var(--lake-dark); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.6); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.btn-primary { background: var(--lake); color: var(--white); }
.btn-primary:hover { background: var(--lake-dark); color: var(--white); }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Layout ---------- */
main { display: block; }
.section { padding: 4.5rem 1rem; }
.section-tight { padding: 3rem 1rem; }
.section-ice { background: var(--ice-soft); }
.wrap { max-width: var(--max); margin: 0 auto; }
.wrap-narrow { max-width: 760px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.75rem; }
.section-head p { margin: 0 auto; color: var(--text-soft); font-size: 1.1rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.centered { text-align: center; }
.centered p { margin-left: auto; margin-right: auto; }

.prose p, .prose ul, .prose ol { margin-left: auto; margin-right: auto; }
.prose h2 { text-align: center; margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose > h2:first-child { margin-top: 0; }

/* ---------- Karten ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--ice);
  color: var(--lake);
  margin-bottom: 1rem;
}
.card .icon svg { width: 26px; height: 26px; }
.card .icon.fir { color: var(--fir); background: #e3efe8; }
.card-link {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }
.card-img {
  padding: 0;
  overflow: hidden;
}
.card-img img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.card-img .card-body { padding: 1.5rem 1.75rem 1.75rem; display: flex; flex-direction: column; flex: 1; }

/* Steckbrief-Karten (Seen, Touren) */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem 1rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--ice-soft);
  border-radius: 12px;
}
.facts div { max-width: none; }
.facts dt { font-size: 0.8rem; color: var(--text-soft); margin-bottom: 0.1rem; }
.facts dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }

/* ---------- Zahlen-Kacheln ---------- */
.stats {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
.stat {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  text-align: center;
  border-top: 4px solid var(--lake);
}
.stat:nth-child(even) { border-top-color: var(--fir); }
.stat .num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--lake-dark);
  margin-bottom: 0.5rem;
}
.stat:nth-child(even) .num { color: var(--fir); }
.stat .label { color: var(--text-soft); font-size: 0.98rem; margin: 0 auto; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 560px; }
caption { text-align: left; padding: 1rem 1.25rem 0.5rem; font-family: var(--font-head); font-weight: 700; color: var(--text-soft); font-size: 0.9rem; }
th, td { padding: 0.85rem 1.25rem; text-align: left; vertical-align: top; }
th { font-family: var(--font-head); font-weight: 700; background: var(--ice); color: var(--text); }
tbody tr:nth-child(even) { background: var(--ice-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-note { font-size: 0.9rem; color: var(--text-soft); margin-top: 0.75rem; }

/* ---------- Schwierigkeitsgrade ---------- */
.grade {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
}
.grade::before { content: ""; width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
.grade-blue::before { background: #2a7fd4; }
.grade-red::before { background: #d33a3a; }
.grade-black::before { background: #1a2a33; }
.grade-yellow::before { background: #f1c40f; }

/* ---------- Bild mit Nachweis ---------- */
figure { margin: 0; }
figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }
figcaption { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.6rem; text-align: center; }
.figure-wide { max-width: var(--max); margin: 0 auto; }
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.split .prose p { margin-left: 0; }

/* ---------- Hinweisbox ---------- */
.note {
  background: var(--white);
  border-left: 4px solid var(--fir);
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow);
  margin: 1.5rem auto;
  max-width: 760px;
}
.note.lake { border-left-color: var(--lake); }
.note p:last-child { margin-bottom: 0; }
.note strong { font-family: var(--font-head); }

/* Notruf */
.emergency {
  text-align: center;
  background: var(--text);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
}
.emergency .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(3rem, 8vw, 5rem); letter-spacing: -0.04em; line-height: 1; }
.emergency p { color: rgba(255, 255, 255, 0.85); margin: 0.5rem auto 0; }
.emergency h2 { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 3.5rem 1rem 2rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}
.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-footer h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 0.35rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--lake); text-decoration: underline; }
.site-footer .brand { color: var(--text); }
.site-footer .brand svg .fill { fill: var(--lake); }
.site-footer p { color: var(--text-soft); }
.footer-bottom {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.footer-bottom p { margin: 0; max-width: none; }

/* ---------- Rechtstexte ---------- */
.legal h2 { text-align: left; font-size: 1.35rem; margin-top: 2rem; }
.legal h3 { font-size: 1.1rem; }
.legal address { font-style: normal; }
.legal .placeholder { background: #fff6d6; padding: 0 0.25em; border-radius: 4px; }

/* 404 */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 8rem 1rem 4rem; }
.error-page .big { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 15vw, 9rem); line-height: 1; color: var(--ice); letter-spacing: -0.05em; }

@media (max-width: 600px) {
  .section { padding: 3.25rem 1rem; }
  .card { padding: 1.4rem; }
  .hero { padding: 6rem 1rem 4rem; }
}
