/* =========================================================================
   FF Mauer-Oehling — Eigenes Designsystem
   Eigenständige professionelle Feuerwehr-Optik (kein Drittdesign übernommen)
   ========================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Public theme (override-bar via theme service) */
  --bg: #1f242b;
  --surface: #262c33;
  --surface-2: #2c333b;
  --surface-3: #333b44;
  --surface-soft: #3a4250;
  --line: #3d4651;
  --line-soft: #2f363f;

  --text: #d6dde6;
  --text-strong: #f3f6fa;
  --text-soft: #aab4c0;
  --muted: #8e98a6;

  --primary: #c8132c;
  --primary-dark: #9c0e22;
  --primary-soft: #e64157;
  --accent: #ff8a4c;
  --ok: #2f9c64;
  --warn: #d6912d;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .28);

  --container: 1320px;
  --container-wide: 1480px;
  --container-narrow: 1080px;

  --nav-height: 56px;
  --topbar-height: 60px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  background: #1f242b;
  min-height: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--bg, #1f242b);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 2px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
}

/* ---------- Layout helpers ---------- */
.container { width: min(var(--container), 92vw); margin-inline: auto; }
.container-wide-page { width: min(var(--container-wide), 94vw); margin-inline: auto; }
.container-narrow { width: min(var(--container-narrow), 92vw); margin-inline: auto; }
.section { padding: 32px 0; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  font-family: inherit;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--surface-3); color: var(--text-strong); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-soft); border-color: var(--surface-soft); }
.btn-ghost { background: transparent; color: var(--text-strong); border: 1px solid rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.inline-form { margin: 0; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
}
.pill-alarm { background: var(--accent); color: #1c1c1c; }
.pill-ok { background: var(--ok); }
.pill-muted { background: var(--surface-soft); color: var(--text); }

/* ---------- Cards ---------- */
.card,
.post-card,
.article-card,
.empty-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card, .article-card, .empty-card { padding: 20px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { margin: 0; font-size: 1.05rem; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list-plain a { color: var(--text); padding: 4px 0; display: inline-block; }
.list-plain a:hover { color: var(--text-strong); }

/* ---------- Alerts ---------- */
.alert {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}
.alert-error {
  background: rgba(172, 53, 53, .2);
  border-color: rgba(212, 72, 72, .45);
  color: #ffdcdc;
}
.alert-success {
  background: rgba(25, 138, 76, .22);
  border-color: rgba(33, 189, 103, .6);
  color: #dfffea;
}

/* ---------- Public Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, #1a1f25 0%, #20262d 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.topbar-inner {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.brand {
  color: var(--text-strong);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--primary);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  flex: 0 0 24px;
}
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Admin dropdown menu in public topbar */
.admin-menu { position: relative; }
.admin-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: none;
  box-shadow: var(--shadow-md);
  z-index: 90;
}
.admin-menu:hover .admin-menu-panel,
.admin-menu:focus-within .admin-menu-panel { display: grid; gap: 2px; }
.admin-menu-panel a {
  padding: 8px 10px;
  color: var(--text);
  border-radius: var(--radius);
  font-size: 13px;
}
.admin-menu-panel a:hover { background: var(--surface-3); color: var(--text-strong); }

/* ---------- Main Navigation (single row, no mega-dropdown) ---------- */
.mega-nav-wrap {
  background: linear-gradient(180deg, #181d23 0%, #14181d 100%);
  border-top: 1px solid rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(0, 0, 0, .35);
}
.mega-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  overflow: visible;
  min-height: var(--nav-height);
}
.mega-item { position: relative; display: flex; align-items: stretch; }
.mega-link {
  display: inline-flex;
  align-items: center;
  padding: 0 20px;
  color: #f3f6fa;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.mega-link:hover,
.mega-link.active,
.mega-item:hover > .mega-link { background: rgba(255, 255, 255, .1); color: #fff; }
.mega-link.active { border-bottom-color: var(--primary); color: #fff; background: rgba(200, 19, 44, .12); }
.mega-link-group::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: .7;
}

/* Simple single-column dropdowns */
.mega-panel {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 240px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: none;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 6px;
  box-shadow: var(--shadow-md);
  z-index: 70;
}
.mega-item:hover > .mega-panel,
.mega-item:focus-within > .mega-panel { display: grid; }
.mega-column { border-right: 0; padding: 0; }
.mega-head {
  display: block;
  padding: 10px 14px;
  color: #e8edf3;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
}
.mega-head:hover { background: var(--surface-3); color: #fff; }

/* ---------- Hero (Home) ---------- */
.public-home .hero {
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 18, 22, .55), rgba(15, 18, 22, .85)),
    radial-gradient(ellipse at 30% 20%, rgba(200, 19, 44, .25) 0%, rgba(40, 46, 54, 0) 60%),
    linear-gradient(135deg, #2a3038 0%, #1c2128 100%);
  position: relative;
}
.public-home .hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--primary);
}
.hero-title {
  margin: 14px 0 12px;
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  max-width: 920px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-copy { color: var(--text-soft); max-width: 720px; font-size: 1.05rem; line-height: 1.6; }
.hero-badge {
  display: inline-flex;
  padding: 5px 12px;
  color: var(--text-strong);
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Home grid ---------- */
.home-main-section { padding-top: 32px; padding-bottom: 24px; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.home-main-content, .home-sidebar { display: grid; gap: 16px; min-width: 0; }
.home-section-head h2 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  position: relative;
  padding-left: 12px;
}
.home-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 4px;
  height: .85em;
  background: var(--primary);
  border-radius: 2px;
}
.home-section-head p { margin: 0 0 16px; color: var(--text-soft); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; gap: 14px; }
.home-post-grid { grid-template-columns: 1fr; }
.post-card { padding: 20px; transition: border-color .15s, background .15s; }
.post-card:hover { border-color: var(--surface-soft); }
.post-card-featured {
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.post-card h3 {
  margin: 10px 0 8px;
  color: var(--text-strong);
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
  line-height: 1.25;
}
.post-card p { color: var(--text-soft); margin: 0 0 12px; line-height: 1.55; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.post-meta .location { color: var(--text-soft); }
.post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  font-weight: 700;
}
.post-link::after { content: "→"; transition: transform .15s; }
.post-link:hover { color: var(--accent); }
.post-link:hover::after { transform: translateX(3px); }
.text-link {
  color: var(--primary-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.text-link:hover { color: var(--accent); }
.empty-card {
  padding: 24px;
  text-align: center;
  border-style: dashed;
  border-color: var(--surface-soft);
}
.empty-card h3 { color: var(--text-strong); margin-top: 0; }

/* ---------- Sidebar widgets ---------- */
.sidebar-stack { display: grid; gap: 14px; }
.appointments-list { gap: 10px; }
.appointment-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.appointment-item:last-child { border-bottom: 0; }
.appointment-date {
  border: 1px solid var(--line);
  background: var(--surface-3);
  text-align: center;
  padding: 6px 4px;
  border-radius: var(--radius);
}
.appointment-date strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
}
.appointment-date span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}
.appointment-content p { margin: 0; color: var(--text); font-weight: 600; font-size: 14px; }
.appointment-content small { color: var(--muted); font-size: 12px; }
.support-card { background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%); border-color: var(--primary-dark); color: #fff; }
.support-card h3 { color: #fff; }
.support-card p { color: rgba(255, 255, 255, .9); margin: 0 0 14px; }
.support-card .btn { background: #fff; color: var(--primary-dark); border-color: #fff; }
.support-card .btn:hover { background: rgba(255, 255, 255, .92); }

/* ---------- Donation band ---------- */
.donation-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.donation-band h2 { margin: 0 0 4px; font-size: 1.25rem; }
.donation-band p { margin: 0; color: var(--text-soft); }

/* ---------- Page Hero (subpages/posts) ---------- */
.page-hero-banner {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 18, 22, .55), rgba(15, 18, 22, .85)),
    linear-gradient(135deg, #262d35 0%, #1d2229 100%);
  position: relative;
}
.page-hero-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--primary);
}
.page-hero-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}
.page-hero-inner h1 {
  margin: 8px 0 0;
  color: var(--text-strong);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.01em;
}

/* ---------- Page layout (subpages) ---------- */
.public-page .page-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: var(--container-wide);
  margin-inline: auto;
}
.page-side-nav { position: sticky; top: calc(var(--topbar-height) + var(--nav-height) + 16px); }
.page-side-nav-card { background: var(--surface-2); border-color: var(--line); padding: 16px; }
.page-side-root { }
.page-side-root-summary {
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-strong);
  list-style: none;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  position: relative;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.page-side-root-summary::-webkit-details-marker { display: none; }
.page-side-root-summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s;
}
.page-side-root:not([open]) .page-side-root-summary::after { transform: rotate(-45deg); }
.page-side-nav-list { gap: 0; }
.page-side-nav-list a,
.page-side-summary {
  display: block;
  padding: 10px 12px;
  color: #e2e8ef;
  border-radius: var(--radius);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  font-weight: 500;
}
.page-side-nav-list a:hover,
.page-side-summary:hover { background: var(--surface-3); color: #fff; }
.page-side-nav-list a.active,
.page-side-summary.active {
  background: var(--surface-3);
  color: var(--text-strong);
  border-left-color: var(--primary);
  font-weight: 700;
}
.page-side-group { margin-top: 2px; }
.page-side-summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  font-weight: 600;
  padding-right: 28px;
}
.page-side-summary::-webkit-details-marker { display: none; }
.page-side-summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s;
}
.page-side-details[open] .page-side-summary::after { transform: rotate(-135deg); top: 17px; }
.page-side-sublist { gap: 0; margin: 2px 0 6px; padding-left: 0; }
.page-side-nav-list li.child a {
  padding-left: 28px;
  font-size: 13px;
  color: var(--text-soft);
}
.page-side-nav-list li.child a.active { color: var(--text-strong); }

/* ---------- Article body ---------- */
.public-article-card { padding: 28px 32px; }
.page-title {
  margin: 6px 0 14px;
  color: var(--text-strong);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.18;
}
.lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 8px 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 13px;
}
.back-link:hover { color: var(--text-strong); }
.article-body { color: var(--text); line-height: 1.7; font-size: 1rem; }
.article-body h2,
.article-body h3,
.article-body h4 { color: var(--text-strong); margin: 1.4em 0 .5em; }
.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.2rem; }
.article-body p { margin: 0 0 1em; }
.article-body a { color: var(--primary-soft); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1em; }
.article-body li { margin-bottom: .35em; }

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 20px 0 8px;
}
.post-gallery-item { margin: 0; }
.post-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.alert-preview {
  background: rgba(214, 145, 45, .15);
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ---------- Members directory ---------- */
.members-directory { margin-top: 24px; }
.members-directory h2 {
  color: var(--text-strong);
  margin: 0 0 16px;
  font-size: 1.4rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
.members-section-title {
  color: var(--accent);
  margin: 24px 0 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}
.members-groups { display: grid; gap: 18px; }
.members-group-title {
  color: var(--text-strong);
  margin: 8px 0 10px;
  font-size: 1.15rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.members-divider { border: 0; border-top: 1px solid var(--line); margin: 12px 0 4px; }
.member-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.member-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 4px;
}
.member-list-item strong { color: var(--text-strong); font-size: 14.5px; }
.member-function { color: var(--text-soft); font-size: 13px; }
.member-rank { color: var(--text); font-weight: 600; font-size: 13px; }
.rank-inline { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }

.member-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.member-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.member-card:hover {
  transform: translateY(-2px);
  border-color: var(--surface-soft);
  box-shadow: var(--shadow-md);
}
.member-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-3);
  display: block;
}
.member-card-photo.placeholder {
  background:
    radial-gradient(circle at 50% 36%, var(--surface-soft) 0 22%, transparent 23%),
    radial-gradient(ellipse 55% 32% at 50% 86%, var(--surface-soft) 0 70%, transparent 71%),
    linear-gradient(180deg, var(--surface-3) 0%, var(--surface-2) 100%);
  background-repeat: no-repeat;
}
.member-card-body {
  padding: 12px 14px 14px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.member-name {
  display: block;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 700;
}
.member-card .member-function { font-size: 13px; color: var(--text-soft); }
.member-rank-line {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.member-card .member-rank { font-size: 12.5px; color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 36px;
  border-top: 3px solid var(--primary);
  background: linear-gradient(180deg, #181d23 0%, #14181d 100%);
  color: var(--text-soft);
  padding: 40px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(4, minmax(150px, 1fr));
  gap: 28px;
  align-items: start;
}
.footer h3, .footer h4 {
  color: var(--text-strong);
  margin: 0 0 12px;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer p { margin: 0 0 6px; line-height: 1.55; font-size: 14px; }
.footer-brand h3 {
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-strong);
}
.footer-brand p { color: var(--text-soft); }
.footer .list-plain { gap: 4px; }
.footer .list-plain a { font-size: 14px; color: var(--text-soft); }
.footer .list-plain a:hover { color: var(--text-strong); }

/* ---------- Admin Surface (dark, matching public design) ---------- */
.admin-surface {
  --admin-bg: var(--bg);
  --admin-bg-alt: #1a1f25;
  --admin-text: var(--text);
  --admin-text-strong: var(--text-strong);
  --admin-text-soft: var(--text-soft);
  --admin-line: var(--line);
  --admin-card: var(--surface);
  --admin-card-alt: var(--surface-2);
  --admin-input-bg: var(--surface-3);
  --admin-input-border: var(--line);
  background: var(--admin-bg);
  color: var(--admin-text);
}
.admin-surface a { color: var(--text); }
.admin-surface a:hover { color: var(--text-strong); }
.admin-surface .muted { color: var(--admin-text-soft); }
.admin-surface .btn-ghost {
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--admin-text-strong);
  background: transparent;
}
.admin-surface .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }
.admin-surface .btn-danger {
  border: 1px solid rgba(199, 74, 74, .85);
  background: rgba(199, 74, 74, .2);
  color: #ffe2e2;
}
.admin-surface .btn-danger:hover {
  background: rgba(199, 74, 74, .32);
  border-color: rgba(220, 89, 89, .95);
}
.admin-surface .btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; background: var(--admin-bg); }
.admin-sidebar {
  background: linear-gradient(180deg, #181d23 0%, #14181d 100%);
  color: #d5dfed;
  padding: 18px 16px;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 18px;
}
.admin-brand::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--primary);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  flex: 0 0 22px;
}
.admin-nav { display: grid; gap: 2px; }
.admin-nav a {
  color: #d5dfed;
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav a.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-left-color: var(--primary);
}
.admin-shell-main { min-width: 0; background: var(--admin-bg); }
.admin-topbar {
  background: var(--admin-bg-alt);
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--admin-text-strong);
}
.admin-topbar strong { color: var(--admin-text-strong); }
.admin-topbar-left { display: flex; align-items: baseline; gap: 12px; }
.admin-topbar-actions { display: flex; gap: 8px; align-items: center; }
.admin-content { padding: 0 20px 24px; color: var(--admin-text); }
.admin-surface .section { padding: 20px 0 24px; }
.admin-surface h1,
.admin-surface h2,
.admin-surface h3,
.admin-surface h4 { color: var(--admin-text-strong); }
.admin-surface .card,
.admin-surface .article-card,
.admin-surface .stat-card,
.admin-surface .empty-card {
  background: var(--admin-card);
  border-color: var(--admin-line);
  color: var(--admin-text);
}
.admin-surface .card-head { border-bottom-color: var(--admin-line); }

.admin-surface table {
  width: 100%;
  border-collapse: collapse;
  background: var(--admin-card-alt);
  color: var(--admin-text);
  border: 1px solid var(--admin-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-surface th, .admin-surface td {
  text-align: left;
  border-bottom: 1px solid var(--admin-line);
  padding: 10px 12px;
  color: var(--admin-text);
}
.admin-surface tr:last-child td { border-bottom: 0; }
.admin-surface th {
  color: var(--admin-text-soft);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(255, 255, 255, .03);
  font-weight: 700;
}
.admin-surface tbody tr:hover { background: rgba(255, 255, 255, .03); }

.admin-surface label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-strong);
}
.admin-surface input,
.admin-surface select,
.admin-surface textarea {
  width: 100%;
  border: 1px solid var(--admin-input-border);
  border-radius: var(--radius);
  padding: 9px 11px;
  font: inherit;
  background: var(--admin-input-bg);
  color: var(--admin-text-strong);
  transition: border-color .15s, background .15s;
}
.admin-surface input:focus,
.admin-surface select:focus,
.admin-surface textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-soft);
}
.admin-surface input[type="checkbox"],
.admin-surface input[type="radio"] {
  width: auto;
  accent-color: var(--primary);
}
.admin-surface select option { background: var(--surface-2); color: var(--text-strong); }
.admin-surface textarea { min-height: 80px; resize: vertical; }
.admin-surface ::placeholder { color: var(--muted); opacity: .8; }

.admin-surface .settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.admin-surface .form-grid { display: grid; gap: 14px; }
.admin-surface .form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-surface .section-tight { padding-top: 10px; }
.admin-surface .section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-surface .admin-filter-card { padding: 14px; }
.admin-surface .admin-filter-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.admin-surface .admin-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-surface .small { font-size: 12px; }

.admin-surface .admin-settings-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--admin-line);
  border-radius: var(--radius-lg);
  background: var(--admin-card-alt);
}
.admin-surface .admin-settings-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--admin-text-soft);
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.admin-surface .admin-settings-nav a:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--admin-text-strong);
}
.admin-surface .admin-settings-nav a.active {
  color: var(--admin-text-strong);
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .1);
}

.admin-surface .status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  border: 1px solid transparent;
}
.admin-surface .status-pill-ok {
  background: rgba(25, 138, 76, .18);
  color: #d7ffe6;
  border-color: rgba(33, 189, 103, .45);
}
.admin-surface .status-pill-neutral {
  background: rgba(202, 167, 95, .14);
  color: #f3dfbd;
  border-color: rgba(202, 167, 95, .4);
}

.admin-surface .table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-surface .table-actions form { margin: 0; }
.admin-surface .admin-actions-row { margin-bottom: 12px; }
.admin-surface .admin-block-gap-top { margin-top: 12px; }

.admin-surface .media-filter-form {
  margin-bottom: 12px;
}
.admin-surface .media-thumb {
  width: 84px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--admin-line);
  display: block;
}

.admin-surface .members-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.admin-surface .members-quick-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--admin-line);
  background: var(--admin-card-alt);
  color: var(--admin-text-soft);
  font-size: 12px;
  font-weight: 700;
}
.admin-surface .members-quick-nav a:hover {
  color: var(--admin-text-strong);
  border-color: rgba(255, 255, 255, .28);
}

.admin-surface .members-overview-stats { margin-bottom: 14px; }

.admin-surface .members-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.admin-surface .members-directory-card,
.admin-surface .members-groups-card,
.admin-surface #section-cms-users,
.admin-surface #section-display {
  margin-bottom: 14px;
}

.admin-surface .members-search {
  min-width: 260px;
  max-width: 320px;
}
.admin-surface .members-search input {
  margin-top: 4px;
}

.admin-surface .member-photo-mini {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--admin-line);
  object-fit: cover;
  margin-bottom: 6px;
}

.admin-surface .members-directory-card td input[type="file"] {
  min-width: 180px;
}

.admin-surface hr { border: 0; border-top: 1px solid var(--admin-line); margin: 16px 0; }
.admin-surface code,
.admin-surface pre {
  background: var(--surface-3);
  color: var(--text-strong);
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: .9em;
  border: 1px solid var(--line-soft);
}
.admin-surface pre { padding: 12px; overflow-x: auto; }

/* Login uses admin-surface; ensure it stays readable */
.admin-surface .login-card { max-width: 420px; margin: 60px auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: 1fr;
  }
  .home-sidebar { order: 2; }
  .public-page .page-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 900px) {
  .public-page .page-layout {
    grid-template-columns: 1fr;
  }
  .page-side-nav { position: static; }
  .admin-surface .members-workspace-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  :root { --topbar-height: 54px; --nav-height: 48px; }
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 6px 0; }
  .top-actions { gap: 6px; }
  .top-actions .btn { padding: 7px 12px; font-size: 12px; }
  .mega-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
  .mega-link { padding: 0 12px; font-size: 13px; }
  .mega-panel { position: static; min-width: 0; }
  .mega-item:hover > .mega-panel { display: none; }
  .public-home .hero { padding: 48px 0 56px; }
  .hero-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .public-article-card { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .donation-band { flex-direction: column; align-items: flex-start; }
  .admin-shell { grid-template-columns: 1fr; }
  .member-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .member-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Ultra-wide: Container skalieren mit dem Viewport */
@media (min-width: 1600px) {
  :root { --container: 1480px; --container-wide: 1640px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
  .public-page .page-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; }
}
@media (min-width: 1900px) {
  :root { --container: 1640px; --container-wide: 1820px; }
  body { font-size: 16.5px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .hero-title { font-size: clamp(2.4rem, 3vw, 3.6rem); }
  .public-home .hero { padding: 96px 0 100px; }
}
@media (min-width: 2200px) {
  :root { --container: 1880px; --container-wide: 2080px; }
  body { font-size: 17px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; }
  .public-page .page-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 40px; }
  .public-home .hero { padding: 110px 0 120px; }
  .hero-title { font-size: clamp(2.6rem, 3vw, 4rem); }
  .member-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
}
@media (min-width: 2600px) {
  :root { --container: 2160px; --container-wide: 2360px; }
  body { font-size: 18px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 460px; gap: 48px; }
  .public-page .page-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 48px; }
  .public-home .hero { padding: 130px 0 140px; }
  .hero-title { font-size: clamp(2.8rem, 3vw, 4.4rem); }
  .member-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (min-width: 3000px) {
  :root { --container: 2480px; --container-wide: 2680px; }
  body { font-size: 19px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 520px; }
  .member-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
