@import url('../fonts/fonts.css');

:root {
  --bone:  #E8E2D0;
  --lime:  #CAEF5D;
  --grass: #5A8A1A;
  --coal:  #1C1C16;
  --amber: #F0A030;
  --paper: #f5f1e6;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
  --max-w: 1180px;

  --f-display: 'Barlow Condensed', Impact, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--coal);
  background: var(--bone);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--grass); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 900;
  color: var(--coal);
  line-height: 1;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(40px, 5.5vw, 76px); }
h2 { font-size: clamp(30px, 3.6vw, 48px); }
h3 { font-size: clamp(22px, 2.4vw, 32px); }
h4 { font-size: 18px; }

p { font-size: 16px; line-height: 1.65; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-label {
  font-family: var(--f-body);
  font-style: normal;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--grass); margin-bottom: 8px;
}

.btn {
  display: inline-block; padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  font-family: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--grass); color: #fff; }
.btn-primary:hover { background: #4a750f; text-decoration: none; }
.btn-secondary { border: 1.5px solid var(--coal); color: var(--coal); }
.btn-secondary:hover { background: var(--coal); color: var(--bone); text-decoration: none; }
.btn-light { background: #fff; color: var(--coal); }

.badge {
  display: inline-block;
  background: var(--coal); color: var(--lime);
  font-family: var(--f-body); font-style: normal; font-weight: 600;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--radius-sm);
}

hr.divider { border: 0; border-top: 1px solid rgba(28,28,22,0.08); }

/* Skip link for a11y */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--coal); color: #fff; padding: 8px 16px;
  z-index: 9999;
}
.skip-link:focus { left: 16px; top: 16px; }

@media (max-width: 720px) {
  .section { padding: 48px 0; }
}

/* ──── Sticky top (nav + bars) ──── */
.sticky-top { position: sticky; top: 0; z-index: 50; }

/* ──── Site nav ──── */
.site-nav { background: var(--bone); border-bottom: 1px solid rgba(28,28,22,0.08); }
.nav-inner { display: flex; align-items: center; gap: 24px; padding: 14px 24px; }
.nav-logo { display: inline-flex; }
.nav-menu { list-style: none; display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav-menu > li { position: relative; display: flex; align-items: center; }
.nav-menu a, .nav-menu > li > button {
  display: inline-flex; align-items: center; padding: 10px 14px; font-size: 14px; font-weight: 600;
  line-height: 1.4; color: var(--coal); background: transparent; border: 0; cursor: pointer; font-family: var(--f-body);
}
.nav-menu a:hover, .nav-menu button:hover { color: var(--grass); text-decoration: none; }
.nav-menu a[aria-current="page"] { color: var(--grass); }
.nav-menu .has-sub > ul {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 220px; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); padding: 8px; list-style: none; z-index: 10;
}
.nav-menu .has-sub > ul.open { display: block; }
.nav-menu .has-sub:hover > ul { display: block; }
.nav-menu .has-sub > ul a { display: block; padding: 8px 12px; border-radius: 4px; }
.nav-menu .has-sub > ul a:hover { background: var(--bone); }
.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--coal); margin: 5px 0; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip: rect(0 0 0 0); }

@media (max-width: 820px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .nav-menu { display: none; width: 100%; flex-direction: column; gap: 0; padding: 8px 0 16px; order: 3; flex-wrap: nowrap; }
  .nav-menu.open { display: flex; }
  .nav-menu > li { display: block; border-top: 1px solid rgba(28,28,22,0.06); }
  .nav-menu > li:first-child { border-top: 0; }
  .nav-menu a, .nav-menu > li > button {
    display: flex; width: 100%; padding: 14px 8px; font-size: 16px; text-align: left; justify-content: flex-start; box-sizing: border-box;
  }
  .nav-menu .has-sub > button::after {
    content: '+';
    margin-left: auto;
    padding-left: 12px;
    font-size: 22px;
    line-height: 1;
    color: var(--grass);
    align-self: center;
  }
  .nav-menu .has-sub > button[aria-expanded="true"]::after { content: '−'; }
  .nav-menu .has-sub > ul {
    position: static; box-shadow: none; padding: 0 0 8px 16px; margin: 0;
    border-left: 2px solid rgba(28,28,22,0.08);
    background: transparent;
  }
  .nav-menu .has-sub:hover > ul { display: none; }
  .nav-menu .has-sub > ul.open { display: block; }
  .nav-menu .has-sub > ul a { padding: 12px 8px; font-size: 15px; }
  body.dark-theme .nav-menu > li { border-top-color: rgba(255,255,255,0.08); }
  body.dark-theme .nav-menu .has-sub > ul { border-left-color: rgba(255,255,255,0.12); background: transparent; }
}

/* ──── Footer ──── */
.site-footer { background: var(--coal); color: #eae5d6; padding: 48px 0 24px; margin-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: start; }
.footer-brand img { display: block; margin-bottom: 12px; }
.footer-tag { font-size: 13px; color: #aaa28e; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-nav a { color: #eae5d6; font-size: 14px; }
.footer-social { display: flex; gap: 12px; justify-self: end; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: #fff;
  transition: background .18s, transform .18s, color .18s;
}
.footer-social a:hover {
  background: var(--lime); color: var(--coal);
  transform: translateY(-2px);
  text-decoration: none;
}
.footer-social svg { display: block; }
.footer-bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: #aaa28e; }
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-social { justify-self: start; }
}

/* ──── Trail cards ──── */
.trail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 20px;
  margin-top: 32px;
}
.trail-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  border-top: 4px solid #ccc;
  box-shadow: var(--shadow-card);
  transition: transform .15s, box-shadow .15s;
  color: inherit;
  text-decoration: none;
  display: block;
  scroll-margin-top: 120px;
}
a.trail-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); text-decoration: none; }
.trail-card.trail-blue  { border-top-color: #2563eb; }
.trail-card.trail-red   { border-top-color: #dc2626; }
.trail-card.trail-black { border-top-color: #111; }
.trail-level {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
  font-family: var(--f-body); text-transform: uppercase;
  letter-spacing: 0.1em;
}
.trail-blue  .trail-level { background: #dbeafe; color: #1d4ed8; }
.trail-red   .trail-level { background: #fee2e2; color: #b91c1c; }
.trail-black .trail-level { background: #f3f4f6; color: #111; }

/* ──── Info cards (regeln) ──── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.info-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid rgba(28,28,22,0.08);
}
.info-card.info-warn {
  background: #fff5e8;
  border-color: #f5d79a;
}
.info-card h4 {
  font-family: var(--f-body); font-style: normal;
  text-transform: none; letter-spacing: normal;
  font-size: 15px; margin-bottom: 6px; color: var(--coal);
}
.info-card p { font-size: 14px; color: #555; }

/* ──── FAQ (details) ──── */
.faq { margin-top: 24px; }
.faq details {
  border-bottom: 1px solid rgba(28,28,22,0.1);
  padding: 16px 0;
}
.faq summary {
  font-weight: 600; cursor: pointer; list-style: none;
  font-size: 16px; padding-right: 24px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 0; top: -2px;
  color: var(--grass); font-size: 22px; line-height: 1;
}
.faq details[open] summary::after { content: '−'; }
.faq details > p,
.faq details > ul,
.faq details > ol {
  margin-top: 12px;
  padding: 14px 18px;
  background: #f5f1e6;
  border-left: 3px solid var(--grass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #3a3a32;
  font-size: 15px; line-height: 1.55;
}
body.dark-theme .faq details {
  border-bottom-color: rgba(255,255,255,0.08);
}
body.dark-theme .faq details > p,
body.dark-theme .faq details > ul,
body.dark-theme .faq details > ol {
  background: #1e1e1a;
  border-left-color: var(--lime);
  color: #d0cab8;
}
body.dark-theme .faq details > p a,
body.dark-theme .faq details > ul a,
body.dark-theme .faq details > ol a {
  color: var(--lime);
}

/* ──── Lead paragraph ──── */
.lead { font-size: 18px; color: #3a3a32; max-width: 640px; margin: 8px 0 32px; }

/* ──── Trail-status big widget (server-rendered) ──── */
/* Overrides the thin-bar .trail-bar-* background so the card uses neutral white/dark */
.trail-status-big,
.trail-status-big.trail-bar-ok,
.trail-status-big.trail-bar-warn,
.trail-status-big.trail-bar-blocked {
  background: #fff;
  color: var(--coal);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 32px 0;
  box-shadow: var(--shadow-card);
  border-left: 8px solid var(--grass);
  position: relative;
  overflow: hidden;
}
.trail-status-big::before {
  content: '';
  position: absolute;
  inset: 0 0 0 -8px;
  background: linear-gradient(135deg, currentColor 0%, transparent 60%);
  opacity: 0.06;
  pointer-events: none;
}
.trail-status-big.trail-bar-ok      { border-left-color: var(--grass); color: var(--grass); }
.trail-status-big.trail-bar-warn    { border-left-color: var(--amber); color: #b37508; }
.trail-status-big.trail-bar-blocked { border-left-color: #a0281a; color: #a0281a; }

.trail-status-label {
  font-family: var(--f-display); font-weight: 900; font-style: italic;
  text-transform: uppercase; font-size: 30px; letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 6px;
}
.trail-status-note {
  font-size: 14px; color: var(--coal);
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.06em;
  margin-bottom: 18px;
  opacity: 0.72;
}
.trail-status-sensors {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid rgba(0,0,0,0.08); border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 14px; color: #666;
}
.trail-status-sensors > span { white-space: nowrap; }
.trail-status-sensors strong { color: var(--coal); margin-left: 4px; font-weight: 700; }
.trail-status-sensors-with-charts { gap: 24px 36px; }
.trail-status-sensors-with-charts > span {
  display: inline-flex; flex-direction: column; gap: 4px;
}
.sparkline-svg {
  display: block; width: 110px; height: 24px;
  margin-top: 2px;
}
.sparkline-line { fill: none; stroke-width: 1.5; }
.sparkline-fill { fill-opacity: 0.16; stroke: none; }
.sparkline-temp   .sparkline-line { stroke: var(--amber); }
.sparkline-temp   .sparkline-fill { fill:   var(--amber); }
.sparkline-moist  .sparkline-line { stroke: #4f9fcf; }
.sparkline-moist  .sparkline-fill { fill:   #4f9fcf; }
.sparkline-precip .sparkline-line { stroke: #6b8ec7; }
.sparkline-precip .sparkline-fill { fill:   #6b8ec7; }
.sparkline-hint {
  font-size: 11px; color: #888;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: 6px;
}
body.dark-theme .sparkline-moist  .sparkline-line,
body.dark-theme .sparkline-moist  .sparkline-fill { stroke: #6ec1e8; fill: #6ec1e8; }
body.dark-theme .sparkline-precip .sparkline-line,
body.dark-theme .sparkline-precip .sparkline-fill { stroke: #8caee0; fill: #8caee0; }
body.dark-theme .sparkline-hint { color: #999388; }

/* Mobile: drei Sparklines untereinander statt zwei+eins-Wrap */
@media (max-width: 640px) {
  .trail-status-sensors-with-charts {
    flex-direction: column;
    gap: 14px;
  }
  .trail-status-sensors-with-charts > span {
    width: 100%;
  }
  .trail-status-sensors-with-charts .sparkline-svg {
    width: 100%;
    height: 32px;
  }
}
.trail-status-meta {
  font-size: 12px; color: #888; margin-top: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.trail-status-meta a { color: inherit; text-decoration: underline; }
/* Sensor-derived state shown when admin/news override is active */
.trail-status-sensor-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 4px 0 12px;
  background: rgba(0,0,0,0.04);
  border-radius: 999px;
  color: var(--coal);
  font-size: 14px;
}
.trail-status-sensor-state small {
  color: #666;
  font-size: 12px;
  margin-left: 4px;
}
.trail-status-sensor-state.tsb-green  strong { color: var(--grass); }
.trail-status-sensor-state.tsb-yellow strong { color: #b37508; }
.trail-status-sensor-state.tsb-red    strong { color: #a0281a; }
.trail-status-sensor-state.tsb-offline strong { color: #666; }
body.dark-theme .trail-status-sensor-state {
  background: rgba(255,255,255,0.06);
  color: #e8e2d0;
}
body.dark-theme .trail-status-sensor-state small { color: #999388; }
body.dark-theme .trail-status-sensor-state.tsb-green   strong { color: #8ac14a; }
body.dark-theme .trail-status-sensor-state.tsb-yellow  strong { color: var(--amber); }
body.dark-theme .trail-status-sensor-state.tsb-red     strong { color: #e8564a; }
body.dark-theme .trail-status-sensor-state.tsb-offline strong { color: #aaa49a; }

@media (max-width: 540px) {
  .trail-status-big { padding: 20px 22px; }
  .trail-status-label { font-size: 22px; }
  .trail-status-note { font-size: 12px; margin-bottom: 14px; }
  .trail-status-sensors { gap: 12px 16px; font-size: 13px; padding: 10px 0; }
  .trail-status-meta { font-size: 11px; }
}

body.dark-theme .trail-status-big,
body.dark-theme .trail-status-big.trail-bar-ok,
body.dark-theme .trail-status-big.trail-bar-warn,
body.dark-theme .trail-status-big.trail-bar-blocked {
  background: #1e1e1a;
  color: #e8e2d0;
}
body.dark-theme .trail-status-big.trail-bar-ok      { border-left-color: #8ac14a; color: #8ac14a; }
body.dark-theme .trail-status-big.trail-bar-warn    { border-left-color: var(--amber); color: var(--amber); }
body.dark-theme .trail-status-big.trail-bar-blocked { border-left-color: #e8564a; color: #e8564a; }
body.dark-theme .trail-status-big::before { opacity: 0.10; }
body.dark-theme .trail-status-note { color: #d0cab8; opacity: 0.85; }
body.dark-theme .trail-status-sensors { color: #aaa49a; border-color: rgba(255,255,255,0.08); }
body.dark-theme .trail-status-sensors strong { color: #f0ebe0; }
body.dark-theme .trail-status-meta { color: #888; }

.hint { font-size: 14px; color: #666; }
body.dark-theme .hint { color: #999; }

/* ──── Welcome + News two-column (homepage) ──── */
.section-welcome-news { padding: 48px 0; }
.welcome-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .welcome-news-grid { grid-template-columns: 1fr; gap: 36px; }
}

.welcome-block h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 8px 0 18px;
  hyphens: manual;
}

/* Prevent auto-hyphenation + word-breaking on short English-style CTA headlines */
.support-cta h2,
.hero h1,
.hero h1 em {
  hyphens: manual !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
/* Hero headline: scale font to fit single-line "COLLECTIVE" in the hero-left column */
.hero h1 { font-size: clamp(44px, 6vw, 92px) !important; }
@media (max-width: 1100px) { .hero h1 { font-size: clamp(40px, 6.5vw, 72px) !important; } }
@media (max-width: 720px)  { .hero h1 { font-size: clamp(46px, 11vw, 72px) !important; } }
@media (max-width: 480px)  { .hero h1 { font-size: clamp(42px, 13.5vw, 64px) !important; } }
.welcome-block p {
  font-size: 16px; line-height: 1.65;
  color: #3a3a32;
  margin-bottom: 14px;
}
.welcome-signoff {
  font-style: italic;
  color: var(--grass);
  font-weight: 500;
}
body.dark-theme .welcome-block p { color: #d0cab8; }
body.dark-theme .welcome-signoff { color: var(--lime); }

.news-side {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.news-side-h {
  font-size: 22px;
  margin: 4px 0 14px;
}
.news-side-list {
  list-style: none;
  padding: 0; margin: 0;
}
.news-side-item {
  border-bottom: 1px solid rgba(28,28,22,0.08);
}
.news-side-item:last-child { border-bottom: 0; }
.news-side-item a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
  align-items: baseline;
}
.news-side-item a:hover { color: var(--grass); }
.news-side-item time {
  font-size: 12px; font-weight: 600;
  color: #888;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.news-side-title {
  grid-column: 1 / -1;
  font-weight: 600; font-size: 15px;
  line-height: 1.35;
}
.event-badge-sm {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  background: var(--amber); color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.news-side .section-more { margin-top: 14px; margin-bottom: 0; font-size: 13px; }

body.dark-theme .news-side { background: #1e1e1a; }
body.dark-theme .news-side-item { border-bottom-color: rgba(255,255,255,0.08); }
body.dark-theme .news-side-item a { color: #e8e2d0; }
body.dark-theme .news-side-item a:hover { color: var(--lime); }
body.dark-theme .news-side-item time { color: #999; }

@media (max-width: 540px) {
  .section-welcome-news { padding: 32px 0; }
  .welcome-block p { font-size: 15px; }
  .news-side { padding: 16px 18px; }
}

/* ──── Prose — Satzung & andere Text-lastige Seiten ──── */
.prose h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin-top: 36px;
  margin-bottom: 12px;
}
.prose h3 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin-top: 24px;
  margin-bottom: 8px;
}
.prose ol, .prose ul { margin: 8px 0 16px 20px; }
.prose ol li, .prose ul li { margin-bottom: 8px; line-height: 1.6; }
.prose p { margin-bottom: 12px; }
@media (max-width: 540px) {
  .prose h2 { font-size: 20px; margin-top: 28px; }
  .prose h3 { font-size: 17px; margin-top: 20px; }
}

/* ──── Timeline (Unsere Geschichte) ──── */
.timeline {
  list-style: none;
  position: relative;
  padding: 8px 0 8px 40px;
  margin: 24px 0 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 14px; bottom: 14px; left: 14px;
  width: 2px;
  background: linear-gradient(to bottom, var(--grass), rgba(90,138,26,0.15));
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grass);
  box-shadow: 0 0 0 4px var(--bone), 0 0 0 5px var(--grass);
}
.timeline-year {
  font-family: var(--f-display);
  font-style: italic; font-weight: 900;
  font-size: 26px; color: var(--grass);
  line-height: 1; margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.timeline-title {
  font-family: var(--f-body); font-weight: 700;
  font-size: 17px; color: var(--coal);
  margin-bottom: 6px;
  text-transform: none; letter-spacing: 0;
}
.timeline-body p {
  font-size: 15px; color: #444; line-height: 1.55; margin: 0;
}

body.dark-theme .timeline::before {
  background: linear-gradient(to bottom, var(--lime), rgba(202,239,93,0.15));
}
body.dark-theme .timeline-item::before {
  background: var(--lime);
  box-shadow: 0 0 0 4px #121210, 0 0 0 5px var(--lime);
}
body.dark-theme .timeline-year { color: var(--lime); }
body.dark-theme .timeline-title { color: #f0ebe0; }
body.dark-theme .timeline-body p { color: #aaa49a; }

/* ──── Inverse section (dark block) ──── */
.inverse {
  background: var(--coal); color: var(--bone);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-top: 32px;
}
.inverse .section-label { color: var(--lime); }
.inverse h1, .inverse h2, .inverse h3, .inverse h4 { color: #fff; }
.inverse p { color: rgba(255,255,255,0.82); }
.inverse .btn-light { margin-top: 20px; }
@media (max-width: 680px) {
  .inverse { padding: 32px 24px; }
}

/* ──── Stats grid ──── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 16px;
  margin: 24px 0 28px;
}
.stat {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  text-align: center;
}
.stat .val {
  font-family: var(--f-display); font-style: italic; font-weight: 900;
  font-size: 30px; color: var(--lime); line-height: 1;
}
.stat .lbl {
  font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px;
}

/* ──── Member / contact info grid ──── */
.member-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}
@media (max-width: 760px) { .member-grid { grid-template-columns: 1fr; } }
.member-benefits h3 { margin-bottom: 12px; }
.member-info {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.member-info h4 {
  font-family: var(--f-body); font-style: normal;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; color: var(--grass); margin: 16px 0 6px;
}
.member-info h4:first-child { margin-top: 0; }
.member-info p { font-size: 14px; line-height: 1.6; }

/* ──── Check list ──── */
.check-list { list-style: none; padding: 0; margin: 0 0 20px; }
.check-list li {
  padding: 8px 0 8px 28px; position: relative;
  font-size: 15px; border-bottom: 1px solid rgba(28,28,22,0.06);
}
.check-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 8px;
  color: var(--grass); font-weight: 700;
}

/* ──── Times list (jugendtraining) ──── */
.times-list { list-style: none; margin-top: 16px; }
.times-list li {
  padding: 14px 18px; background: #fff;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  margin-bottom: 10px; font-size: 15px;
}
.times-list strong { color: var(--grass); margin-right: 8px; }
body.dark-theme .times-list li { background: #1e1e1a; color: #e8e2d0; }
body.dark-theme .times-list strong { color: var(--lime); }

.note { margin-top: 24px; font-size: 14px; color: #555; }
body.dark-theme .note { color: #b8b2a4; }

.callout-green {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f7faf3;
  border: 1px solid #d4edaa;
  border-left: 3px solid var(--grass);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: #3a3a32;
}
body.dark-theme .callout-green {
  background: #1e1e1a;
  border-color: rgba(255,255,255,0.08);
  border-left-color: var(--lime);
  color: #d0cab8;
}
body.dark-theme .callout-green strong { color: #f0ebe0; }
body.dark-theme .callout-green a { color: var(--lime); }

/* ──── Course cards ──── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 20px;
  margin-top: 32px;
}
.course-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--grass);
}
.course-card h3 {
  font-size: 22px; margin-bottom: 10px;
  hyphens: auto; overflow-wrap: break-word; word-break: break-word;
}

/* Defensive: long German compound words (Nachwuchsförderung etc.) should
   never punch out of their container on narrow viewports. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: manual; }
.course-card p { font-size: 14px; color: #444; margin-bottom: 8px; }
.course-meta { color: #888 !important; font-size: 13px !important; margin-top: 12px !important; }

/* ──── Flash messages ──── */
.flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}
.flash-ok { background: #dcf1b8; color: #2c4a08; }
.flash-err { background: #fde2d5; color: #7a2b08; }

/* ──── Contact grid + form ──── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-top: 32px;
  align-items: start;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 24px; } }

.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  display: block; width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(28,28,22,0.15);
  border-radius: var(--radius-sm);
  font-family: var(--f-body);
  font-size: 14px;
  background: #fff;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--grass);
  outline-offset: 1px;
  border-color: var(--grass);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button { margin-top: 8px; }

.contact-info {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.contact-info h4 {
  font-family: var(--f-body); font-style: normal;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 11px; color: var(--grass); margin: 16px 0 6px;
}
.contact-info h4:first-child { margin-top: 0; }
.contact-info p { font-size: 14px; line-height: 1.6; }

/* ──── Facts (über-uns) ──── */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 680px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact {
  background: #fff;
  padding: 22px;
  text-align: center;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.fact .val {
  font-family: var(--f-display); font-style: italic; font-weight: 900;
  font-size: 34px; color: var(--grass); line-height: 1;
}
.fact .lbl { font-size: 12px; color: #666; margin-top: 6px; }

/* ──── Prose (satzung, datenschutz, impressum) ──── */
.prose {
  max-width: 780px;
  font-size: 15px;
  line-height: 1.7;
  color: #2a2a22;
  margin-top: 32px;
}
.prose h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 12px;
}
.prose h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 10px 0 14px 24px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--coal); }

/* ──── Trail-status bar ──── */
.trail-bar {
  padding: 10px 24px;
  font-size: 13px;
  text-align: center;
  color: #fff;
  font-weight: 500;
}
.trail-bar-ok { background: var(--grass); }
.trail-bar-warn { background: var(--amber); color: var(--coal); }
.trail-bar-blocked { background: #a0281a; }
.trail-bar strong { font-weight: 700; margin-right: 6px; }

/* ──── Instagram grid ──── */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 32px;
}
.ig-tile {
  display: block; position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.04);
}
.ig-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.ig-tile:hover img { transform: scale(1.05); }
@media (max-width: 600px) { .ig-grid { grid-template-columns: repeat(2, 1fr); } }

/* ──── Hero ──── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 520px;
  background: var(--bone);
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; min-height: auto; } }
.hero-left {
  padding: 72px 48px;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 720px; margin-left: auto; width: 100%;
}
@media (max-width: 820px) { .hero-left { padding: 48px 24px; margin-left: 0; max-width: none; } }
.hero-left .badge { align-self: flex-start; margin-bottom: 20px; }
.hero-left h1 em { font-style: italic; }
.hero-desc {
  font-size: 17px; color: #3a3a32;
  max-width: 480px; margin: 16px 0 28px;
  line-height: 1.55;
}
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.hero-desc + .hero-btns { margin-top: 0; }

.hero-right {
  position: relative; overflow: hidden;
  background: #1a2014;
  background-size: cover; background-position: center;
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -80px;
}
@media (max-width: 820px) {
  .hero-right { clip-path: none; margin-left: 0; min-height: 280px; }
}

/* ──── News cards (homepage teasers) ──── */
.news-teasers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.news-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .15s;
}
.news-card:hover { transform: translateY(-2px); }
.news-img {
  display: block;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
}
.news-body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.news-date {
  display: flex; flex-direction: column;
  line-height: 1;
}
.news-year {
  font-family: var(--f-display); font-style: italic; font-weight: 900;
  font-size: 32px; color: var(--grass);
}
.news-md {
  font-size: 14px; color: #666; margin-top: 4px;
  font-family: var(--f-body); font-weight: 600;
}
.news-card h3 { font-size: 20px; margin-top: 4px; }
.news-card h3 a { color: inherit; }
.news-card h3 a:hover { color: var(--grass); text-decoration: none; }
.event-badge {
  display: inline-block;
  background: var(--amber); color: var(--coal);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  align-self: flex-start;
}
.recurring-badge {
  display: inline-block;
  background: var(--grass); color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  align-self: flex-start;
}
.recurring-badge-sm {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  background: var(--grass); color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.news-side-rec {
  display: block;
  font-size: 12px; color: var(--grass); font-weight: 600;
  margin-top: 2px;
}
.news-recurrence {
  font-size: 14px; color: var(--grass);
  margin-bottom: 6px;
}
.news-date-block.news-date-recurring {
  background: rgba(90,138,26,0.10);
  color: var(--grass);
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border-radius: var(--radius-sm);
}
.news-date-block.news-date-recurring .news-year {
  font-family: var(--f-body);
  font-style: normal;
  font-weight: 700;
  font-size: 42px;
  color: var(--grass);
  line-height: 1;
}
.news-date-block.news-date-recurring .news-md {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--grass);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-top: 2px;
}
.event-info-recurring {
  border-left-color: var(--grass) !important;
  background: #f0fae0 !important;
}
.event-info-recurring h4 { color: var(--grass) !important; }
.event-info-recurring p strong { color: var(--grass); }

body.dark-theme .event-info {
  background: rgba(240,160,48,0.10);
  border-left-color: var(--amber);
}
body.dark-theme .event-info h4 { color: var(--amber); }
body.dark-theme .event-info p,
body.dark-theme .event-info p strong { color: #f0ebe0; }

body.dark-theme .event-info.event-info-recurring {
  background: rgba(122,184,46,0.12) !important;
}
body.dark-theme .event-info.event-info-recurring h4 { color: #cde27a !important; }
body.dark-theme .event-info.event-info-recurring p,
body.dark-theme .event-info.event-info-recurring p strong { color: #f0ebe0; }
body.dark-theme .event-info.event-info-recurring p strong { color: #cde27a; }
.weekday-checks {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 6px 0 14px;
}
.weekday-check {
  display: inline-flex; align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(28,28,22,0.18);
  border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer;
  user-select: none;
  background: #fff;
  margin-bottom: 0 !important;
  transition: background .12s, border-color .12s;
}
.weekday-check input { margin-right: 6px; }
.weekday-check:has(input:checked) {
  background: var(--lime); border-color: var(--grass);
  font-weight: 600;
}
body.dark-theme .weekday-check {
  background: #2a2a24; border-color: rgba(255,255,255,0.18); color: #e8e2d0;
}
body.dark-theme .weekday-check:has(input:checked) {
  background: var(--grass); border-color: var(--grass); color: #fff;
}
body.dark-theme .recurring-badge,
body.dark-theme .recurring-badge-sm { background: #7ab82e; color: #121210; }
body.dark-theme .news-side-rec,
body.dark-theme .news-recurrence    { color: #cde27a; }
body.dark-theme .news-date-recurring { background: rgba(90,138,26,0.15); color: #cde27a; }
.section-more { margin-top: 24px; }
.section-more a { font-weight: 600; font-size: 14px; }

/* ──── Sponsors ──── */
.section-hr-label {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.section-hr-label::before, .section-hr-label::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(28,28,22,0.15);
}
.section-hr-label span {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #888;
}
.sponsors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.sponsor-slot {
  background: #fff;
  border: 1px solid rgba(28,28,22,0.08);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  font-size: 12px; color: #666;
  min-height: 72px;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .15s, transform .15s;
}
a.sponsor-slot { text-decoration: none; }
a.sponsor-slot:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.sponsor-slot img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(40%);
  transition: filter .2s;
}
.sponsor-slot:hover img { filter: grayscale(0); }

/* ──── News listing (news.php) ──── */
.news-list {
  display: flex; flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.news-row {
  display: grid;
  grid-template-columns: 120px 200px 1fr;
  gap: 24px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
  align-items: start;
}
@media (max-width: 720px) {
  .news-row { grid-template-columns: 1fr; }
  .news-row-img { min-height: 200px !important; }
}
.news-date-block { display: flex; flex-direction: column; }
.news-date-block .news-year {
  font-family: var(--f-display); font-style: italic; font-weight: 900;
  font-size: 48px; color: var(--grass); line-height: 1;
}
.news-date-block .news-md {
  font-size: 14px; color: #666;
  margin-top: 4px; font-weight: 600;
}
.news-row-img {
  display: block;
  aspect-ratio: 4/3;
  background-size: cover; background-position: center;
  border-radius: var(--radius-sm);
}
.news-row-body h3 { font-size: 22px; margin-bottom: 8px; }
.news-row-body h3 a { color: inherit; }
.news-row-body h3 a:hover { color: var(--grass); text-decoration: none; }
.news-row-body p { font-size: 14px; color: #555; margin-bottom: 10px; }
.read-more { font-weight: 600; font-size: 13px; }

body.dark-theme .news-row { background: #1e1e1a; }
body.dark-theme .news-row-body h3 a { color: #f0ebe0; }
body.dark-theme .news-row-body h3 a:hover { color: var(--lime); }
body.dark-theme .news-date-block .news-md { color: #aaa49a; }

/* ──── News detail ──── */
.news-detail .news-back {
  font-size: 13px; color: #666;
  display: inline-block; margin-bottom: 16px;
}
.news-detail h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 48px); line-height: 1.1; }
body.dark-theme .news-detail h1 { font-size: clamp(30px, 4.5vw, 56px); }
.news-meta { color: #666; font-size: 14px; margin-bottom: 24px; }
.news-hero-img {
  width: 100%; height: auto;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.event-info {
  background: #fff5e8;
  border-left: 4px solid var(--amber);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  max-width: 600px;
}
.event-info h4 {
  font-family: var(--f-body); text-transform: none; font-style: normal;
  letter-spacing: normal; font-size: 13px; color: var(--amber);
  margin-bottom: 10px; font-weight: 700;
}
.event-info p { font-size: 14px; margin-bottom: 6px; }
.news-body-text {
  font-size: 16px; line-height: 1.7;
  max-width: 720px;
  white-space: pre-line;
}
.news-body-text h3 { font-size: 22px; margin-top: 24px; margin-bottom: 10px; }
.news-body-text p { margin-bottom: 14px; }

/* ──── LoRa Sensor Bar ──── */
.trail-sensor-bar {
  background: var(--coal);
  color: #fff;
  padding: 0 24px;
  font-family: var(--f-body);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tsb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 48px;
  gap: 0;
}
.tsb-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 0;
  border-right: 1px solid rgba(255,255,255,0.15);
  margin-right: 20px;
}
.tsb-main strong {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ts-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #888;
}
.ts-dot.ts-green    { background: var(--lime);  box-shadow: 0 0 0 3px rgba(202,239,93,0.25); }
.ts-dot.ts-yellow   { background: var(--amber); box-shadow: 0 0 0 3px rgba(240,160,48,0.25); }
.ts-dot.ts-red      { background: #e85d3c;      box-shadow: 0 0 0 3px rgba(232,93,60,0.25); }
.ts-dot.ts-loading  { background: #888; }
.ts-dot.ts-offline  { background: #666; }

.trail-sensor-bar.tsb-green  .tsb-main strong { color: var(--lime); }
.trail-sensor-bar.tsb-yellow .tsb-main strong { color: var(--amber); }
.trail-sensor-bar.tsb-red    .tsb-main strong { color: #ff8b6e; }

.tsb-sensors {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.tsb-sensor {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}
.tsb-sensor strong {
  color: #fff;
  font-weight: 600;
  margin-left: 2px;
}
.tsb-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.15);
}
.tsb-time {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  padding: 10px 0;
}
@media (max-width: 720px) {
  .trail-sensor-bar { padding: 0 16px; }
  .tsb-time { display: none; }
  .tsb-main { border-right: 0; margin-right: 0; width: 100%; padding-bottom: 4px; }
  .tsb-sensors { padding-top: 0; padding-bottom: 10px; gap: 12px; }
  .tsb-sep { display: none; }
}

/* ──── Depth & Visual Variation ──── */

/* Warm section variant — subtle tint, not white */
.section-warm { background: var(--paper); }
.section-paper { background: var(--paper); }

/* Stronger card hover */
.trail-card:hover, .news-card:hover, .info-card:hover, .course-card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Hero depth */
.hero-left h1 {
  text-shadow: 0 2px 0 rgba(0,0,0,0.04);
}
.hero-right::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(28,28,22,0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* News card accent border */
.news-card { border-left: 4px solid var(--grass); }
.news-card.is-event { border-left-color: var(--amber); }

/* Section decorative tree divider */
.tree-divider {
  display: block; text-align: center;
  padding: 20px 0;
  line-height: 0;
}
.tree-divider svg { opacity: 0.08; }

/* Inverse section texture */
.inverse {
  background-image: radial-gradient(circle at 20% 80%, rgba(202,239,93,0.06) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(90,138,26,0.08) 0%, transparent 50%);
}

/* Facts cards depth */
.fact {
  border-bottom: 3px solid var(--grass);
  transition: transform .15s, box-shadow .15s;
}
.fact:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }

/* Sponsor slots depth */
.sponsor-slot {
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Info cards subtle border-left */
.info-card { border-left: 3px solid var(--grass); }
.info-card.info-warn { border-left-color: var(--amber); }

/* Contact/member info card depth */
.member-info, .contact-info {
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--grass);
}

/* ──── Trail Support CTA ──── */
.support-cta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 720px) {
  .support-cta { grid-template-columns: 1fr; gap: 24px; padding: 32px 24px; text-align: center; }
}
.support-img img {
  width: 220px; height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
  transition: transform .3s;
}
.support-img img:hover { transform: rotate(-3deg) scale(1.05); }
.support-text h2 { margin-bottom: 12px; }
.support-text p { font-size: 16px; color: #3a3a32; max-width: 480px; margin-bottom: 24px; line-height: 1.6; }
.support-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .support-btns { justify-content: center; }
  .support-text p { max-width: none; }
}

/* ══════════════════════════════════════════
   DESIGN POLISH — Character & Depth
   ══════════════════════════════════════════ */

/* ── 1. Scroll reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children */
.trail-card.reveal, .news-card.reveal, .info-card.reveal,
.fact.reveal, .sponsor-slot.reveal, .ig-tile.reveal, .stat.reveal {
  transition-delay: calc(var(--i, 0) * 0.08s);
}

/* ── 2. Background texture (topo lines) ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  background-image:
    radial-gradient(ellipse 900px 700px at 15% 25%, rgba(90,138,26,0.08), transparent),
    radial-gradient(ellipse 700px 900px at 85% 75%, rgba(202,239,93,0.05), transparent);
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  background-image: url('../img/grain.png');
  background-size: 150px 150px;
}

/* ── 3. Full-bleed image break ── */
.image-break {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  margin: 0;
}
.image-break::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(232,226,208,0.6) 0%, transparent 30%, transparent 70%, rgba(232,226,208,0.6) 100%);
}
@media (max-width: 720px) {
  .image-break { height: 180px; background-attachment: scroll; }
}

/* ── 4. Asymmetric news layout ── */
.news-teasers {
  grid-template-columns: 1fr 1fr !important;
}
.news-teasers .news-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-left-width: 5px;
}
.news-teasers .news-card:first-child .news-img {
  aspect-ratio: auto;
  min-height: 220px;
}
.news-teasers .news-card:first-child .news-body {
  padding: 24px;
}
.news-teasers .news-card:first-child .news-year {
  font-size: 48px;
}
.news-teasers .news-card:first-child h3 {
  font-size: 26px;
}
@media (max-width: 720px) {
  .news-teasers { grid-template-columns: 1fr !important; }
  .news-teasers .news-card:first-child { grid-template-columns: 1fr; }
  .news-teasers .news-card:first-child .news-img { min-height: 180px; }
}

/* ── 5. Bolder typography & spacing ── */
h1 { font-size: clamp(36px, 6vw, 88px); }
h2 { font-size: clamp(28px, 4.2vw, 56px); margin-bottom: 12px; }
.section { padding: 48px 0; }
@media (max-width: 720px) { .section { padding: 32px 0; } }
@media (max-width: 540px) {
  h1 { font-size: clamp(30px, 9vw, 44px); }
  h2 { font-size: clamp(24px, 6vw, 34px); }
}

.section-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}
.section-label::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--lime);
  margin-top: 6px;
}

/* Hero polish */
.hero { min-height: 580px; }
.hero-left h1 {
  margin-bottom: 4px;
  text-shadow: 0 3px 0 rgba(0,0,0,0.05);
}
.hero-desc { font-size: 18px; max-width: 500px; }

/* Section warm gets subtle top-border */
.section-warm {
  position: relative;
}
.section-warm::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--lime);
  border-radius: 2px;
}

/* Trail cards bigger padding */
.trail-card { padding: 28px 24px 24px; }
.trail-card h3 { font-size: 24px; margin-bottom: 10px; }
.trail-card p { font-size: 15px; line-height: 1.6; }

/* IG grid: slightly larger gap, rounded more */
.ig-grid { gap: 10px; }
.ig-tile { border-radius: var(--radius-md); }

/* ══════════════════════════════════════════
   DARK THEME OVERRIDE
   ══════════════════════════════════════════ */
body.dark-theme {
  --bone:  #121210;
  --paper: #424139;
  --coal:  #f0ebe0;
  --grass: #7ab82e;
  --lime:  #CAEF5D;
  --amber: #F0A030;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.30), 0 1px 3px rgba(0,0,0,0.20);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.25);
  color: #e8e2d0;
  background: #121210;
}
body.dark-theme::before, body.dark-theme::after { opacity: 0.015; }

/* Nav */
body.dark-theme .site-nav { background: #121210; border-bottom-color: rgba(255,255,255,0.06); }
body.dark-theme .nav-menu a, body.dark-theme .nav-menu > li > button { color: #e8e2d0; }
body.dark-theme .nav-menu a:hover, body.dark-theme .nav-menu button:hover { color: var(--lime); }
body.dark-theme .nav-menu .has-sub > ul { background: #1e1e1a; }
body.dark-theme .nav-menu .has-sub > ul a:hover { background: #2a2a24; }
body.dark-theme .nav-logo img { content: url('../img/logo/logo-light.png'); }

/* Hero */
body.dark-theme .hero { background: #121210; }
body.dark-theme .hero-left h1 { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,0.3); }
body.dark-theme .hero-desc { color: #bbb5a4; }
body.dark-theme .badge { background: rgba(255,255,255,0.1); color: var(--lime); }
body.dark-theme .btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  color: #e8e2d0;
}
body.dark-theme .btn-secondary:hover {
  background: #e8e2d0;
  color: #121210;
  border-color: #e8e2d0;
}

/* Cards */
body.dark-theme .trail-card,
body.dark-theme .news-card,
body.dark-theme .info-card,
body.dark-theme .course-card,
body.dark-theme .fact,
body.dark-theme .member-info,
body.dark-theme .contact-info,
body.dark-theme .admin-form,
body.dark-theme .admin-table,
body.dark-theme .support-cta { background: #1e1e1a; color: #e8e2d0; }
body.dark-theme .admin-table th { background: #2a2a24; color: #e8e2d0; }
body.dark-theme .admin-table th,
body.dark-theme .admin-table td { border-bottom-color: rgba(255,255,255,0.08); }
body.dark-theme .admin-table a { color: #cde27a; }
body.dark-theme .trail-card p,
body.dark-theme .info-card p,
body.dark-theme .news-row-body p { color: #aaa49a; }
body.dark-theme .info-card { border-color: rgba(255,255,255,0.06); }
body.dark-theme .info-card.info-warn {
  background: #9a661c;
  border: 1.5px solid #ffc56b;
  box-shadow: 0 0 0 1px rgba(255,197,107,0.30), 0 8px 28px rgba(240,160,48,0.30);
}
body.dark-theme .info-card.info-warn h4 { color: #fff7d6; }
body.dark-theme .info-card.info-warn p  { color: #fdebbf; }
body.dark-theme .news-card h3 a { color: #e8e2d0; }

/* Section warm */
body.dark-theme .section-warm { background: #1a1a16; }
body.dark-theme .section-warm::before { background: var(--lime); }

/* Inverse section — stays similar but adjust */
body.dark-theme .inverse { background: #0a0a08; }

/* Sponsors */
body.dark-theme .sponsor-slot { background: #f0ebe0; border-color: rgba(0,0,0,0.06); }
body.dark-theme .sponsor-slot img { filter: none; }
body.dark-theme .sponsor-slot:hover img { filter: none; }

/* Footer */
body.dark-theme .site-footer { background: #0a0a08; margin-top: 0; }

/* Flash, forms */
body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea { background: #2a2a24; border-color: rgba(255,255,255,0.1); color: #e8e2d0; }

/* IG tiles */
body.dark-theme .ig-tile { background: #1e1e1a; }

/* Trail bar */
body.dark-theme .trail-bar-ok { background: var(--grass); color: #fff; }

/* Section dividers */
body.dark-theme .tree-divider svg { opacity: 0.06; color: var(--lime); }
body.dark-theme hr.divider { border-top-color: rgba(255,255,255,0.06); }

/* Section label */
body.dark-theme .section-label { color: var(--lime); }
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4 { color: #f0ebe0; }

/* Section hr label (sponsors) */
body.dark-theme .section-hr-label::before, body.dark-theme .section-hr-label::after { background: rgba(255,255,255,0.1); }
body.dark-theme .section-hr-label span { color: #888070; }

/* Prose */
body.dark-theme .prose { color: #ccc5b8; }

/* Lead */
body.dark-theme .lead { color: #aaa49a; }
body.dark-theme .hero-btns .btn-primary { color: #121210; }

/* ── Dark theme: Outfit display font (wide, non-italic) ── */
body.dark-theme {
  --f-display: 'Playfair Display', Georgia, serif;
}
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4 {
  font-style: normal;
  letter-spacing: -0.02em;
}
body.dark-theme h1 { font-size: clamp(52px, 7vw, 96px); line-height: 0.95; }
body.dark-theme h2 { font-size: clamp(36px, 4.5vw, 60px); }
@media (max-width: 540px) {
  body.dark-theme h1 { font-size: clamp(40px, 11vw, 60px); hyphens: auto; }
  body.dark-theme h2 { font-size: clamp(28px, 7vw, 40px); hyphens: auto; }
  /* IG-Heading nicht trennen — @handle bleibt zusammen */
  .ig-heading { hyphens: none; -webkit-hyphens: none; font-size: clamp(20px, 5.6vw, 32px) !important; }
  .ig-handle  { white-space: nowrap; }
}
body.dark-theme .hero-left h1 {
  text-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
body.dark-theme .news-card {
  border-left-color: #e85d3c;
}
body.dark-theme .news-card.is-event {
  border-left-color: var(--amber);
}
body.dark-theme .event-badge {
  background: #e85d3c;
  color: #fff;
}
body.dark-theme .section-label::after {
  background: #e85d3c;
}

/* ──── Theme chooser (admin sidebar — global site theme) ──── */
.admin-side .theme-form {
  display: flex; gap: 6px; margin-top: 4px;
}
.admin-side .theme-btn {
  flex: 1;
  background: #0d0d0a;
  border: 1px solid rgba(255,255,255,0.30);
  color: #fff; font-size: 12px; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  padding: 8px 6px; text-align: center;
  font-family: var(--f-body);
  transition: background .15s, border-color .15s;
}
.admin-side .theme-btn:hover {
  background: #000;
  border-color: rgba(255,255,255,0.50);
}
.admin-side .theme-btn.active {
  background: var(--grass); color: #fff;
  border-color: var(--grass); font-weight: 700;
}

/* ── Dark theme: sensor + trail bars ── */
body.dark-theme .trail-sensor-bar { background: #0a0a08; border-bottom-color: rgba(255,255,255,0.04); }
body.dark-theme .trail-bar-blocked { background: #7a1a10; }
body.dark-theme .trail-bar-warn { background: #6b4a08; color: #e8e2d0; }
body.dark-theme .trail-bar-ok { background: #2d4a0e; }

/* ── Dark theme: smaller h2, lighter body text ── */
body.dark-theme h2 { font-size: clamp(26px, 3.2vw, 42px); }
body.dark-theme p, body.dark-theme li { color: #ccc5b8; }
body.dark-theme .hero-desc { color: #bbb5a4; }
body.dark-theme .support-text p { color: #bbb5a4; }
body.dark-theme .news-row-body p { color: #aaa49a; }

/* ── Dark theme: btn-light fix ── */
body.dark-theme .btn-light { background: var(--grass); color: #fff; }
body.dark-theme .btn-light:hover { background: #4a750f; }
