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

:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --border: #e0e0de;
  --text: #1a1a18;
  --text-muted: #6b6b68;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --dark: #1a1a18;
  --dark-2: #2e2e2c;
  --dark-3: #3a3a38;
  --radius: 8px;
  --content-width: 92%;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ===== Header ===== */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  white-space: nowrap;
}
.site-title:hover { text-decoration: none; color: #fff; }
.site-title-prefix { color: #a0a09e; font-weight: 400; margin-right: 0.35rem; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.875rem; }
.main-nav a { color: #a0a09e; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a.active { color: #fff; }
.nav-admin {
  background: var(--accent);
  color: var(--dark) !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}
.nav-admin:hover { background: var(--accent-dark); }

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #2a3520;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
  width: 100%;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-title {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  margin-bottom: 0.4rem;
}
.hero-sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

/* Hero Slider Controls */
.hero-dots {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot.active { background: var(--accent); }

/* ===== Statusbar ===== */
.status-bar {
  background: #f0f0ee;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
}
.status-bar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  justify-content: center;
  flex-wrap: wrap;
}
.status-bar-inner strong { color: var(--text); }

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  padding: 1.75rem 0;
  background: var(--bg);
}
.content-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Sektions-Titel ===== */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== Seiten-Header (Unterseiten) ===== */
.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.75rem 0 0;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 0.95rem; }
.back-link { color: var(--text-muted); font-size: 0.875rem; }
.back-link:hover { color: var(--text); text-decoration: none; }
.eintrag-datum { color: var(--text-muted); font-size: 0.875rem; }

/* ===== Einträge Grid ===== */
.eintraege-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.eintrag-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  color: var(--text);
}
.eintrag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-decoration: none;
}
.card-bild { aspect-ratio: 16/9; overflow: hidden; background: var(--border); position: relative; }
.card-bild img { width: 100%; height: 100%; object-fit: cover; }
.card-bild-leer { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.85rem; }
.card-datum-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
}
.card-inhalt { padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.card-titel { font-size: 0.9rem; font-weight: 600; }
.card-notiz { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.card-medien-typen { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.25rem; }
.medien-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 600;
}
.medien-badge.aktiv { background: var(--dark); color: #fff; }
.medien-badge.inaktiv { background: #f0f0ee; color: #b0b0ae; }

/* ===== Eintrag Detail ===== */
.eintrag-notiz {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}
.eintrag-medien { display: flex; flex-direction: column; gap: 1.5rem; }
.media-block {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.media-block h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.media-video, .media-foto { width: 100%; border-radius: 4px; }
.media-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ===== Projekt ===== */
.projekt-fakten { margin-bottom: 2rem; }
.fakten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.fakt {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fakt-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.fakt-wert { font-weight: 600; font-size: 0.9rem; }
.projekt-inhalt { display: flex; flex-direction: column; gap: 1.5rem; }
.projekt-block {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.projekt-block h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.projekt-block p, .projekt-block li { font-size: 0.95rem; line-height: 1.7; }
.projekt-block ul { padding-left: 1.25rem; }
.projekt-block li { margin-bottom: 0.3rem; }
.projekt-quelle { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Changelog ===== */
.changelog-liste { display: flex; flex-direction: column; gap: 1rem; }
.changelog-eintrag {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 80px 120px 1fr;
  gap: 1rem;
  align-items: start;
}
.changelog-version { font-weight: 700; color: var(--accent-dark); font-size: 0.9rem; }
.changelog-datum { color: var(--text-muted); font-size: 0.85rem; }
.changelog-beschreibung { font-size: 0.9rem; }

/* ===== Admin ===== */
.admin-login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.admin-login-box {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 360px;
}
.admin-login-box h1 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.admin-links { margin-bottom: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.admin-tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.9rem;
}
.admin-tabelle th {
  background: var(--bg);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.admin-tabelle td {
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}
.admin-tabelle tr:last-child td { border-bottom: none; }
.aktionen { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ===== Medien Upload ===== */
.medien-bereich { margin-top: 2.5rem; }
.medien-bereich h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.medien-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.medium-block {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.medium-block h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.medium-vorschau { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; margin-bottom: 0.5rem; }
.medium-vorschau-video { width: 100%; border-radius: 4px; margin-bottom: 0.5rem; }
.upload-form { display: flex; flex-direction: column; gap: 0.5rem; }
.upload-form input[type="file"] { font-size: 0.85rem; }

/* Hero Admin */
.hero-bilder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.hero-bild-block {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-bild-block img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-bild-actions { padding: 0.6rem; display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; }
.hero-bild-nr { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Forms ===== */
.admin-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.875rem; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; }
.form-hinweis { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.optional { color: var(--text-muted); font-weight: 400; }

/* ===== Buttons ===== */
.btn-primary {
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-primary:hover { background: var(--dark-3); text-decoration: none; color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-small {
  background: var(--surface);
  color: var(--text);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-small:hover { background: var(--bg); text-decoration: none; }
.btn-gefahr { color: #dc2626; border-color: #dc2626; background: #fff; }
.btn-gefahr:hover { background: #dc2626; color: #fff; }
.btn-logout {
  background: none;
  border: none;
  color: #a0a09e;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
}
.btn-logout:hover { color: #fff; }

/* ===== Misc ===== */
.fehler-meldung {
  background: #fef2f2;
  border: 0.5px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.empty-state {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}
.login-form { display: flex; flex-direction: column; gap: 1rem; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); margin-top: auto; }
.footer-top {
  padding: 1.25rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--dark-2);
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-project-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  margin-bottom: 0.2rem;
}
.footer-project-title-prefix { color: #888; font-weight: 400; margin-right: 0.3rem; }
.footer-project-sub { font-size: 0.75rem; color: #666; }
.footer-nav { display: flex; gap: 1.25rem; font-size: 0.8rem; flex-wrap: wrap; }
.footer-nav a { color: #777; }
.footer-nav a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #777;
}
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { text-decoration: none; color: var(--accent-dark); }
.footer-heart { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .media-fotos { grid-template-columns: 1fr; }
  .changelog-eintrag { grid-template-columns: 1fr; gap: 0.25rem; }
  .header-inner { padding: 0 1rem; }
  .main-content { padding: 1.25rem 0; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; text-align: center; }
  .hero-title { font-size: 1.3rem; }
}

/* ===== Subheader ===== */
.subheader {
  background: #2a2a28;
  border-bottom: 1px solid #3a3a38;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.subheader-back {
  color: #a0a09e;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}
.subheader-back:hover { color: #fff; text-decoration: none; }
.subheader-divider { width: 1px; height: 20px; background: #3a3a38; flex-shrink: 0; }
.subheader-meta { display: flex; flex-direction: column; gap: 0.1rem; }
.subheader-datum { font-size: 0.75rem; color: #a0a09e; }
.subheader-titel { font-size: 0.95rem; font-weight: 600; color: #fff; }
.subheader-badges { display: flex; gap: 0.35rem; margin-left: auto; flex-wrap: wrap; }

/* ===== Badges überarbeitet ===== */
.medien-badge.aktiv { background: #fbbf24; color: #1a1a18; }
.medien-badge.inaktiv { background: #e8e8e6; color: #a0a09e; }

/* ===== Hero Fallback ===== */
.hero-bg-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, #8b7355 0%, transparent 50%),
    radial-gradient(ellipse at 70% 40%, #5a7a4a 0%, transparent 50%),
    linear-gradient(135deg, #2a3520 0%, #4a5a35 40%, #6b7a50 70%, #3a4a2a 100%);
}

/* ===== Galerie ===== */
.galerie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  width: 100%;
}
.galerie-foto {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.15s;
}
.galerie-foto:hover { transform: scale(1.02); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
}
.lightbox-img {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 3;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 0.875rem;
  border-radius: 4px;
  opacity: 0.7;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.media-foto { cursor: pointer; }

/* ===== Hamburger Menü ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.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); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #1a1a18;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-top: 1px solid #2e2e2c;
    z-index: 200;
  }
  .main-nav.open { display: flex; }
  .main-nav a { color: #fff; font-size: 1rem; padding: 0.25rem 0; }
  .nav-admin { display: inline-block; }
  .btn-logout { color: #a0a09e; font-size: 1rem; }
  .site-header { position: relative; }
}

/* ===== Mobile Header Fix ===== */
@media (max-width: 768px) {
  .header-inner {
    height: auto;
    min-height: 56px;
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    align-items: center;
  }
  .site-title {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.3;
    white-space: normal;
  }
  .site-title-prefix {
    display: block;
    font-size: 0.7rem;
    margin-right: 0;
    margin-bottom: 0.1rem;
  }
  .status-bar-inner {
    gap: 1rem;
    font-size: 0.75rem;
  }
}

/* ===== Admin Layout Fix ===== */
.admin-page { max-width: var(--content-width); margin: 0 auto; padding: 1.75rem 0; width: 100%; }
.admin-page .page-header { padding-top: 0; margin-bottom: 1.5rem; }

/* ===== Flash Banner ===== */
.flash-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 90vw;
}
.flash-banner.erfolg { background: #16a34a; color: #fff; }
.flash-banner.fehler { background: #dc2626; color: #fff; }
.flash-banner-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.8;
  padding: 0;
}
.flash-banner-close:hover { opacity: 1; }

/* ===== Upload Bereich einheitlich ===== */
.upload-bereich {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}
form.upload-bereich {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem;
}
.upload-bereich input[type="file"],
form.upload-bereich input[type="file"] {
  font-size: 0.85rem;
  width: 100%;
}
.upload-bereich .btn-small,
form.upload-bereich button[type="submit"] {
  white-space: nowrap;
}

/* ===== Admin Log ===== */
.admin-log {
  margin-top: 2rem;
}
.admin-log h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.log-liste {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.8rem;
}
.log-eintrag {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 0.5px solid var(--border);
  align-items: start;
}
.log-eintrag:last-child { border-bottom: none; }
.log-eintrag.fehler { background: #fef2f2; }
.log-zeit { color: var(--text-muted); white-space: nowrap; }
.log-aktion { font-weight: 500; }
.log-details { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.1rem; }
.log-status { font-size: 0.75rem; font-weight: 600; }
.log-status.ok { color: #16a34a; }
.log-status.err { color: #dc2626; }

/* ===== Projekt Medien ===== */
.projekt-medien-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.pdf-karte {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: background 0.15s;
}
.pdf-karte:hover { background: #eee; text-decoration: none; }
.pdf-icon { font-size: 2rem; }
.pdf-name { font-size: 0.75rem; color: var(--text-muted); word-break: break-word; }
.pdf-download { font-size: 0.7rem; color: var(--accent-dark); font-weight: 600; }

/* ===== Wetter ===== */
.wetter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.wetter-wert {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wetter-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wetter-zahl { font-size: 1.1rem; font-weight: 600; color: var(--text); }

/* ===== Fortschrittsbalken ===== */
.fortschritt-bar-wrap {
  background: #f0f0ee;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.fortschritt-bar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.fortschritt-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.fortschritt-prozent { color: var(--accent-dark); font-weight: 700; }
.fortschritt-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.fortschritt-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ===== Zeitstrahl ===== */
.zeitstrahl { display: flex; flex-direction: column; gap: 0; }
.zeitstrahl-eintrag { display: flex; gap: 1.5rem; align-items: flex-start; }
.zeitstrahl-linie {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 0.4rem;
}
.zeitstrahl-punkt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-dark);
  flex-shrink: 0;
}
.zeitstrahl-verbindung {
  width: 2px;
  flex: 1;
  min-height: 2rem;
  background: var(--border);
  margin: 4px 0;
}
.zeitstrahl-karte {
  flex: 1;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.zeitstrahl-karte:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); text-decoration: none; }
.zeitstrahl-datum { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.25rem; }
.zeitstrahl-titel { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.zeitstrahl-notiz { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.5; }
.zeitstrahl-bild { width: 100%; max-height: 200px; object-fit: cover; border-radius: 4px; margin-top: 0.5rem; }

/* ===== Wetter Abstand Fix ===== */
.eintrag-medien > section + section,
.eintrag-medien > .media-fotos + section,
.eintrag-medien section:last-child { margin-top: 0; }
.eintrag-medien { gap: 1.5rem; }

/* ===== Wetter-Abstand Fix ===== */
.wetter-section { margin-top: 1.5rem; }

/* ===== Druckansicht ===== */
.druck-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.875rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}
.druck-btn:hover { background: var(--bg); text-decoration: none; }

@media print {
  .site-header, .site-footer, .subheader, .hero, .status-bar,
  .fortschritt-bar-wrap, .druck-btn, .lightbox, .btn-primary,
  .btn-secondary, .btn-small, .nav-toggle { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }

  .main-content { padding: 0; }
  .content-inner { max-width: 100%; padding: 0; }

  .media-block {
    border: 0.5pt solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  .media-foto, .zeitstrahl-bild { max-width: 100%; max-height: 200pt; object-fit: contain; }

  #sphere-viewer { display: none !important; }

  .galerie-grid { grid-template-columns: repeat(3, 1fr); }
  .galerie-foto { max-height: 100pt; object-fit: cover; }

  .wetter-grid { grid-template-columns: repeat(4, 1fr); }

  .page-header h1 { font-size: 16pt; margin-bottom: 0.5rem; }
  .eintrag-datum { font-size: 10pt; }

  .druck-header {
    display: block !important;
    border-bottom: 1pt solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 9pt;
    color: #555;
  }
}

.druck-header { display: none; }

/* ===== Webcam ===== */
.nav-webcam {
  background: var(--accent);
  color: var(--dark) !important;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
}
.nav-webcam:hover { background: var(--accent-dark); text-decoration: none; }

.hero-webcam-box {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.7);
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  overflow: hidden;
  width: 160px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
@media (max-width: 768px) {
  .hero-webcam-box { display: none; }
}
.hero-webcam-box:hover { border-color: var(--accent-dark); text-decoration: none; }
.hero-webcam-img { width: 100%; height: 90px; object-fit: cover; display: block; }
.hero-webcam-label {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  padding: 0.25rem;
  background: rgba(0,0,0,0.8);
}

/* Druck-Button im Subheader */
.subheader .druck-btn {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #a0a09e;
  font-size: 1rem;
  padding: 0.2rem 0.5rem;
}
.subheader .druck-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ===== Zugangs-Banner ===== */
.zugang-banner {
  background: var(--accent);
  color: var(--dark);
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
}
.zugang-banner-link {
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
}
.zugang-banner-link:hover { text-decoration: underline; }

/* ===== Markdown-Inhalt ===== */
.markdown-inhalt {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}
.markdown-inhalt h2 { font-size: 1.1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
.markdown-inhalt h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0.4rem; }
.markdown-inhalt p { margin-bottom: 0.75rem; }
.markdown-inhalt strong { font-weight: 600; }
.markdown-inhalt em { font-style: italic; }
.markdown-inhalt ul, .markdown-inhalt ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.markdown-inhalt li { margin-bottom: 0.25rem; }
.markdown-inhalt a { color: var(--accent-dark); text-decoration: underline; }
.markdown-inhalt a:hover { color: var(--accent); }
