/* North East Buses – home page and site search
   Same colours, type and spacing as Find My Bus (tracker.css) and the shared header (site.css). */

:root {
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --brand-soft: #eef0ff;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f7f8fa;
  --ok: #16a34a;
}
body.neb-page {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 16px/1.6 system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.neb-page * { box-sizing: border-box; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; }
.neb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Search box ---------- */
.neb-search { position: relative; margin: 0; max-width: 640px; }
.neb-search-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px;
  background: #fff; border: 1px solid #d6d9e0; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .06);
}
.neb-search-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(67, 56, 202, .14); }
.neb-search-icon { flex: none; opacity: .55; }
.neb-search-input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--ink); padding: 10px 4px;
}
.neb-search-btn {
  flex: none; border: 0; border-radius: 12px; background: var(--brand); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; padding: 12px 22px; cursor: pointer;
}
.neb-search-btn:hover { background: var(--brand-dark); }
.neb-search-big .neb-search-input { font-size: 18px; padding: 14px 4px; }
.neb-search-big .neb-search-btn { padding: 14px 26px; }

/* Suggestions while typing (built by search.js) */
.neb-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1500;
  margin: 0; padding: 6px; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(17, 24, 39, .14);
  max-height: 420px; overflow-y: auto; text-align: left;
}
.neb-suggest li { margin: 0; }
.neb-suggest a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.neb-suggest a:hover, .neb-suggest li.is-on a { background: var(--soft); }
.neb-suggest .sg-type {
  flex: none; width: 64px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.neb-suggest .sg-text { flex: 1 1 auto; min-width: 0; }
.neb-suggest .sg-label { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neb-suggest .sg-sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neb-suggest .sg-badge { flex: none; min-width: 34px; padding: 2px 6px; border-radius: 7px; font-size: 13px; font-weight: 700; text-align: center; }
.neb-suggest .sg-all a { justify-content: center; color: var(--brand); font-weight: 600; font-size: 14px; }

/* ---------- Hero ---------- */
.hm-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 56px 0 104px; }
.hm-hero-inner { display: flex; align-items: center; gap: 48px; }
.hm-hero-text { flex: 1 1 56%; min-width: 0; }
.hm-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .02em; }
.hm-hero h1 { margin: 0; font-size: 48px; line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
.hm-lede { margin: 18px 0 28px; max-width: 600px; font-size: 18px; color: var(--muted); }
.hm-try { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.hm-try a {
  display: inline-block; margin: 4px 0 0 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 500; text-decoration: none;
}
.hm-try a:hover { border-color: var(--brand); color: var(--brand); }
.hm-hero-art { position: relative; flex: 0 1 44%; min-width: 0; }
.hm-hero-art img { display: block; width: 100%; height: auto; }
.hm-live-pill {
  position: absolute; left: 24px; top: 24px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px rgba(17, 24, 39, .08);
}
.hm-live-pill:hover { color: var(--brand); }
.hm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: hm-pulse 2s infinite; }
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }

/* ---------- Four main tiles (overlap the bottom of the hero) ---------- */
.hm-tiles { list-style: none; margin: -64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; }
.hm-tiles a {
  display: block; height: 100%; padding: 22px 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: var(--text); box-shadow: 0 10px 30px rgba(17, 24, 39, .06);
  transition: border-color .15s ease, transform .15s ease;
}
.hm-tiles a:hover { border-color: var(--brand); transform: translateY(-2px); }
.hm-tiles img { display: block; width: 48px; height: 48px; padding: 10px; margin-bottom: 14px; border-radius: 12px; background: var(--brand-soft); }
.hm-tiles strong { display: block; color: var(--ink); font-size: 17px; }
.hm-tiles span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.hm-section { padding-top: 72px; padding-bottom: 72px; }
.hm-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.hm-section h2, .hm-say h2 { margin: 0 0 14px; font-size: 32px; line-height: 1.2; font-weight: 800; }
.hm-section p { margin: 0 0 14px; }
.hm-split { display: flex; align-items: center; gap: 56px; }
.hm-split-rev { flex-direction: row-reverse; }
.hm-split-text { flex: 1 1 50%; min-width: 0; }
.hm-split > .hm-card { flex: 0 1 46%; min-width: 0; }
.hm-ticks { list-style: none; margin: 18px 0 0; padding: 0; }
.hm-ticks li { position: relative; padding-left: 30px; margin: 0 0 10px; }
.hm-ticks li:before {
  content: "\2713"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.hm-actions { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hm-center { justify-content: center; }
.hm-btn, a.hm-btn:link, a.hm-btn:visited {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; border: 1px solid var(--brand);
}
a.hm-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
a.hm-btn:after { content: "\2192"; }
a.hm-btn-ghost:link, a.hm-btn-ghost:visited { background: #fff; color: var(--ink); border-color: var(--line); }
a.hm-btn-ghost:hover { background: #fff; color: var(--brand); border-color: var(--brand); }

.hm-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.hm-card h3 { margin: 0 0 12px; font-size: 17px; }
.hm-card ul { list-style: none; margin: 0; padding: 0; }
.hm-busiest li + li, .hm-latest li + li { border-top: 1px solid #f0f1f4; }
.hm-busiest a { display: flex; align-items: center; gap: 14px; padding: 10px 0; text-decoration: none; color: var(--ink); }
.hm-busiest a:hover .hm-item-title { color: var(--brand); }
.hm-badge {
  flex: none; min-width: 46px; padding: 4px 8px; border-radius: 9px; font-weight: 800; font-size: 15px; text-align: center; line-height: 1.3;
}
.hm-item-text { flex: 1 1 auto; min-width: 0; }
.hm-item-title { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.hm-item-sub { display: block; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-count { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 600; color: #15803d; white-space: nowrap; }
.hm-ops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm-ops a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; min-width: 0;
}
.hm-ops a:hover { border-color: var(--brand); color: var(--brand); }
.hm-swatch { flex: none; width: 12px; height: 12px; border-radius: 50%; }

.hm-band-soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hm-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.hm-head p { color: var(--muted); }
.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: hm; }
.hm-steps li { position: relative; padding: 24px 24px 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; counter-increment: hm; }
.hm-steps li:before {
  content: counter(hm); display: block; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; line-height: 34px; text-align: center;
}
.hm-steps strong { display: block; color: var(--ink); font-size: 17px; }
.hm-steps span { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }

/* ---------- Have your say ---------- */
.hm-say { background: #1e1b4b; color: #c7c9f0; }
.hm-say-inner { display: flex; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 72px; }
.hm-say-text { flex: 1 1 52%; min-width: 0; }
.hm-say h2 { color: #fff; }
.hm-say .hm-kicker { color: #a5b4fc; }
.hm-say p { margin: 0 0 14px; }
.hm-say-stats { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; font-size: 14px; }
.hm-say-stats strong { display: block; color: #fff; font-size: 30px; line-height: 1.2; font-weight: 800; }
a.hm-btn-light:link, a.hm-btn-light:visited { background: #fff; color: #1e1b4b; border-color: #fff; }
a.hm-btn-light:hover { background: #e0e7ff; border-color: #e0e7ff; color: #1e1b4b; }
a.hm-btn-outline:link, a.hm-btn-outline:visited { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
a.hm-btn-outline:hover { background: rgba(255, 255, 255, .08); border-color: #fff; color: #fff; }
.hm-latest { flex: 0 1 44%; min-width: 0; color: var(--text); }
.hm-latest li { padding: 11px 0; }
.hm-latest li a { display: block; color: var(--ink); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-latest li a:hover { color: var(--brand); }
.hm-more { margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.hm-more a { text-decoration: none; }

/* ---------- Adverts ---------- */
.ad-block { max-width: 970px; margin: 0 auto; text-align: center; }
.ad-block .ad-label { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; }
.neb-ad { min-height: 90px; max-width: 100%; overflow: hidden; }
.hm-ad { margin: 8px auto 40px; }
.hm-ad-end { margin: 48px auto; }

/* ---------- Search results page ---------- */
.hm-intro { background: var(--soft); border-bottom: 1px solid var(--line); padding: 36px 0 40px; }
.hm-crumbs { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.hm-crumbs a { color: var(--muted); text-decoration: none; }
.hm-crumbs a:hover { color: var(--brand); }
.hm-crumbs span { margin: 0 6px; color: #c4c8d0; }
.hm-intro h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; overflow-wrap: break-word; }
.hm-intro .hm-lede { margin: 8px 0 22px; font-size: 16px; }
.hm-results { padding-top: 32px; padding-bottom: 16px; }
.hm-group { margin: 0 0 36px; }
.hm-group h2 { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.hm-group h2 span { margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.hm-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.hm-list-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #f0f1f4; background: #fff; min-width: 0; }
.hm-list > .hm-item:last-child { border-bottom: 0; }
.hm-list-2 > .hm-item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.hm-list-2 > .hm-item:nth-child(odd) { border-right: 1px solid #f0f1f4; }
.hm-item a.hm-item-title:hover { color: var(--brand); }
.hm-ind { font-weight: 400; color: var(--muted); }
.hm-pin { flex: none; }
.hm-live { display: inline-flex; align-items: center; gap: 6px; color: #15803d; font-weight: 600; }
.hm-item-links { flex: none; display: flex; gap: 8px; }
.hm-item-links a {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.hm-item-links a:hover { border-color: var(--brand); color: var(--brand); }
.hm-empty { padding: 8px 0 24px; }
.hm-empty h2 { margin: 0 0 12px; font-size: 20px; }
.hm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hm-chips a {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 500; text-decoration: none; background: #fff;
}
.hm-chips a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Screen sizes ---------- */
@media (max-width: 1060px) {
  .hm-hero h1 { font-size: 40px; }
  .hm-hero-inner, .hm-split, .hm-say-inner { gap: 36px; }
  .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hm-hero { padding: 36px 0 88px; }
  .hm-hero-inner { display: block; }
  .hm-hero-art { display: none; }
  .hm-hero h1 { font-size: 34px; }
  .hm-lede { font-size: 16px; }
  .hm-split, .hm-split-rev, .hm-say-inner { flex-direction: column; align-items: stretch; }
  .hm-split > .hm-card, .hm-latest { flex: none; width: 100%; }
  .hm-section { padding-top: 56px; padding-bottom: 56px; }
  .hm-section h2, .hm-say h2 { font-size: 26px; }
  .hm-steps { grid-template-columns: 1fr; }
  .hm-say-inner { padding-top: 56px; padding-bottom: 56px; }
  .hm-list-2 { display: block; }
  .hm-list-2 > .hm-item { border-right: 0; }
  .hm-list-2 > .hm-item:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #f0f1f4; }
  .hm-intro { padding: 24px 0 28px; }
  .hm-intro h1 { font-size: 22px; }
}
@media (max-width: 720px) {
  .hm-section { padding-top: 48px; padding-bottom: 48px; }
  .hm-tiles a { padding: 18px 16px; }
  .hm-tiles img { width: 42px; height: 42px; padding: 8px; margin-bottom: 10px; }
  .hm-tiles strong { font-size: 15.5px; }
  .hm-tiles span { font-size: 13px; }
  .hm-item { flex-wrap: wrap; padding: 12px 14px; }
  .hm-item-links { width: 100%; padding-left: 60px; }
  .hm-ops { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hm-hero h1 { font-size: 30px; }
  .neb-search-row { padding-left: 12px; }
  .neb-search-icon { display: none; }
  .neb-search-input, .neb-search-big .neb-search-input { font-size: 16px; }   /* 16px stops iPhones zooming in */
  .neb-search-btn, .neb-search-big .neb-search-btn { padding: 12px 16px; }
  .hm-tiles { gap: 10px; }
  .neb-suggest .sg-type { display: none; }
  .hm-card { padding: 18px; }
}

/* Large monitors and TVs */
@media (min-width: 1600px) {
  body.neb-page { font-size: 17px; }
  .hm-hero h1 { font-size: 56px; }
  .hm-section h2, .hm-say h2 { font-size: 36px; }
}
@media (min-width: 2200px) {
  body.neb-page { font-size: 20px; }
  .hm-hero h1 { font-size: 72px; }
  .hm-lede { font-size: 22px; max-width: 900px; }
  .neb-search { max-width: 900px; }
  .neb-search-input, .neb-search-big .neb-search-input { font-size: 22px; }
  .hm-section h2, .hm-say h2 { font-size: 46px; }
  .hm-tiles strong { font-size: 21px; }
  .hm-tiles span { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-dot { animation: none; }
  .hm-tiles a { transition: none; }
}

/* Buttons keep their space above them inside sections */
.hm-section p.hm-actions, .hm-say p.hm-actions { margin: 28px 0 0; }
/* An odd one out at the end of a two-column list takes the full width */
.hm-list-2 > .hm-item:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
