/* Fahrrad-Blog — warm, verspielt, mobilfreundlich */
:root {
  --bg: #eef3ef;
  --bg-warm: #f6f3ee;
  --card: #ffffff;
  --text: #1a1f1c;
  --muted: #5c6560;
  --accent: #1a7a52;
  --accent-deep: #145a3d;
  --accent2: #2b6cb0;
  --border: #d4ddd6;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(25, 55, 40, 0.09);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --max: 920px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 1rem;
}

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

.site-header {
  background: linear-gradient(180deg, #fff 0%, #f7faf7 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(30, 60, 45, 0.06);
}

.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #3d9e6c 40%, var(--accent2) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  max-width: calc(var(--max) + 2rem);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-deep);
  text-decoration: none;
  max-width: min(100%, 16rem);
}

.logo:hover {
  color: var(--accent);
}

.logo:hover .logo-bike {
  transform: rotate(-4deg) translateY(-1px);
}

.logo-mark {
  flex-shrink: 0;
  color: var(--accent);
  line-height: 0;
}

.logo-bike {
  display: block;
  transition: transform 0.2s ease;
}

.logo-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.logo-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.75rem;
  }
  .main-nav.is-open {
    display: flex;
  }
}

.main-content {
  padding: 1.5rem 1rem 3rem;
}

.home-hero {
  text-align: center;
  padding: 2.25rem 1.25rem 2.5rem;
  margin-bottom: 1.5rem;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(26, 122, 82, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, #fff 0%, var(--bg-warm) 45%, #e8f0ea 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.home-hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6.5vw, 3.15rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--accent-deep);
  letter-spacing: -0.03em;
}

.home-hero-lead {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.55;
}

.hero-km {
  text-align: center;
  padding: 2rem 1rem 2.25rem;
  background: linear-gradient(135deg, #dff5ea 0%, #f4f6f3 42%, #dbe8f8 100%);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.hero-label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-value {
  margin: 0.35rem 0 0;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.km-unit {
  font-size: 0.45em;
  font-weight: 600;
  vertical-align: super;
  margin-left: 0.15em;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.section-title,
.page-title {
  margin-top: 0;
  font-size: 1.35rem;
}

.page-title {
  font-size: 1.6rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0;
  text-decoration: none;
  color: inherit;
}

.post-list-link:hover .post-list-title {
  color: var(--accent2);
}

.post-list-title {
  font-weight: 600;
}

.post-list-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.more-link {
  margin: 0.75rem 0 0;
}

.more-link a {
  color: var(--accent2);
  font-weight: 600;
}

.leaflet-map {
  height: min(420px, 60vh);
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
}

.post-map {
  height: min(340px, 50vh);
}

.photos-map {
  height: min(480px, 65vh);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.data-table .num {
  text-align: right;
  white-space: nowrap;
}

.data-table a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 500;
}

.data-table a:hover {
  text-decoration: underline;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.view-toggle a {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}

.view-toggle a.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.gallery-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(26, 90, 61, 0.15);
  outline: none;
}

.gallery-thumb:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 122, 82, 0.45);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.gallery-thumb--post img {
  aspect-ratio: 16 / 10;
}

.post-header .post-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.post-meta-line {
  margin: 0 0 1rem;
  color: var(--muted);
}

.prose {
  font-size: 1.05rem;
}

.prose h1.post-h1 {
  font-size: 1.5rem;
  margin-top: 0;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  scroll-margin-top: 5rem;
  color: var(--accent);
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  color: var(--accent2);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.post-gallery--lightbox {
  margin-top: 0.25rem;
}

/* Lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(12, 18, 15, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.photo-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.photo-lightbox__panel > * {
  pointer-events: auto;
}

.photo-lightbox__stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  min-height: 40vh;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
}

.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.photo-lightbox__nav:hover,
.photo-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: none;
}

.photo-lightbox__nav--prev {
  left: 0.25rem;
}

.photo-lightbox__nav--next {
  right: 0.25rem;
}

@media (min-width: 900px) {
  .photo-lightbox__nav--prev {
    left: -0.25rem;
  }

  .photo-lightbox__nav--next {
    right: -0.25rem;
  }
}

.photo-lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.photo-lightbox__close:hover,
.photo-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.photo-lightbox__meta {
  width: 100%;
  max-width: 42rem;
  text-align: center;
  color: #e8ece9;
  padding: 0 0.5rem 0.25rem;
}

.photo-lightbox__caption {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.photo-lightbox__caption:empty {
  display: none;
}

.photo-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.photo-lightbox__tour {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #2d9d6a 100%);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.photo-lightbox__tour:hover,
.photo-lightbox__tour:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.photo-lightbox__counter {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.25rem;
}

body.photo-lightbox-open {
  overflow: hidden;
}

.legal h2 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

/* Impressum / Datenschutz: weniger dominant oben */
.main-content.wrap:has(> .card.legal-compact) {
  padding-top: 0.65rem;
}

.card.legal-compact {
  padding: 1rem 1.2rem;
}

.card.legal-compact .page-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card.legal-compact > p:first-of-type {
  margin-top: 0;
}

.anchor-sec {
  scroll-margin-top: 5rem;
}

.legal-warn code {
  font-size: 0.88em;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem 1rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner a {
  color: var(--muted);
}

/* Admin */
.admin-bar {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.admin-bar a {
  color: #93c5fd;
  margin-right: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  vertical-align: top;
}

.admin-table .actions {
  white-space: nowrap;
}

.btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="password"],
.form-row input[type="file"],
.form-row textarea,
.form-row select {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.form-row textarea {
  min-height: 220px;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.flash.ok {
  background: #dcfce7;
  border: 1px solid #86efac;
}

.flash.err {
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.login-box {
  max-width: 400px;
  margin: 2rem auto;
}

.image-upload-preview-wrap {
  margin: 1rem 0 1.25rem;
}

.admin-image-draft-table .admin-img-cell,
.admin-image-table .admin-img-cell {
  width: 140px;
  vertical-align: top;
}

.admin-image-draft-table img,
.admin-image-table .admin-img-cell img {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

.admin-caption-input {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.form-actions-bottom {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.admin-route-preview-block {
  margin-top: 0.5rem;
}

.admin-images-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.35rem 0 0.5rem;
}

.admin-file-pick-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-inline-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-map-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.admin-map-select {
  font: inherit;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.admin-textarea-wide {
  width: 100%;
  max-width: 42rem;
  min-height: 9rem;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  line-height: 1.45;
}

/* Fotokarte: Miniatur statt Standard-Pin */
.leaflet-div-icon.photo-map-thumb-wrap {
  border: none;
  background: transparent;
}

.photo-map-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  border: 2px solid #fff;
}

.photo-map-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-popup-inner {
  text-align: center;
}

.photo-popup-img {
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 0.5rem;
}

.photo-popup-cap {
  margin: 0;
  font-size: 0.9rem;
}

.photo-popup-link {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}
