/* =========================================================
   brauereifinder.de — Craft & Warm Design System
   Modernes, abhängigkeitsfreies CSS (Light + Dark Mode)
   ========================================================= */

:root {
  /* Warm / Craft – Light */
  --bg:            #fbf4e9;
  --bg-2:          #f4e9d6;
  --surface:       #fffdf8;
  --surface-2:     #f7efe1;
  --text:          #2a2018;
  --muted:         #7a6a55;
  --primary:       #c47d1a;
  --primary-strong:#a8650f;
  --on-primary:    #fffaf2;
  --accent:        #6f8f3f;
  --border:        #e8dcc6;
  --shadow:        0 6px 24px rgba(80, 55, 20, .10);
  --shadow-lg:     0 18px 50px rgba(80, 55, 20, .16);
  --ring:          rgba(196, 125, 26, .35);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw:      1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Hero-Vektorgrafik */
  --art-ink:       #9a7a4f;
  --art-map-fill:  rgba(196, 125, 26, .13);
  --art-map-hover: rgba(196, 125, 26, .32);
  --art-hop:       #6f8f3f;
  --art-hop-fill:  rgba(111, 143, 63, .18);
  --art-beer:      rgba(196, 125, 26, .55);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:            #15110c;
  --bg-2:          #1b150f;
  --surface:       #221b13;
  --surface-2:     #2b2117;
  --text:          #f3e7d4;
  --muted:         #b39d80;
  --primary:       #e6a13a;
  --primary-strong:#f0b154;
  --on-primary:    #1a130a;
  --accent:        #9bbd5f;
  --border:        #362a1c;
  --shadow:        0 8px 28px rgba(0, 0, 0, .40);
  --shadow-lg:     0 22px 60px rgba(0, 0, 0, .55);
  --ring:          rgba(230, 161, 58, .40);

  /* Hero-Vektorgrafik */
  --art-ink:       #b59b73;
  --art-map-fill:  rgba(230, 161, 58, .18);
  --art-map-hover: rgba(230, 161, 58, .36);
  --art-hop:       #9bbd5f;
  --art-hop-fill:  rgba(155, 189, 95, .20);
  --art-beer:      rgba(230, 161, 58, .60);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color .25s ease, color .25s ease;
}

a { color: var(--primary-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 800;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.main { flex: 1 0 auto; padding-block: clamp(2rem, 5vw, 4rem); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--primary); }
.brand b { color: var(--primary); }
.brand-logo { height: 30px; width: auto; display: block; }
.site-footer .brand-logo { height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
  list-style: none;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: .5rem .85rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  transition: background-color .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.nav-links a.is-active { background: var(--primary); color: var(--on-primary); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-menu { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }
.nav-toggle[aria-expanded="true"] { background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .1s ease, background-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--primary-strong); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 10vw, 7rem);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
/* Vektor-Illustration als unterster Layer: echte Deutschlandkarte +
   Brauerei-Motive. Färbt sich per CSS-Variablen (theme-nativ). */
.hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  color: var(--art-ink);
  opacity: .95;
}
.hero-art { display: block; width: 100%; height: 100%; }
.hero-art path, .hero-art rect, .hero-art ellipse { vector-effect: non-scaling-stroke; }
.hero-art .art-map path {
  fill: var(--art-map-fill);
  stroke: var(--art-ink);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.hero-art .art-line path,
.hero-art .art-line rect,
.hero-art .art-line ellipse {
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.hero-art .art-line .art-beer { fill: var(--art-beer); stroke: none; }
.hero-art .art-hop path {
  fill: none; stroke: var(--art-hop); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.hero-art .art-hop .art-hop-fill { fill: var(--art-hop-fill); stroke: var(--art-hop); }
.hero-art .art-routes .art-route {
  fill: none; stroke: currentColor; stroke-width: 1.1; opacity: .32; stroke-linecap: round;
}
.hero-art .art-pin { fill: var(--primary); stroke: var(--primary-strong); stroke-width: 1.2; }
.hero-art .art-pin-ico path, .hero-art .art-pin-ico rect { fill: var(--on-primary); stroke: none; }

/* Interaktive Karte: nur die Bundesland-Flächen reagieren auf Klicks */
.hero::after { pointer-events: none; }
.hero__inner { pointer-events: none; }
.hero__inner .search, .hero__inner a, .hero__inner button { pointer-events: auto; }
.hero-art .art-deco, .hero-art .art-routes, .hero-art .art-pins { pointer-events: none; }
.hero-art .art-map .ds { cursor: pointer; transition: fill .15s ease, stroke-width .15s ease; }
.hero-art .art-map .ds:hover { fill: var(--art-map-hover); stroke-width: 1.6; }
.hero-art .art-map .ds:focus-visible { outline: none; fill: var(--art-map-hover); stroke-width: 1.8; }

/* Hover-Label auf der Karte: Bundesland + Anzahl */
.map-tip {
  position: fixed;
  z-index: 1500;
  pointer-events: none;
  transform: translate(14px, -135%);
  padding: .3rem .8rem;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .12s ease;
}
.map-tip.show { opacity: 1; }
.map-tip strong { color: var(--primary-strong); }
/* Lesbarkeits-Schleier – nutzt --bg, funktioniert daher in Light & Dark */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 78% at 50% 44%, color-mix(in srgb, var(--bg) 60%, transparent), transparent 62%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 52%, transparent) 0%,
      color-mix(in srgb, var(--bg) 14%, transparent) 36%,
      color-mix(in srgb, var(--bg) 30%, transparent) 72%,
      var(--bg) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; margin-inline: auto; text-align: center; }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  margin-bottom: .35em;
  text-shadow: 0 1px 12px color-mix(in srgb, var(--bg) 78%, transparent);
}
.hero h1 .accent { color: var(--primary); }
.hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  margin: 0 auto 2rem;
  max-width: 38ch;
  text-shadow: 0 1px 10px color-mix(in srgb, var(--bg) 82%, transparent);
}
[data-theme="dark"] .hero::after {
  background:
    radial-gradient(120% 78% at 50% 44%, color-mix(in srgb, var(--bg) 68%, transparent), transparent 64%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 74%, transparent) 0%,
      color-mix(in srgb, var(--bg) 48%, transparent) 42%,
      var(--bg) 100%);
}

/* ---------- Search ---------- */
.search {
  position: relative;
  max-width: 560px;
  margin-inline: auto;
}
.search--full { max-width: none; }
.search svg.search-icon {
  position: absolute;
  left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 1rem 1.15rem 1rem 3rem;
  font: inherit;
  font-size: 1.1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

/* ---------- Controls bar (filter + sort + count) ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.controls .search { flex: 1 1 280px; margin-inline: 0; }
.field {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding: .7rem 2.4rem .7rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.field::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.result-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
}
.result-count b { color: var(--text); }

/* ---------- Brewery cards grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.brewery-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.brewery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.brewery-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 80% 0%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 60%),
    var(--surface-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brewery-card__media img { width: 100%; height: 100%; object-fit: cover; }
.brewery-card__media .placeholder { width: 88px; height: 88px; color: color-mix(in srgb, var(--primary) 78%, var(--muted)); opacity: .8; }
.brewery-card__media .placeholder svg { width: 100%; height: 100%; }
.brewery-card__badge {
  position: absolute;
  top: .7rem; left: .7rem;
  padding: .2rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--on-primary);
  background: color-mix(in srgb, var(--primary) 92%, black 4%);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.brewery-card__badge--closed {
  left: auto; right: .7rem;
  color: #fff;
  background: #8a6f57;
}
/* Geschlossene Brauereien dezent als "historisch" markieren */
.brewery-card--closed .brewery-card__media { filter: grayscale(.6); opacity: .72; }
.brewery-card--closed h3 { color: var(--muted); }
.brewery-card--closed .brewery-card__city { color: var(--muted); }

.brewery-card__body { padding: 1.1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.brewery-card h3 { font-size: 1.12rem; margin: 0; }
.brewery-card__city { color: var(--primary-strong); }
.brewery-card__meta { color: var(--muted); font-size: .92rem; margin: 0; }
.brewery-card__years {
  display: flex; align-items: center; gap: .4rem; margin: 0;
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.brewery-card__years svg { width: 14px; height: 14px; flex: 0 0 auto; color: color-mix(in srgb, var(--primary) 65%, var(--muted)); }
.brewery-card--closed .brewery-card__years { color: #9a6a4a; }
.brewery-card--closed .brewery-card__years svg { color: #9a6a4a; }
.brewery-card__textwrap { margin: 0; }
.brewery-card__text {
  font-size: .92rem; margin: 0; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.brewery-card__textwrap.is-expanded .brewery-card__text { -webkit-line-clamp: 100; }
.readmore {
  margin-top: .3rem; padding: 0; border: 0; background: none;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--primary-strong); cursor: pointer;
}
.readmore:hover { text-decoration: underline; }
.brewery-card__beers { margin: 0; font-size: .88rem; color: var(--text); }
.beers-label {
  display: inline-block; margin-right: .35rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--primary-strong);
}
.beers-tx { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.brewery-card__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .35rem;
}
.brewery-card__actions .btn { padding: .5rem .9rem; font-size: .88rem; }
.social { display: inline-flex; gap: .35rem; margin-left: auto; }
.social a {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: color .15s ease, border-color .15s ease;
}
.social a:hover { color: var(--primary); border-color: var(--primary); }
.social svg { width: 17px; height: 17px; }
.brewery-card__contact { display: flex; flex-direction: column; gap: .3rem; margin: 0; min-width: 0; }
.contact-link {
  display: inline-flex; align-items: center; gap: .45rem; min-width: 0;
  font-size: .88rem; font-weight: 600; color: var(--muted);
}
.contact-link:hover { color: var(--primary); text-decoration: none; }
.contact-link svg { width: 15px; height: 15px; flex: 0 0 auto; }
.contact-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Discover / empty states ---------- */
.discover { display: grid; gap: 2.5rem; }

/* Statistik-Kacheln */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 720px;
  margin-inline: auto;
}
.stat {
  text-align: center;
  padding: 1.15rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat__num { display: block; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat__label { display: block; margin-top: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Offline-Hinweis */
.offline-panel { display: flex; align-items: center; gap: 1.15rem; text-align: left; }
.offline-panel__icon {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
}
.offline-panel__icon svg { width: 28px; height: 28px; }
.offline-panel h2 { font-size: 1.25rem; margin-bottom: .35rem; }
.offline-panel p { margin: 0; }
@media (max-width: 520px) { .offline-panel { flex-direction: column; text-align: center; } }
.cloud { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; max-width: 640px; margin-inline: auto; }
.cloud button {
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.cloud button:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.cloud__n { font-weight: 700; opacity: .5; margin-left: .3rem; }

.discover__section { display: grid; gap: 1.1rem; }
.discover__heading { text-align: center; font-size: clamp(1.3rem, 3.5vw, 1.8rem); margin: 0; }
.offline-panel__icon--primary {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-2));
  color: var(--primary-strong);
}
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.panel-grid .offline-panel { align-items: flex-start; }
@media (max-width: 760px) { .panel-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.panel--center { text-align: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }
.cta-row--left { justify-content: flex-start; margin-top: .9rem; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}
.empty svg { width: 54px; height: 54px; color: var(--border); margin-bottom: .5rem; }

.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h1, .section-title h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }

/* ---------- Generierte SEO-Seiten (Detail / Listen) ---------- */
.crumbs { max-width: 760px; margin: 0 auto 1.2rem; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.detail__badges { display: flex; gap: .4rem; margin-bottom: .6rem; }
.badge {
  display: inline-block; padding: .22rem .65rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; color: var(--on-primary); background: var(--primary); border-radius: 999px;
}
.badge--closed { color: #fff; background: #8a6f57; }
.detail__lead { font-size: 1.1rem; font-weight: 600; color: var(--primary-strong); margin: 0 0 .2rem; }
.detail__meta { color: var(--muted); margin: 0 0 1.3rem; }
.detail__beers, .detail__contact, .detail__social { margin: .7rem 0; }
.detail__contact a { font-weight: 600; margin-right: .4rem; }
.detail__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0; }
.detail__back { margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.seo-related { margin-top: 2.2rem; border-top: 1px solid var(--border); padding-top: 1.3rem; }
.seo-related h2 { font-size: 1.15rem; }
.brewery-index { list-style: none; padding: 0; margin: .6rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .3rem .9rem; }
.brewery-index a { font-weight: 600; }
.ix-tag { font-size: .72rem; color: #9a6a4a; font-weight: 700; }
.region-cities { display: grid; gap: 1.5rem; }
.region-city h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.region-hub { max-width: 760px; margin: 2.5rem auto 0; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.region-hub h2 { font-size: 1.2rem; text-align: center; }
.region-hub__links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.region-hub__links a {
  padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem;
}
.region-hub__links a:hover { background: var(--primary); color: var(--on-primary); border-color: var(--primary); text-decoration: none; }
.section-title p { color: var(--muted); margin: 0; }

/* Skeleton loading */
.skeleton .brewery-card { pointer-events: none; }
.skeleton .brewery-card__media,
.skeleton .sk-line {
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 60%, var(--bg)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.sk-line { height: 12px; border-radius: 6px; margin: .4rem 0; }
.sk-line.short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Map ---------- */
#map {
  width: 100%;
  height: clamp(420px, 70vh, 760px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1;
}
/* Leaflet-Popup an Theme anpassen */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.leaflet-popup-content-wrapper { border: 1px solid var(--border); border-radius: 14px; }
.leaflet-popup-content { margin: .85rem 1rem; }
.leaflet-popup-close-button { color: var(--muted) !important; }

.map-popup { font-family: var(--font); }
.map-popup h4 { margin: 0 0 .15rem; font-size: 1.02rem; color: var(--text); }
.mp-closed { font-size: .66rem; font-weight: 700; color: #fff; background: #8a6f57; padding: .05rem .4rem; border-radius: 999px; vertical-align: middle; }
.mp-sub { margin: 0 0 .35rem; font-size: .85rem; font-weight: 600; color: var(--primary-strong); }
.mp-years { display: flex; align-items: center; gap: .3rem; margin: 0 0 .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.mp-years svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mp-addr { margin: 0 0 .5rem; font-size: .82rem; color: var(--muted); }
.mp-text { margin: 0 0 .5rem; font-size: .82rem; color: var(--text); max-height: 7.5em; overflow-y: auto; }
.mp-beers { margin: 0 0 .5rem; font-size: .82rem; color: var(--text); max-height: 6em; overflow-y: auto; }
.mp-contacts { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .5rem; }
.mp-contact { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.mp-contact svg { width: 13px; height: 13px; flex: 0 0 auto; }
.mp-contact:hover { color: var(--primary); }
.mp-actions { display: flex; gap: .4rem; margin-bottom: .45rem; }
.mp-actions .btn { padding: .4rem .75rem; font-size: .8rem; }
.mp-actions .btn svg { width: 15px; height: 15px; }
.mp-social { display: flex; gap: .35rem; }
.mp-social a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.mp-social a:hover { color: var(--primary); border-color: var(--primary); }
.mp-social svg { width: 15px; height: 15px; }
.map-popup--closed h4 { color: var(--muted); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 620px; }
.form-field label { display: block; font-weight: 700; margin-bottom: .4rem; font-size: .95rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .8rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.check input { margin-top: .25rem; }
.form-note { color: var(--muted); font-size: .95rem; }
/* Auswahl-/Radio-Gruppe */
.field-group { display: grid; gap: .45rem; }
.field-group__label { font-weight: 700; font-size: .95rem; color: var(--text); }
.field-group .check { align-items: center; color: var(--text); font-weight: 600; }
.field-group .check input { margin-top: 0; }

/* ---------- Legal / prose ---------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.prose h3, .prose h4 { margin-top: 1.8rem; font-size: 1.15rem; color: var(--primary-strong); }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.2rem; }
.prose strong { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding-block: 2rem;
  margin-top: 3rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer .brand { font-size: 1rem; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--muted); font-size: .88rem; width: 100%; text-align: center; margin-top: .5rem; }
.footer-copy-logo { display: inline-block; height: 1.15em; width: auto; vertical-align: -.22em; }

/* ---------- Modal: Hinweis beim Verlassen der Seite ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 14, 8, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  width: min(420px, 100%);
  padding: 1.75rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.97);
  transition: transform .22s ease;
}
.modal-overlay.show .modal { transform: none; }
.modal__icon {
  width: 52px; height: 52px;
  margin: 0 auto .85rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 16%, var(--surface-2));
  color: var(--primary);
}
.modal__icon svg { width: 26px; height: 26px; }
.modal h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.modal p { margin: 0 0 .25rem; font-size: .95rem; color: var(--muted); }
.modal__host {
  margin: .4rem 0 1.3rem !important;
  font-weight: 700;
  color: var(--text) !important;
  word-break: break-all;
}
.modal__actions { display: flex; gap: .6rem; justify-content: center; }
.modal__actions .btn { flex: 1; max-width: 160px; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.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;
}
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav { gap: .4rem; }
  .nav-toggle { display: inline-grid; margin-left: auto; }  /* Buttons nach rechts */

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: clamp(.75rem, 4vw, 1.5rem);
    right: clamp(.75rem, 4vw, 1.5rem);
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;
    margin: 0;
    padding: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px) scale(.99);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    align-items: center;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
  }
  .nav-links a:active { background: var(--surface-2); }
  .result-count { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
