:root{
  --hero-maxw: 1200px;
  /* sanfte Pastell-Töne grün→beige */
  --bg1:#f3f7f1;
  --bg2:#f2efe6;
  --text:#1f2722;
  --link:#485646;
  --muted:#4b5a50;
  --overlap-x: 20%;
  --overlap-y: 20%;
  --stage-maxw: 1200px;
  --sticky-h: 72px;
  --admin-top-gap: 24px;
  --gutter-m: clamp(16px, 4.5vw, 28px);
  --btndoc-radius: 10px;
  --btndoc-pad-x: 14px;
  --btndoc-pad-y: 10px;
  --btndoc-border: #cfd5ce;
  --btndoc-bg: #fbfbfb;
  --btndoc-bg-hover: #f2f4f1;
  --btndoc-text: #111;
}

/* =================================
 * GLOBALE & BASIS-DEFINITIONEN
 * ================================= */

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

html{
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  background-color: var(--bg1); /* Fallback */
}

body{
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: "Merienda", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: transparent;
}

/* Standardmargins für alle Kindelemente im Hero-Block killen */
.hero > *{ margin: 0; }

/* =================================
 * TYPOGRAFIE & SCHRIFTEN
 * ================================= */

/* Merienda – Variable Font */
@font-face{
  font-family: "Merienda";
  src: url("../fonts/merienda/Merienda-VariableFont_wght.woff2") format("woff2"),
       url("../fonts/merienda/Merienda-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  font-optical-sizing: auto;
}

/* (Optional für Alt-Browser ohne Variable-Fonts) */
@supports not (font-variation-settings: normal) {
  @font-face{
    font-family: "Merienda";
    src: url("../fonts/merienda/Merienda-Regular.woff2") format("woff2"),
         url("../fonts/merienda/Merienda-Regular.ttf") format("truetype");
    font-weight: 400; font-style: normal; font-display: swap;
  }
  @font-face{
    font-family: "Merienda";
    src: url("../fonts/merienda/Merienda-Bold.woff2") format("woff2"),
         url("../fonts/merienda/Merienda-Bold.ttf") format("truetype");
    font-weight: 700; font-style: normal; font-display: swap;
  }
}

/* FontAwesome */
@font-face {
  font-family: "FontAwesome";
  src: url("../fonts/fontawesome/fontawesome-webfont.eot");
  src: url("../fonts/fontawesome/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),
       url("../fonts/fontawesome/fontawesome-webfont.ttf") format("truetype"),
       url("../fonts/fontawesome/FontAwesome.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.fa { display: inline-block; font: normal normal normal 1rem/1 "FontAwesome"; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.fa-phone:before { content: "\f095"; }
.fa-envelope:before{ content: "\f0e0"; }

/* Links */
a { color: var(--link); }

/* Firmenname ID */
#firmenname{ font-weight: 700; font-size: clamp(2.2rem, 4vw + 1rem, 4rem); line-height: 1.1; }

/* Tagline */
.tagline{ margin-top: 1rem; font-size: clamp(1.1rem, 1rem + .8vw, 1.6rem); color: var(--muted); line-height: 1.3; }

/* Titel und Absätze */
h4{ line-height: 1.2; } /* ohne default-margin, da im .hero */

/* Intro & Textblöcke Typografie */
.intro p,
.bottom-texts .textblock p,
.top-texts .textblock p,
.intro-wide p{
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.55;
}
.textblock p { margin: .5rem 0 0; }
.intro-wide p + p { margin-top: 1.2em; line-height: 1.45; }
.textblock p + p  { margin-top: 0.9em; line-height: 1.45; }

/* Spezifische Typo für Doppel-Textbereiche */
.top-texts .textblock:nth-child(1) p,
.top-texts .textblock:nth-child(2) p,
.bottom-texts .textblock.accent-left p,
.bottom-texts .textblock:not(.accent-left) p {
  font-size: 0.94rem; line-height: 1.4; text-align: left;
}
.bottom-texts .textblock.accent-left p { text-align: left; }

/* Dorfladen Textausrichtung (linksbündig erzwingen) */
.intro-bottom-left,
.intro-bottom-right,
.intro-bottom-left *,
.intro-bottom-right *,
.intro-wide .text-center,
.intro-bottom-left .text-center,
.intro-bottom-right .text-center { text-align: left !important; }

/* Absatz-Ränder: keine Auto-Margins */
.intro-wide p, .intro-bottom-left p, .intro-bottom-right p { margin-left: 0; margin-right: 0; }

/* =================================
 * LAYOUT & STRUKTUR
 * ================================= */

/* Bühne/Container */
.hero{
  flex: 1 0 auto;
  display: grid;
  place-content: center;
  text-align: center;
  gap: .6rem;
  max-width: var(--hero-maxw);
  margin: 40px auto;
  padding: 0 16px;
}

/* Logo */
.logo, .admin-logo{
  width: min(40vw, 360px);
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.08));
}
.admin-logo{ width: min(40vw, 560px); }

/* Icon-Spalten (Titelgrafik) */
#titelname{ display: block; margin: 16px auto 0; width: min(75vw, 100%); height: auto; clear: both; }

/* Flyer ID */
#flyer{ display: block; margin: 16px auto 0; width: 400px; max-width: 90vw; height: auto; clear: both; }

/* Bild-Spalte mit Overlay */
#img-col-ol { display: block; margin: 16px 4px 0; width: 90%; border-radius: 8px; max-width: 90vw; height: auto; clear: both; }

/* Schaugruppe Layout */
.schaubox{ display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 32px; position: relative; }
.schaubild{ grid-column: 1 / 2; width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.schautext{
  grid-column: 2 / 3;
  position: relative;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(0.5px);
  padding: 20px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
  z-index: 2;
  width: min(680px, 100%);
}
.schautext-ru{ margin-left: calc(-1 * var(--overlap-x)); margin-top: calc(-1 * var(--overlap-y)); justify-self: start; }
.schautext-lu{ grid-column: 1 / 2; margin-right: calc(-1 * var(--overlap-x)); margin-top: calc(-1 * var(--overlap-y)); justify-self: end; }
.schautext p{ margin: 0; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); }

/* Zwei-Spalten-Raster */
.grid-two{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  margin: 24px 0;
}

/* Funding-Widget */
.funding-lead { margin-bottom: 1.25rem; }
.funding-lead__title { font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.25; margin: 0 0 0.5rem 0; }
.funding-lead__text p { margin: 0 0 0.75rem 0; }
.funding-lead__cta .btn { display: inline-block; }

/* Optional: Spalten vertikal ausrichten */
.grid-two.bottom-texts .textblock { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.grid-two.bottom-texts { align-items: flex-start; gap: 2rem; }

/* =================================
 * KOMPONENTEN
 * ================================= */

/* Akzentlinie links */
.accent-left{ border-left: 6px solid #2f3b33; padding-left: 14px; }
/* Variante (derzeit ohne Linie) */
.accent-left{ border-left: none; padding-left: 14px; }
.textblock.accent-left p { text-align: left; }

/* Kachel mit Bild + Overlay */
.tile .tile-imgwrap{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}
.tile .schaubild{ width: 100%; height: auto; display: block; }

/* Schwebende Box */
.tile .overlay{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(12px, 1.6vw, 24px);
  max-width: min(85%, 680px);
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(.5px);
  padding: clamp(12px,1.1vw,18px) clamp(16px,1.6vw,24px);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
  z-index: 2;
}
.tile .overlay p{ margin: 0; }
.tile .overlay.ru{ left: auto; transform: none; right: clamp(12px, 1.6vw, 24px); }

/* Generische Overlay-Box */
.overlay{
  position: absolute;
  max-width: 80%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(.5px);
  padding: 16px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.15);
}
.overlay.ru{ right: 16px; bottom: 16px; }

/* Buttonbild rechts neben Funding */
.gallery-cta .gallery-btn-img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }

/* Buttons */
.btnrow{ display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  text-decoration: none;
  color: #111;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn.ghost{ background: transparent; }
.btnrow.center { justify-content: center; }

/* Frontend: Primary Button Colors im Sticky-Header */
body:not(.admin) header.admin-sticky .btnrow .btn.primary{
  background: #cbf0ce; border-color: #508c60; color: #326853;
}
body:not(.admin) header.admin-sticky .btnrow .btn.primary:hover,
body:not(.admin) header.admin-sticky .btnrow .btn.primary:focus{ filter: brightness(.95); }

/* Dokumentenliste */
.doc-list { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 1rem; }
.doc-list .doc { padding: 8px 12px; border-radius: 12px; background: #eef0ea; text-decoration: none; }
.doc-list .btn, .doc-list .doc { margin: 0 .5rem .5rem 0; }

/* Event & Aktuelle Buttons */
#tdot-button { width: 300px; }

/* Doc Buttons */
/* ---------- Dokument-Buttons (.btndoc) ---------- */
/* Kompakter, technischer System-Font – läuft auf macOS, Windows, iOS, Android, Linux */
a.btndoc{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:var(--btndoc-pad-y) var(--btndoc-pad-x);
  border-radius:var(--btndoc-radius);
  border:1px solid var(--btndoc-border);
  background:var(--btndoc-bg);
  color:var(--btndoc-text);
  text-decoration:none;
  cursor:pointer;
  font:500 0.95rem/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont,
       "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
       "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  transition:background .15s ease, transform .06s ease;
}
a.btndoc:hover{ background:var(--btndoc-bg-hover); }
a.btndoc:active{ transform:translateY(1px); }

/* Damit die Liste schön fließt (1 bis 6 Items) */
.doc-list a.btndoc{ margin:4px 4px 6px 0; }

/* ---------- Leading Icon per Dateiendung ---------- */
/* Fallback-Icon (graues Dokument) */
a.btndoc::before{
  content:"";
  width:1.05rem; height:1.05rem;
  background-repeat:no-repeat;
  background-size:contain;
  background-position:center;
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233a3a3a">\
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>\
<path fill="%23fff" d="M14 2v6h6"/>\
</svg>');
}

/* PDF */
a.btndoc[href$=".pdf" i]::before{
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<path fill="%23b2262a" d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>\
<path fill="%23fff" d="M14 2v6h6"/>\
<text x="6.5" y="17" font-family="Arial, Helvetica, sans-serif" font-size="8" fill="%23fff">PDF</text>\
</svg>');
}

/* DOC/DOCX */
a.btndoc[href$=".doc" i]::before,
a.btndoc[href$=".docx" i]::before{
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<path fill="%232873d6" d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>\
<path fill="%23fff" d="M14 2v6h6"/>\
<text x="5.8" y="17" font-family="Arial, Helvetica, sans-serif" font-size="8" fill="%23fff">DOC</text>\
</svg>');
}

/* ODT */
a.btndoc[href$=".odt" i]::before{
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<path fill="%2334962b" d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>\
<path fill="%23fff" d="M14 2v6h6"/>\
<text x="6.2" y="17" font-family="Arial, Helvetica, sans-serif" font-size="8" fill="%23fff">ODT</text>\
</svg>');
}

/* RTF */
a.btndoc[href$=".rtf" i]::before{
  background-image:url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\
<path fill="%235a5a5a" d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>\
<path fill="%23fff" d="M14 2v6h6"/>\
<text x="6.8" y="17" font-family="Arial, Helvetica, sans-serif" font-size="8" fill="%23fff">RTF</text>\
</svg>');
}

/* Optional: XLS/XLSX, PPT/PPTX – wenn gewünscht, einfach auskommentieren
a.btndoc[href$=".xlsx" i]::before,
a.btndoc[href$=".xls" i]::before{ ... }
a.btndoc[href$=".pptx" i]::before,
a.btndoc[href$=".ppt" i]::before{ ... }
*/



/* News */
.news-list { display: grid; gap: 28px; }
.news-item { background: rgba(255,255,255,.75); border-radius: 22px; padding: 18px 18px 22px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.news-title { font-size: 1.8rem; margin: 0 0 4px; text-align: left;}
.news-date { opacity: .65; font-size: .95rem; margin-bottom: 10px; }
.news-row { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.news-media img { width: 100%; height: auto; border-radius: 18px; display: block; margin-top: 18px;}
.news-text { line-height: 1.6; text-align: left;}
.news-text.full { grid-column: 1 / -1; }
.news-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.news-gallery .thumb { display: inline-block; width: 160px; border-radius: 16px; overflow: hidden; }
.news-gallery .thumb img { width: 100%; height: auto; display: block; }

/* =================================
 * FOOTER
 * ================================= */

.foot{
  background: #dbe8da;
  margin-top: auto;
  font-size: .85rem;
  line-height: 1.4;
}

.foot-inner{
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 1.25rem clamp(12px, 3vw, 28px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start; /* alle Grid-Items grundsätzlich obenbündig */
  column-gap: clamp(16px, 4vw, 40px);
}

.privacy{
  text-align: left;
  justify-self: end;
}

.copy{
  justify-self: center;
  align-self: start;          /* war: center -> jetzt obenbündig wie die anderen */
  text-align: center;
  white-space: nowrap;
  color: #66706a;
}



.imprint{
  text-align: left;
}



.imprint h4,
.privacy h4{
  margin: 0 0 .25rem;
  font-size: 1em;
  font-weight: 700;
  color: var(--text);
}

.obligatorisch{
  margin: 0;
  color: #66706a;
}


/* =================================
 * ADMIN-BEREICH
 * ================================= */

.admin-sticky{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid #e5e5e5;
}
header.admin-sticky .admin-sticky-inner{
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  flex-wrap: nowrap;
}
.admin-sticky-inner{ display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.admin-title{ flex: 1 1 auto; display: inline-flex; gap: .35rem; align-items: baseline; white-space: nowrap; }
.admin-title .sep{ opacity: .7; }
.admin-sticky .btnrow{ margin: 0; justify-content: center; gap: 10px; }
.admin-sticky .btn { padding: 2px 19px; margin: 0.4rem; }

/* Admin Hero / Content-Wrapper */
main.hero.admin{
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px;
  padding-top: var(--admin-top-gap);
  border-top: 1px solid transparent;
}
.hero.admin > .admin-card:first-child{ margin-top: 0; }
.hero.admin .admin-card > :first-child { margin-top: 0; }

/* Admin Cards */
.admin-card{
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 14px;
  padding: 14px;
  max-width: 1060px;
  margin: 0 auto 18px;
}
.admin-card.sub{ margin-top: 14px; background: #ebf2f0; }
.admin-card h1{ margin: 0 0 16px; font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.6rem); }

/* Admin Button Colors */
header.admin-sticky .btnrow .btn, .admin-card .btn{ background: #f7f7f7; border-color: #cfcfcf; color: #111; }
header.admin-sticky .btnrow .btn:hover,
header.admin-sticky .btnrow .btn:focus,
.admin-card .btn:hover,
.admin-card .btn:focus{ background: #eee; border-color: #c4c4c4; }
header.admin-sticky .btnrow .btn.primary, .admin-card .btn.primary{ border-color: #1a6f4b; background: #1a6f4b; color: #fff; }
header.admin-sticky .btnrow .btn.primary:hover,
header.admin-sticky .btnrow .btn.primary:focus,
.admin-card .btn.primary:hover,
.admin-card .btn.primary:focus{ background: #225ed0; border-color: #225ed0; }
.btn.danger{ background: #b84a4a; color: #fff; border-color: #b84a4a; }
.btn.primary, .btn.ghost, .btn.danger { border-radius: 8px; }

/* Tabs in der Admin-Karte */
nav.admin-tabs, .admin-tabs{ margin-bottom: 12px; }
.admin-tabs .btn.primary{ background: #2b59ff; border-color: #2b59ff; }

/* Formulare */
.admin-form .lbl{ display: block; font-weight: 600; margin: 12px 0 6px; }
.inp, .ta, .admin-form .inp, .admin-form .ta{
  width: 100%; padding: 12px 14px; border: 1px solid #d0d0d0; border-radius: 8px; font: inherit; background: #fff;
}
.admin-form .inp, .admin-form .ta{ padding: .6rem .7rem; border-radius: 10px; border: 1px solid #d8d8d8; }
.ta{ min-height: 160px; line-height: 1.5; }
.admin-form .lbl{ margin: .6rem 0 .25rem; }

/* Formulare Grid (Admin) */
.grid-two{ gap: 12px; } /* Admin-spezifische Anpassung */

/* Alerts */
.alert{ padding: 10px 12px; border-radius: 8px; margin: 8px 0 14px; font-size: .95rem; }
.alert.ok{ background: #e9f7ee; border: 1px solid #b8e0c5; }
.alert.error{ background: #fde9ea; border: 1px solid #f5b7b9; }
.alert.ok{ background: #e7f6ee; border: 1px solid #bfe6d1; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.alert.error{ background: #fdecec; border: 1px solid #f3c4c4; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }

/* Hinweise & Meta */
.hint, .meta-note{ font-size: .9rem; color: #666; }
.count-ok{ color: #2a7a2a; }
.count-warn{ color: #b36b00; }
.count-bad{ color: #b00020; font-weight: 600; }

/* Admin Bilder & Aktionen */
.img-preview{ display: block; width: 90%; max-width: 900px; height: auto; margin: 8px auto; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.img-row{ padding: 6px 0 14px; }
.img-grid{ display: grid; grid-template-columns: 1fr; gap: 10px; }
.img-hr{ border: 0; border-top: 1px solid #e2e2e2; margin: 18px 0; }
.img-actions{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumbline{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
details.fold{ border: 1px dashed #ddd; border-radius: 10px; padding: 10px; margin: 8px 0; }
details.fold > summary{ cursor: pointer; }
.repeat > .grid-two{ margin-bottom: 8px; }

/* Utilities */
.nowrap { white-space: nowrap; }
.mt-10{ margin-top: 10px; }
.mt-16{ margin-top: 16px; }

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  transform: translate(-50%, 0);
  top: calc(var(--sticky-h) + 10px);
  z-index: 10000;
  max-width: min(92vw, 820px);
  padding: 12px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3e8e3;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  font-size: .95rem;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform-origin: top center;
  animation: toast-in .22s ease-out forwards, toast-out .30s ease-in forwards;
  animation-delay: 0s, 2.6s;
}
.toast.ok{ background: #edf9f1; border-color: #bfe7cd; }
.toast.error{ background: #fdecee; border-color: #f6b7be; }
@keyframes toast-in{ from{ opacity: 0; transform: translate(-50%, -8px); } to{ opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out{ to{ opacity: 0; transform: translate(-50%, -8px); } }


/* Upload-Zeile: File-Input + Button nebeneinander */
.upload-mitmachen .upline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;           /* bricht sauber auf kleinen Screens */
  margin:8px 0 4px;
}
.upload-mitmachen input[type="file"]{
  flex:1 1 520px;           /* nimmt Platz, schrumpft auf Mobile */
  max-width:100%;
}

/* Blaues Primär-Theme nur für diesen Button */
.admin-card .btn.primary.blue{
  background:#2b59ff;
  border-color:#2b59ff;
  color:#fff;
}
.admin-card .btn.primary.blue:hover,
.admin-card .btn.primary.blue:focus{
  filter:brightness(.95);
}


/* =================================
 * MEDIA QUERIES
 * ================================= */

@media (max-width: 1100px){
  .admin-sticky-inner{ flex-wrap: wrap; row-gap: 8px; }
  .btnrow{ flex-wrap: wrap; width: 100%; justify-content: flex-end; }
}

@media (max-width: 1024px){
  #titelname{ width: min(80vw, 100%); }
  .hero{ padding-left: clamp(28px, 6vw, 56px); padding-right: clamp(14px, 4vw, 32px); padding-inline: var(--gutter-m); }
  .accent-left{ padding-left: 18px; }
}

@media (max-width: 900px){
  .schaubox{ gap: 24px; }
  :root{ --overlap-x: 14%; --overlap-y: 14%; }
  .grid-two{ grid-template-columns: 1fr; gap: 20px; }
  .hero{ padding-inline: var(--gutter-m); }
}

@media (max-width: 780px){
  .hero{ padding-left: clamp(32px, 8vw, 64px); padding-right: clamp(16px, 6vw, 36px); }
  .accent-left{ padding-left: 20px; }
}

@media (max-width: 760px){
  .news-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .grid-two.bottom-texts { display: grid; grid-template-columns: 1fr; }
  .textblock.accent-left { order: 1; }
  .textblock { order: 2; }
}

@media (max-width: 700px){
  .admin-sticky-inner{ flex-wrap: wrap; row-gap: 8px; }
  .btnrow{ margin-left: auto; }
}

@media (max-width: 680px){
  #titelname{ width: min(90vw, 100%); }
  .schaubox{ grid-template-columns: 1fr; }
  .schaubild{ grid-column: 1 / -1; }
  .schautext{ grid-column: 1 / -1; width: 100%; }
  .schautext-ru, .schautext-lu{ margin-left: -8%; margin-right: -8%; margin-top: -8%; }
}

@media (max-width: 640px){
  .foot-inner{ grid-template-columns: 1fr; row-gap: 1rem; text-align: center; }
  .imprint, .privacy{ text-align: center; justify-self: center; }
}

@media (max-width: 560px){
  .admin-logo{ width: min(68vw, 360px); }
  nav.btnrow{
    flex-wrap: wrap;          /* statt nowrap */
    gap: 6px;
    padding-inline: 8px;
    justify-content: center;  /* optional: Buttons zentrieren */
  }
  nav.btnrow .btn{
    margin: 0;
    padding: 6px 10px;
    font-size: clamp(.90rem, 2.9vw, 1rem);
    line-height: 1.1;
    white-space: normal;      /* statt nowrap */
  }
}


@media (max-width: 520px){
  .admin-logo{ width: 80%; display: block; filter: drop-shadow(0 6px 18px rgba(0,0,0,.08)); }
  .admin-sticky .btn{ padding: 8px 10px; }
}

@media (max-width: 480px){
  .hero{ padding-inline: clamp(18px, 6vw, 32px); }
}

@media (max-width: 420px){
  nav.btnrow{ gap: 4px; }
  nav.btnrow .btn{ padding: 6px 8px; font-size: clamp(.82rem, 3.4vw, .94rem); }
}

@media (max-width: 360px){
  nav.btnrow{ gap: 3px; }
  nav.btnrow .btn{ padding: 5px 6px; font-size: .80rem; }
}

@media (max-width: 320px){
  nav.btnrow{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* =================================
 * THEME-SPEZIFISCHE FIXES (Mitmachen)
 * ================================= */
body.theme-mitmachen .page-title { text-align: left; }
body.theme-mitmachen .doc-list { margin-top: 1rem; }
body.theme-mitmachen .doc-list .btn { margin: 0 .5rem .5rem 0; }

.flag-row { display:inline-flex; align-items:center; gap:8px; font-weight:600; }
.flag-label.public-on  { color:#2f7d32; }  /* grün  */
.flag-label.public-off { color:#b2262a; }  /* rot   */


/* ===== Frontend-Header: Logo oben, Buttons darunter (zentriert) ===== */
body:not(.admin) header.admin-sticky .admin-sticky-inner{
  display:flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: unset;
}
body:not(.admin) header.admin-sticky .admin-sticky-inner .btnrow{
  display:flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; justify-content: center; width: auto;
}
body:not(.admin) header.admin-sticky .admin-sticky-inner .btnrow .btn{ white-space: nowrap; }
@media (max-width:560px){
  body:not(.admin) header.admin-sticky .admin-sticky-inner .btnrow{ flex-wrap: wrap; }
}

/* ===== Admin-Header: explizit wieder horizontal ===== */
body.admin header.admin-sticky .admin-sticky-inner{
  display:flex; flex-direction: row; justify-content: space-between; align-items: center; gap:12px; min-height:64px;
}
body.admin header.admin-sticky .admin-sticky-inner .btnrow{
  display:flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; width:auto;
}

.admin-card sub {
	text-align:left;
}

/* Einträge Fix */

main.hero.admin details.fold { text-align: left; }
main.hero.admin details.fold summary { text-align: left; }

