:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1d22;
  --muted: #5c6573;
  --brand: #1f6feb;
  --border: #e1e5ea;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

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

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
}

/* ---- Dropdown container ---- */
.nav-menu {
  position: relative;
}

.nav-menu__trigger {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Chevron via CSS — no extra icon needed */
.nav-menu__trigger::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
  opacity: 0.6;
}

.nav-menu:hover .nav-menu__trigger,
.nav-menu__trigger[aria-expanded="true"] {
  background: rgba(31, 111, 235, 0.08);
  color: var(--brand);
}

.nav-menu__trigger[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* ---- Dropdown panel ---- */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

/* Open on hover (desktop) */
.nav-menu:hover .nav-dropdown,
.nav-menu:focus-within .nav-dropdown,
.nav-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown__item {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown__item:hover,
.nav-dropdown__item[aria-current="page"] {
  background: rgba(31, 111, 235, 0.08);
  color: var(--brand);
}

.nav-dropdown__item[aria-current="page"] {
  font-weight: 600;
}

.lang-toggle {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
  background: rgba(31, 111, 235, 0.08);
  color: var(--brand);
}

.hero {
  padding: 48px 0 32px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.lede {
  color: var(--muted);
  max-width: 60ch;
}

/* ---- Filter bar ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 32px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.filter-bar__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-bar__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.filter-bar__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.pill--active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.filter-bar__select {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 6px 28px 6px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6573' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s ease;
}

.filter-bar__select:focus,
.filter-bar__select:hover {
  border-color: var(--brand);
  outline: none;
}

.filter-bar__count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  align-self: flex-end;
  padding-bottom: 2px;
}

.filter-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-size: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding-bottom: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.card-emoji {
  font-size: 2.8rem;
  line-height: 1;
  /* slight pop without affecting layout */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

.card h2 {
  font-size: 1.4rem;
}

.route-emoji {
  font-size: 0.9em;
  vertical-align: middle;
  margin-right: 4px;
}

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

.facts {
  display: grid;
  gap: 12px;
}

.facts div {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

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

.button {
  align-self: start;
  background: var(--brand);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
}

.route-header {
  padding: 40px 0 16px;
}

.route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  padding-bottom: 48px;
}

.route-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.meta-list {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
}

.map-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 360px;
  position: relative;
  box-shadow: var(--shadow);
}

.map {
  height: 100%;
  min-height: 360px;
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(246, 247, 249, 0.9), rgba(246, 247, 249, 0.65));
  color: var(--muted);
  text-align: center;
  padding: 24px;
  gap: 12px;
}

.map-overlay button {
  border: none;
  background: var(--brand);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-updated {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.7;
}

/* Show the span that matches the active language; hide the other. */
/* Default = de; toggled by JS via data-lang on <html> */
html[lang="de"] .footer-updated__en { display: none; }
html[lang="en"] .footer-updated__de { display: none; }

/* Private project notice on legal pages */
.route-card--private-note {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border-left: 3px solid var(--brand);
  font-style: italic;
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  gap: 14px;
  margin-left: 16px;
  font-weight: 600;
}

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

.footer-links a:hover {
  color: var(--brand);
}

.coffee-link,
.donate-link {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.coffee-link:hover,
.donate-link:hover {
  color: #0070ba;
}

/* Standalone button variant used on the impressum card */
.coffee-link--button,
.donate-link--button {
  display: inline-block;
  background: #0070ba;
  color: #ffffff !important;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.coffee-link--button:hover,
.donate-link--button:hover {
  background: #005ea6;
  color: #ffffff !important;
}

.route-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.route-actions a {
  color: var(--brand);
  font-weight: 600;
}

/* ---- Kids feedback ---- */
.kids-feedback {
  margin: 32px 0 48px;
}

.kids-feedback__heading {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--text);
}

.kids-feedback__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.kids-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.kids-col__heading {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kids-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kids-list li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}

.kids-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--border);
}

/* Language switching — same pattern as footer timestamp */
html[lang="de"] .kids-list--en { display: none; }
html[lang="en"] .kids-list--de { display: none; }

@media (max-width: 900px) {
  .route-grid {
    grid-template-columns: 1fr;
  }
}
