/* ==========================================================================
   OGV Marbach e.V. – Dev-Website Design-System
   Natur-/Garten-Thema, modern & responsiv, ohne externe Abhängigkeiten
   ========================================================================== */

:root {
  /* Farben – Garten-Natur-Palette */
  --green-900: #2e4d24;
  --green-800: #3a5f2d;
  --green-700: #467037;
  --green-600: #54853f;
  --green-500: #66994c;
  --green-100: #e8f0e0;
  --green-50:  #f4f8ef;

  --amber-600: #c98a2b;
  --amber-500: #d99b3a;
  --amber-100: #f7ecd7;

  --red-600:   #b3432f;

  --text:      #2c3527;
  --text-soft: #5c6a55;
  --bg:        #ffffff;
  --bg-soft:   #f7f9f4;
  --border:    #e3e9dc;

  /* Typo */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1120px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(46, 77, 36, 0.08);
  --shadow-lg: 0 8px 30px rgba(46, 77, 36, 0.14);
}

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-500); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; color: var(--green-900); }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: .6rem; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 2rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
h4 { font-size: 1rem; margin: 1rem 0 .4rem; }

p { margin-bottom: .9rem; }
ul, ol { margin: 0 0 1rem 1.4rem; }
li { margin-bottom: .3rem; }

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

.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.lead { font-size: 1.12rem; color: var(--text-soft); }

/* ---------- Top-Bar (Kontakt) ---------- */
.topbar {
  background: var(--green-900);
  color: #eaf3e2;
  font-size: .86rem;
}
.topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.topbar a { color: #eaf3e2; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .5; }

/* ---------- Header / Navigation ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.brand img { width: 52px; height: auto; }
.brand-text { line-height: 1.1; }
.brand-text strong { display: block; font-size: 1.02rem; color: var(--green-900); }
.brand-text span { font-size: .78rem; color: var(--text-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--green-800);
  line-height: 1;
}

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; }
.main-nav a {
  display: block;
  padding: 14px 12px;
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
}
.main-nav a:hover, .main-nav a.active { color: var(--green-700); background: var(--green-50); text-decoration: none; }
.main-nav a.active { box-shadow: inset 0 -3px 0 var(--green-600); }

/* Dropdown */
.has-dropdown { position: relative; }
.has-dropdown > .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  z-index: 50;
}
.has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown { display: block; }
.dropdown a { padding: 9px 16px; font-weight: 500; font-size: .9rem; border-radius: 0; }
.dropdown a:hover { background: var(--green-50); }
.dropdown .caret { font-size: .7rem; margin-left: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--green-800);
  overflow: hidden;
}
.hero img.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .45;
}
.hero .container { position: relative; padding: 90px 20px; text-align: center; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: .8rem; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero p { color: #f0f6ea; font-size: clamp(1rem, 2vw, 1.2rem); max-width: 720px; margin: 0 auto 1.6rem; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.hero .badge { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(2px); padding: 6px 16px; border-radius: 999px; font-size: .9rem; margin-bottom: 18px; }

.btn {
  display: inline-block;
  background: var(--green-600);
  color: #fff;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--green-700); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn--light { background: #fff; color: var(--green-800); }
.btn--light:hover { background: var(--green-50); color: var(--green-900); }
.btn--outline { background: transparent; border: 2px solid currentColor; }
.btn + .btn { margin-left: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card img.card-img { width: 100%; height: 180px; object-fit: cover; }
.card .card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-soft); font-size: .94rem; }
.card .card-link { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--green-700); }

/* ---------- Personen (Vorstand usw.) ---------- */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.person {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.person h4 { color: var(--green-800); margin: 0 0 4px; }
.person .role { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--amber-600); font-weight: 700; margin-bottom: 10px; }
.person ul { list-style: none; margin: 0; }
.person li { font-size: .92rem; color: var(--text-soft); margin-bottom: 2px; }
.person .badge-vakant { display: inline-block; background: var(--amber-100); color: var(--amber-600); border-radius: 999px; padding: 4px 14px; font-size: .82rem; font-weight: 700; }

/* ---------- Termine ---------- */
.event-list { display: flex; flex-direction: column; gap: 14px; }
.event {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  align-items: flex-start;
}
.event .date-box {
  flex: 0 0 74px;
  text-align: center;
  background: var(--green-700);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  line-height: 1.1;
}
.event .date-box .d { font-size: 1.5rem; font-weight: 800; }
.event .date-box .m { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.event .date-box .y { font-size: .78rem; opacity: .85; }
.event .event-body h3 { margin: 0 0 4px; font-size: 1.06rem; }
.event .event-meta { font-size: .86rem; color: var(--text-soft); margin-bottom: 6px; }
.event .event-desc { font-size: .94rem; }
.event .event-img { margin-top: 10px; }
.event .event-img a { position: relative; display: block; overflow: hidden; border-radius: var(--radius-sm); cursor: zoom-in; }
.event .event-img a:hover img, .event .event-img a:focus img { transform: scale(1.03); }
.event .event-img img { max-height: 160px; border-radius: var(--radius-sm); transition: transform .2s ease; display: block; }
.event .event-img .zoom-hint { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .72rem; line-height: 1; padding: 4px 8px; border-radius: 999px; opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.event .event-img a:hover .zoom-hint, .event .event-img a:focus .zoom-hint { opacity: 1; }
.event--nodate .date-box { background: var(--text-soft); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-800); margin-right: 6px; }
.tag--year { background: var(--amber-100); color: var(--amber-600); }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery a { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.gallery img { width: 100%; height: 170px; object-fit: cover; transition: transform .2s ease; }
.gallery a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 30, 16, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius-sm); }
.lightbox .lb-close {
  position: absolute; top: 18px; right: 26px;
  font-size: 2.2rem; color: #fff; background: none; border: none; cursor: pointer;
}
.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.4rem; color: #fff; background: none; border: none; cursor: pointer; padding: 10px;
}
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { right: 14px; }

/* ---------- Info-Boxen ---------- */
.callout {
  border-left: 4px solid var(--green-600);
  background: var(--green-50);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
}
.callout--amber { border-color: var(--amber-500); background: var(--amber-100); }
.callout--red { border-color: var(--red-600); background: #fbece8; }
.callout h4 { margin: 0 0 6px; }

/* ---------- Downloads ---------- */
.download-list { list-style: none; margin: 0; }
.download-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.download-list .ico { font-size: 1.4rem; }
.download-list a { font-weight: 600; }
.download-list small { display: block; color: var(--text-soft); font-weight: 400; }

/* ---------- Tabelle ---------- */
table { border-collapse: collapse; width: 100%; margin: 14px 0; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--green-50); color: var(--green-900); font-size: .9rem; }

/* ---------- Kontakt ---------- */
.contact-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.contact-block .kv { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.contact-block .kv .ic { font-size: 1.25rem; width: 26px; text-align: center; color: var(--green-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #dce8d2; margin-top: 60px; }
.site-footer .container { padding-top: 40px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #cfe3bf; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-footer { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-footer .brand-footer img { width: 44px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .82rem;
  color: #b6c9a8;
}
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 16px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .85rem; color: var(--text-soft); padding: 14px 0 0; }
.breadcrumbs a { color: var(--green-600); }
.breadcrumbs .sep { margin: 0 6px; opacity: .5; }

/* ---------- Markdown-Inhalte (gerenderte Seiten) ---------- */
.md-content { max-width: 820px; }
.md-content h1 { margin-top: 1.2rem; }
.md-content h2 { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.md-content h3 { color: var(--green-800); }
.md-content ul, .md-content ol { margin-bottom: 1rem; }
.md-content li { margin-bottom: .25rem; }
.md-content table { margin: 1rem 0; }
.md-content img { border-radius: var(--radius-sm); box-shadow: var(--shadow); margin: 1rem 0; }
.md-content a { font-weight: 600; }
.md-content blockquote {
  border-left: 4px solid var(--green-600);
  background: var(--green-50);
  padding: 12px 18px;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar .container { justify-content: center; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px; }
  .main-nav a { border-radius: 6px; }
  .has-dropdown > .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
  }
  .has-dropdown.open > .dropdown { display: block; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .container { padding: 60px 20px; }
  .event { flex-direction: column; gap: 12px; }
  .event .date-box { flex: 0 0 auto; width: 74px; }
}

@media (max-width: 480px) {
  .brand-text span { display: none; }
}
