/* ═══════════════════════════════════════════════════════
   petop.eu – Global Stylesheet
   ═══════════════════════════════════════════════════════ */

:root {
  /* ── EU Kernfarben ── */
  --eu-blue:    #003399;
  --eu-gold:    #FFCC00;

  /* ── Aliases für bestehende Komponenten ── */
  --orange:     #FFCC00;   /* EU-Gold ersetzt Orange */
  --green:      #003399;   /* EU-Blau */
  --blue:       #003399;   /* EU-Blau */
  --dark-green: #002080;   /* dunkleres EU-Blau */
  --mid-green:  #003399;
  --light-green:#1A4FBF;
  --bg-green:   #EEF2FF;   /* sehr helles EU-Blau */
  --dark-blue:  #001A66;
  --mid-blue:   #002080;
  --light-blue: #003399;
  --bg-blue:    #EEF2FF;
  --dark-red:   #001A66;   /* für Tanken-Seite: dunkel */
  --mid-red:    #002080;
  --light-red:  #003399;
  --bg-red:     #EEF2FF;
  --sidebar-w:  280px;
  --topbar-h:   56px;
  --radius:     12px;
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --font-head:  'Poppins', sans-serif;
  --font-body:  'Open Sans', sans-serif;
  --text:       #1a1a1a;
  --text-muted: #666;
  --bg:         #f4f6f8;
  --card-bg:    #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  border-bottom: 3px solid var(--eu-gold);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem;
}

.topbar-brand {
  font-family: var(--font-head);
  font-weight: 700; font-size: 1.2rem;
  color: var(--eu-blue); text-decoration: none;
  flex: 1;
}

.topbar-nav { display: flex; gap: 0.5rem; }
.topbar-nav a {
  text-decoration: none; font-size: 1.15rem;
  padding: 0.3rem 0.5rem; border-radius: 8px;
  transition: background 0.15s;
}
.topbar-nav a:hover { background: var(--bg); }
.topbar-nav a.active { background: var(--bg-blue); border-left: 3px solid var(--eu-gold); }

.burger {
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; padding: 0.2rem 0.4rem;
  border-radius: 6px; color: var(--text);
  transition: background 0.15s;
}
.burger:hover { background: #EEF2FF; color: var(--eu-blue); }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: var(--sidebar-w);
  background: #fff;
  box-shadow: 4px 0 20px rgba(0,0,0,.12);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-inner { padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem; min-height: 100%; }

.sidebar-close {
  align-self: flex-end;
  background: none; border: none; font-size: 1.1rem;
  cursor: pointer; color: var(--text-muted);
}

.sidebar-weather iframe { border-radius: var(--radius); width: 100%; }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-link {
  display: block; padding: 0.6rem 0.9rem;
  text-decoration: none; color: var(--text);
  border-radius: 8px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg); }
.nav-link.active { background: #EEF2FF; color: var(--eu-blue); font-weight: 600; }

.sidebar-social { display: flex; flex-direction: column; gap: 0.3rem; }
.social-label { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.sidebar-social a { text-decoration: none; color: var(--text); font-size: 0.9rem; padding: 0.2rem 0; }
.sidebar-social a:hover { color: var(--eu-blue); }

.sidebar-copy { color: var(--text-muted); font-size: 0.78rem; margin-top: auto; }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,.35);
  transition: opacity 0.28s;
}
.sidebar-overlay.open { display: block; }

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.page-content {
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h) - 56px);
  padding: 2rem 1.25rem;
  max-width: 900px; margin-left: auto; margin-right: auto;
  margin-top: calc(var(--topbar-h) + 1.5rem);
}

.page-footer {
  text-align: center; padding: 1rem;
  color: var(--text-muted); font-size: 0.85rem;
  border-top: 1px solid #e5e7eb;
}
.page-footer a { color: var(--eu-blue); text-decoration: none; }

/* ── HERO HEADER ─────────────────────────────────────────── */
.page-hero {
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.page-hero h1 {
  font-family: var(--font-head);
  color: #fff; font-size: 2rem; margin: 0;
  text-shadow: 1px 2px 6px rgba(0,0,0,.25);
}
.page-hero p { color: rgba(255,255,255,.85); margin: 0.3rem 0 0; font-size: 0.95rem; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-family: var(--font-head); font-weight: 600;
  font-size: 1.1rem; margin-bottom: 0.75rem;
}

/* ── STATION HEADER ──────────────────────────────────────── */
.station-hdr {
  border-radius: var(--radius);
  padding: 0.75rem 1.4rem;
  margin-bottom: 0.9rem;
}
.station-hdr h2 {
  font-family: var(--font-head);
  color: #fff; font-size: 1.3rem; margin: 0;
}

/* ── DEPARTURE TABLE ─────────────────────────────────────── */
.dep-table {
  width: 100%; border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.dep-table thead tr { color: #fff; }
.dep-table thead th {
  padding: 0.7rem 1rem; text-align: left;
  font-family: var(--font-head); font-size: 0.85rem;
  font-weight: 600; letter-spacing: .03em;
}
.dep-table tbody tr { border-bottom: 1px solid var(--bg-green); }
.dep-table tbody tr:last-child { border-bottom: none; }
.dep-table tbody tr:hover { background: #f8fffe; }
.dep-table tbody td { padding: 0.6rem 1rem; font-size: 0.93rem; vertical-align: middle; }

.time-cell { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.time-planned { color: #999; text-decoration: line-through; font-size: 0.78rem; display: block; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
}
.badge-ontime  { background: var(--bg-green); color: var(--mid-green); }
.badge-late    { background: #FFECB3; color: #E65100; }
.badge-cancel  { background: #FFCDD2; color: #B71C1C; }
.badge-line    { color: #fff; font-size: 0.88rem; font-weight: 700; }
.badge-platform{ font-size: 0.85rem; font-weight: 600; }

/* ── STOPS TOOLTIP ───────────────────────────────────────── */
.has-stops {
  cursor: help;
  border-bottom: 1px dotted #aaa;
}

/* ── STATUS MESSAGES ─────────────────────────────────────── */
.msg-loading, .msg-empty, .msg-error {
  padding: 1.2rem; border-radius: var(--radius);
  text-align: center; font-style: italic; margin-bottom: 1rem;
}
.msg-loading { background: #f0f4ff; color: var(--eu-blue); }
.msg-empty   { background: var(--bg-green); color: var(--mid-green); }
.msg-error   { background: #FFEBEE; color: #B71C1C; text-align: left; border-left: 4px solid #C62828; }

/* ── NEWS CARDS ──────────────────────────────────────────── */
.news-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-left: 5px solid var(--eu-gold);
}
.news-card h3 { font-family: var(--font-head); color: #222; margin-bottom: 0.5rem; }
.news-card p  { color: #444; line-height: 1.65; }
.news-meta    { font-size: 0.82rem; color: #888; margin-bottom: 0.4rem; }
.news-source  {
  display: inline-block;
  background: var(--eu-gold); color: var(--eu-blue);
  padding: 0.1rem 0.6rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; margin-right: 0.4rem;
}
.news-link { color: var(--eu-blue) !important; font-weight: 600; font-size: 0.9rem; }

/* ── NINA WARNINGS ───────────────────────────────────────── */
.nina-card {
  padding: 0.8rem 1rem; border-radius: 8px;
  margin-bottom: 0.5rem; border-left: 6px solid;
}
.nina-ok      { background: #f0fff4; border-color: #003399; }
.nina-ok strong { color: #1e8449; }
.nina-ok .nina-msg { color: #1e8449; }
.nina-warn    { background: #fff0f0; border-color: #c0392b; }
.nina-warn strong { color: #922b21; }
.nina-warn .nina-msg { color: #922b21; }
.nina-msg     { font-size: 0.9rem; margin-top: 0.25rem; }

/* ── CHEAPEST STATION BANNER ─────────────────────────────── */
.cheapest-banner {
  background: linear-gradient(135deg, #001A66, #003399);
  border-radius: var(--radius); padding: 1.2rem 1.5rem;
  margin-bottom: 1.2rem; box-shadow: var(--shadow); color: #fff;
}
.cheapest-banner .cb-label { font-size: 0.82rem; opacity: .85; margin-bottom: 0.25rem; }
.cheapest-banner .cb-name  { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; }
.cheapest-banner .cb-addr  { font-size: 0.88rem; opacity: .82; margin: 0.3rem 0 0.8rem; }
.cb-prices { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cb-price {
  background: rgba(255,255,255,.15); border-radius: 8px;
  padding: 0.45rem 0.9rem; text-align: center;
}
.cb-price .cb-fuel { font-size: 0.72rem; opacity: .8; }
.cb-price .cb-val  { font-size: 1.15rem; font-weight: 700; }
.cb-nav {
  display: inline-block; background: rgba(255,255,255,.2);
  color: #fff; text-decoration: none;
  border-radius: 6px; padding: 2px 10px; font-size: 0.82rem; margin-left: 0.5rem;
}

/* ── MAP ─────────────────────────────────────────────────── */
#map { height: 550px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }

.map-legend {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  align-items: center; font-size: 0.88rem; margin-top: 0.5rem;
}
.legend-dot {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 3px rgba(0,0,0,.3); margin-right: 5px;
  vertical-align: middle;
}

/* ── IMPRESSUM ───────────────────────────────────────────── */
.legal h2 { font-family: var(--font-head); margin: 1.5rem 0 0.5rem; font-size: 1.3rem; }
.legal h3 { font-family: var(--font-head); margin: 1rem 0 0.3rem; font-size: 1rem; color: #444; }
.legal p, .legal li { line-height: 1.7; color: #333; margin-bottom: 0.5rem; }
.legal ul { padding-left: 1.3rem; }
.legal a  { color: var(--eu-blue); }
.legal .info-box {
  background: var(--bg-blue); border-radius: 8px;
  padding: 1rem 1.25rem; margin: 0.5rem 0;
  border-left: 4px solid var(--blue);
}

/* ── ÜBER MICH ───────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--blue) 100%);
  border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem;
  color: #fff; text-align: center; box-shadow: var(--shadow);
}
.profile-hero h1 { font-family: var(--font-head); font-size: 2rem; }
.profile-hero p  { opacity: .88; margin-top: 0.4rem; }

.skill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.skill-tag {
  background: #EEF2FF; color: var(--eu-blue);
  border-radius: 20px; padding: 0.25rem 0.75rem;
  font-size: 0.83rem; font-weight: 600;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-hero h1 { font-size: 1.5rem; }
  .dep-table thead th, .dep-table tbody td { padding: 0.5rem 0.6rem; }
  #map { height: 380px; }
  .cb-prices { gap: 0.5rem; }
}

/* ── Skeleton Loader ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}

.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.sk-line  { height: 14px; margin-bottom: 10px; }
.sk-title { height: 20px; width: 55%; margin-bottom: 14px; }
.sk-img   { height: 180px; margin-bottom: 14px; }
.sk-short { width: 35%; }
.sk-med   { width: 70%; }

.skeleton-table-row {
  display: flex; gap: 1rem; padding: 0.6rem 1rem;
  border-bottom: 1px solid #f0f0f0;
}
.sk-cell-time  { height: 16px; width: 60px; }
.sk-cell-line  { height: 16px; width: 40px; }
.sk-cell-dest  { height: 16px; flex: 1; }

/* ── Lazy Image Wrapper ───────────────────────────────────── */
.img-wrap {
  width: 100%;
  min-height: 180px;     /* Platzhalter-Höhe während Skeleton */
  border-radius: 8px;
  margin-bottom: .75rem;
  overflow: hidden;
}
.img-wrap.skeleton {
  /* Shimmer solange Bild noch nicht geladen */
  background: linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.post-img {
  width: 100%;
  display: block;
  border-radius: 8px;
}
.post-video {
  width: 100%;
  border-radius: 8px;
  margin-bottom: .75rem;
  max-height: 480px;
}

/* ── Startseite: Medien halbe Breite, zentriert ──────────── */
.post-card .img-wrap {
  max-width: 50%;
  min-height: 100px;   /* Skeleton-Platzhalter kleiner */
  margin: 0 auto .75rem;
}

.post-card .post-video {
  max-width: 50%;
  display: block;
  margin: 0 auto .75rem;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .92);
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
  /* flex wird per JS gesetzt */
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-overlay img {
  max-width: 96vw;
  max-height: 94vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  cursor: zoom-out;
  /* sanftes Einblenden */
  animation: lb-in .18s ease;
}
@keyframes lb-in {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1);   }
}
.lightbox-close {
  position: fixed;
  top: 16px; right: 20px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: opacity .15s;
  user-select: none;
}
.lightbox-close:hover { opacity: 1; }

/* Bild in Post-Card anklickbar machen */
.post-card .post-img {
  cursor: zoom-in;
  transition: opacity .4s, transform .2s;
}
.post-card .post-img:hover {
  transform: scale(1.01);
}