/* ============================================================
   DESIGN TOKENS — maritiem, modern, minimalistisch
   ============================================================ */
:root {
  --navy:        #1B3A6B;
  --navy-dark:   #122a50;
  --ocean:       #2E6DA4;
  --sky:         #5BA4D0;
  --foam:        #EAF4FB;
  --wave:        #B8D9EE;
  --sand:        #F6EEE4;
  --white:       #FFFFFF;
  --text:        #1A2B4A;
  --text-muted:  #567295;
  --accent:      #E07A25;
  --accent-dark: #C46618;
  --success:     #1E8A5A;
  --warning:     #C47A1E;
  --error:       #C0392B;
  --border:      #D4E5F2;
  --shadow-sm:   0 1px 3px rgba(27,58,107,.10);
  --shadow-md:   0 4px 16px rgba(27,58,107,.12);
  --shadow-lg:   0 8px 32px rgba(27,58,107,.16);
  --radius:      12px;
  --radius-sm:   8px;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #F2F7FC;
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--ocean); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem;    font-weight: 600; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  letter-spacing: -.01em;
}
.logo-icon { font-size: 1.4rem; }
.logo-tag {
  font-size: .7rem;
  font-weight: 400;
  color: var(--wave);
  display: block;
  margin-top: -2px;
}
.header-meta {
  font-size: .74rem;
  color: var(--wave);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.gtfs-badge {
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  padding: .2rem .6rem;
  font-size: .7rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #888; flex-shrink: 0; }
.dot.ready   { background: #4CAF50; }
.dot.loading { background: #FFC107; animation: pulse 1.4s ease-in-out infinite; }
.dot.error   { background: #E07A25; }

/* ── Hero / Search ──────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--ocean) 55%, var(--sky) 100%);
  padding: 2.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 50px;
  background: #F2F7FC;
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
}
.hero-title {
  color: var(--white);
  margin-bottom: .4rem;
}
.hero-sub {
  color: var(--wave);
  font-size: .95rem;
  margin-bottom: 1.8rem;
}

/* Search card */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}
.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .75rem;
}
.search-col {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.search-time-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
}
.search-time-row .field { flex: 1; }
.field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.field label {
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field select,
.field input {
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 .85rem;
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  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 d='M1 1l5 5 5-5' stroke='%23567295' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
}
.field input[type="date"],
.field input[type="time"] {
  background-image: none;
  padding-right: .85rem;
}
.field select:focus,
.field input:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(46,109,164,.15);
}
.swap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--foam);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 46px;
  height: 46px;
  color: var(--ocean);
  font-size: 1.1rem;
  transition: background .15s;
  align-self: end;
}
.swap-btn:hover { background: var(--wave); }
.btn-search {
  height: 46px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 1.8rem;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-search:hover  { background: var(--accent-dark); }
.btn-search:active { transform: scale(.98); }

/* ── Main Layout ────────────────────────────────────────────── */
.main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}
/* Welkomststatus: geen filterbalk, resultaten over volledige breedte */
.main--welcome {
  grid-template-columns: 1fr;
}
.main--welcome .results-area {
  display: flex;
  justify-content: center;
}
.main--welcome .state-box {
  width: 100%;
  max-width: 740px;   /* ruim breder dan de zoekkaart (~560px zichtbaar in hero) */
}

/* ── Filters ────────────────────────────────────────────────── */
.filters-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  position: sticky;
  top: 76px;
}
.filters-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.filter-group {
  margin-bottom: 1.2rem;
}
.filter-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: .4rem;
}
.filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.chip {
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: .22rem .6rem;
  font-size: .74rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--white);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover         { border-color: var(--ocean); color: var(--ocean); }
.chip.active        { background: var(--navy); border-color: var(--navy); color: var(--white); }
.reset-filters {
  width: 100%;
  padding: .5rem;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .5rem;
  transition: all .15s;
}
.reset-filters:hover { border-color: var(--error); color: var(--error); }

/* ── Results ────────────────────────────────────────────────── */
.results-area {}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.results-count {
  font-size: .88rem;
  color: var(--text-muted);
}
.results-count strong { color: var(--text); }
.source-badge {
  font-size: .72rem;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-weight: 500;
}
.source-live     { background: #E6F7EE; color: var(--success); }
.source-cache    { background: #FFF7E6; color: var(--warning); }
.source-fallback { background: #FFF0F0; color: var(--error); }

/* ── Freshness indicator ─────────────────────────────────────── */
.freshness-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .32rem .75rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 500;
  margin-bottom: .85rem;
  border: 1px solid transparent;
}
.freshness-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.freshness--fresh {
  background: rgba(30, 138, 90, .08);
  border-color: rgba(30, 138, 90, .22);
  color: #1a6e47;
}
.freshness--fresh .freshness-dot { background: var(--success); }

.freshness--stale {
  background: rgba(196, 122, 30, .09);
  border-color: rgba(196, 122, 30, .25);
  color: #7a5200;
}
.freshness--stale .freshness-dot { background: var(--warning); }

.freshness--old {
  background: rgba(224, 122, 37, .10);
  border-color: rgba(224, 122, 37, .28);
  color: #b35a00;
}
.freshness--old .freshness-dot { background: var(--accent); }

.freshness--unknown {
  background: rgba(86, 114, 149, .07);
  border-color: rgba(86, 114, 149, .18);
  color: var(--text-muted);
}
.freshness--unknown .freshness-dot { background: var(--text-muted); }

/* ── Departure Card ─────────────────────────────────────────── */
.departure-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(19, 43, 86, 0.06);
  margin-bottom: 1rem;
  border: 1px solid #dbe6f1;
  border-left: 4px solid var(--ocean);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  overflow: hidden;
}
.departure-card:hover {
  box-shadow: 0 10px 28px rgba(19, 43, 86, 0.1);
  transform: translateY(-1px);
  border-color: #c8d9eb;
}
.card-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
}
.departure-card.service-sneldienst { border-left-color: var(--accent); }
.departure-card.service-express    { border-left-color: var(--accent); }
.departure-card.past {
  opacity: .52;
  border-left-color: var(--text-muted);
}
.departure-card.past .time-value { text-decoration: line-through; color: var(--text-muted); }
/* ── TESO drukte & status ───────────────────────────────────── */
.departure-card.cancelled {
  opacity: .6;
  border-left-color: #e5c400;
}
.departure-card.cancelled .time-value {
  text-decoration: line-through;
  color: var(--text-muted);
}
.departure-card.is-extra {
  border-left-color: #22c55e;
}
.wait-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .68rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 20px;
  white-space: nowrap;
}
.wait-low    { background: #f8f0c8; color: #5c3d00; }
.wait-medium { background: #f9d898; color: #6b3b00; }
.wait-high   { background: #f3ab80; color: #6b2800; }
.extra-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 20px;
  background: #dcfce7;
  color: #14532d;
  white-space: nowrap;
}
.cancelled-badge {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 20px;
  background: #fef9c3;
  color: #713f12;
  white-space: nowrap;
}
.past-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 20px;
  padding: .15rem .55rem;
  background: var(--foam);
  color: var(--text-muted);
}

/* ── WPD beschikbaarheid ──────────────────────────────────────── */
.avail-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
  align-items: center;
}
.avail-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .72rem;
  font-weight: 500;
  padding: .15rem .5rem;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.avail-ok    { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.avail-warn  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.avail-full  { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.avail-seats { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

.dep-route {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.dep-icon { font-size: 1.3rem; }
.dep-from, .dep-to { font-weight: 600; font-size: 1rem; }
.dep-arrow { color: var(--text-muted); font-size: .9rem; }
.dep-operator {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--foam);
  border-radius: 20px;
  padding: .15rem .6rem;
}
.service-pill {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 20px;
  padding: .15rem .55rem;
  background: var(--sand);
  color: var(--accent);
}
.service-pill.snel { background: #FFF3E6; color: var(--accent); }

.dep-times {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.time-block { display: flex; flex-direction: column; }
.time-label  { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.time-value  { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
.time-sep    { color: var(--border); font-size: 1.2rem; margin-top: 8px; }
.duration-badge {
  background: var(--foam);
  border-radius: 20px;
  padding: .2rem .7rem;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ocean);
}

.dep-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
}
.btn-book {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: .55rem 1.1rem;
  font-size: .82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: background .15s;
  white-space: nowrap;
}
.btn-book:hover { background: var(--navy-dark); }
.btn-info {
  background: none;
  color: var(--ocean);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .4rem .9rem;
  font-size: .74rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: all .15s;
  white-space: nowrap;
}
.btn-info:hover  { border-color: var(--ocean); background: var(--foam); }
.btn-info.open   { background: var(--foam); border-color: var(--ocean); color: var(--navy); }


/* ── Departure Card Redesign ─────────────────────────────────── */

/* --- System UX Improvements --- */
.departure-card:first-child {
  border: 2px solid #2f6fed;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  background: linear-gradient(180deg,#ffffff,#f8fbff);
}

@media (min-width: 900px) {
  .card-main {
    grid-template-columns: 1.5fr 1fr auto;
    align-items: center;
  }

  .dep-layout {
    display: contents;
  }

  .dep-top {
    grid-column: 1;
  }

  .dep-body {
    grid-column: 2;
  }

  .dep-actions {
    grid-column: 3;
    min-width: 160px;
  }

  .dep-times {
    justify-content: center;
  }
}

.departure-card {
  border-left-width: 5px;
}
.card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.15rem;
  align-items: start;
  padding: 1.1rem 1.15rem 1.2rem;
}

.dep-layout {
  display: grid;
  gap: .85rem;
  min-width: 0;
}

.dep-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .9rem;
  align-items: start;
}

.dep-route-main {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  flex-wrap: wrap;
}

.dep-route-text {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  flex-wrap: wrap;
}

.dep-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.dep-from,
.dep-to {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy);
  line-height: 1.2;
}

.dep-arrow {
  color: var(--ocean);
  opacity: .55;
  font-size: 1rem;
}

.dep-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  justify-content: flex-end;
  align-items: center;
}

.dep-operator,
.service-pill,
.extra-badge,
.cancelled-badge,
.wait-badge,
.past-badge {
  line-height: 1;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}

.dep-operator {
  font-size: .74rem;
  font-weight: 700;
  color: #47688f;
  background: #e8f1fb;
  padding: .3rem .7rem;
}

.service-pill {
  font-size: .7rem;
  padding: .3rem .65rem;
}

.extra-badge,
.cancelled-badge,
.wait-badge,
.past-badge {
  font-size: .7rem;
  padding: .3rem .65rem;
}

.dep-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.dep-info {
  display: grid;
  gap: .7rem;
  min-width: 0;
}

.dep-times {
  display: grid;
  grid-template-columns: minmax(88px, auto) 28px minmax(88px, auto) auto;
  gap: .7rem;
  align-items: center;
}

.time-block {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.time-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.time-value {
  font-size: clamp(1.7rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--navy);
}

.time-sep {
  color: #bfcee0;
  font-size: 1.2rem;
  margin-top: 1rem;
  text-align: center;
}

.duration-badge {
  justify-self: start;
  background: #edf5fd;
  border: 1px solid #d8e7f7;
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ocean);
  white-space: nowrap;
}

.avail-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .05rem;
}

.avail-chip {
  font-size: .74rem;
  font-weight: 700;
  padding: .32rem .7rem;
  border-radius: 999px;
}

.dep-actions {
  display: grid;
  gap: .6rem;
  align-content: start;
  min-width: 176px;
  justify-items: stretch;
}

.btn-book,
.btn-info {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  font-size: .86rem;
  font-weight: 700;
}

.btn-book {
  box-shadow: 0 8px 18px rgba(23, 48, 94, 0.12);
}

.btn-info {
  background: #fff;
}

.data-note {
  margin-top: .1rem;
  text-align: center;
  font-size: .73rem;
}

.departure-card.cancelled .dep-from,
.departure-card.cancelled .dep-to,
.departure-card.cancelled .time-value {
  opacity: .7;
}

@media (max-width: 900px) {
  .dep-top,
  .dep-body {
    grid-template-columns: 1fr;
  }

  .dep-meta {
    justify-content: flex-start;
  }

  .dep-actions {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .data-note {
    grid-column: 1 / -1;
  }
}




/* ── UX cleanup: compact status + simplified filters ───────── */
.header-meta { display: none; }

.results-meta {
  margin-top: 1rem;
  padding: .9rem 0 0;
  color: var(--text-muted);
  font-size: .84rem;
  text-align: center;
}
.results-meta strong { color: var(--navy); font-weight: 700; }
.results-meta .dotsep { opacity: .45; margin: 0 .45rem; }

.filter-group.filter-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .filters-panel {
    display: none !important;
  }
}
@media (max-width: 640px) {
  .results-meta {
    font-size: .74rem;
    line-height: 1.45;
  }
}

/* ── Detail panel ────────────────────────────────────────────── */
.detail-panel {
  border-top: 1px solid var(--border);
  background: var(--foam);
  display: none;
  grid-template-columns: 240px 1fr;
  gap: 0;
  animation: fadeSlide .2s ease;
}
.detail-panel.open {
  display: grid;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.detail-map-wrap {
  height: 200px;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.detail-map { height: 100%; width: 100%; }
.detail-info {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.detail-route-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.detail-vessels-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-top: .25rem;
}
.vessel-cards {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.vessel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  min-width: 180px;
}
.vessel-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--navy);
  margin-bottom: .3rem;
}
.vessel-type {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.vessel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.vessel-stat {
  font-size: .72rem;
  background: var(--foam);
  border-radius: 12px;
  padding: .1rem .5rem;
  color: var(--ocean);
  font-weight: 600;
}
.vessel-note {
  font-size: .72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .3rem;
}

/* ── Prijstabel ──────────────────────────────────────────────── */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
  margin-top: .1rem;
}
.price-table th {
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .2rem .5rem .3rem 0;
  border-bottom: 1px solid var(--border);
}
.price-table th:not(:first-child) { text-align: right; }
.price-table td {
  padding: .3rem .5rem .3rem 0;
  border-bottom: 1px solid var(--foam);
  color: var(--text);
  vertical-align: middle;
}
.price-table td:not(:first-child) { text-align: right; font-weight: 600; color: var(--navy); }
.price-table td.na { color: var(--text-muted); font-weight: 400; font-size: .72rem; }
.price-table td.dal { color: var(--success); }
.price-table td.dal.na { color: var(--text-muted); font-weight: 400; font-size: .72rem; }
.price-table tr:last-child td { border-bottom: none; }
.price-note {
  font-size: .68rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .3rem;
}
@media (max-width: 640px) {
  .detail-panel { grid-template-columns: 1fr; }
  .detail-map-wrap { height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
}

.data-note {
  font-size: .68rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: right;
  max-width: 160px;
}

/* ── States ─────────────────────────────────────────────────── */
.state-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-sm);
}
.state-icon  { font-size: 3rem; margin-bottom: 1rem; text-align: center; }
.state-title { font-size: 1.1rem; font-weight: 600; margin-bottom: .4rem; text-align: center; }
.state-sub   { font-size: .88rem; color: var(--text-muted); text-align: center; max-width: 800px; margin: 0 auto; }
.state-sources { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.source-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: start;
  column-gap: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
}
.source-item strong { color: var(--text); }
.source-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  min-height: 38px;
  padding: .15rem .75rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-top: 0;
}
.source-live    { background: #d1fae5; color: #065f46; }
.source-scrape  { background: #dbeafe; color: #1e40af; }
.source-fallback { background: #fef3c7; color: #92400e; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--ocean);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 1rem;
}
.fallback-warning {
  background: #FFF8F0;
  border: 1.5px solid #F5C98A;
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .8rem;
  color: #8B5E1A;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.scrape-notice {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .8rem;
  color: #1E40AF;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.scrape-notice a { color: #1D4ED8; font-weight: 600; }
.no-results-tip {
  background: var(--foam);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .82rem;
  color: var(--ocean);
  margin-top: 1rem;
}

/* ── Info Strip ─────────────────────────────────────────────── */
.info-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.info-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .85rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
}
.operator-card {
  display: flex;
  gap: .4rem;
  align-items: center;
  padding: .5rem 1rem;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  white-space: nowrap;
}
.operator-card:last-child { border-right: none; }
.op-icon { font-size: 1.1rem; flex-shrink: 0; }
.op-name { font-weight: 600; font-size: .8rem; }
.op-route { font-size: .7rem; color: var(--text-muted); }
.op-link  { font-size: .68rem; color: var(--ocean); display: inline-block; }
.data-method { display: none; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--navy-dark);
  color: var(--wave);
  text-align: center;
  padding: 1.5rem;
  font-size: .74rem;
  line-height: 1.8;
}
footer a { color: var(--sky); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.fade-in { animation: fadeIn .25s ease both; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .main { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
  .main--welcome .state-box { max-width: 100%; }
}
@media (max-width: 640px) {
  .search-grid { grid-template-columns: 1fr; }
  .btn-search  { width: 100%; justify-content: center; }
  .hero        { padding: 2rem 1rem 3rem; }

  .card-main {
    grid-template-columns: 1fr;
    gap: .9rem;
    align-items: start;
    padding: 1rem 1rem 1.05rem;
  }

  .dep-route {
    gap: .45rem;
    margin-bottom: .7rem;
  }

  .dep-icon {
    font-size: 1.15rem;
  }

  .dep-from, .dep-to {
    font-size: 0.95rem;
  }

  .dep-operator,
  .service-pill,
  .extra-badge,
  .cancelled-badge,
  .wait-badge,
  .past-badge {
    font-size: .7rem;
  }

  .dep-times {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem .9rem;
    align-items: end;
  }

  .time-sep {
    display: none;
  }

  .time-block {
    min-width: 0;
  }

  .time-label {
    font-size: .68rem;
  }

  .time-value {
    font-size: 1.15rem;
    line-height: 1.1;
  }

  .duration-badge {
    grid-column: 1 / -1;
    width: fit-content;
    margin-top: .1rem;
  }

  .avail-row {
    margin-top: .55rem;
    gap: .4rem;
  }

  .avail-chip {
    font-size: .76rem;
    padding: .22rem .58rem;
  }

  .dep-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    width: 100%;
    align-items: stretch;
  }

  .btn-book,
  .btn-info {
    justify-content: center;
    width: 100%;
    padding: .62rem .8rem;
    font-size: .8rem;
  }

  .data-note {
    display: none;
  }

  .source-item {
    grid-template-columns: 1fr;
    row-gap: .5rem;
  }

  .source-badge {
    width: fit-content;
    min-height: auto;
  }
}
@media (max-width: 400px) {
  .search-row-bottom { grid-template-columns: 1fr; }
  .swap-btn          { width: 100%; }
}



@keyframes shake {
  0%,100%{transform:none}
  20%{transform:translateX(-4px)}
  40%{transform:translateX(4px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(2px)}
}



.map-tip { background:var(--navy); color:#fff; border:none; border-radius:4px; font-size:.72rem; font-weight:600; padding:.2rem .5rem; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.map-tip::before { display:none; }



/* ── Typografie fix ─────────────────────────────────────────── */

/* Tijden minder dominant */
.time-value {
  font-size: clamp(1.3rem, 1.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Labels iets duidelijker */
.time-label {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Route minder “headline” */
.dep-from,
.dep-to {
  font-size: 1rem;
  font-weight: 700;
}

/* Badge consistent kleiner */
.dep-operator,
.service-pill,
.extra-badge {
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
}

/* Knoppen iets rustiger */
.btn-book,
.btn-info {
  font-size: 0.85rem;
  min-height: 42px;
}

/* Desktop balans */
@media (min-width: 900px) {
  .time-value {
    font-size: 1.4rem;
  }
  .dep-from,
  .dep-to {
    font-size: 1.05rem;
  }
}

/* Mobiel compacter */
@media (max-width: 640px) {
  .time-value {
    font-size: 1.3rem;
  }
}



/* ── Finer typography tuning ───────────────────────────────── */

/* Nog iets kleinere tijden */
.time-value {
  font-size: clamp(1.15rem, 1.3vw, 1.35rem);
  font-weight: 700;
}

/* Route op 1 regel houden */
.dep-route-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Route nog compacter */
.dep-from,
.dep-to {
  font-size: 0.95rem;
}

/* Badge nog subtieler */
.dep-operator,
.service-pill,
.extra-badge {
  font-size: 0.65rem;
}

/* Cache badge kleiner */
.results-meta {
  font-size: 0.75rem;
  padding-top: 0.6rem;
}

/* Desktop extra finetune */
@media (min-width: 900px) {
  .time-value {
    font-size: 1.3rem;
  }
  .dep-from,
  .dep-to {
    font-size: 1rem;
  }
}

/* Mobiel */
@media (max-width: 640px) {
  .dep-route-text {
    white-space: nowrap;
  }
}


/* ── Layout fix desktop + mobile (2026-03) ───────────────────────── */
.header-meta { display: flex; }
.gtfs-badge {
  max-width: min(42vw, 360px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-area {
  min-width: 0;
}

@media (min-width: 980px) {
  .main {
    max-width: 1280px;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.75rem;
  }

  .card-main {
    grid-template-columns: minmax(280px, 1.15fr) minmax(320px, 1fr) 208px;
    align-items: start;
    gap: 1.25rem;
    padding: 1.25rem 1.25rem 1.3rem;
  }

  .dep-layout {
    display: contents;
  }

  .dep-top,
  .dep-body,
  .dep-actions {
    min-width: 0;
  }

  .dep-top {
    grid-column: 1;
    grid-template-columns: 1fr;
    gap: .8rem;
    align-content: start;
  }

  .dep-meta {
    justify-content: flex-start;
  }

  .dep-body {
    grid-column: 2;
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .dep-times {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: .8rem;
  }

  .duration-badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .dep-actions {
    grid-column: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: .65rem;
    align-self: stretch;
    min-width: 208px;
  }

  .btn-book,
  .btn-info {
    min-height: 52px;
  }

  .data-note {
    text-align: left;
  }
}

@media (max-width: 979px) {
  .main {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .filters-panel {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
    min-height: 60px;
    padding: .75rem 1rem;
    align-items: flex-start;
    gap: .75rem;
    flex-wrap: wrap;
  }

  .header-meta {
    width: 100%;
  }

  .gtfs-badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    align-items: flex-start;
  }

  .search-card {
    padding: 1rem;
  }

  .search-time-row {
    display: grid;
    grid-template-columns: 1fr 46px;
    align-items: end;
  }

  .results-header {
    align-items: flex-start;
  }

  .departure-card {
    margin-bottom: .95rem;
  }

  .dep-top {
    grid-template-columns: 1fr;
  }

  .dep-meta {
    justify-content: flex-start;
  }

  .dep-actions {
    grid-template-columns: 1fr;
  }

  .btn-book,
  .btn-info {
    min-height: 48px;
  }

  .footer-status-grid {
    grid-template-columns: 1fr;
  }
}

.footer-status {
  max-width: 860px;
  margin: 0 auto 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(184, 217, 238, .2);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.footer-status-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: .7rem;
}

.footer-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.footer-status-item {
  display: grid;
  gap: .2rem;
  padding: .75rem .85rem;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
}

.footer-status-label {
  font-size: .74rem;
  color: var(--wave);
}

.footer-status-item strong {
  color: var(--white);
  font-size: .95rem;
  line-height: 1.25;
}

/* ── Footer contact knop ──────────────────────────────────────── */
.footer-contact-row {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.footer-contact-btn {
  background: transparent;
  border: 1px solid rgba(91,164,208,.45);
  color: var(--sky);
  padding: .5rem 1.4rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .18s, border-color .18s, color .18s;
}
.footer-contact-btn:hover,
.footer-contact-btn:focus-visible {
  background: rgba(91,164,208,.12);
  border-color: var(--sky);
  color: var(--white);
  outline: none;
}

/* ── Contact modal overlay ────────────────────────────────────── */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(18,42,80,.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.contact-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll while modal open */
body.modal-open { overflow: hidden; }

/* ── Contact modal container ──────────────────────────────────── */
.contact-modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(18px) scale(.97);
  transition: transform .22s ease;
}
.contact-overlay.is-open .contact-modal {
  transform: translateY(0) scale(1);
}

/* ── Modal header ─────────────────────────────────────────────── */
.contact-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}
.contact-modal__header h2 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0;
}
.contact-modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: .3rem .5rem;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.contact-modal__close:hover {
  background: var(--foam);
  color: var(--navy);
}

/* ── Modal body ───────────────────────────────────────────────── */
.contact-modal__body {
  padding: 1.3rem 1.4rem 1.5rem;
}
.contact-modal__intro {
  color: var(--text-muted);
  font-size: .875rem;
  margin-bottom: 1.2rem;
}

/* ── Honeypot: visueel verborgen maar aanwezig in DOM voor bots ── */
.contact-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── Formuliervelden ──────────────────────────────────────────── */
.contact-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .9rem;
}
.contact-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.contact-required { color: var(--accent); margin-left: .1rem; }
.contact-field input,
.contact-field textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(46,109,164,.15);
}
.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}
.contact-field__error {
  font-size: .78rem;
  color: var(--error);
  min-height: 1rem;
}

/* ── Consent checkbox ─────────────────────────────────────────── */
.contact-field--consent {
  margin-top: .4rem;
}
.contact-consent-label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  line-height: 1.45;
}
.contact-consent-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .15rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--ocean);
  cursor: pointer;
}
.contact-consent-label input[aria-invalid="true"] {
  outline: 2px solid var(--error);
  outline-offset: 2px;
}
.contact-consent-privacy {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ocean);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Feedback banner ──────────────────────────────────────────── */
.contact-feedback {
  display: none;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: .9rem;
}
.contact-feedback--success {
  background: #EAF7EF;
  border: 1px solid #A8D5B8;
  color: var(--success);
}
.contact-feedback--error {
  background: #FDF0EE;
  border: 1px solid #EAA89F;
  color: var(--error);
}

/* ── Modal actieknoppen ───────────────────────────────────────── */
.contact-modal__actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .5rem;
}
.contact-btn-cancel {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  transition: border-color .15s, color .15s;
}
.contact-btn-cancel:hover { border-color: var(--ocean); color: var(--ocean); }
.contact-btn-submit {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: .55rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  transition: background .15s;
}
.contact-btn-submit:hover:not(:disabled) { background: var(--ocean); }
.contact-btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Mobiel ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .contact-modal {
    max-height: calc(100dvh - 1rem);
    border-radius: var(--radius) var(--radius) 0 0;
    align-self: flex-end;
    margin-bottom: 0;
  }
  .contact-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .contact-modal__actions {
    flex-direction: column-reverse;
  }
  .contact-btn-cancel,
  .contact-btn-submit {
    width: 100%;
    text-align: center;
    padding: .7rem;
  }
}


/* ── Privacy modal ────────────────────────────────────────────── */
.contact-modal--wide {
  max-width: 640px;
}

.privacy-body {
  padding-bottom: 2rem;
}

.privacy-section {
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.privacy-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}
.privacy-section h3 {
  color: var(--navy);
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .45rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}
.privacy-section p {
  font-size: .875rem;
  color: var(--text);
  line-height: 1.65;
}
.privacy-section code {
  font-family: monospace;
  font-size: .82rem;
  background: var(--foam);
  padding: .1rem .35rem;
  border-radius: 4px;
  color: var(--navy);
}

.privacy-list {
  margin: .5rem 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.privacy-list li {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Inline link-knop in privacytekst (→ opent contactformulier) */
.privacy-contact-link {
  background: none;
  border: none;
  color: var(--ocean);
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-contact-link:hover { color: var(--navy); }

.privacy-updated {
  margin-top: 1.2rem;
  font-size: .76rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── Hotfix results desktop/mobile + remove top GTFS badge ───────── */
.header-meta,
#gtfs-status {
  display: none !important;
}

.results-area {
  min-width: 0;
}

.departure-card {
  overflow: visible;
}

.card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.dep-layout {
  display: grid;
  gap: .9rem;
  min-width: 0;
}

.dep-top,
.dep-body {
  min-width: 0;
}

.dep-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
}

.dep-route-main,
.dep-route-text,
.dep-meta,
.dep-info,
.dep-times,
.dep-actions {
  min-width: 0;
}

.dep-meta {
  justify-content: flex-start;
}

.dep-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
}

.dep-times {
  display: grid;
  grid-template-columns: minmax(84px, auto) 24px minmax(84px, auto);
  gap: .75rem;
  align-items: center;
}

.duration-badge {
  grid-column: 1 / -1;
  width: fit-content;
}

.dep-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
  align-content: start;
}

.btn-book,
.btn-info {
  width: 100%;
  justify-content: center;
}

.data-note {
  max-width: none;
  text-align: left;
}

@media (min-width: 980px) {
  .card-main {
    grid-template-columns: minmax(0, 1.65fr) 220px;
    gap: 1.25rem;
    align-items: start;
  }

  .dep-layout {
    gap: 1rem;
  }

  .dep-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
  }

  .dep-meta {
    justify-content: flex-end;
    align-self: start;
  }

  .dep-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .dep-times {
    grid-template-columns: minmax(92px, auto) 24px minmax(92px, auto);
    column-gap: .9rem;
  }

  .dep-actions {
    align-self: stretch;
  }
}

@media (max-width: 640px) {
  .dep-route-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .dep-times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem .85rem;
  }

  .time-sep {
    display: none;
  }

  .duration-badge,
  .avail-row {
    grid-column: 1 / -1;
  }

  .dep-actions {
    grid-template-columns: 1fr;
  }
}


/* ── Alignment hotfix desktop + homepage centering (2026-03-29) ───── */
.main.main--welcome {
  grid-template-columns: minmax(0, 1fr) !important;
}

.main.main--welcome .results-area {
  grid-column: 1 / -1;
  width: 100%;
  display: flex !important;
  justify-content: center;
}

.main.main--welcome .state-box {
  width: 100%;
  max-width: 760px;
}

.results-area {
  min-width: 0;
  width: 100%;
}

.results-header .source-badge {
  width: auto;
  min-height: auto;
  margin-top: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  display: inline-flex;
  max-width: 100%;
}

@media (min-width: 980px) {
  .card-main {
    grid-template-columns: minmax(0, 1fr) 182px !important;
    gap: 1.25rem !important;
    align-items: start !important;
  }

  .dep-layout {
    width: 100%;
    display: grid !important;
    gap: .85rem;
  }

  .dep-top {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .7rem !important;
  }

  .dep-route-main,
  .dep-route-text,
  .dep-info,
  .dep-times {
    min-width: 0;
  }

  .dep-route-text {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .dep-from,
  .dep-to {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .dep-meta {
    justify-content: flex-start !important;
  }

  .dep-body {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .7rem;
  }

  .dep-times {
    grid-template-columns: auto 24px auto auto !important;
    justify-content: start;
    column-gap: .9rem;
  }

  .time-block {
    min-width: 96px;
  }

  .dep-actions {
    min-width: 182px;
    width: 182px;
    align-self: start;
  }
}

@media (max-width: 979px) {
  .main.main--welcome .state-box {
    max-width: 100%;
  }
}

/* ── Desktop refinement v3: rustiger kaartlayout ─────────────────── */
.results-header .source-badge {
  white-space: nowrap;
}

.main {
  max-width: 1240px;
}

.main--welcome .state-box {
  max-width: 980px;
}

@media (min-width: 901px) {
  .departure-card {
    border-left-width: 6px;
  }

  .card-main {
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 1.25rem;
    align-items: start;
    padding: 1rem 1rem 1rem 1.05rem;
  }

  .dep-layout {
    gap: .55rem;
  }

  .dep-top {
    grid-template-columns: 1fr;
    gap: .4rem;
  }

  .dep-service-line,
  .dep-status-line {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    min-width: 0;
  }

  .dep-service-line .dep-icon {
    font-size: .92rem;
    width: 18px;
    text-align: center;
  }

  .dep-operator,
  .service-pill,
  .extra-badge,
  .cancelled-badge,
  .wait-badge,
  .past-badge,
  .duration-badge,
  .avail-chip,
  .info-label,
  .time-label,
  .data-note,
  .btn-book,
  .btn-info,
  .results-count,
  .source-badge {
    font-size: .74rem;
  }

  .dep-operator,
  .service-pill,
  .extra-badge,
  .cancelled-badge,
  .wait-badge,
  .past-badge,
  .duration-badge,
  .avail-chip {
    min-height: 0;
    padding: .28rem .62rem;
    border-radius: 999px;
    line-height: 1.1;
  }

  .dep-operator {
    background: #e8f1fb;
    color: #47688f;
    font-weight: 700;
  }

  .service-pill {
    background: #f6eee4;
    color: var(--accent);
  }

  .dep-body {
    grid-template-columns: minmax(190px, 1.15fr) minmax(330px, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .dep-route-text--stacked {
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    align-self: center;
    padding-top: .1rem;
  }

  .dep-from,
  .dep-to {
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.35;
  }

  .dep-arrow {
    font-size: .9rem;
    opacity: .55;
  }

  .dep-times-block {
    display: grid;
    gap: .45rem;
    min-width: 0;
  }

  .dep-times {
    grid-template-columns: auto 22px auto;
    gap: .7rem;
    align-items: end;
  }

  .time-block {
    gap: .08rem;
  }

  .time-value {
    font-size: 1rem;
    line-height: 1.15;
    letter-spacing: -.02em;
  }

  .time-sep {
    font-size: .95rem;
    margin-top: 0;
    align-self: center;
  }

  .dep-info-row {
    display: flex;
    align-items: center;
    gap: .38rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
  }

  .info-label {
    color: var(--text-muted);
    font-weight: 700;
    flex: 0 0 auto;
  }

  .duration-badge {
    justify-self: auto;
    flex: 0 0 auto;
  }

  .avail-row.inline {
    display: flex;
    flex-wrap: nowrap;
    gap: .38rem;
    margin-top: 0;
    min-width: 0;
    overflow: hidden;
  }

  .avail-chip {
    flex: 0 0 auto;
  }

  .dep-actions {
    min-width: 132px;
    gap: .42rem;
    justify-items: stretch;
  }

  .btn-book,
  .btn-info {
    width: 100%;
    min-height: 36px;
    padding: .42rem .65rem;
    border-radius: 10px;
  }

  .data-note {
    text-align: right;
    max-width: none;
    font-size: .72rem;
  }
}

@media (max-width: 900px) {
  .dep-service-line,
  .dep-status-line,
  .dep-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
  }

  .dep-route-text--stacked {
    justify-content: flex-start;
  }

  .dep-times-block {
    display: grid;
    gap: .55rem;
  }

  .dep-info-row .info-label {
    width: 100%;
    color: var(--text-muted);
    font-weight: 700;
  }
}

/* Rustiger welkomsblok op desktop */
@media (min-width: 901px) {
  .state-box {
    padding: 2.2rem 2rem;
  }

  .state-sources {
    gap: 1.1rem;
  }

  .source-item {
    grid-template-columns: 120px 1fr;
    column-gap: 1rem;
    font-size: .74rem;
    line-height: 1.55;
  }
}


/* =============================================================
   Trip card component (BEM)
   Rustigere kaart-layout met duidelijke hiërarchie.
   ============================================================= */
.trip-card {
  padding: 0;
}

.trip-card__main {
  width: 100%;
  padding: 1.15rem 1.2rem;
}

.trip-card__summary {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(340px, 1.28fr) minmax(170px, .7fr);
  grid-template-areas:
    "meta schedule actions"
    "route info actions";
  column-gap: 1.4rem;
  row-gap: .95rem;
  align-items: start;
  width: 100%;
}

.trip-card__meta,
.trip-card__route-wrap,
.trip-card__schedule,
.trip-card__info,
.trip-card__actions {
  min-width: 0;
}

.trip-card__meta {
  grid-area: meta;
  display: grid;
  gap: .7rem;
  align-content: start;
}

.trip-card__service,
.trip-card__status,
.trip-card__info {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.trip-card__icon {
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  flex: 0 0 auto;
}

.trip-card__route-wrap {
  grid-area: route;
  align-self: center;
}

.trip-card__route {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.trip-card__port {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.trip-card__route-arrow,
.trip-card__time-arrow {
  color: #9bb0ca;
  font-size: 1.15rem;
  line-height: 1;
  flex: 0 0 auto;
}

.trip-card__schedule {
  grid-area: schedule;
  display: grid;
  grid-template-columns: minmax(86px, 1fr) 24px minmax(86px, 1fr) minmax(104px, .9fr);
  align-items: stretch;
  justify-content: stretch;
  gap: .75rem;
  padding: .95rem 1rem;
  border: 1px solid #d9e5f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
}

.trip-card__time-group,
.trip-card__duration-group {
  display: grid;
  align-content: start;
  gap: .2rem;
  min-width: 0;
}

.trip-card__time-label,
.trip-card__info-label,
.trip-card__note,
.trip-card__button,
.trip-card__pill,
.trip-card__chip {
  font-size: .74rem;
}

.trip-card__time-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}

.trip-card__time-value {
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  line-height: 1.02;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.03em;
}

.trip-card__duration-group {
  padding-left: .9rem;
  border-left: 1px solid #d9e5f2;
  align-self: stretch;
}

.trip-card__duration-value {
  font-size: .84rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.trip-card__info {
  grid-area: info;
  align-items: center;
  width: 100%;
  flex-wrap: nowrap;
  gap: .45rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c8d9eb transparent;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .15rem;
}

.trip-card__info::-webkit-scrollbar {
  height: 6px;
}

.trip-card__info::-webkit-scrollbar-thumb {
  background: #c8d9eb;
  border-radius: 999px;
}

.trip-card__info > * {
  flex: 0 0 auto;
}

.trip-card__info-label {
  color: var(--text-muted);
  font-weight: 700;
  flex: 0 0 auto;
  font-size: .74rem;
}

.trip-card__actions {
  grid-area: actions;
  display: grid;
  gap: .65rem;
  align-content: start;
  justify-items: stretch;
  width: 100%;
  min-width: 170px;
  padding-left: .25rem;
}

.trip-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  min-height: 44px;
  padding: .72rem .9rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.trip-card__button:hover {
  transform: translateY(-1px);
}

.trip-card__button--primary {
  background: var(--navy);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 10px 20px rgba(23, 48, 94, 0.12);
}

.trip-card__button--secondary {
  border: 1px solid #c8d9eb;
  background: #fff;
  color: #3d6fa5;
}

.trip-card__note {
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}

.trip-card__pill,
.trip-card__chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .62rem;
  border-radius: 999px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}

.trip-card__pill--operator {
  background: #e8f1fb;
  color: #47688f;
}

.trip-card__pill--service {
  background: #f6eee4;
  color: var(--accent);
}

.trip-card__pill--status {
  background: #edf4fb;
  color: #617da3;
}

.trip-card__chip--duration {
  background: #edf4fb;
  border: 1px solid #c8d9eb;
  color: #3d6fa5;
}

.trip-card__chip--ok {
  background: #d8f6df;
  border: 1px solid #a7e6b2;
  color: #1d6b3d;
}

.trip-card__chip--warn {
  background: #fff0c6;
  border: 1px solid #efc84b;
  color: #9a4e00;
}

.trip-card__chip--full {
  background: #fbe2e2;
  border: 1px solid #efbbbb;
  color: #a12a2a;
}

.trip-card.past .trip-card__time-value {
  text-decoration: line-through;
  color: var(--text-muted);
}

.trip-card.cancelled .trip-card__port,
.trip-card.cancelled .trip-card__time-value {
  color: var(--text-muted);
}

@media (max-width: 1100px) {
  .trip-card__main {
    padding: 1rem 1.05rem;
  }

  .trip-card__summary {
    grid-template-columns: minmax(200px, .95fr) minmax(280px, 1.1fr) minmax(160px, .75fr);
    column-gap: 1rem;
  }

  .trip-card__schedule {
    padding: .85rem .9rem;
  }
}

@media (max-width: 900px) {
  .trip-card__summary {
    grid-template-columns: 1fr 160px;
    grid-template-areas:
      "schedule actions"
      "route route"
      "meta meta"
      "info info";
    row-gap: .85rem;
  }

  .trip-card__actions {
    min-width: 160px;
    padding-left: 0;
  }
}

@media (max-width: 680px) {
  .trip-card__main {
    padding: .95rem;
  }

  .trip-card__info {
    gap: .35rem;
  }

  .trip-card__info-label,
  .trip-card__pill,
  .trip-card__chip,
  .trip-card__button {
    font-size: .76rem;
  }

  .trip-card__summary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "schedule"
      "actions"
      "route"
      "meta"
      "info";
    row-gap: .8rem;
  }

  .trip-card__schedule {
    grid-template-columns: 1fr 20px 1fr;
    gap: .55rem;
    width: 100%;
    justify-content: stretch;
  }

  .trip-card__actions {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
  }

  .trip-card__note {
    grid-column: 1 / -1;
  }

  .trip-card__port {
    font-size: .98rem;
  }

  .trip-card__time-value {
    font-size: 1.55rem;
  }
}

@media (max-width: 520px) {
  .trip-card__main {
    padding: .85rem;
  }

  .trip-card__actions {
    grid-template-columns: 1fr;
  }

  .trip-card__service,
  .trip-card__status,
  .trip-card__info,
  .trip-card__route {
    gap: .38rem;
  }

  .trip-card__pill,
  .trip-card__chip {
    white-space: normal;
  }
}

/* ── Trip card support vars ─────────────────────────────────── */
:root {
  --ink: var(--navy);
}

.trip-card__actions > * {
  width: 100%;
}


@media (max-width: 980px) {
  .trip-card__schedule {
    grid-template-columns: minmax(74px, 1fr) 20px minmax(74px, 1fr) minmax(78px, .9fr);
    gap: .55rem;
    padding: .85rem .9rem;
  }

  .trip-card__duration-group {
    padding-left: .7rem;
  }

  .trip-card__duration-value {
    font-size: .8rem;
  }
}

@media (max-width: 720px) {
  .trip-card__schedule {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    padding: .85rem;
  }

  .trip-card__schedule .trip-card__time-arrow {
    display: none;
  }

  .trip-card__duration-group {
    padding-left: 0;
    border-left: 0;
  }

  .trip-card__time-value {
    font-size: clamp(1.3rem, 6vw, 1.75rem);
  }

  .trip-card__duration-value {
    font-size: .76rem;
  }
}


.trip-card__route-inline {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .25rem;
}

.trip-card__route-inline .trip-card__port {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}
