/* ============================================================
   Holcombe HC — mobile-first stylesheet
   Breakpoints (min-width):  640px (md)  ·  960px (lg)  ·  1200px (xl)
   ============================================================ */

:root {
  --red:        #E31B23;
  --red-dark:   #B11218;
  --yellow:     #FFD629;
  --black:      #111111;
  --ink:        #1a1a1a;
  --muted:      #5a5a5a;
  --paper:      #ffffff;
  --bg:         #faf7f2;
  --panel:      #f3efe8;            /* address / footer surface */
  --border:     rgba(0,0,0,.1);

  --max:        1200px;
  --gutter:     clamp(1rem, 4vw, 4rem);  /* side padding; grows on big screens */
  --radius:     10px;
  --shadow:     0 6px 24px rgba(0,0,0,.08);
  --shadow-lg:  0 14px 40px rgba(0,0,0,.18);

  --font-body:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head:  "Inter", system-ui, sans-serif;

  --header-h:   132px;   /* mobile header height (logo + nav stacked)  */
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Offset in-page anchor jumps (#committee, #faq, …) by the sticky header
   height so the target heading lands below the header, not behind it. */
html { scroll-padding-top: 90px; }
@media (min-width: 960px) { html { scroll-padding-top: 180px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }

ul { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--muted); font-size: .9rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--black); color: #fff; padding: .75rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header (mobile-first) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  color: var(--ink);
  border-bottom: 3px solid var(--red);
}
/* Theme toggle pinned to the top-left corner of the header (left of the logo) */
.site-header > .theme-toggle {
  position: absolute;
  top: .6rem;
  left: var(--gutter);
  z-index: 60;
}
.header-inner {
  margin: 0 auto;
  padding: .5rem var(--gutter);
  padding-bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "toggle  brand socials"
    "nav     nav   nav";
  align-items: center;
  gap: .5rem;
} 

.brand { grid-area: brand; display: inline-flex; justify-self: center; }
.brand img { width: 60px; height: auto; }

.nav-toggle {
  grid-area: socials;          /* moved to the right so the theme toggle owns top-left */
  justify-self: end;
  width: 56px; height: 56px;
  background: transparent; border: 0; padding: 12px;
  display: inline-flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  overflow: visible;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(15px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-15px) rotate(-45deg); }

.primary-nav { grid-area: nav; }
.primary-nav ul {
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding-top: .5rem;
  border-top: 1px solid var(--red);
  margin-top: .5rem;
}
.primary-nav[data-open="true"] ul { display: flex; }
.primary-nav a {
  display: block;
  padding: .75rem .5rem;
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .95rem;
  border-radius: 6px;
}
.primary-nav a:hover, .primary-nav a:focus-visible,
.primary-nav a[aria-current="page"] {
  background: rgba(227,27,35,.08); color: var(--red); text-decoration: none;
}

/* ---------- Header submenus ---------- */
/* Mobile: sub-links sit indented under their parent inside the open menu. */
.primary-nav .subnav { list-style: none; }
.primary-nav .has-sub > .subnav {
  border-top: 0;
  margin-top: 0;
  padding-top: .1rem;
  padding-left: 1rem;
}
.primary-nav .subnav a {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: .9rem;
  color: var(--muted);
}
.primary-nav .subnav a:hover,
.primary-nav .subnav a:focus-visible {
  background: rgba(227,27,35,.06); color: var(--red);
}

/* Mobile only: submenus stay collapsed in the burger menu until the parent
   heading is tapped (the .open class is toggled by js/main.js). */
@media (max-width: 959.98px) {
  .primary-nav[data-open="true"] .has-sub > .subnav { display: none; }
  .primary-nav[data-open="true"] .has-sub.open > .subnav { display: flex; }

  /* caret affordance that flips when the submenu is open */
  .primary-nav .has-sub > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .primary-nav .has-sub > a::after {
    content: "";
    width: .5rem; height: .5rem;
    margin-left: .5rem;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
  }
  .primary-nav .has-sub.open > a::after { transform: rotate(225deg); }
}

/* ---------- Hero (mobile) ---------- */
.hero { background: var(--black); }
.hero-media {
  position: relative;
  min-height: 70vh;
  background: var(--black);
  display: grid; place-items: center;
  color: #fff;
  padding: 3rem 1rem;
  overflow: hidden;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: -20% 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.35)),
    url("../assets/hero2.jpg") center/cover no-repeat;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, transparent, rgba(0,0,0,.35));
  pointer-events: none;
  z-index: 1;
}
.hero-content { position: relative; max-width: 720px; text-align: center; z-index: 1; }
.hero-content h1 { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero-content p { font-size: 1.1rem; margin: 0 0 1.5rem; }

.btn {
  display: inline-block;
  background: var(--red); color: #fff;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .9rem 1.6rem; border-radius: 999px;
  border: 2px solid var(--red);
  transition: background-color .2s ease, transform .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--red-dark); border-color: var(--red-dark); text-decoration: none; transform: translateY(-1px); }

/* ---------- Features (3-up section) ---------- */
.features {
  padding: 2rem var(--gutter);
  display: grid; gap: 1rem;
}
.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
  min-width: 0;
  overflow: hidden;
}
.card > * { max-width: 100%; }
.gms-wrapper { max-width: 100%; overflow-x: auto; }
.gms-wrapper table { max-width: 100%; }
.card h2 { margin-top: 0; }
.link-more { font-weight: 700; }

.news-preview li {
  padding: .5rem 0;
  border-bottom: 1px solid #eee;
  display: flex; gap: .75rem;
}
.news-preview a { color: var(--ink); }
.news-preview a:hover { color: var(--red); }

/* ---------- News page ---------- */
.news-page > h1 { margin-bottom: 1.5rem; }
.news-list {
  display: grid;
  gap: 1.25rem;
  max-width: 760px;
}
.news-item {
  background: var(--paper);
  border-radius: var(--radius);
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}
.news-item h2 { margin: .15rem 0 .5rem; }
.news-item p { margin: 0; }
.news-date {
  color: var(--muted);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Sponsors ---------- */
.sponsors {
  background: #fff;
  padding: 2rem var(--gutter);
  text-align: center;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}
.sponsors h2 { margin-bottom: 1.5rem; color: var(--black); }
.sponsor-rows {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;   /* evenly spaced across the row */
  align-items: center;
  gap: 1.5rem 2rem;
}
.sponsor-row img {
  height: 60px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}
/* Linked sponsors — wrapper sizes to the logo, with a subtle hover cue */
.sponsor-row a { display: flex; transition: opacity .2s ease; }
.sponsor-row a:hover, .sponsor-row a:focus-visible { opacity: .7; }
/* The first two single-logo rows are lead/headline sponsors — show larger */
.sponsor-row.is-lead img { height: 92px; max-width: 260px; }

/* ---------- Location ---------- */
.location {
  display: grid; gap: 0;
}
.map-wrap { position: relative; }
#club-map {
  width: 100%; height: 260px; display: block;
  background: #e8e4dc;
  z-index: 0;
}
/* Strip Leaflet's default white box around the divIcon so only our
   teardrop SVG shows. Its drop shadow lifts the pin off the tiles. */
.leaflet-marker-icon.club-marker {
  background: transparent;
  border: 0;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
}
.address {
  font-style: normal;
  background: var(--panel); color: var(--ink);
  padding: 1.5rem 1rem;
}
.address h2 { color: var(--red); margin-top: 0; }
.address a { color: var(--red); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--panel); color: var(--ink);
  position: relative;
}
.footer-inner {
  padding: 3rem var(--gutter) 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-col h2 {
  color: var(--red);
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.footer-col p,
.footer-col address {
  margin: 0 0 .4rem;
  font-size: .9rem;
  font-style: normal;
  line-height: 1.6;
  color: var(--ink);
}
.footer-col a { color: var(--ink); }
.footer-col a:hover, .footer-col a:focus-visible { color: var(--red); text-decoration: none; }

/* Quick links rendered as a plain link list over the dark footer */
.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li { margin-bottom: .5rem; }
.footer-links a { font-size: .9rem; }

/* Social — red rounded squares */
.footer-socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
}
.footer-socials a {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  background: var(--red);
  border-radius: 8px;
  color: #fff;
  transition: background-color .2s ease;
}
.footer-socials a:hover { background: var(--red-dark); color: #fff; }
.footer-socials svg { width: 18px; height: 18px; fill: currentColor; }

/* Bottom copyright bar */
.footer-bar {
  background: var(--panel);
  color: var(--ink);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bar p {
  margin: 0;
  padding: .85rem var(--gutter);
  font-size: .85rem;
}

/* ---------- GMS feed (Hockey GMS Feed plugin tables) ----------
   Light overrides for the [gms] shortcode output: keep wide tables
   scrollable inside cards and recolour the plugin's hover/result
   classes to the club palette. */

/* Recolour GMS's row hover from its default bright yellow to club red. */
.gms-detaillink:hover { background-color: var(--red) !important; color: #fff !important; }
.gms-detaillink:hover a { color: #fff !important; }

/* Wash out the win/loss/draw score colours to ~70% (softened over white). */
.gms-win  { background-color: rgba(0, 128, 0, .7) !important; }    /* green */
.gms-loss { background-color: rgba(255, 0, 0, .7) !important; }    /* red */
.gms-draw { background-color: rgba(105, 105, 105, .7) !important; }/* dimgray */

/* ============================================================
   md — 640px+
   ============================================================ */
@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .features .about { grid-column: span 2; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }

  .hero-media { min-height: 80vh; }
  .hero-content p { font-size: 1.25rem; }
}

/* ============================================================
   lg — 960px+  (desktop nav appears, full grid layouts)
   ============================================================ */
@media (min-width: 960px) {
  .header-inner {
    padding: 1rem var(--gutter);
    padding-bottom: 0;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      ".       brand   socials"
      "nav     nav     nav";
    gap: .25rem;
  }
  .brand img { width: 88px; }
  .nav-toggle { display: none; }

  .primary-nav ul {
    display: flex !important;
    flex-direction: row;
    justify-content: space-evenly;
    border-top: 1px solid var(--red);
    margin-top: .75rem;
    padding-top: .25rem;
    gap: 0;
  }
  .primary-nav li { flex: 1; text-align: center; }
  .primary-nav a {
    padding: 1rem .5rem;
    border-radius: 0;
    border-bottom: 0px solid transparent;
    font-size: 1rem;
    position: relative;
  }
  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: var(--red);
    border-radius:4px 4px 0 0;
    opacity: 0;
    transition: opacity .15s ease;
  }
  .primary-nav a:hover,
  .primary-nav a:focus-visible,
  .primary-nav a[aria-current="page"] {
    background: transparent;
    border-bottom-color: transparent;
    color: var(--red);
  }
  .primary-nav a:hover::after,
  .primary-nav a:focus-visible::after,
  .primary-nav a[aria-current="page"]::after {
    opacity: 1;
  }

  /* Desktop: dropdown anchored under the hovered item, its left edge aligned
     to the left of that item's box. .has-sub is the positioning context. */
  .primary-nav .has-sub { position: relative; }
  .primary-nav .has-sub:hover,
  .primary-nav .has-sub:focus-within { z-index: 31; }
  .primary-nav .has-sub > .subnav {
    position: absolute;
    top: 100%; left: 0; right: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 100%;
    width: max-content;
    background: #fff;
    border-top: 0;
    border-bottom: 3px solid var(--red);
    box-shadow: 0 12px 22px rgba(0,0,0,.12);
    margin: 0;
    padding: .4rem 0;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
    z-index: 30;
  }
  .primary-nav .has-sub > .subnav li { flex: 0 0 auto; width: 100%; text-align: left; }
  .primary-nav .has-sub > .subnav a {
    display: block;
    padding: .45rem 1rem;
    font-size: .9rem;
    color: var(--ink);
    white-space: nowrap;
  }
  .primary-nav .subnav a::after { display: none; }
  .primary-nav .has-sub:hover > .subnav,
  .primary-nav .has-sub:focus-within > .subnav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
  /* keep the parent item highlighted while its panel is open */
  .primary-nav .has-sub:hover > a,
  .primary-nav .has-sub:focus-within > a { color: var(--red); }
  .primary-nav .has-sub:hover > a::after,
  .primary-nav .has-sub:focus-within > a::after { opacity: 1; }

  /* Desktop: third-level flyout (Our Club ▸ Men's / Women's ▸ teams) opens to
     the right of its parent row instead of dropping below. */
  .primary-nav .subnav .has-sub > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .primary-nav .subnav .has-sub > a::after {
    content: "";
    display: block;
    width: .45rem; height: .45rem;
    margin-left: .75rem;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: .55;
  }
  .primary-nav .subnav .has-sub > .subnav {
    top: 0;
    left: 100%;
    /* This flyout opens to the side, away from the header's red border, so it
       needs its own red cap to match the top-level dropdowns. */
    border-top: 3px solid var(--red);
  }

  /* Hero — full-width */
  .hero-media { min-height: calc(100vh - var(--header-h)); }

  /* Optional scroll-snap on main sections */
  main { scroll-snap-type: y proximity; }
  .hero, .features, .sponsors, .location {
    scroll-snap-align: start;
  }

  .features {
    grid-template-columns: 2fr 2fr 1.5fr;
    padding: 3rem var(--gutter);
    gap: 1.5rem;
  }
  .features .about { grid-column: auto; }

  .location {
    grid-template-columns: 2fr 1fr;
  }
  #club-map { height: 100%; min-height: 360px; }

  .footer-inner { grid-template-columns: repeat(4, 1fr); }
  /* Footer background stays full-width; content sits 200px in on each side. */
  .footer-inner { padding-inline: 200px; }
  .footer-bar p { padding-inline: 200px; }
}

/* ============================================================
   xl — 1200px+
   ============================================================ */
@media (min-width: 1200px) {
  .hero-content h1 { font-size: 4rem; }
  .brand img { width: 96px; }
}

/* ---------- Parallax fallback for iOS (no fixed bg) ---------- */
@supports (-webkit-touch-callout: none) {
  .hero-media {
    background-attachment: scroll;
  }
}

/* ============================================================
   Club split — 75/25 intro + contacts (shared with Juniors)
   ============================================================ */
.club-split {
  padding: 2rem var(--gutter);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;   /* stacked on mobile */
  align-items: stretch;
}
@media (min-width: 960px) {
  .club-split { grid-template-columns: 3fr 1fr; }   /* 75 / 25 */
}

.club-intro {
  background: var(--paper);
  border-radius: var(--radius);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.club-intro h1, .club-intro h2 { margin-top: 0; }
.club-intro p { margin: 0 0 1rem; }
.club-intro p:last-child { margin-bottom: 0; }

.club-contacts {
  background: var(--paper);
  border-radius: var(--radius);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.25rem;
}
.club-contacts h2 {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1.1rem;
}
.contact-people {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.contact-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
}
.contact-person img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
  border: 2px solid var(--border);
}
.contact-person .name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.contact-person .role { color: var(--muted); font-size: .82rem; line-height: 1.2; }

.club-contacts h2 + * { margin-top: 0; }
.contacts-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.contacts-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; justify-items: center; }
.contacts-list a { font-weight: 600; font-size: .9rem; color: var(--ink); text-align: center; }
.contacts-list a:hover, .contacts-list a:focus-visible { color: var(--red); text-decoration: none; }
.contacts-list--links a:last-child { grid-column: 1 / -1; }
@media (min-width: 960px) { .contacts-list { grid-template-columns: 1fr; } }

/* ============================================================
   Team page — Squad / Staff split tabs + alternating roster
   ============================================================ */

/* Tab strip */
.team-tabs {
  display: flex;
  gap: .25rem;
  margin: 1.5rem 0 0;
  border-bottom: 2px solid var(--border);
}
.team-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: .75rem 1.5rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.team-tab:hover { color: var(--ink); }
.team-tab[aria-selected="true"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* Panels */
.team-panel { margin-top: 2rem; }
.team-panel[hidden] { display: none; }

/* Roster: alternating photo / write-up rows */
.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.roster-item {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.roster-item:nth-child(even) { flex-direction: row-reverse; }

.roster-photo {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel);
  border: 4px solid var(--red);
}
.roster-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roster-bio { flex: 1 1 0; min-width: 0; }
.roster-item:nth-child(even) .roster-bio { text-align: right; }
.roster-bio h3 { margin: 0 0 .15rem; }
.roster-bio .roster-role {
  margin: 0 0 .6rem;
  color: var(--red);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.roster-bio p { margin: 0; max-width: 60ch; }
.roster-item:nth-child(even) .roster-bio p { margin-left: auto; }

@media (max-width: 640px) {
  .roster-item,
  .roster-item:nth-child(even) { flex-direction: column; text-align: center; }
  .roster-item:nth-child(even) .roster-bio,
  .roster-bio { text-align: center; }
  .roster-bio p { margin-inline: auto; }
}

/* ============================================================
   History — "Holcombe Honours" vertical timeline
   ============================================================ */
/* Short founding / facilities intro that sits above the Honours heading.
   Spans the full content width rather than being capped at half the page. */
.honours-intro { max-width: none; color: var(--muted); }

.honours { margin-top: 3rem; }
.honours-heading { text-align: center; color: var(--red); margin-bottom: .5rem; }
.honours-sub { text-align: center; color: var(--muted); margin: 0 auto 2rem; max-width: 60ch; }

/* The timeline. Mobile-first: a single rail down the left with every season
   stacked to its right. From 760px up it becomes a true centre line with the
   seasons alternating left / right. */
.honours-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0;
}
/* The central (mobile: left) line. */
.honours-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 3px;
  background: var(--red);
  border-radius: 3px;
}

.honours-entry {
  position: relative;
  width: 100%;
  padding: 0 0 2.5rem 2.5rem;
  box-sizing: border-box;
  text-align: left;
}
.honours-entry:last-child { padding-bottom: 0; }

/* The node sitting on the line. */
.honours-entry::before {
  content: "";
  position: absolute;
  top: .35rem;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--red);
}

.honours-year {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.honours-teams {
  list-style: none;
  margin: 0;
  padding: 0;
}
.honours-teams li {
  padding: .15rem 0;
  color: var(--muted);
}
.honours-teams li::before {
  content: "▸ ";
  color: var(--red);
}
.honours-empty { font-style: italic; opacity: .7; }

@media (min-width: 760px) {
  .honours-timeline::before { left: 50%; transform: translateX(-50%); }

  .honours-entry { width: 50%; padding-bottom: 3rem; }
  /* Left column: aligned to the centre line, text right-aligned. */
  .honours-entry.left {
    left: 0;
    padding: 0 2.5rem 3rem 0;
    text-align: right;
  }
  /* Right column: pushed across the centre line, text left-aligned. */
  .honours-entry.right {
    left: 50%;
    padding: 0 0 3rem 2.5rem;
    text-align: left;
  }
  .honours-entry.left::before  { left: auto; right: -8px; }
  .honours-entry.right::before { left: -8px; }
  .honours-entry.left .honours-teams li::before  { content: ""; }
  .honours-entry.left .honours-teams li::after   { content: " ◂"; color: var(--red); }
}

/* ============================================================
   Dark mode — toggled by .dark on <body>
   ============================================================ */
body.dark {
  --bg:     #121212;
  --paper:  #1e1e1e;
  --panel:  #181818;
  --border: rgba(255,255,255,.08);
  --ink:    #e8e8e8;
  --muted:  #a0a0a0;
  --black:  #0a0a0a;
  color: var(--ink);
  background: var(--bg);
}

body.dark .theme-toggle:hover { background: rgba(255,255,255,.1); }
body.dark .theme-toggle img { filter: invert(1); }

body.dark .site-header { background: #0a0a0a; color: #fff; }
body.dark .nav-toggle span { background: #fff; }
body.dark .primary-nav a { color: #fff; }
body.dark .primary-nav ul { border-top-color: rgba(255,255,255,.08); }
body.dark .primary-nav .has-sub > .subnav { background: #0a0a0a; box-shadow: 0 12px 22px rgba(0,0,0,.6); }
body.dark .primary-nav .subnav a { color: #cfcfcf; }
body.dark .primary-nav .subnav a:hover,
body.dark .primary-nav .subnav a:focus-visible { color: #fff; background: rgba(255,255,255,.08); }

body.dark .card,
body.dark .news-item {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
body.dark .news-preview a { color: var(--ink); }
body.dark .news-preview a:hover { color: var(--red); }
body.dark .news-preview li { border-bottom-color: #2a2a2a; }


/* ============================================================
   Shared page chrome — ported from the per-page inline <style>
   blocks of the static site (identical on every page there).
   ============================================================ */
.theme-toggle {
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  line-height: 0;
}
.theme-toggle:hover { background: rgba(0,0,0,.06); }
.theme-toggle img { width: 18px; height: 18px; display: block; }
@media (min-width: 960px) {
  .site-header .header-inner { grid-template-areas: "brand brand brand" "nav nav nav" !important; }
}

/* Footer: columns sized to content and centred as a group — overrides the
   4-column full-width grid above. */
@media (min-width: 960px) {
  .footer-inner {
    grid-template-columns: repeat(3, auto);
    justify-content: space-evenly;
    gap: 2rem;
    padding-inline: var(--gutter);
  }
}
