/* Gemeinsames Stylesheet für alle Seiten von ziegelbruecke.ch */
:root {
  --bg: oklch(98% 0.008 90);
  --text: oklch(24% 0.02 250);
  --text-muted: oklch(40% 0.02 250);
  --text-muted-2: oklch(46% 0.02 250);
  --text-faint: oklch(55% 0.02 250);
  --text-faint-2: oklch(60% 0.02 250);
  --accent-teal: oklch(52% 0.13 195);
  --accent-teal-dark: oklch(40% 0.13 195);
  --accent-amber: oklch(72% 0.15 55);
  --accent-amber-text: oklch(52% 0.15 55);
  --card-bg: #ffffff;
  --card-border: oklch(91% 0.01 250);
  --card-shadow: 0 4px 24px oklch(20% 0.02 250 / 0.05);
  --radius-card: 16px;
  --radius-pill: 20px;
  --radius-accordion: 14px;
  --footer-bg: oklch(20% 0.02 250);
  --footer-text: oklch(70% 0.01 250);
  --nav-bg: rgba(253,252,250,0.92);
  --nav-line: oklch(90% 0.01 250);
  --control-border: oklch(88% 0.01 250);
  --control-hover: oklch(94% 0.01 250);
  --text-body: oklch(35% 0.02 250);
  --text-tag: oklch(52% 0.02 250);
  --line-soft: oklch(95% 0.005 90);
  --panel-bg: oklch(97% 0.01 90);
  --menu-bg: #ffffff;
  --on-accent: #ffffff;
  --kat-bg: oklch(95% 0.02 195);
  --tdot-bg: oklch(94% 0.05 75);
  --tdot-text: oklch(42% 0.1 60);
  --voll-bg: oklch(94% 0.04 25);
  --voll-text: oklch(45% 0.15 25);
  --pille-an: oklch(52% 0.14 150);
  --pille-an-text-knopf: oklch(42% 0.12 150);
  color-scheme: light;
}

/* Dunkles Design: wird per Knopf oder nach Geräteeinstellung auf <html data-theme="dark"> gesetzt; nur am Bildschirm, gedruckt wird immer hell */
@media screen {
  :root[data-theme="dark"] {
    --bg: oklch(18% 0.015 250);
    --text: oklch(93% 0.008 250);
    --text-muted: oklch(82% 0.01 250);
    --text-muted-2: oklch(78% 0.01 250);
    --text-faint: oklch(70% 0.01 250);
    --text-faint-2: oklch(66% 0.01 250);
    --accent-teal: oklch(75% 0.12 195);
    --accent-teal-dark: oklch(84% 0.1 195);
    --accent-amber: oklch(80% 0.14 60);
    --accent-amber-text: oklch(80% 0.14 60);
    --card-bg: oklch(23% 0.015 250);
    --card-border: oklch(33% 0.015 250);
    --card-shadow: 0 4px 24px oklch(0% 0 0 / 0.35);
    --footer-bg: oklch(13% 0.015 250);
    --footer-text: oklch(72% 0.01 250);
    --nav-bg: oklch(18% 0.015 250 / 0.92);
    --nav-line: oklch(30% 0.015 250);
    --control-border: oklch(40% 0.015 250);
    --control-hover: oklch(28% 0.015 250);
    --text-body: oklch(85% 0.01 250);
    --text-tag: oklch(72% 0.01 250);
    --line-soft: oklch(28% 0.015 250);
    --panel-bg: oklch(21% 0.015 250);
    --menu-bg: oklch(23% 0.015 250);
    --on-accent: oklch(16% 0.02 250);
    --kat-bg: oklch(31% 0.05 195);
    --tdot-bg: oklch(33% 0.06 70);
    --tdot-text: oklch(88% 0.09 75);
    --voll-bg: oklch(33% 0.07 25);
    --voll-text: oklch(87% 0.08 25);
    --pille-an: oklch(76% 0.15 150);
    --pille-an-text-knopf: oklch(82% 0.13 150);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  scroll-behavior: smooth;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 { overflow-wrap: break-word; hyphens: auto; }

a { color: var(--accent-teal); }
a:hover { color: var(--accent-teal-dark); }

.eyebrow {
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.section-h {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.5rem, 6vw, 2rem);
  margin: 0 0 12px;
  color: var(--text);
}
.section-title { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-title p { color: var(--text-muted-2); }

/* NAVIGATION */
nav {
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--nav-line);
  z-index: 1000;
}
.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--accent-teal); }
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; gap: 22px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent-teal); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle:hover { background: var(--control-hover); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  padding: 5px 11px;
  border: 1px solid var(--control-border);
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.lang-switch:hover { background: var(--control-hover); color: var(--text); }

/* Hell/Dunkel-Knopf: gleiche Pillenform wie .lang-switch; ohne JavaScript ausgeblendet; zeigt den aktuellen Zustand: im hellen Design die Sonne, im dunklen den Mond */
.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  padding: 5px 13px;
  border: 1px solid var(--control-border);
  border-radius: 20px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.6;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle svg { width: 1.1em; height: 1.1em; margin: 0.25em 0; }
@media (min-width: 1320.02px) {
  .theme-toggle { margin-left: 36px; }
}
:root[data-theme] .theme-toggle { display: inline-flex; }
.theme-toggle .ic-mond, :root[data-theme="dark"] .theme-toggle .ic-sonne { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-mond { display: block; }
.theme-toggle:hover { background: var(--control-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.theme-toggle + .lang-switch { margin-left: 8px; }
/* Nach dem Sprachwechsel bekommt die Lesestelle den Fokus (tabindex="-1"), ohne Rahmen */
main [id][tabindex="-1"]:focus, section[id][tabindex="-1"]:focus { outline: none; }
@media (max-width: 480px) {
  .nav-container { padding-left: 16px; padding-right: 16px; }
  .logo { font-size: 1.1rem; }
  .theme-toggle { margin-left: 6px; }
  .theme-toggle + .lang-switch { margin-left: 6px; }
}
@media print {
  .theme-toggle, .nav-toggle { display: none !important; }
}

/* HERO */
.hero {
  position: relative;
  min-height: 560px;
  height: 82vh;
  display: flex;
  align-items: flex-end;
  background-image: linear-gradient(180deg, oklch(20% 0.03 220 / 0.35), oklch(15% 0.03 220 / 0.82)), url('../img/hero-ziegelbruecke.jpg');
  background-size: cover;
  background-position: 90% 25%;
  background-repeat: no-repeat;
  color: white;
}
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px 64px; width: 100%; }
.hero-pill-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: oklch(72% 0.15 55 / 0.9);
  color: oklch(18% 0.02 250);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  max-width: 780px;
}
.hero p { font-size: 1.25rem; max-width: 640px; margin: 0 0 28px; opacity: 0.95; }
.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  font-weight: 600;
  font-size: 0.9rem;
}

main { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* CARDS */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.card img.card-img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-body { padding: 28px; }
.card-body h3, .card-body .karte-h { font-family: 'Sora', sans-serif; font-size: 1.2rem; margin: 0 0 10px; }
.card-body p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; }
.card-body ul { color: var(--text-muted); font-size: 0.9rem; padding-left: 18px; margin: 0 0 14px; }
.btn-link { font-weight: 700; text-decoration: none; display: inline-block; }
.photo-credit { font-size: 0.75rem; color: var(--text-muted); margin: 10px 0 0; }
.photo-credit a { color: inherit; text-decoration: underline; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

section { padding: 24px 0 72px; scroll-margin-top: 90px; }
#lage { scroll-margin-top: 90px; }

/* LAGE */
#lage { padding: 72px 0; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
#lage .intro p { color: var(--text-muted); margin-bottom: 16px; }
.map-frame { position: relative; }
.map-guard {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.map-guard::after {
  content: attr(data-hint);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.map-guard:hover::after { opacity: 1; }
.map-guard.is-active {
  pointer-events: none;
  background: transparent;
}
.glance-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.glance-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 18px; }
.glance-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.glance-row:last-child { margin-bottom: 0; }
.glance-icon { font-size: 1.3rem; }
.glance-row strong { display: block; }
.glance-row div.glance-sub { color: var(--text-muted-2); font-size: 0.9rem; }
/* Wetter auf der Startseite (Daten holt der Browser bei Open-Meteo) */
.wetter-karte { scroll-margin-top: 90px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius-card); padding: 22px 28px; box-shadow: var(--card-shadow); }
.wetter-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.wetter-kopf .glance-title { margin: 0; }
.wetter-kopf a { font-size: 0.88rem; }
/* Platz für die Kacheln vorhalten, damit beim Nachladen nichts unter dem Leser springt */
.wetter-tage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-height: 154px; }
.wetter-tag { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--control-hover); }
.wetter-name { font-weight: 600; font-size: 0.88rem; }
.wetter-symbol { font-size: 1.8rem; line-height: 1.3; }
.wetter-art, .wetter-regen, .wetter-jetzt { font-size: 0.8rem; color: var(--text-muted); }
.wetter-temp { font-weight: 700; }
.linth-werte { min-height: 132px; }
/* Abfahrten: Züge und Busse nebeneinander, auf dem Handy untereinander */
.abfahrten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; min-height: 260px; }
.abfahrten-titel { margin: 0 0 6px; font-family: 'Sora', sans-serif; font-size: 0.95rem; }
.abfahrten-liste { list-style: none; margin: 0; padding: 0; }
.abfahrt { display: grid; grid-template-columns: 5.6em 4.2em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--card-border); font-size: 0.9rem; }
.abfahrt-zeit { font-weight: 700; font-variant-numeric: tabular-nums; }
.abfahrt-spaet { color: var(--accent-amber-text); font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.abfahrt-linie { font-weight: 600; white-space: nowrap; }
.abfahrt-ziel { overflow-wrap: anywhere; }
.abfahrt-gleis { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
@media (max-width: 640px) {
  .abfahrten { grid-template-columns: minmax(0, 1fr); min-height: 520px; }
}
/* Karten übersichtlich: Stichworte oben, ausführlicher Text auf Klick */
.fakten { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 5px; font-size: 0.9rem; color: var(--text-muted); }
.fakten li { padding-left: 0; }
.anlass .anlass-meta + .anlass-meta, .anlass .anlass-meta + details.mehr { margin-top: 4px; }
.infra-card .fakten, .card-body .fakten { padding-left: 0; margin-bottom: 12px; }
.infra-card p + .fakten { margin-top: 10px; }
.fakten strong { color: var(--text); font-weight: 700; }
details.mehr { margin: 0 0 12px; }
details.mehr > summary { cursor: pointer; font-weight: 700; font-size: 0.85rem; color: var(--accent-teal); list-style: none; }
details.mehr > summary::-webkit-details-marker { display: none; }
details.mehr > summary::before { content: "+ "; }
details.mehr[open] > summary::before { content: "− "; }
.anlass-hinweis details.mehr > :not(summary) { font-size: inherit; }
.anlass-hinweis details.mehr > summary { display: inline-block; }
details.mehr > summary:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
details.mehr > :not(summary) { margin-top: 8px; font-size: 0.9rem; color: var(--text-muted); }
@media print {
  details.mehr > :not(summary) { display: block; }
  details.mehr::details-content { content-visibility: visible; }
  details.mehr > summary { display: none; }
}
/* Touren: über die ganze Breite der Freizeit-Karten */
.touren-karte { grid-column: 1 / -1; }
.touren-liste { margin: 0 0 4px; padding-left: 18px; display: grid; gap: 8px; font-size: 0.92rem; }
.touren-liste a { display: inline; white-space: nowrap; }
/* Notfall: über die ganze Breite, drei Spalten, auf dem Handy untereinander */
.notfall-karte { grid-column: 1 / -1; }
.notfall-spalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 28px; margin: 6px 0 4px; }
.notfall-spalten h3 { margin: 0 0 8px; font-family: 'Sora', sans-serif; font-size: 0.95rem; }
.notfall-karte .fakten a, .notfall-karte p a { display: inline; font-size: inherit; }
@media (max-width: 900px) { .notfall-spalten { grid-template-columns: minmax(0, 1fr); } }
.infra-card[id], .card[id], .activity-card[id], .bildung-card[id] { scroll-margin-top: 90px; }
.infra-card:target, .card:target, .activity-card:target, .bildung-card:target { border-color: var(--accent-teal); box-shadow: 0 0 0 2px var(--accent-teal); }
.infra-card a.im-text { display: inline; font-size: inherit; }
.vorschau-links { margin-top: 12px; }
.vorschau-links a { white-space: nowrap; }
.sprungmarken { margin: -8px auto 32px; }
.anlass-monat[id] { scroll-margin-top: 90px; }
.wetter-hinweis { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 480px) {
  .wetter-karte { padding: 18px; }
  .wetter-tage { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 320px; }
  .linth-werte { min-height: 236px; }
}

/* GESCHICHTE */
.geschichte-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--card-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.geschichte-card img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; border-radius: 12px; }
.geschichte-card .text p { margin-bottom: 16px; color: var(--text-body); }

/* KANTONE */
.kantone-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.kantone-header img { width: 28px; height: 34px; object-fit: contain; }
.kantone-header .kt-kanton { font-weight: 700; font-size: 0.85rem; }
.kantone-header .kt-gemeinde { font-weight: 700; font-size: 0.9rem; }

/* AKTIVITÄTEN */
.activity-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
}
.activity-card h3 { font-family: 'Sora', sans-serif; font-size: 1rem; margin: 0 0 10px; }
.activity-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 12px; }
.activity-card a { font-weight: 700; text-decoration: none; font-size: 0.85rem; }

/* INFRASTRUKTUR */
.infra-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
}
.infra-card h3, .infra-card > h2 { font-family: 'Sora', sans-serif; font-size: 1rem; margin: 0 0 10px; }
.infra-card p, .infra-card ul { color: var(--text-muted); font-size: 0.88rem; }
.infra-card ul { padding-left: 16px; margin: 0 0 12px; }
.infra-card a { font-weight: 700; text-decoration: none; font-size: 0.85rem; display: block; }
.infra-card a + a { margin-top: 2px; }

/* GEWERBE ACCORDION */
.gewerbe-note { max-width: 800px; margin: -15px auto 30px; text-align: center; font-size: 0.9rem; color: var(--text-muted-2); }
.gewerbe-accordion { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.gewerbe-cat {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-accordion);
  overflow: hidden;
}
.gewerbe-cat-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}
.gewerbe-cat-btn:hover { background: var(--bg); }
.gewerbe-plus { font-size: 1.3rem; color: var(--accent-teal); transition: transform 0.2s; display: inline-block; }
.gewerbe-cat-btn[aria-expanded="true"] .gewerbe-plus { transform: rotate(45deg); }
.gewerbe-cat-body { padding: 4px 24px 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; }
.gewerbe-cat-body[hidden] { display: none; }
.gewerbe-item { font-size: 0.9rem; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.gewerbe-item a { font-weight: 600; text-decoration: none; }
.gewerbe-item .gewerbe-name { font-weight: 600; }
.gewerbe-item .gewerbe-tag { color: var(--text-tag); }

/* BILDUNG */
.bildung-panel {
  background: var(--panel-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 44px;
}
.bildung-panel > p.intro { margin-bottom: 24px; color: var(--text-body); }
.bildung-card {
  background: var(--card-bg);
  padding: 26px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}
.bildung-card h3, .bildung-card h2 { font-family: 'Sora', sans-serif; font-size: 1.1rem; margin: 0 0 10px; }
.bildung-card p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 14px; }
.bildung-card a { font-weight: 700; text-decoration: none; font-size: 0.9rem; }

/* FOOTER */
footer { background: var(--footer-bg); color: white; padding: 56px 24px 28px; margin-top: 40px; }
.footer-content {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 { font-family: 'Sora', sans-serif; margin: 0 0 14px; }
.footer-col p { color: var(--footer-text); font-size: 0.9rem; }
.footer-col .links { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--footer-text); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid oklch(35% 0.02 250);
  color: oklch(60% 0.01 250);
  font-size: 0.85rem;
  line-height: 1.8;
}

.anlass-suche { max-width: 480px; margin: 0 auto 14px; }
/* Während einer Suche ruhen Orts-, Kategorie-, Preis- und Datumsfilter: gestrichelt statt durchgezogen, Text bleibt voll lesbar; der Hinweis steht in der Zusammenfassung */
.anlass-filter.pausiert .anlass-mehrfach-knopf, .anlass-datumwahl.pausiert .anlass-kalender { border-style: dashed; box-shadow: none; }
.anlass-filter.pausiert .anlass-mehrfach-knopf.gewaehlt { color: var(--text-muted); }
/* Orts-, Kategorie-, Preis- und Datumsfilter: je ein Pillenknopf, der eine Auswahl aus Pillen aufklappt; gewählte Pillen grün. Auf dem Handy untereinander */
.anlass-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 0 auto 28px; max-width: 900px; }
.anlass-filterteil { display: flex; }
.anlass-wahl { display: inline-flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.anlass-wahl-titel { cursor: pointer; }
.anlass-wahl-feld { position: relative; display: inline-block; }
.anlass-wahl-feld::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.anlass-wahl-feld.offen::after { transform: translateY(-30%) rotate(-135deg); }
.anlass-mehrfach-knopf { text-align: left; font: inherit; font-weight: 600; min-width: 220px; max-width: 100%; padding: 9px 44px 9px 18px; border-radius: var(--radius-pill); border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text); box-shadow: var(--card-shadow); cursor: pointer; transition: border-color 0.2s; }
.anlass-mehrfach-knopf:hover { border-color: var(--pille-an); }
.anlass-mehrfach-knopf.gewaehlt { border-color: var(--pille-an); color: var(--pille-an-text-knopf); }
.anlass-mehrfach-liste { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 100%; width: max-content; max-width: min(460px, calc(100vw - 32px)); max-height: 360px; overflow-y: auto; padding: 12px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: var(--card-shadow); display: flex; flex-wrap: wrap; gap: 8px; }
.anlass-mehrfach-liste[hidden] { display: none; }
/* Ort, Kategorie und Preis: senkrechte Liste, Name links, Anzahl Anlässe rechts */
.anlass-mehrfach-liste.senkrecht { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 6px; width: max(100%, 260px); min-width: 0; }
.anlass-mehrfach-liste.senkrecht .anlass-pille.leer { color: var(--text-muted); font-weight: 400; }
.anlass-mehrfach-liste.senkrecht .anlass-pille.leer[aria-pressed="true"] { color: var(--on-accent); font-weight: 600; }
.anlass-mehrfach-liste.senkrecht .anlass-pille { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; text-align: left; border-radius: 10px; border-color: transparent; }
.anlass-mehrfach-liste.senkrecht .anlass-pille:hover { border-color: var(--pille-an); }
.anlass-mehrfach-liste.senkrecht .anlass-pille .anz { font-variant-numeric: tabular-nums; }
.anlass-mehrfach-knopf { display: flex; align-items: center; gap: 8px; }
.anlass-knopf-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anlass-zahl { display: inline-block; margin-left: auto; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--control-hover); color: var(--text-muted); font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.anlass-pille { font: inherit; font-size: 0.88rem; font-weight: 600; padding: 7px 14px; border-radius: var(--radius-pill); border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text); cursor: pointer; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s; }
.anlass-pille:hover { border-color: var(--pille-an); }
.anlass-pille .anz { color: var(--text-muted); font-weight: 400; }
.anlass-pille[aria-pressed="true"] { background: var(--pille-an); border-color: var(--pille-an); color: var(--on-accent); }
.anlass-pille[aria-pressed="true"] .anz { color: inherit; }
.anlass-mehrfach-knopf:focus-visible, .anlass-pille:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
@media (pointer: coarse) {
  .anlass-pille { padding: 10px 16px; }
}
@media (max-width: 480px) {
  .anlass-filter { flex-direction: column; align-items: stretch; max-width: 340px; }
  .anlass-wahl { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); width: 100%; }
  .anlass-wahl-feld { min-width: 0; }
  .anlass-mehrfach-knopf { min-width: 0; width: 100%; }
  .anlass-mehrfach-liste, .anlass-mehrfach-liste.senkrecht { width: 100%; max-width: none; }
}
.anlass-datumwahl { display: flex; justify-content: center; margin: -14px auto 24px; max-width: 900px; }
.anlass-datumwahl[hidden] { display: none; }
.anlass-summe { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin: -14px auto 18px; }
.anlass-summe:empty { display: none; }
/* Kalender für «Datum wählen»: Von und Bis im selben Monatsblatt, Bereich dazwischen hinterlegt */
.anlass-kalender { width: 100%; max-width: 340px; padding: 14px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: var(--card-shadow); font-size: 0.9rem; }
.kal-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kal-monat { font-weight: 700; color: var(--text); }
.kal-nav { font: inherit; font-size: 1.3rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--card-border); background: none; color: var(--text); cursor: pointer; }
.kal-nav:disabled { opacity: 0.35; cursor: default; }
.kal-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.kal-wt { text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); padding: 4px 0; }
.kal-tag { font: inherit; height: 42px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 10px; }
@media (hover: hover) {
  .kal-tag:hover:not(:disabled):not(.kal-von):not(.kal-bis) { background: var(--control-hover); }
}
.kal-tag:disabled { color: var(--text-faint); opacity: 0.45; cursor: default; }
.kal-heute { font-weight: 700; text-decoration: underline; }
.kal-zwischen { background: var(--control-hover); background: color-mix(in oklch, var(--pille-an) 18%, transparent); border-radius: 0; }
.kal-von, .kal-bis { background: var(--pille-an); color: var(--on-accent); font-weight: 700; }
.kal-von.kal-bis { border-radius: 10px; }
.kal-fuss { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; min-height: 32px; }
.kal-hinweis { color: var(--text-muted); font-weight: 600; }
.kal-loeschen { white-space: nowrap; font: inherit; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--card-border); background: none; color: var(--text); cursor: pointer; }
.kal-nav:focus-visible, .kal-tag:focus-visible, .kal-loeschen:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.anlass-liste { max-width: 900px; margin: 0 auto; }
.anlass-monat { font-family: 'Sora', sans-serif; font-size: 1.05rem; margin: 26px 0 10px; color: var(--text); }
.anlass-monat:first-child { margin-top: 0; }
.anlass { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.anlass-datum { text-align: center; line-height: 1.15; color: var(--accent-teal-dark); }
.anlass-datum .tag { display: block; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.4rem; }
.anlass-datum .wt { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted-2); }
.anlass-datum .bis { display: block; font-size: 0.75rem; color: var(--text-muted-2); margin-top: 2px; }
.anlass .anlass-titel { font-size: 1rem; margin: 0 0 3px; overflow-wrap: anywhere; }
.anlass .anlass-titel a { text-decoration: none; }
.anlass .anlass-titel a:hover, .anlass .anlass-titel a:focus-visible { text-decoration: underline; }
.anlass:focus { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.anlass-mehr[hidden] { display: none; }
.anlass-meta { font-size: 0.88rem; color: var(--text-muted); }
p.anlass-meta { margin: 0; }
.anlass-kat { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 1px 9px; border-radius: var(--radius-pill); background: var(--kat-bg); color: var(--accent-teal-dark); margin-right: 6px; }
.anlass-kat.tdot { background: var(--tdot-bg); color: var(--tdot-text); }
.anlass-voll { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 1px 9px; border-radius: var(--radius-pill); background: var(--voll-bg); color: var(--voll-text); margin-right: 6px; }
.anlass-mehr { display: block; margin: 18px auto 0; font: inherit; font-weight: 600; padding: 10px 22px; border-radius: var(--radius-pill); border: 1px solid var(--accent-teal); background: var(--card-bg); color: var(--accent-teal-dark); cursor: pointer; }
.anlass-hinweis { max-width: 900px; margin: 28px auto 0; font-size: 0.88rem; color: var(--text-muted-2); text-align: center; }
.anlass-leer { text-align: center; color: var(--text-muted-2); padding: 20px 0; }
/* Feste Liste aus tools/deploy_zip.py für Leser ohne JavaScript; mit JavaScript zeigt das Skript die aktuelle Liste */
.anlass-statisch { font-size: 0.92rem; color: var(--text-muted); }
.anlass-statisch ul { padding-left: 20px; margin-top: 8px; }
.anlass-statisch li { margin-bottom: 6px; }
:root[data-theme] .anlass-statisch, :root[data-theme] .gewerbe-statisch { display: none; }
.gewerbe-statisch h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.gewerbe-statisch ul { padding-left: 20px; }

@media (max-width: 860px) {
  .hero { background-image: linear-gradient(180deg, oklch(20% 0.03 220 / 0.35), oklch(15% 0.03 220 / 0.82)), url('../img/hero-ziegelbruecke-mobile.jpg'); background-position: left center; }
  .hero h1 { font-size: 2.2rem; }
  #lage, .geschichte-card, .grid-2, .grid-3, .footer-content { grid-template-columns: 1fr !important; }
  .gewerbe-cat-body { grid-template-columns: 1fr; }
  .bildung-panel { padding: 28px; }
  .geschichte-card { padding: 24px; }
}

@media (max-width: 480px) {
  .hero-pill-eyebrow { font-size: 0.72rem; letter-spacing: 0.02em; padding: 6px 12px; white-space: normal; }
}

/* ALLGEMEIN */
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.sprung-inhalt { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--card-bg); color: var(--text); border: 1px solid var(--card-border); font-weight: 700; }
.sprung-inhalt:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* UNTERSEITEN UND VORSCHAUEN */
.zurueck { max-width: 1240px; margin: 0 auto; padding: 28px 24px 0; font-size: 0.92rem; }
.zurueck a { text-decoration: none; font-weight: 600; }
.zurueck a:hover { text-decoration: underline; }
.mehr-link { display: table; margin: 28px auto 0; font-weight: 600; padding: 10px 22px; border-radius: var(--radius-pill); border: 1px solid var(--accent-teal); background: var(--card-bg); color: var(--accent-teal-dark); text-decoration: none; }
.mehr-link:hover { background: var(--accent-teal); color: var(--on-accent); }
.vorschau-text { max-width: 760px; margin: 0 auto; text-align: center; color: var(--text-muted); }
/* Abfall-Seiten: Querverweis auf die andere Gemeinde unter den Karten */
.abfall-wechsel { margin-top: 32px; }
.nav-links a[aria-current="page"] { color: var(--accent-teal); }
.gewerbe-suche { display: block; width: 100%; max-width: 480px; margin: 0 auto; font: inherit; padding: 11px 16px; border-radius: var(--radius-pill); border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text); }
.gewerbe-suche:focus { outline: 2px solid var(--accent-teal); outline-offset: 1px; }
.gewerbe-leer { text-align: center; color: var(--text-muted-2); margin-top: 20px; }
.mehr-link:focus-visible, .zurueck a:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.fehler-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.fehler-links .mehr-link { display: inline-block; margin: 0; }

/* Navigation: zehn Menüpunkte plus Hell/Dunkel und Sprache passen erst ab rund 1320px in eine Zeile, darunter das Menü einklappen */
@media (max-width: 1320px) {
  .nav-links { display: none; position: absolute; top: calc(100% + 10px); left: 24px; right: 24px; flex-direction: column; gap: 0; background: var(--menu-bg); border-radius: 12px; border: 1px solid var(--card-border); box-shadow: var(--card-shadow); padding: 10px; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 10px; }
  .nav-toggle { display: block; }
}
@media (min-width: 861px) and (max-width: 1320px) {
  .nav-links { left: auto; width: 280px; }
}
/* Sehr schmale Geräte: die englische Hero-Pille ist zu lang für eine Zeile */
@media (max-width: 360px) {
  .hero-pill-eyebrow { white-space: normal; }
}

/* Galerie */
.galerie h2 { font-family: 'Sora', sans-serif; font-size: 1.35rem; margin: 48px 0 12px; }
.galerie-text { color: var(--text-muted); margin: 0 0 20px; max-width: 720px; }
.galerie figure { margin: 0; }
.galerie figcaption { font-size: 0.92rem; color: var(--text); margin-top: 8px; }
.galerie figcaption .photo-credit { display: block; margin-top: 4px; }
.galerie-titelbild img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.galerie-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.galerie-bild img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--panel-bg); }
.galerie-link { display: block; cursor: zoom-in; }
.galerie-link:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 3px; border-radius: 12px; }
.galerie-dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; margin: auto; }
.galerie-dialog::backdrop { background: rgba(0, 0, 0, 0.88); }
.galerie-dialog img { display: block; max-width: 96vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; }
.galerie-dialog img.geschuetzt { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.galerie-dialog-text { color: #f2f2f2; font-size: 0.9rem; text-align: center; margin: 10px auto 0; max-width: 900px; }
.galerie-dialog-text .photo-credit { display: block; color: #cfcfcf; }
.galerie-knopf { position: fixed; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; }
.galerie-knopf:hover, .galerie-knopf:focus-visible { background: rgba(0, 0, 0, 0.85); outline: 2px solid #fff; }
.galerie-zu { top: 12px; right: 12px; }
.galerie-zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
.galerie-vor { right: 12px; top: 50%; transform: translateY(-50%); }
.hero-galerie-link { color: inherit; }
