/* =========================================================
   AC Muräne 1991 e.V. – Stylesheet
   Farben aus dem Vereinslogo: Blau (#1b1a5e) & Gold (#f2b233)
   ========================================================= */

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans.woff2") format("woff2-variations"), url("../fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2-variations"), url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #1b1a5e;
  --navy-700: #15144a;
  --navy-100: #e8e8f4;
  --gold: #f2b233;
  --gold-600: #d9971a;
  --gold-50: #fdf5e2;
  --lake: #2e5a4c;
  --lake-50: #eef2ee;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --ink: #1c1f26;
  --muted: #5b6270;
  --line: #e2dfd5;
  --danger: #b3261e;
  --ok: #2e6b3f;
  --warn: #8a5a00;

  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 22, 40, .06), 0 8px 24px rgba(20, 22, 40, .08);
  --shadow-lg: 0 18px 50px rgba(20, 22, 40, .18);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy-700); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--navy-700); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.icon-sm { width: 1.05em; height: 1.05em; }
.icon-xl { width: 3rem; height: 3rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-accent { background: var(--gold); color: var(--navy-700); }
.btn-accent:hover { background: #ffc34d; color: var(--navy-700); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost-dark { background: var(--navy-100); color: var(--navy); }
.btn-ghost-dark:hover { background: #d9d9ee; color: var(--navy-700); }
.btn-sm { padding: .45em .9em; font-size: .9rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .15s; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.18); }
.brand-logo--fallback { display: grid; place-items: center; background: var(--navy); color: var(--gold); font: 800 1.1rem var(--font-display); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 800 1.25rem/1.1 var(--font-display); letter-spacing: -.02em; color: var(--navy-700); }
.brand-sub { font-size: .82rem; color: var(--muted); letter-spacing: .02em; margin-top: 3px; }

.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: flex; align-items: center; gap: .35em; padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; }
.main-nav > ul > li > a:hover, .main-nav > ul > li > a[aria-current="page"] { background: var(--navy-100); color: var(--navy); }
.main-nav .btn-nav { background: var(--navy); color: #fff; margin-left: 8px; }
.main-nav .btn-nav:hover, .main-nav .btn-nav[aria-current="page"] { background: var(--navy-700) !important; color: #fff !important; }
.has-sub { position: relative; }
.sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s;
}
.sub::before { content: ""; position: absolute; inset: -10px 0 auto 0; height: 10px; }
.sub-right { left: auto; right: 0; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a, .sub .linklike { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.sub a:hover, .sub .linklike:hover { background: var(--navy-100); color: var(--navy); }
.sub-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .site-header { backdrop-filter: none; background: #fff; }
  .nav-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer;
  }
  .nav-toggle .nav-toggle-close, .nav-open .nav-toggle .nav-toggle-open { display: none; }
  .nav-open .nav-toggle .nav-toggle-close { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto;
    padding: 16px var(--gutter) 40px; display: none;
  }
  .nav-open .main-nav { display: block; }
  .nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 14px 12px; font-size: 1.08rem; border-radius: 10px; }
  .main-nav .btn-nav { margin: 10px 0 0; justify-content: center; }
  .main-nav .has-sub > a .icon { display: none; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; background: none; }
  .sub::before { display: none; }
  .brand-sub { display: none; }
}

/* ---------- Seitenkopf ---------- */
.page-head {
  position: relative; color: #fff; padding: clamp(40px, 7vw, 76px) 0 clamp(32px, 5vw, 52px);
  background:
    linear-gradient(100deg, rgba(21,20,74,.92) 0%, rgba(21,20,74,.75) 45%, rgba(21,20,74,.35) 100%),
    var(--head-img, url("../img/header-banner.jpg")) left center / cover no-repeat, var(--navy);
}
.page-head h1 { color: #fff; margin: 0; }
.page-head--members { background: linear-gradient(120deg, var(--navy-700), var(--navy) 60%, #2c2a86); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; margin-bottom: 12px; color: rgba(255,255,255,.75); }
.crumbs a { color: rgba(255,255,255,.9); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--gold); }

/* ---------- Startseite ---------- */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--lake); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,14,52,.72) 0%, rgba(12,14,52,.35) 55%, rgba(12,14,52,.05) 100%), linear-gradient(180deg, rgba(10,12,40,.15) 0%, rgba(10,12,40,.2) 45%, rgba(12,14,52,.85) 100%); }
.hero-inner { position: relative; z-index: 1; padding-top: 120px; padding-bottom: clamp(48px, 8vw, 88px); }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.6vw, 4rem); letter-spacing: -.035em; font-weight: 800; max-width: 16ch; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero-lead { font-size: clamp(1.08rem, 1.8vw, 1.3rem); max-width: 46ch; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--gold); margin-bottom: 14px; }
.eyebrow--dark { color: var(--lake); }

.facts { background: var(--navy); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 20px; border-left: 1px solid rgba(255,255,255,.12); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font: 800 clamp(1.4rem, 2.6vw, 1.9rem)/1.1 var(--font-display); color: var(--gold); }
.fact span { font-size: .95rem; color: rgba(255,255,255,.8); }
@media (max-width: 760px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact { border-left: 0; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12); }
  .fact:nth-child(-n+2) { border-top: 0; }
  .fact:nth-child(even) { padding-left: 16px; }
}

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--tint { background: var(--lake-50); }
.section--members { padding-top: clamp(28px, 5vw, 48px); }
.section-head { margin-bottom: 32px; max-width: 60ch; }
.section-head p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--top { align-items: start; }
.split-text p { color: #3a404c; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.stack { position: relative; padding: 0 0 18% 12%; }
.stack img, .stack .img-missing { border-radius: var(--radius); box-shadow: var(--shadow-lg); object-fit: cover; }
.stack-a { width: 88%; aspect-ratio: 4 / 3; margin-left: auto; }
.stack-b { position: absolute; left: 0; bottom: 0; width: 55%; aspect-ratio: 3 / 2; border: 6px solid var(--paper); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.tile-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 22px; }
.tile-kicker { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lake); }
.tile strong { font: 800 1.12rem/1.3 var(--font-display); letter-spacing: -.01em; color: var(--navy-700); }
.tile-body > span:last-child { color: var(--muted); font-size: .95rem; }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--gold-50), #fff 70%); border: 1px solid #f0e2bd;
  border-radius: 20px; padding: clamp(28px, 5vw, 48px);
}
.cta h2 { margin-bottom: .3em; }
.cta p { margin: 0; max-width: 56ch; color: #4a4f5a; }

.partners { padding: 48px 0 56px; }
.partner-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 40px; margin-top: 20px; }
.partner { background: #fff; padding: 12px; border-radius: 12px; box-shadow: var(--shadow); }
.partner-img { height: 90px; width: auto; max-width: min(360px, 80vw); object-fit: contain; }

/* ---------- Inhalte ---------- */
.prose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .prose-layout { grid-template-columns: 1fr; } }
.prose { max-width: 70ch; }
.prose p { color: #353a45; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--navy-700) !important; font-weight: 600; letter-spacing: -.01em; }
.figure { margin: 2em 0; }
.figure img, .figure .img-missing { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.figure--flush { margin: 0; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
@media (max-width: 900px) { .aside { position: static; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card--accent { background: var(--navy); border-color: var(--navy); color: #fff; }
.card--accent .card-title { color: #fff; }
.card--accent .btn-primary { background: var(--gold); color: var(--navy-700); margin-bottom: 14px; }
.card--accent .link-arrow { color: var(--gold); }
.card-title { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-50); }

.intro { max-width: 70ch; color: var(--muted); margin-bottom: 36px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.person { background: #fff; border-radius: var(--radius); padding: 28px 20px 22px; text-align: center; box-shadow: var(--shadow); }
.person-img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold); }
.person .img-missing { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 16px; }
.person h2 { font-size: 1.15rem; margin: 0 0 4px; }
.person p { margin: 0; color: var(--lake); font-weight: 600; font-size: .95rem; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 0; }
.specs div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.specs dt { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.specs dd { margin: 2px 0 0; font: 800 1.25rem/1.2 var(--font-display); color: var(--navy-700); }

.fish-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.fish { background: #fff; border-radius: var(--radius); padding: 16px 16px 18px; text-align: center; border: 1px solid var(--line); }
.fish-img { display: grid; place-items: center; aspect-ratio: 3 / 2; margin-bottom: 12px; overflow: hidden; background: #000; border-radius: 10px; }
.fish-img img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.fish-img .img-missing { width: 100%; height: 100%; }
.fish h3 { font-size: 1.1rem; margin: 0; }
.fish p { margin: 0; font-style: italic; color: var(--muted); font-size: .92rem; }

/* ---------- Galerien ---------- */
.posts { display: grid; gap: clamp(40px, 6vw, 72px); }
.post { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .post { grid-template-columns: 1fr; gap: 16px; } }
.post-head { min-width: 0; }
.post-head h2, .post-text { overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
/* Beitrag ohne Bilder: Text nutzt die volle Breite bis zur rechten Bildkante */
.post--text { grid-template-columns: minmax(0, 1fr); }
.post--text .post-head, .post--text .post-text { max-width: none; }
.post-date { font-size: .85rem; font-weight: 700; color: var(--lake); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.post-head p:last-child { color: var(--muted); }

.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.gallery--1 { grid-template-columns: 1fr; }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--4 { grid-template-columns: repeat(2, 1fr); }
.gallery--grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery--single { grid-template-columns: minmax(0, 720px); }
.gallery-item { display: block; overflow: hidden; border-radius: 10px; background: #dfe3dc; aspect-ratio: 4 / 3; }
.gallery--1 .gallery-item, .gallery--single .gallery-item { aspect-ratio: auto; }
.gallery-item img, .gallery-item .img-missing { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.04); }
@media (max-width: 480px) { .gallery--3, .gallery--grid { grid-template-columns: repeat(2, 1fr); } }

.album-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.album-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.album-nav a span { background: var(--navy-100); color: var(--navy); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.album-nav a:hover { border-color: var(--navy); }
.album + .album { margin-top: clamp(40px, 6vw, 64px); }
.album-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 16px; }
.album-head h2 { margin: 0; }
.album-note { margin: 0; font-style: italic; color: var(--lake); font-weight: 600; }

.img-missing { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #e6e9e3, #e6e9e3 10px, #eef0eb 10px, #eef0eb 20px); color: #9aa39a; min-height: 120px; }
.img-missing .icon { width: 36px; height: 36px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-700); color: rgba(255,255,255,.78); padding-top: 56px; font-size: .97rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer h2 { font: 700 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 12px; font: 800 1.3rem var(--font-display); color: #fff; }
.footer-brand img { border-radius: 50%; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-list li { display: flex; gap: 10px; align-items: flex-start; }
.footer-list .icon { margin-top: 4px; color: var(--gold); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; padding-bottom: 28px; font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-bottom a { color: rgba(255,255,255,.85); }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #cfccc1; border-radius: 10px; padding: 10px 12px;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
input[type="file"] { padding: 8px; background: var(--paper); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,26,94,.15); }
textarea { resize: vertical; }

.auth { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 5vw, 40px); box-shadow: var(--shadow); }
.auth-card h2 { display: flex; align-items: center; gap: 10px; }
.auth-card h3 { font-size: 1.1rem; margin-top: 24px; }

.flashes { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid; margin: 0 0 12px; font-weight: 600; }
.flash--ok { background: #eaf4ec; border-color: #bcdcc4; color: var(--ok); }
.flash--error { background: #fbeceb; border-color: #efc2bf; color: var(--danger); }
.flash--warn { background: var(--gold-50); border-color: #f0dca8; color: var(--warn); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { margin-top: 16px; }

/* ---------- Mitgliederbereich ---------- */
.members-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }
.members-intro h2 { margin-bottom: 4px; }
.members-intro p { margin: 0; }
.members-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cat-card { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; height: 100%; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat-card:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.cat-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: var(--gold); display: grid; place-items: center; }
.cat-icon .icon { width: 26px; height: 26px; }
.cat-text { display: grid; gap: 2px; }
.cat-text strong { font: 800 1.1rem/1.3 var(--font-display); letter-spacing: -.01em; color: var(--navy-700); }
.cat-text span { color: var(--muted); font-size: .93rem; }
.cat-count { grid-column: 2; font-size: .8rem; font-weight: 700; color: var(--lake); text-transform: uppercase; letter-spacing: .06em; }

.members-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .members-layout { grid-template-columns: 1fr; } }
.members-nav { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.members-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .96rem; }
.members-nav a:hover { background: var(--navy-100); }
.members-nav a[aria-current="page"] { background: var(--navy); color: #fff; }
.members-nav a[aria-current="page"] .icon { color: var(--gold); }
@media (max-width: 860px) {
  .members-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; }
  .members-nav a { white-space: nowrap; }
}

.doc-section + .doc-section { margin-top: 32px; }
.doc-section h2 { font-size: 1.35rem; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.doc-icon { position: relative; flex: none; width: 44px; height: 52px; display: grid; place-items: center; color: var(--danger); }
.doc-icon .icon { width: 44px; height: 52px; stroke-width: 1.4; }
.doc-icon em { position: absolute; bottom: 9px; font: 700 .58rem/1 var(--font-body); font-style: normal; background: var(--danger); color: #fff; padding: 2px 4px; border-radius: 3px; letter-spacing: .04em; }
.doc-icon--sm, .doc-icon--sm .icon { width: 30px; height: 36px; }
.doc-meta { flex: 1; min-width: 0; display: grid; }
.doc-meta strong { font-size: 1.05rem; }
.doc-meta span { font-size: .88rem; color: var(--muted); }
.doc-actions { display: flex; gap: 8px; flex: none; }
.doc--missing { background: transparent; border-style: dashed; }
.doc--missing .doc-icon { color: #b9b6ac; }
.doc--missing .doc-icon em { background: #b9b6ac; }
@media (max-width: 560px) {
  .doc { flex-wrap: wrap; }
  .doc-actions { width: 100%; }
  .doc-actions .btn { flex: 1; }
  .hide-sm { display: none; }
}
.info-box { margin-top: 36px; background: var(--gold-50); border: 1px solid #f0e2bd; border-radius: var(--radius); padding: 24px; }
.info-box h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.info-box p { margin: 0; }
.info-img { margin-top: 18px; border-radius: 10px; max-height: 440px; width: auto; }
.admin-hint { margin-top: 32px; font-size: .92rem; display: flex; align-items: center; gap: 6px; color: var(--muted); }

/* ---------- Verwaltung ---------- */
.admin-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.tabs a[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.admin-head h2 { margin: 0; }
.admin-side { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 20px); }
@media (max-width: 960px) { .admin-side { position: static; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fbfaf6; border-bottom: 1px solid var(--line); }
.pad { padding: 14px 16px; margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input:not([type="hidden"]), .inline-form select { width: auto; flex: 1; min-width: 160px; }
.grow { flex: 1; }
.input-title { font-weight: 700; border-color: transparent; background: transparent; }
.input-title:hover { border-color: var(--line); background: #fff; }
.admin-docs { list-style: none; margin: 0; padding: 0; }
.admin-doc { border-bottom: 1px solid var(--line); }
.admin-doc:last-child { border-bottom: 0; }
.admin-doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.admin-doc-info { flex: 1; min-width: 0; display: grid; }
.admin-doc-info .small { overflow-wrap: anywhere; }
.admin-doc-actions { display: flex; gap: 4px; }
.admin-doc-actions form { margin: 0; }
.is-missing .doc-icon { color: #b9b6ac; }
.warn-text { color: var(--warn); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--navy-100); }
.icon-btn[disabled] { opacity: .35; cursor: default; background: #fff; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: #fbeceb; }
.admin-doc-edit { padding: 0 14px 12px 56px; }
.admin-doc-edit summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--navy); display: inline-flex; gap: 6px; align-items: center; list-style: none; }
.admin-doc-edit summary::-webkit-details-marker { display: none; }
.edit-grid { display: grid; gap: 10px; margin-top: 10px; }
@media (max-width: 560px) { .admin-doc-edit { padding-left: 14px; } .admin-doc-row { flex-wrap: wrap; } .admin-doc-actions { width: 100%; justify-content: flex-end; } }
.add-section { margin-top: 8px; }
.info-thumb { max-height: 140px; width: auto; border-radius: 8px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #fbfaf6; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table select { width: auto; min-width: 0; padding: 6px 10px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: flex-start; }
.row-actions form { margin: 0; }
.pw-reset summary { list-style: none; }
.pw-reset summary::-webkit-details-marker { display: none; }
.pw-reset[open] { flex-basis: 100%; }
.pw-reset[open] .inline-form { margin-top: 8px; }
.badge { display: inline-block; background: var(--gold-50); color: var(--warn); border: 1px solid #f0dca8; border-radius: 999px; font-size: .75rem; padding: 0 8px; font-weight: 700; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table td { padding: 4px 0; border: 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .85rem; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .members-nav, .doc-actions { display: none; } body { background: #fff; } }

[hidden] { display: none !important; }
input, select, textarea { font-weight: 400; }

/* ---------- CMS-Inhalte ---------- */
.section--flush { padding-top: 0; }
.section--intro { padding-bottom: clamp(24px, 4vw, 40px); }
.prose--intro { max-width: 75ch; }
.prose img { border-radius: 10px; height: auto; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; box-shadow: var(--shadow); border-radius: var(--radius); }
.prose figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--gold); background: var(--gold-50); border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #fbfaf6; font-weight: 600; width: 38%; }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose h3 { margin-top: 1.4em; }
.prose > :last-child { margin-bottom: 0; }
.prose .align-left, .prose img[style*="float: left"] { float: left; margin: 0 1.2em 1em 0; }
.prose .align-right, .prose img[style*="float: right"] { float: right; margin: 0 0 1em 1.2em; }
.prose::after { content: ""; display: block; clear: both; }
.prose--card h3 { font-size: 1.2rem; margin-top: 1.2em; }
.prose--card h3:first-child { margin-top: 0; }
.prose--card ul { list-style: none; padding: 0; }
.prose--card li { position: relative; padding: 6px 0 6px 24px; border-bottom: 1px dashed var(--line); margin: 0; }
.prose--card li:last-child { border-bottom: 0; }
.prose--card li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-50); }
.post-text p { color: var(--muted); }
.edit-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--navy-700); padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-lg); }
.edit-fab:hover { background: #ffc34d; color: var(--navy-700); }

.prose--card table { margin: 0; border: 0; }
.prose--card th, .prose--card td { padding: 8px 0; background: none; }
.prose--card th { width: 45%; color: var(--muted); font-weight: 600; }

/* ---------- Galerie: Albumübersicht ---------- */
.gal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.gal-stats { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lake); }
.album-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.album-cards > li { display: flex; }
@media (max-width: 960px) { .album-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .album-cards { grid-template-columns: 1fr; gap: 18px; } }
.album-tile { display: flex; flex-direction: column; width: 100%; background: #fff; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.album-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.album-tile-media { position: relative; display: grid; grid-template-rows: 1fr auto; aspect-ratio: 4 / 3; background: #dfe3dc; overflow: hidden; }
.album-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.album-cards--2 .album-tile-media { aspect-ratio: 16 / 10; }
.album-cards--2 .album-tile-body strong { font-size: 1.3rem; }
@media (max-width: 600px) { .album-cards--2 { grid-template-columns: 1fr; } .album-cards--2 .album-tile-body strong { font-size: 1.15rem; } }
.album-tile-main { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); min-height: 0; }
.album-tile:hover .album-tile-main { transform: scale(1.05); }
.album-tile-strip { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.album-tile-strip img, .album-tile-strip .img-missing { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); min-height: 0; }
@media (max-width: 600px) { .album-tile-strip img { width: 44px; height: 44px; } }
.album-tile-body { display: grid; gap: 4px; padding: 18px 20px 20px; flex: 1; align-content: start; }
.album-tile-count { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lake); }
.album-tile-body strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; color: var(--navy-700); }
.album-tile-note { color: var(--muted); font-size: .95rem; font-style: italic; }
.album-tile-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; font-size: .92rem; color: var(--navy); }
.album-tile-cta .icon { transition: transform .2s; }
.album-tile:hover .album-tile-cta .icon { transform: translateX(4px); }

/* ---------- Galerie: Album ---------- */
.section--album { padding-top: 28px; }
.album-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.album-meta { margin: 0 auto 0 0; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.album-meta em { font-weight: 500; color: var(--lake); }
.flip { display: inline-flex; transform: rotate(180deg); }
.masonry { columns: 4 240px; column-gap: 14px; }
.masonry--few { columns: 2 320px; max-width: 980px; }
.masonry-item { position: relative; display: block; margin: 0 0 14px; break-inside: avoid; border-radius: 14px; overflow: hidden; background: #dfe3dc; }
.masonry-item img, .masonry-item .img-missing { width: 100%; height: auto; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
.masonry-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,12,40,.55)); opacity: 0; transition: opacity .3s; }
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item:hover::after, .masonry-item:focus-visible::after { opacity: 1; }
.masonry-zoom { position: absolute; top: 12px; right: 12px; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--navy); display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: .25s; }
.masonry-item:hover .masonry-zoom { opacity: 1; transform: none; }
.masonry-caption { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff; font-size: .9rem; font-weight: 600; opacity: 0; transition: opacity .3s; }
.masonry-item:hover .masonry-caption { opacity: 1; }
@media (max-width: 600px) { .masonry { columns: 2; column-gap: 8px; } .masonry-item { margin-bottom: 8px; border-radius: 10px; } .masonry--few { columns: 1; } }
.album-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.album-pager-link { display: flex; align-items: center; gap: 14px; padding: 12px; background: #fff; border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s; }
.album-pager-link:hover { transform: translateY(-2px); color: var(--ink); }
.album-pager-link--next { justify-content: flex-end; text-align: right; grid-column: 2; }
.album-pager-link img, .album-pager-link .img-missing { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; min-height: 0; }
.album-pager-link span { display: grid; min-width: 0; }
.album-pager-link small { color: var(--muted); font-size: .8rem; }
.album-pager-link strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .album-pager { grid-template-columns: 1fr; } .album-pager-link--next { grid-column: 1; } .album-pager-link img { width: 56px; height: 56px; } }

/* ---------- Beitragsbilder (Bento) ---------- */
.bento { display: grid; gap: 8px; border-radius: 16px; overflow: hidden; }
.bento-item { position: relative; display: block; overflow: hidden; background: #dfe3dc; }
.bento-item[hidden] { display: none; }
.bento-item img, .bento-item .img-missing { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); min-height: 0; }
.bento-item:hover img { transform: scale(1.04); }
.bento--1 .bento-item { aspect-ratio: 16 / 10; }
.bento--2 { grid-template-columns: 1fr 1fr; }
.bento--2 .bento-item { aspect-ratio: 4 / 5; }
.bento--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 10; }
.bento--3 .bento-item:first-child { grid-row: span 2; }
.bento--4, .bento--5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 9; }
.bento--4 .bento-item:first-child, .bento--5 .bento-item:first-child { grid-row: span 2; }
.bento--4 .bento-item:nth-child(4) { grid-column: span 2; }
.bento-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(12,14,52,.6); color: #fff; font-size: 1.6rem; font-weight: 800; }
@media (max-width: 600px) { .bento { gap: 4px; border-radius: 12px; } .bento--4, .bento--5 { aspect-ratio: 4 / 3; } }

/* ---------- Lightbox ---------- */
.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #07081a; color: #fff; animation: lb-in .2s ease; }
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 24px; }
.lb-counter { font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); font-size: .92rem; min-width: 56px; }
.lb-caption { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-btn, .lb-nav { display: grid; place-items: center; border: 0; background: rgba(255,255,255,.08); color: #fff; border-radius: 50%; cursor: pointer; transition: background .15s; text-decoration: none; }
.lb-btn { width: 44px; height: 44px; }
.lb-btn:hover, .lb-nav:hover { background: rgba(255,255,255,.2); color: #fff; }
.lb-stage { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; min-height: 0; }
.lb-figure { grid-column: 2; margin: 0; height: 100%; display: grid; place-items: center; min-height: 0; padding: 8px 0; }
.lb-figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: opacity .25s; }
.is-loading .lb-figure img { opacity: .35; }
.lb-nav { width: 56px; height: 56px; justify-self: center; }
.lb-prev .icon { transform: rotate(180deg); }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 24px 18px; scrollbar-width: thin; justify-content: safe center; }
.lb-thumb { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #222; opacity: .5; cursor: pointer; transition: .15s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { opacity: 1; border-color: var(--gold); }
.is-single .lb-nav, .is-single .lb-thumbs, .is-single .lb-counter { visibility: hidden; }
.is-single .lb-thumbs { display: none; }
@media (max-width: 700px) {
  .lb-top { padding: 8px 8px 8px 16px; gap: 8px; }
  .lb-stage { grid-template-columns: 1fr; }
  .lb-figure { grid-column: 1; padding: 0 4px; }
  .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; background: rgba(0,0,0,.45); }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-thumbs { padding: 10px 12px 14px; justify-content: flex-start; }
  .lb-thumb { width: 56px; height: 42px; }
}

/* ---------- Cookie-Einwilligung ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 250; display: flex; justify-content: center; pointer-events: none; }
.consent[hidden] { display: none; }
.consent-box { pointer-events: auto; width: 100%; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 22px 18px; animation: consent-in .25s ease; }
@keyframes consent-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.consent-box h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.consent-box p { font-size: .93rem; color: var(--muted); margin-bottom: 12px; }
.consent-details { margin-bottom: 14px; font-size: .93rem; }
.consent-details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.consent-details .check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.consent-details .check input { margin-top: 4px; flex: none; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .consent-actions { grid-template-columns: 1fr; } .consent { left: 8px; right: 8px; bottom: 8px; } }
.footer-link { color: #fff; font-size: inherit; text-align: left; }
.footer-link:hover { color: var(--gold); }

/* Mobile Feinschliff */
@media (max-width: 600px) {
  .edit-grid .inline-form > *, .add-section > * { flex: 1 1 100%; min-width: 0; }
  .edit-grid .inline-form input[type=file] { width: 100%; }
  .panel-head { flex-wrap: wrap; }
  .panel-head .inline-form { flex: 1 1 100%; }
  .panel-head .inline-form input { min-width: 0; }
  .consent-box { padding: 16px 16px 14px; border-radius: 14px; }
  .consent-box p { font-size: .86rem; margin-bottom: 8px; }
  .consent-box h2 { font-size: 1rem; }
  .consent-actions .btn { padding: .6em 1em; }
}

/* ---------- Ruhige Seitenwechsel ---------- */
html { scrollbar-gutter: stable; }                 /* kein Seitensprung, wenn die Scrollleiste erscheint/verschwindet */
@view-transition { navigation: auto; }             /* sanftes Überblenden auch bei normalen Seitenaufrufen */
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
#inhalt:focus { outline: none; }
.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gold); z-index: 400; opacity: 0; transition: width .6s ease, opacity .2s; pointer-events: none; }
.nav-progress.is-active { width: 70%; opacity: 1; transition: width 2.5s cubic-bezier(.1,.7,.2,1), opacity .1s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Dokumente: „Ansehen“ als Hauptaktion, Download als Symbol ---------- */
.doc-actions { align-items: center; }
.doc-dl { width: 38px; height: 38px; padding: 0; border-radius: 50%; flex: none; }
.doc-view { min-width: 124px; }
@media (max-width: 560px) {
  .doc-actions { display: flex; width: 100%; gap: 8px; }
  .doc-actions .doc-view { flex: 1; }
  .doc-actions .doc-dl { flex: none; width: 42px; height: 42px; }
}

/* ---------- Mitgliederbereich mobil: Übersicht + „Bereich wechseln“ statt Scroll-Leiste ---------- */
.members-switch { display: none; }
.flip { display: inline-flex; transform: rotate(180deg); }
@media (max-width: 860px) {
  .members-nav { display: none; }
  .members-switch { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 20px; position: relative; }
  .switch-menu { flex: 1; }
  .switch-menu summary { list-style: none; width: 100%; justify-content: space-between; cursor: pointer; }
  .switch-menu summary::-webkit-details-marker { display: none; }
  .switch-menu[open] .switch-chev { transform: rotate(180deg); }
  .switch-list { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
  .switch-list a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
  .switch-list a span:last-child { display: grid; line-height: 1.25; }
  .switch-list small { font-weight: 400; color: var(--muted); font-size: .8rem; }
  .switch-list a[aria-current="page"] { background: var(--navy-100); }
  .switch-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: var(--gold); display: grid; place-items: center; flex: none; }
}

/* ---------- Startseite: Kennzahlen mobil als ruhiges 2×2-Raster ---------- */
@media (max-width: 760px) {
  .facts-grid { grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.12); padding-inline: 0; }
  .fact, .fact:first-child, .fact:nth-child(even) { background: var(--navy); border: 0; padding: 18px 12px; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: 96px; }
  .fact strong { font-size: 1.35rem; margin-bottom: 4px; }
  .fact span { font-size: .8rem; line-height: 1.35; color: rgba(255,255,255,.75); }
}

/* ---------- Partner: einheitliche Kästen ---------- */
.partner-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); justify-content: center; gap: 20px; }
.partner { display: grid; place-items: center; height: 140px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.partner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.partner .partner-img, .partner .img-missing { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 560px) { .partner-row { grid-template-columns: minmax(0, 1fr); } .partner { height: 120px; } }

/* ---------- PDF-Ansicht im Overlay ---------- */
.pdfv-open { overflow: hidden; }
.pdfv { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 28px; background: rgba(8, 9, 28, .72); backdrop-filter: blur(3px); animation: pdfv-fade .2s ease; cursor: zoom-out; }
.pdfv[hidden] { display: none; }
@keyframes pdfv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pdfv-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.pdfv-panel { width: min(860px, 100%); height: min(100%, 1100px); display: grid; grid-template-rows: auto minmax(0, 1fr); background: #3a3c48; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); cursor: auto; animation: pdfv-in .22s ease; }
.pdfv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; background: var(--navy-700); color: #fff; }
.pdfv-title { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.pdfv-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
.pdfv-pageinfo { font-size: .8rem; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.pdfv-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.pdfv-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; text-decoration: none; }
.pdfv-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.pdfv-close { background: var(--gold); color: var(--navy-700); }
.pdfv-close:hover { background: #ffc34d; color: var(--navy-700); }
.pdfv-zoom { min-width: 58px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: rgba(255,255,255,.85); font: 600 .85rem var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums; }
.pdfv-zoom:hover { background: rgba(255,255,255,.1); }
.pdfv-scroll { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; position: relative; }
.pdfv-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 24px 40px; min-width: min-content; }
.pdfv-page { background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); border-radius: 2px; flex: none; position: relative; }
.pdfv-page:not(.is-ready)::after { content: ""; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border: 3px solid #d9d9e3; border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
.pdfv-page canvas { display: block; }
.pdfv-status { display: none; position: absolute; inset: 0; place-items: center; align-content: center; gap: 14px; color: rgba(255,255,255,.85); text-align: center; padding: 24px; }
.pdfv.is-loading .pdfv-status, .pdfv.is-error .pdfv-status { display: grid; }
.pdfv-spinner { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Handy: Vollbild für maximale Lesbarkeit */
@media (max-width: 640px) {
  .pdfv { padding: 0; backdrop-filter: none; background: #3a3c48; }
  .pdfv-panel { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .pdfv-bar { padding: max(10px, env(safe-area-inset-top)) 10px 10px 14px; gap: 8px; }
  .pdfv-pages { padding: 8px 8px 40px; gap: 8px; }
  .pdfv-zoom { display: none; }
  .pdfv-btn { width: 38px; height: 38px; }
}

/* Partner-Logos: absolut im Kasten positioniert (zuverlässig auch in Safari/iOS) */
.partner { position: relative; }
.partner .partner-img, .partner .img-missing { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); max-width: none; max-height: none; object-fit: contain; }
