/* =====================================================================
   North East Buses – shared site header & footer
   Self-contained and namespaced (.neb-*) so it can be reused on the
   forum or any other page of northeastbuses.co.uk.
   ===================================================================== */

.neb-header, .neb-footer {
  text-align: left;
  line-height: 1.5;
  --neb-brand: #4338ca;
  --neb-ink: #111827;
  --neb-text: #4b5563;
  --neb-muted: #6b7280;
  --neb-line: #eceef2;
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}
.neb-header *, .neb-footer * { box-sizing: border-box; }

.neb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Brand ---------- */
.neb-brand,
.neb-header a.neb-brand:link, .neb-header a.neb-brand:visited,
.neb-footer a.neb-brand:link, .neb-footer a.neb-brand:visited {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  text-decoration: none;
}
.neb-brand img { display: block; border-radius: 9px; }
.neb-brand-name {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.neb-brand-name strong { font-weight: 700; }

/* ---------- Header ---------- */
.neb-header {
  position: relative;
  z-index: 1200;
  background: #fff;
  border-bottom: 1px solid var(--neb-line);
}
.neb-header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.neb-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.neb-nav a, .neb-nav a:link, .neb-nav a:visited {
  position: relative;
  display: block;
  padding: 10px 14px;
  color: var(--neb-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  transition: color .15s ease, background-color .15s ease;
}
.neb-nav a:hover { color: var(--neb-ink); background: #f6f7f9; text-decoration: none; }
.neb-nav a.is-active, .neb-nav a.is-active:link, .neb-nav a.is-active:visited { color: var(--neb-ink); }
.neb-nav a.is-active:after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--neb-brand);
}
.neb-nav a:focus-visible, .neb-brand:focus-visible, .neb-footer a:focus-visible {
  outline: 2px solid var(--neb-brand);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.neb-footer {
  background: #fff;
  border-top: 1px solid var(--neb-line);
  color: var(--neb-text);
  font-size: 14px;
  line-height: 1.6;
}
.neb-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding: 56px 0 40px;
}
.neb-footer-brand { max-width: 420px; }
.neb-footer-brand p { margin: 16px 0 0; color: var(--neb-muted); }
.neb-footer-cols { display: flex; gap: 56px; }
.neb-footer-h {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--neb-muted);
}
.neb-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.neb-footer-links li + li { margin-top: 8px; }
.neb-footer-links a, .neb-footer-links a:link, .neb-footer-links a:visited {
  color: var(--neb-ink);
  text-decoration: none;
  font-weight: 500;
}
.neb-footer-links a:hover { color: var(--neb-brand); text-decoration: none; }
.neb-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--neb-line);
  font-size: 12.5px;
  color: var(--neb-muted);
}
.neb-footer-bottom p { margin: 0; }
.neb-footer-bottom a, .neb-footer-bottom a:link, .neb-footer-bottom a:visited { color: inherit; text-decoration: underline; }
.neb-footer-bottom a:hover { color: var(--neb-ink); }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .neb-wrap { padding: 0 20px; }
  /* Phones: logo on top, then every menu item on one full-width row (no hidden items to swipe to) */
  .neb-header-inner { height: auto; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0 4px; }
  .neb-brand { gap: 10px; }
  .neb-brand img { width: 32px; height: 32px; }
  .neb-brand-name { font-size: 16px; }
  .neb-header-inner > .neb-brand { flex: none; }
  .neb-nav { width: 100%; gap: 0; justify-content: space-between; flex-wrap: wrap; }
  .neb-nav a, .neb-nav a:link, .neb-nav a:visited { padding: 10px 8px; font-size: 14px; }
  .neb-nav a.is-active:after { left: 8px; right: 8px; }
  .neb-footer-top { flex-direction: column; gap: 28px; padding: 40px 0 28px; }
  .neb-footer-cols { flex-wrap: wrap; gap: 28px 40px; }
  .neb-footer-bottom { flex-direction: column; padding-bottom: 32px; }
}
@media (max-width: 480px) {
  .neb-wrap { padding: 0 16px; }
  .neb-nav a, .neb-nav a:link, .neb-nav a:visited { padding: 10px 3px; font-size: 13.5px; }
  .neb-nav a.is-active:after { left: 3px; right: 3px; }
}
@media (max-width: 374px) {
  .neb-nav a, .neb-nav a:link, .neb-nav a:visited { font-size: 12.5px; padding: 10px 2px; }
}

/* ---------- Large monitors and TVs ---------- */
@media (min-width: 1600px) {
  .neb-wrap { max-width: 1440px; }
  .neb-header-inner { height: 84px; }
  .neb-nav a, .neb-nav a:link, .neb-nav a:visited { font-size: 16px; padding: 10px 16px; }
  .neb-brand-name { font-size: 20px; }
  .neb-footer { font-size: 15px; }
}
@media (min-width: 2200px) {
  .neb-wrap { max-width: 1900px; padding: 0 56px; }
  .neb-header-inner { height: 104px; }
  .neb-brand img { width: 48px; height: 48px; }
  .neb-brand-name { font-size: 26px; }
  .neb-nav a, .neb-nav a:link, .neb-nav a:visited { font-size: 20px; padding: 12px 20px; }
  .neb-footer { font-size: 18px; }
  .neb-footer-bottom { font-size: 15px; }
}

/* "Skip to main content" link for keyboard and screen reader users: hidden until focused */
.neb-skip { margin: 0; }
.neb-skip a, .neb-skip a:link, .neb-skip a:visited {
  position: absolute; left: 12px; top: -60px; z-index: 6000;
  padding: 10px 16px; border-radius: 10px; background: #4338ca; color: #fff;
  font-weight: 600; text-decoration: none; transition: top .15s ease;
}
.neb-skip a:focus { top: 12px; outline: 2px solid #fff; outline-offset: -4px; }
