/* =========================================================
   Wien 2026 – Urlaubsplanung
   Gemeinsames Stylesheet
   - Responsive: Desktop & Mobile
   - Light- (Day) und Dark- (Night) Modus
   ========================================================= */

/* ---------- Design-Tokens / Farbvariablen ---------- */
:root {
  /* Markenfarbe (aus dem Original-Reiseplan) */
  --accent: #2e7d32;
  --accent-strong: #1b5e20;
  --accent-soft: rgba(46, 125, 50, 0.12);

  /* Day-Mode (Standard) */
  --bg: #f6f7f4;
  --bg-elev: #ffffff;
  --bg-elev-2: #f0f2ec;
  --text: #1c2024;
  --text-muted: #5a6470;
  --border: #e1e5dc;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --link: #2e7d32;
  --link-visited: #6a8f6c;
  --warn-bg: #fff4e5;
  --warn-border: #ffb74d;
  --warn-text: #8a5200;

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 960px;
  --header-h: 60px;
}

/* ---------- Night-Mode ---------- */
:root[data-theme="dark"] {
  --accent: #6abf69;
  --accent-strong: #81c784;
  --accent-soft: rgba(106, 191, 105, 0.14);

  --bg: #1a1c1a;
  --bg-elev: #242724;
  --bg-elev-2: #2d312d;
  --text: #e8ebe6;
  --text-muted: #9aa39a;
  --border: #383d38;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  --link: #81c784;
  --link-visited: #a5b7a6;
  --warn-bg: #3a2f1c;
  --warn-border: #b8860b;
  --warn-text: #ffcc80;
}

/* Folgt der Systemeinstellung, solange der/die Nutzer:in nicht manuell wählt */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #6abf69;
    --accent-strong: #81c784;
    --accent-soft: rgba(106, 191, 105, 0.14);

    --bg: #1a1c1a;
    --bg-elev: #242724;
    --bg-elev-2: #2d312d;
    --text: #e8ebe6;
    --text-muted: #9aa39a;
    --border: #383d38;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
    --link: #81c784;
    --link-visited: #a5b7a6;
    --warn-bg: #3a2f1c;
    --warn-border: #b8860b;
    --warn-text: #ffcc80;
  }
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; height: auto; }

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

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(16px, 4vw);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .flag { font-size: 1.3rem; line-height: 1; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.header-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.header-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Theme-Umschalter */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover {
  transform: rotate(-12deg) scale(1.05);
  border-color: var(--accent);
}
.theme-toggle:active { transform: scale(0.94); }
/* Passendes Icon je nach Modus */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Layout-Container ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 max(16px, 4vw) 64px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px max(16px, 4vw) 40px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--accent-soft), transparent 60%);
}
.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

/* ---------- Schnellfakten ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 32px 0;
}
.fact {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.fact .label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.fact .value {
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Karten-Raster (Startseite) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.card .card-icon { font-size: 1.8rem; }
.card h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card .card-cta {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Abschnitts-Überschriften ---------- */
.section-title {
  margin: 48px 0 4px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}
.section-intro { margin: 0 0 8px; color: var(--text-muted); }

/* ---------- Tages-Zeitstrahl (Reiseplan) ---------- */
.day {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 18px 0;
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 6px;
}
.day-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.day h3 {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

/* Tageskarte (Google Maps Einbettung) */
.day-map { margin-top: 18px; }
.day-map .map-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.day-map iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: block;
  background: var(--bg-elev-2);
}
.day-map .map-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
@media (max-width: 600px) {
  .day-map iframe { aspect-ratio: 4 / 3; }
}

/* Leaflet-Tageskarte (OpenStreetMap, ohne API-Key) */
.day-map-canvas {
  width: 100%;
  height: 340px;
  position: relative;
  z-index: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
}
@media (max-width: 600px) {
  .day-map-canvas { height: 280px; }
}
.leaflet-container { font: inherit; background: var(--bg-elev-2); }

/* Nummerierte Stations-Marker */
.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  font-weight: 700;
}
.map-pin.home { background: var(--accent-strong); }

/* Dunkler Kartenstil im Night-Mode (nur die Kacheln, nicht die Marker) */
:root[data-theme="dark"] .leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9);
  }
}

/* Einzelne Programmpunkte */
.items { margin: 14px 0 0; padding: 0; list-style: none; }
.items > li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-top: 1px solid var(--border);
}
.items > li:first-child { border-top: none; }
.items > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.items .tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
  margin-right: 6px;
}
.items .note {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Hinweis-/Warnbox ---------- */
.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.95rem;
}
.callout.warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-border);
  color: var(--warn-text);
}
.callout.warn a { color: inherit; text-decoration: underline; }
.callout strong { font-weight: 700; }

/* ---------- Info-/Café-Listen ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.tile h4 { margin: 0 0 4px; font-size: 1.05rem; }
.tile .meta {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.tile p { margin: 8px 0 0; font-size: 0.92rem; color: var(--text-muted); }
.tile.best { border-color: var(--accent); }
.tile.best .meta { color: var(--accent); }

/* ---------- Hervorhebungs-Badge ---------- */
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- Inhaltsverzeichnis (Sprungmarken) ---------- */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 8px;
}
.toc a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-muted);
}
.toc a:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Trenner ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px max(16px, 4vw);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.site-footer a { color: var(--text-muted); text-decoration: underline; }

/* "Nach oben"-Knopf */
.to-top {
  display: inline-block;
  margin-top: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Mobile Feinschliff ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand small { display: none; }
  .header-nav { gap: 2px; }
  .header-nav a { padding: 6px 8px; font-size: 0.82rem; }
  .day { padding: 18px 16px; }
  .hero { padding: 40px 16px 28px; }
}

/* Weiche Übergänge respektieren Nutzerpräferenz */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
