/*
Theme Name: Thorpe Malsor
Theme URI: https://thorpemalsor.co.uk/
Author: inCloud Web Design
Description: A clean, accessible theme for Thorpe Malsor village.
Version: 1.1.6
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: thorpe-malsor
*/

/* ---------------------------------------------------------
   Design tokens
--------------------------------------------------------- */
:root {
  --green: #4f6a5f;
  --green-dark: #33453d;
  --green-deep: #26332d;
  --teal: #2c7f7b;
  --teal-dark: #216460;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --tint: #eef2ee;
  --ink: #232b27;
  --muted: #5c6a64;
  --line: #e3ded4;
  --gold: #c9a227;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(27, 43, 35, 0.09);
  --shadow-sm: 0 2px 10px rgba(27, 43, 35, 0.06);
  --container: 1140px;
  --narrow: 760px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------------------------------------------------------
   Reset / base
--------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.22;
  color: var(--green-dark);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 4px solid var(--teal);
  color: var(--muted);
  font-style: italic;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--surface);
  color: var(--green-dark);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }

.btn-light { background: #fff; color: var(--green-dark); }
.btn-light:hover { background: var(--paper); color: var(--green-dark); }

.btn-outline { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--green-dark); border-color: #fff; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 24px rgba(20, 34, 27, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img { height: 36px; width: auto; }
.brand:focus-visible { outline-offset: 6px; }

.primary-nav { display: flex; align-items: center; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav li { position: relative; margin: 0; }

.primary-nav a {
  display: block;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-parent > a,
.primary-nav .current_page_parent > a {
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  display: block;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(22, 36, 29, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 20;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Keep the final dropdown inside the viewport. */
.primary-nav > ul > li:last-child > .sub-menu { left: auto; right: 0; }

.primary-nav .sub-menu a {
  color: var(--green-dark);
  padding: 10px 14px;
  font-weight: 500;
  white-space: nowrap;
}
.primary-nav .sub-menu a:hover { background: var(--tint); color: var(--green-dark); }

.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  margin-bottom: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------------------------------------------------------
   Hero (front page)
--------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 76vh, 720px);
  padding: 96px 0 112px;
  background-color: var(--green-dark);
  background-image: url("assets/img/hero.jpg");
  background-size: cover;
  background-position: center 58%;
  color: #fff;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(24, 38, 31, 0.55) 0%, rgba(24, 38, 31, 0.18) 38%, rgba(24, 38, 31, 0.72) 100%);
}
.hero-content { max-width: 720px; }
.hero .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.hero h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.9rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 24px rgba(15, 25, 20, 0.35);
}
.hero p {
  margin: 0 0 30px;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------
   Page header
--------------------------------------------------------- */
.page-hero {
  background: linear-gradient(180deg, var(--tint) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
}
.page-hero .eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.page-hero h1 { margin: 0; max-width: 18em; }
.page-hero p {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------
   Sections / content
--------------------------------------------------------- */
.section { padding: 64px 0; }
.section--tint { background: var(--tint); }
.section--tight { padding: 40px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 { margin: 0; }
.section-head .btn { flex-shrink: 0; }

.page-body { padding: 56px 0 72px; }

.prose { max-width: 100%; }
.prose > * { max-width: var(--narrow); }
.prose > .alignwide { max-width: var(--container); }
.prose--wide { max-width: 100%; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.9rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.45em; }
.prose img { border-radius: var(--radius-sm); margin: 1.6rem 0; box-shadow: var(--shadow-sm); }
.prose figure { margin: 1.8rem 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption { margin-top: 0.6rem; font-size: 0.88rem; color: var(--muted); }

.prose .lead { font-size: 1.16rem; color: var(--muted); }

/* Callout */
.notice {
  margin: 2rem 0;
  padding: 18px 22px;
  border-left: 4px solid var(--teal);
  background: var(--tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.98rem;
}
.notice p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------
   Quick links / cards
--------------------------------------------------------- */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: -64px 0 0;
  position: relative;
  z-index: 2;
}
.quick-link {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.quick-link:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(27, 43, 35, 0.14); color: var(--ink); }
.quick-link h2,
.quick-link h3 { margin: 0 0 6px; font-size: 1.2rem; }
.quick-link p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.quick-link .arrow { display: inline-block; margin-top: 12px; color: var(--teal-dark); font-weight: 600; font-size: 0.9rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 25% 20%, rgba(44, 127, 123, 0.18), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(79, 106, 95, 0.22), transparent 50%),
    linear-gradient(135deg, #e7ece7 0%, #f4f1e9 100%);
}
.card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card__meta {
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.card__body h3 { margin: 0 0 10px; font-size: 1.25rem; }
.card__body h3 a { color: inherit; text-decoration: none; }
.card__body h3 a:hover { color: var(--teal-dark); }
.card__body p { margin: 0 0 16px; color: var(--muted); font-size: 0.96rem; line-height: 1.6; }
.card__body .more { margin-top: auto; font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.card__body .more:hover { text-decoration: underline; }

/* ---------------------------------------------------------
   Venues (amenities)
--------------------------------------------------------- */
.venue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.venue:first-of-type { padding-top: 0; }
.venue:last-of-type { border-bottom: 0; padding-bottom: 0; }
.venue:nth-child(even) .venue__media { order: 2; }
.venue__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.venue h2 { margin-top: 0; }
.venue h2 .sub {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.venue dl { margin: 0 0 1.2em; }
.venue dt { font-weight: 600; color: var(--green-dark); }
.venue dd { margin: 0 0 0.55em; color: var(--muted); }

/* ---------------------------------------------------------
   People (councillors)
--------------------------------------------------------- */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin: 2rem 0;
}
.person {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 22px;
}
.person h3 { margin: 0 0 2px; font-size: 1.1rem; }
.person .role {
  display: block;
  margin-bottom: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.person p { margin: 0 0 6px; font-size: 0.94rem; color: var(--muted); line-height: 1.55; }
.person a { font-size: 0.9rem; overflow-wrap: anywhere; word-break: break-word; }
.prose a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------
   Tables
--------------------------------------------------------- */
.table-wrap {
  margin: 1.8rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-wrap th {
  background: var(--tint);
  color: var(--green-dark);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.table-wrap th, .table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) { background: #fafaf8; }
.table-wrap tbody tr:hover { background: #f4f7f4; }
.table-wrap td:first-child { white-space: nowrap; font-weight: 500; }

.table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
.table-tools input[type="search"] {
  flex: 1 1 240px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
.table-tools input[type="search"]:focus { border-color: var(--teal); outline: 3px solid rgba(44, 127, 123, 0.18); }
.table-tools .count { color: var(--muted); font-size: 0.88rem; }

/* ---------------------------------------------------------
   News
--------------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }

.entry-header { margin-bottom: 28px; }
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.entry-header h1 { margin: 0; }
.entry-featured { margin: 0 0 32px; }
.entry-featured img { width: 100%; border-radius: var(--radius); }

.single-body { padding: 56px 0 72px; }
.single-body .prose { max-width: 720px; }
.single-body .prose img { margin: 1.8rem 0; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 720px;
}
.post-nav a {
  display: block;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.95rem;
}
.post-nav a:hover { border-color: var(--teal); }
.post-nav .label { display: block; margin-bottom: 4px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.post-nav .next { text-align: right; }

.pagination { margin-top: 48px; text-align: center; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  padding: 8px 12px;
  margin: 0 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.9rem;
}
.pagination .current { background: var(--green); border-color: var(--green); color: #fff; }
.pagination a:hover { border-color: var(--teal); }

/* ---------------------------------------------------------
   Events
--------------------------------------------------------- */
.event-year {
  margin: 0 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.event-year summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.event-year summary::-webkit-details-marker { display: none; }
.event-year summary::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid var(--teal-dark);
  border-bottom: 2px solid var(--teal-dark);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.event-year[open] summary::before { transform: rotate(45deg); }
.event-year-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--green-dark); }
.event-year-count { margin-left: auto; font-size: 0.85rem; color: var(--muted); }
.event-year .event-list { padding: 0 20px 6px; }
.event-total { color: var(--muted); font-size: 0.9rem; }

.event-list { margin: 0; padding: 0; list-style: none; }
.event-row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child { border-bottom: 0; }
.event-date {
  flex: 0 0 64px;
  text-align: center;
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  color: var(--green-dark);
  line-height: 1.1;
}
.event-date .d { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.event-date .m { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-dark); }
.event-info h3 { margin: 0 0 3px; font-size: 1.12rem; }
.event-info h3 a { color: inherit; text-decoration: none; }
.event-info h3 a:hover { color: var(--teal-dark); }
.event-info p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.event-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0 0 28px;
  padding: 18px 22px;
  background: var(--tint);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.event-detail span { display: inline-flex; align-items: center; gap: 8px; color: var(--green-dark); }
.event-detail strong { font-weight: 600; }

/* ---------------------------------------------------------
   Section nav (sub pages)
--------------------------------------------------------- */
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}
.section-nav li { margin: 0; }
.section-nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}
.section-nav a:hover { border-color: var(--teal); }
.section-nav .current { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  margin-top: 0;
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 58px 0 26px;
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
}
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.site-footer p { margin: 0 0 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .brand-footer { display: inline-block; margin-bottom: 16px; }
.site-footer .brand-footer img { height: 34px; width: auto; opacity: 0.95; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 940px) {
  .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .venue { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  body { font-size: 16px; }

  .header-inner { min-height: 66px; }
  .brand img { height: 31px; }
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(20, 34, 27, 0.2);
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }
  .site-header.nav-open .primary-nav { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav a { color: var(--green-dark); padding: 13px 14px; border-radius: var(--radius-sm); }
  .primary-nav a:hover { background: var(--tint); color: var(--green-dark); }
  .primary-nav .current-menu-item > a,
  .primary-nav .current_page_item > a { background: var(--tint); color: var(--green-dark); }

  .primary-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 4px 14px;
    min-width: 0;
  }
  .primary-nav .sub-menu a { padding: 9px 14px; font-size: 0.92rem; color: var(--muted); }
  .menu-item-has-children > a::after { display: none; }

  .hero { min-height: 74vh; padding: 72px 0 56px; }
  .quick-links { grid-template-columns: 1fr; margin-top: 28px; }
  .section { padding: 48px 0; }
  .page-hero { padding: 36px 0 30px; }
  .page-body, .single-body { padding: 40px 0 56px; }

  .venue { grid-template-columns: 1fr; gap: 22px; padding: 34px 0; }
  .venue:nth-child(even) .venue__media { order: 0; }
  .venue__media img { aspect-ratio: 16 / 10; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }

  /* Long section menus scroll sideways instead of stacking. */
  .section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 26px;
    scrollbar-width: thin;
  }
  .section-nav li { flex: 0 0 auto; }

  .event-row { gap: 14px; }
  .event-date { flex-basis: 56px; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 32px; }
  .site-footer { padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
}

/* WordPress alignment classes */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }


/* ---------------------------------------------------------
   Gutenberg block content
--------------------------------------------------------- */
.prose > .wp-block-columns,
.prose > .wp-block-table,
.prose > .wp-block-image,
.prose > .wp-block-buttons { max-width: var(--narrow); }
.prose > .alignwide { max-width: var(--container); }

.wp-block-image img { border-radius: var(--radius-sm); }
.wp-block-image { margin: 1.8rem 0; }

.tm-caption,
.wp-block-image figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: left;
}

/* Tables (extra specificity to beat core block styles) */
.prose .wp-block-table {
  margin: 1.8rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.prose .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 0;
}
.prose .wp-block-table thead { border-bottom: 0; }
.prose .wp-block-table th {
  background: var(--tint);
  color: var(--green-dark);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.prose .wp-block-table th,
.prose .wp-block-table td {
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose .wp-block-table tbody tr:last-child td { border-bottom: 0; }
.prose .wp-block-table tbody tr:nth-child(even) { background: #fafaf8; }
.prose .wp-block-table tbody tr:hover { background: #f4f7f4; }
.prose .wp-block-table td:first-child { white-space: nowrap; font-weight: 500; }
.prose .wp-block-table figcaption {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Card columns used on the home and About pages */
.tm-cards { gap: 24px; }
.tm-cards .wp-block-column {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}
.tm-cards .wp-block-column h3 { margin: 0 0 8px; font-size: 1.2rem; }
.tm-cards .wp-block-column p { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.tm-cards .wp-block-column p:last-child a { font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.tm-cards .wp-block-column p:last-child a:hover { text-decoration: underline; }

/* Councillor columns */
.tm-people { gap: 22px; }
.tm-people .wp-block-column {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 22px;
}
.tm-people h3 { margin: 0 0 4px; font-size: 1.1rem; }
.tm-people .tm-role {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.tm-people p { margin: 0 0 6px; font-size: 0.94rem; color: var(--muted); line-height: 1.55; }
.tm-people a { font-size: 0.9rem; overflow-wrap: anywhere; }

.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; max-width: var(--narrow); }


/* Let card columns wrap instead of squeezing into a single row.
   !important is needed to beat the per-post layout styles WordPress prints. */
.wp-block-columns.tm-cards,
.wp-block-columns.tm-people { flex-wrap: wrap !important; }
.tm-cards > .wp-block-column { flex: 1 1 300px !important; }
.tm-people > .wp-block-column { flex: 1 1 260px !important; }

@media (max-width: 800px) {
  .tm-cards .wp-block-column,
  .tm-people .wp-block-column { padding: 20px; }
}
