/* =========================================================
   Block: MAIN HEADER (v0.1) - main website pages only
   Logo + main menu + tap-to-call. Landing pages use the
   top bar instead (no menu there).
   Phones: menu folds behind a "Menu" button (needs
   header-menu.js; without it the menu just stays open).
   ========================================================= */
.header {
  background: var(--colour-background);
  border-bottom: 1px solid var(--colour-border);
}
.header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  min-height: 64px;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.header__logo { display: block; width: 52px; margin-right: auto; }   /* logo is about 1.37 : 1 */
.header__logo img { width: 100%; height: auto; }

/* Menu links */
.header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
}
.header__list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target-min);
  color: var(--colour-text);
  font-weight: var(--weight-strong);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.header__list a:hover { color: var(--colour-action); }
.header__list a[aria-current="page"] { border-bottom-color: var(--colour-action); }

/* Drop-downs ("Plan your trip", "Book online"): a standard <details>, so they work without scripts */
.header__group { position: relative; }
.header__drop > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target-min);
  color: var(--colour-text);
  font-weight: var(--weight-strong);
  cursor: pointer;
  list-style: none;
  border-bottom: 2px solid transparent;
}
.header__drop > summary::-webkit-details-marker { display: none; }
.header__drop > summary::after {              /* small arrow that turns when open */
  content: "";
  width: .45em;
  height: .45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform var(--motion-fast, 150ms) ease;
}
.header__drop[open] > summary::after { transform: translateY(15%) rotate(225deg); }
.header__drop > summary:hover,
.header__drop[open] > summary { color: var(--colour-action); }
.header__drop > summary.is-current { border-bottom-color: var(--colour-action); }
.header__sub { list-style: none; margin: 0; padding: 0; }
.header__sub a { font-weight: var(--weight-body); }

/* A page that isn't built yet (staging only): shown, greyed, not a link */
.header__soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target-min);
  color: var(--colour-text-muted);
  cursor: default;
}
.header__soon small {
  font-size: .75rem;
  padding: 0 var(--space-2);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Tap-to-call */
.header__call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target-min);
  font-weight: var(--weight-strong);
  color: var(--colour-text);
  text-decoration: none;
  white-space: nowrap;
}
.header__call svg { width: 1.1em; height: 1.1em; color: var(--colour-action); flex: none; }
.header__call:hover { color: var(--colour-action); }

/* "Menu" button (phones and small tablets) */
.header__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-target-min);
  padding: 0 var(--space-3);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-small);
  background: var(--colour-surface);
  color: var(--colour-text);
  font: inherit;
  font-weight: var(--weight-strong);
  cursor: pointer;
}
.header__toggle[hidden] { display: none; }
.header__bars,
.header__bars::before,
.header__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.header__bars { position: relative; }
.header__bars::before,
.header__bars::after { content: ""; position: absolute; left: 0; }
.header__bars::before { top: -5px; }
.header__bars::after { top: 5px; }

/* ---------- Small screens ---------- */
@media (max-width: 63.99rem) {
  .header__call span { display: none; }            /* phone: icon only, still 44px to tap */
  .header__call { justify-content: center; min-width: var(--tap-target-min); order: 1; }
  .header__toggle { order: 2; }
  .header__nav { order: 3; flex-basis: 100%; }     /* menu drops to its own row */
  .header__list { flex-direction: column; padding-bottom: var(--space-2); }
  .header__list a { width: 100%; border-bottom: 1px solid var(--colour-border); }
  .header__list a[aria-current="page"] { color: var(--colour-action); border-bottom-color: var(--colour-border); }
  .header__soon { width: 100%; border-bottom: 1px solid var(--colour-border); }
  .header__drop > summary { width: 100%; justify-content: space-between; border-bottom: 1px solid var(--colour-border); }
  .header__drop > summary.is-current { border-bottom-color: var(--colour-border); }
  .header__sub { padding-left: var(--space-4); }   /* sub-links sit indented under their group */
  /* With the script: menu hidden until "Menu" is pressed */
  .header--js .header__nav { display: none; }
  .header--js.is-open .header__nav { display: block; }
}

/* ---------- Large screens: everything on one line ---------- */
@media (min-width: 64rem) {
  .header__logo { width: 60px; }
  .header__toggle { display: none !important; }
  .header__inner { flex-wrap: nowrap; gap: var(--space-5); }
  .header__list { flex-wrap: nowrap; white-space: nowrap; }
  .header__sub {                                    /* a small panel under its menu item */
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--space-4));
    z-index: 20;
    min-width: 15rem;
    padding: var(--space-2) var(--space-4);
    background: var(--colour-surface);
    border: 1px solid var(--colour-border);
    border-radius: var(--radius-large);
    box-shadow: 0 12px 28px rgb(0 0 0 / .12);
    white-space: nowrap;
  }
  .header__sub a,
  .header__sub .header__soon { display: flex; }
}
