/* ==========================================================================
   LEUKIN e.V. — Stylesheet
   Farben aus dem Vereinslogo: Rot / Schwarz / Weiß, ergänzt um ein warmes
   Off-White und ein zurückhaltendes Rosé für Sektionswechsel.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --red: #E2001A;
  --red-dark: #A5000E;
  --red-soft: #F7E4E2;
  --black: #1B1918;
  --grey: #6B6660;
  --grey-light: #A8A29B;
  --warm-white: #FBF8F4;
  --white: #FFFFFF;
  --line: #E7E1D8;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--warm-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--black);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--black); }

.lede {
  font-size: 1.2rem;
  color: var(--grey);
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--red);
  font-size: 1.05rem;
  margin: 0 0 0.4em;
  display: block;
}

::selection { background: var(--red); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--black);
  color: var(--black);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }

.btn-outline-light {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline-light:hover { background: var(--white); color: var(--black); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Kein backdrop-filter hier: filter/backdrop-filter auf einem Vorfahren
     macht diesen zum Containing Block für position:fixed-Kindelemente.
     Das mobile Menü (position:fixed) würde dadurch relativ zum kleinen
     Header-Kasten statt zum Viewport positioniert und wirkt "eingeklemmt"
     bzw. hinter dem restlichen Seiteninhalt. */
  background: rgba(251, 248, 244, 0.97);
  border-bottom: 1px solid var(--line);
}

body.nav-open {
  overflow: hidden;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img { height: 44px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--black);
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.main-nav a[aria-current="page"] { color: var(--red); }

.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--black);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; z-index: 1002; position: relative; }
  .main-nav {
    position: fixed;
    inset: 0 0 0 0;
    z-index: 1001;
    background: var(--warm-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 1.15rem; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 88px;
  background: var(--white);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 0.35em; }
.hero .lede { margin-bottom: 2em; }

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-art {
  display: flex;
  justify-content: center;
}
.hero-art img { max-width: 380px; }

.page-hero {
  padding: 56px 0 48px;
  background: var(--black);
  color: var(--white);
}
.page-hero h1 { color: var(--white); }
.page-hero .lede { color: #D9D4CC; }

/* ---------- Stats strip ---------- */

.stats {
  background: var(--black);
  color: var(--white);
  padding: 44px 0;
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--red);
}
.stat span {
  color: #D9D4CC;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .stats .wrap { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Sections ---------- */

.section {
  padding: 88px 0;
}
.section-alt {
  background: var(--red-soft);
}
.section-black {
  background: var(--black);
  color: var(--white);
}
.section-black h2, .section-black h3 { color: var(--white); }
.section-black p { color: #D9D4CC; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 260px; }
}

/* ---------- Timeline (Wie alles begann) ---------- */

.timeline {
  border-left: 2px solid var(--line);
  margin-left: 8px;
}
.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--red);
}
.timeline-item .year {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--red);
  display: block;
  margin-bottom: 4px;
}

/* ---------- Cards: News / Events ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 980px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .card-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-card .date {
  font-size: 0.85rem;
  color: var(--grey);
  font-weight: 500;
}
.news-card h3 { margin-bottom: 4px; }
.news-card p { color: var(--grey); margin-bottom: 0; flex-grow: 1; }
.tag {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 3px 10px;
  border-radius: 20px;
}
.tag-pill {
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.event-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.event-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.event-date {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  line-height: 1.1;
}
.event-date small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--grey);
  font-size: 0.8rem;
  margin-top: 2px;
}
.event-info h3 { margin-bottom: 4px; }
.event-info p { color: var(--grey); margin-bottom: 0; }
.event-loc {
  font-size: 0.9rem;
  color: var(--grey);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .event-row { grid-template-columns: 1fr; gap: 8px; }
  .event-loc { white-space: normal; }
}

/* ---------- Category filter bar (Aktuelles / Veranstaltungen) ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-chip {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--grey);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.filter-chip:hover { border-color: var(--red); color: var(--red); }
.filter-chip.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.state-msg {
  color: var(--grey);
  font-style: italic;
  padding: 24px 0;
}

/* Tag-Farbvarianten: werden Kategorien zyklisch zugewiesen, damit
   beliebig viele/neue Kategorien angelegt werden können, ohne dass
   jede Farbe manuell gepflegt werden muss. Bleibt bewusst in der
   Rot/Schwarz/Grau-Markenpalette statt bunter Regenbogenfarben. */
.tag-0 { color: var(--red); border-color: var(--red); }
.tag-1 { color: var(--black); border-color: var(--black); }
.tag-2 { color: var(--grey); border-color: var(--grey-light); }
.tag-3 { color: var(--red-dark); border-color: var(--red-dark); }
.tag-4 { color: #8A5A00; border-color: #8A5A00; }
.tag-5 { color: #3A3733; border-color: #3A3733; }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 980px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .team-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

.team-card { text-align: left; }
.team-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 16px;
  border-bottom: 4px solid var(--red);
}
.team-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(15%);
}
.team-card h3 { margin-bottom: 2px; }
.team-card .role { color: var(--red); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.team-card .mail { font-size: 0.9rem; color: var(--grey); }
.team-card .mail:hover { color: var(--red); }

/* ---------- Donation blocks ---------- */

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) {
  .bank-grid { grid-template-columns: 1fr; }
}
.bank-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px 26px;
}
.bank-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.bank-card dl { margin: 0; font-size: 0.95rem; }
.bank-card dt { color: var(--grey); font-weight: 500; display: inline; }
.bank-card dd { margin: 0 0 6px; display: inline; font-weight: 600; }
.bank-card .row { display: block; margin-bottom: 4px; }

.note-box {
  background: var(--white);
  border-left: 4px solid var(--red);
  padding: 20px 24px;
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--grey);
}
.note-box strong { color: var(--black); }

/* ---------- Membership options ---------- */

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 780px) {
  .option-grid { grid-template-columns: 1fr; }
}
.option-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px;
}
.option-card h3 { color: var(--red); }

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--red);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.3em; }
.cta-banner p { color: #FBE3E1; max-width: 56ch; margin: 0 auto 2em; }
.cta-banner .hero-actions { justify-content: center; }

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--black); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--red);
  outline: none;
}
.radio-group { display: flex; gap: 24px; }
.radio-option { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--grey);
}
.consent input { margin-top: 4px; }
.form-note {
  font-size: 0.85rem;
  color: var(--grey);
  margin-top: -6px;
}

/* Anti-Spam: Honeypot-Feld nur für Bots sichtbar/ausfüllbar, für Menschen
   und Screenreader ausgeblendet. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-field input[type="text"] {
  max-width: 140px;
}
.captcha-q {
  font-weight: 700;
  color: var(--red);
}

.form-status {
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.3em;
  margin: 14px 0 0;
}
.form-status.ok { color: #1E7A34; }
.form-status.error { color: var(--red); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: #D9D4CC;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #3A3733;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h4 {
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--white); }
.footer-brand img { height: 40px; margin-bottom: 14px; }
.footer-brand p { color: #A8A29B; font-size: 0.92rem; max-width: 30ch; }
.social-row { display: flex; gap: 14px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid #3A3733;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.social-row a:hover { border-color: var(--red); color: var(--red); }
.social-row svg { width: 17px; height: 17px; fill: currentColor; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--grey-light);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a:hover { color: var(--white); }

/* ==========================================================================
   Admin / Control Panel
   ========================================================================== */

.admin-body {
  background: #F1EEE8;
  min-height: 100vh;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.admin-login-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.admin-login-box img { height: 48px; margin: 0 auto 20px; }
.admin-login-box .field { text-align: left; margin-bottom: 18px; }
.admin-error {
  color: var(--red);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-top: 10px;
}

.admin-shell { display: none; }
.admin-shell.visible { display: block; }

.admin-topbar {
  background: var(--black);
  color: var(--white);
  padding: 18px 0;
}
.admin-topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-topbar h1 {
  color: var(--white);
  font-size: 1.3rem;
  margin: 0;
}
.admin-topbar .sub { color: var(--grey-light); font-size: 0.85rem; }

.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.admin-tabs .wrap { display: flex; gap: 4px; }
.admin-tab {
  padding: 16px 22px;
  font-weight: 600;
  color: var(--grey);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.admin-tab.active { color: var(--red); border-bottom-color: var(--red); }

.admin-panel { display: none; padding: 40px 0 80px; }
.admin-panel.active { display: block; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.publish-status {
  font-size: 0.88rem;
  color: var(--grey);
}
.publish-status.ok { color: #1E7A34; }
.publish-status.error { color: var(--red); }

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.admin-item {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 18px;
  align-items: center;
}
@media (max-width: 700px) {
  .admin-item { grid-template-columns: 1fr; }
}
.admin-item .meta { font-size: 0.82rem; color: var(--grey); }
.admin-item h4 { margin: 0 0 4px; font-family: var(--font-body); font-weight: 600; font-size: 1rem; }
.admin-item .tag-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid;
}
.admin-item-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: var(--font-body);
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

.editor-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
}
.editor-card h3 { margin-bottom: 20px; }

.cat-manager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
}
.cat-chip button {
  border: none;
  background: var(--line);
  width: 20px; height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--black);
}
.cat-chip button:hover { background: var(--red); color: var(--white); }
.cat-add {
  display: flex;
  gap: 10px;
  max-width: 420px;
}
.cat-add input { flex: 1; }

.admin-note {
  font-size: 0.85rem;
  color: var(--grey);
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  padding: 14px 18px;
  margin-bottom: 28px;
}

/* ---------- Service Points ---------- */

.location-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.location-card .pin {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.location-card .pin svg { width: 18px; height: 18px; fill: currentColor; }
.location-card h3 { margin-bottom: 2px; }
.location-card .addr { color: var(--grey); font-size: 0.95rem; margin-bottom: 0; }
.location-card .hours {
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 600;
  margin-top: auto;
}

.placeholder-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--grey);
  background: var(--line);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
