/* ═══════════════════════════════════════════════════════════════════
 * shell.css – Grundgerüst für ALLE Seiten von taiskirchen.net
 * Gemeinde-Blau-Glas, Wappen im Hintergrund, Seitenleiste links,
 * Leiste unten am Handy, "Mehr"-Blatt.
 *
 * Reihenfolge im <head>:  base.css → Seiten-CSS → responsive.css
 *                         → shell.css → glass.css (nur Unterseiten)
 * ═════════════════════════════════════════════════════════════════*/

:root {
  --g-blau:      #437094;
  --g-blau2:     #5a8bb3;
  --g-blau-tief: #2d5a78;
  --g-text:      #1f3347;
  --g-text2:     #33506a;
  --g-muted:     #5b7189;

  --g-bg:        rgba(255, 255, 255, .58);
  --g-bg-zart:   rgba(255, 255, 255, .55);
  --g-rand:      rgba(255, 255, 255, .80);
  --g-linie:     rgba(67, 112, 148, .11);
  --g-blur:      blur(18px) saturate(160%);
  --g-radius:    18px;

  --schatten:
    0 1px 1px rgba(31, 58, 92, .05), 0 4px 8px rgba(31, 58, 92, .06),
    0 14px 28px -6px rgba(31, 58, 92, .14), 0 30px 50px -20px rgba(31, 58, 92, .16);
  --schatten-h:
    0 2px 2px rgba(31, 58, 92, .05), 0 8px 16px rgba(31, 58, 92, .08),
    0 24px 44px -8px rgba(31, 58, 92, .20), 0 44px 70px -24px rgba(31, 58, 92, .24);
  --kante: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(31, 58, 92, .07);

  --sb-w: 264px;
}

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

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 15%, rgba(90, 139, 179, .42), transparent 36%),
    radial-gradient(circle at 92% 8%,  rgba(126, 184, 214, .45), transparent 34%),
    radial-gradient(circle at 78% 88%, rgba(67, 112, 148, .32), transparent 42%),
    radial-gradient(circle at 18% 92%, rgba(170, 206, 228, .50), transparent 38%),
    linear-gradient(135deg, #e7eff8 0%, #f4f7fb 48%, #e4edf7 100%) #e9f0f8 !important;
  background-attachment: fixed !important;
  height: auto;
}
body {
  margin: 0;
  height: auto;
  min-height: 100%;
  background: transparent !important;
  color: var(--g-text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Gemeindewappen im Hintergrund: rechts unten, angeschnitten, weich verschwommen und sehr zurückgenommen.
   Stärke: opacity · Unschärfe: blur · Farbe: saturate (0 = grau, 1 = volle Farben) */
body::before {
  content: ''; position: fixed; z-index: -1; pointer-events: none;
  right: -9vh; bottom: -14vh; transform: rotate(-10deg);
  height: 72vh; aspect-ratio: 474 / 576;
  background: url('wappen.svg') center / contain no-repeat;
  opacity: .10; filter: blur(7px) saturate(.4);
  /* läuft von der Ecke rechts unten Richtung Seitenmitte auf 0 aus */
  -webkit-mask-image: radial-gradient(circle at 78% 88%, #000 0%, rgba(0,0,0,.55) 30%, transparent 62%);
          mask-image: radial-gradient(circle at 78% 88%, #000 0%, rgba(0,0,0,.55) 30%, transparent 62%);
}
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex: none; }

/* ── Layout ─────────────────────────────────────────────────────── */
.app  { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.main { padding: 28px clamp(16px, 2.4vw, 36px) 36px; width: 100%; max-width: 1600px; min-width: 0; }

/* ── Seitenleiste ───────────────────────────────────────────────── */
.sb {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20;
  display: flex; flex-direction: column; gap: 2px;
  padding: 24px 14px 16px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  border-right: 1px solid var(--g-rand);
  box-shadow: 10px 0 34px -20px rgba(31, 58, 92, .3), inset -1px 0 0 var(--g-linie);
  scrollbar-width: thin;
}
.sb-brand {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; padding: 0 0 18px; margin-bottom: 10px;
  border-bottom: 1px solid var(--g-linie);
}
/* Ortstafel (wie die blau umrandete Ortstafel an der Ortseinfahrt) */
.ortstafel {
  display: block; width: 100%; max-width: 212px;
  padding: 4px; border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 22px -10px rgba(31, 58, 92, .45), 0 2px 4px rgba(31, 58, 92, .12);
  transform: rotate(-1.2deg);
  transition: transform .25s ease;
}
.sb-brand:hover .ortstafel { transform: rotate(0deg) translateY(-1px); }
.ortstafel-innen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 9px 8px 8px; border: 4px solid #1f4ea3; border-radius: 6px;
  font-family: 'DIN 1451', 'DIN Alternate', 'Bahnschrift', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  font-stretch: condensed; color: #111; line-height: 1;
}
.ortstafel-ort  { font-size: 1.55rem; font-weight: 600; letter-spacing: .005em; }
.ortstafel-zus  { font-size: .86rem; font-weight: 500; margin-top: 6px; letter-spacing: .03em; }
.sb-sec  {
  margin: 16px 0 4px; padding: 0 12px;
  font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--g-muted);
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 11px; text-decoration: none;
  color: var(--g-text2); font-size: .9rem; font-weight: 550;
  transition: background .15s, color .15s, box-shadow .15s;
}
.sb-link svg.lucide { width: 17px; height: 17px; color: var(--g-blau2); }
.sb-link:hover { background: rgba(255, 255, 255, .78); color: var(--g-blau-tief); }
.sb-link.active {
  color: var(--g-blau-tief);
  background: linear-gradient(135deg, rgba(67, 112, 148, .16), rgba(90, 139, 179, .07));
  box-shadow: inset 0 0 0 1px rgba(67, 112, 148, .18), 0 4px 12px -4px rgba(67, 112, 148, .28);
}
.sb-link.active svg.lucide { color: var(--g-blau); }
.sb-link svg.ext { width: 13px; height: 13px; margin-left: auto; opacity: .45; }
.sb-foot {
  margin-top: auto; padding: 14px 12px 0;
  border-top: 1px solid var(--g-linie);
  font-size: .8rem; color: var(--g-muted); font-variant-numeric: tabular-nums;
}
.sb-dsgvo { display: block; margin-top: 6px; font-size: .74rem; color: var(--g-muted); text-decoration: none; }
.sb-dsgvo:hover { color: var(--g-blau-tief); text-decoration: underline; }

/* ── Leiste unten + Mehr-Blatt (Handy) ──────────────────────────── */
.mbar {
  display: none; position: fixed; z-index: 1200;
  left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px;
  border-radius: 22px; background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
  border: 1px solid var(--g-rand); box-shadow: 0 10px 30px -8px rgba(31, 58, 92, .35);
}
.mbar a, .mbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
  padding: 7px 2px; border: 0; border-radius: 15px; background: none; cursor: pointer;
  font: inherit; font-size: .64rem; font-weight: 600; color: #4a6580; text-decoration: none;
}
.mbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbar svg.lucide { width: 21px; height: 21px; }
.mbar .active { color: var(--g-blau-tief); background: rgba(67, 112, 148, .13); }

.sheet-bd {
  position: fixed; inset: 0; z-index: 1250; opacity: 0; pointer-events: none; transition: opacity .2s;
  background: rgba(31, 58, 92, .25) !important; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.sheet-bd.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300; max-height: 80vh; overflow-y: auto;
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  border: 0; border-radius: 22px 22px 0 0; background: rgba(248, 251, 254, .97) !important;
  box-shadow: 0 -10px 40px rgba(31, 58, 92, .25);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.sheet:not(.open) { visibility: hidden; transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s; }
.sheet.open { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: rgba(67,112,148,.25); margin: 0 auto 8px; }
.sheet-t { margin: 12px 4px 4px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
.sheet a {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; border-radius: 12px; border: 0;
  background: none; text-decoration: none; font-weight: 600; color: var(--g-text2);
}
.sheet a.active { background: rgba(67, 112, 148, .12); color: var(--g-blau-tief); }
.sheet svg.lucide { color: var(--g-blau2); }
@media (min-width: 761px) { .sheet, .sheet-bd { display: none; } }

/* ═══ Responsive ══════════════════════════════════════════════════ */

/* Tablet: Seitenleiste als schmale Icon-Leiste */
@media (max-width: 1080px) and (min-width: 761px) {
  :root { --sb-w: 78px; }
  .sb { padding: 18px 10px; align-items: center; }
  .sb-brand { padding-bottom: 12px; }
  .ortstafel { padding: 2px; border-radius: 6px; transform: none; }
  .ortstafel-innen { padding: 6px 2px 5px; border-width: 2.5px; border-radius: 4px; }
  .ortstafel-ort { font-size: .62rem; }
  .ortstafel-zus { display: none; }
  .sb-sec, .sb-link span, .sb-link svg.ext, .sb-foot { display: none; }
  .sb-link { justify-content: center; padding: 11px; }
  .sb-nav + .sb-nav { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--g-linie); }
}

/* Handy */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sb { display: none; }
  .mbar { display: grid; }
  .main { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
  body { padding-bottom: 0; }
  body::before { right: -12vh; bottom: -8vh; height: 46vh; opacity: .08; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --g-bg: rgba(255, 255, 255, .93); }
  .sb { background: rgba(255, 255, 255, .95); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
}

@media print {
  html, body { background: #fff !important; }
  body::before, .sb, .mbar, .sheet, .sheet-bd { display: none !important; }
  .app { display: block; }
}
