/*
  Homepage and priority pages update (2026)
  - Hero: longer headline and introduction
  - Priorities: separate cards with a diagonal corner, one row on desktop
  - KPIs: fixed blocks when there are four or fewer figures
  - Copy and image: same 32px gap above buttons as the rest of the site
  - News: "Latest stories" block with intro and link to all news
  Loaded after layout.css.
*/

/* ------ Hero (front page) --------- */

.hero-front-page-column-info h1 {
  /* Longer headline: still capitals (site style), slightly smaller than the original 50px */
  font-size: clamp(1.875rem, 1.5rem + 1.1vw, 2.625rem); /* 30px to 42px */
  line-height: 1.1;
  margin: 0 0 1.25rem 0; /* 20px */
}

.hero-front-page-column-info p {
  font-size: 1.125rem; /* 18px, the site's body text size */
  line-height: 1.55;
  margin-bottom: 0.875rem; /* 14px */
}

@media all and (min-width: 48rem) {
  /* The menu floats over the top of the page: keep the text clear of it */
  .hero-front-page-column-info {
    padding-top: 7rem; /* 112px */
  }
}

@media all and (min-width: 60rem) {
  /* Wider text column (9 of 16 instead of 7) so the headline needs fewer lines */
  .hero-front-page-column-info {
    grid-column: 1 / 10;
  }

  .hero-front-page-column-visual {
    grid-column: 10 / 17;
  }
}

/* ------ Priorities (signposts): separate cards --------- */

/* Keep the cards above the dotted pattern, and shorten the pattern so it
   sits beside the heading rather than behind the cards */
.flexible-signposts .container {
  position: relative;
  z-index: 1;
}

.flexible-signposts-pattern-1 {
  height: 14rem; /* 224px */
}

.flexible-signposts-column {
  /* Each card: dark blue, white text, diagonal top-right corner, and a
     coloured strip that runs along the top and down the diagonal */
  --card-accent: #f6d82a; /* yellow */
  --card-corner: 2.5rem; /* size of the diagonal cut */
  --card-strip: 6px; /* thickness of the coloured strip */
  background-color: #054b64;
  clip-path: polygon(0 0, calc(100% - var(--card-corner)) 0, 100% var(--card-corner), 100% 100%, 0 100%);
  color: #fff;
  padding: calc(2rem + var(--card-strip)) 1.75rem 2rem 1.75rem;
  position: relative;
}

.flexible-signposts-column::before {
  /* The strip: a band along the top edge that turns and follows the diagonal.
     8.5px and 2.5px keep the band the same 6px thickness on the 45 degree edge. */
  background-color: var(--card-accent);
  clip-path: polygon(
    0 0,
    calc(100% - var(--card-corner)) 0,
    100% var(--card-corner),
    100% calc(var(--card-corner) + 8.5px),
    calc(100% - var(--card-corner) - 2.5px) var(--card-strip),
    0 var(--card-strip)
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.flexible-signposts-column-pink {
  --card-accent: #ea5439; /* orange-red */
}

.flexible-signposts-column-teal {
  --card-accent: #f3a32f; /* orange: teal would barely show on dark blue */
}

.flexible-signposts-column h3 {
  margin-top: 0;
}

.flexible-signposts-column h3 a,
.flexible-signposts-column h3 span,
.flexible-signposts-column p,
.flexible-signposts-column .flexible-signposts-cta a {
  color: #fff;
}

.flexible-signposts-column h3 a:hover,
.flexible-signposts-column h3 a:focus,
.flexible-signposts-column .flexible-signposts-cta a:hover,
.flexible-signposts-column .flexible-signposts-cta a:focus {
  color: #f3a32f;
}

/* Teal arrow: white chevrons so it stands out on dark blue */
.flexible-signposts-column-teal .flexible-signposts-cta .bg-teal {
  color: #fff;
}

@media all and (min-width: 48rem) {
  .flexible-signposts-column {
    padding: calc(2rem + var(--card-strip)) 1.75rem 5.5rem 1.75rem; /* room for the link at the bottom */
  }

  .flexible-signposts-column-no-link {
    padding-bottom: 2rem;
  }

  .flexible-signposts-cta {
    bottom: 1.75rem; /* 28px */
    left: 1.75rem;
  }

  /* Four or five cards: two per row on tablets */
  .flexible-signposts-columns-4,
  .flexible-signposts-columns-5 {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
  }

  .flexible-signposts-columns-4 .flexible-signposts-column,
  .flexible-signposts-columns-5 .flexible-signposts-column {
    grid-column: auto;
  }
}

@media all and (min-width: 1300px) {
  /* Desktop: all four or five cards in one row, using the full container width */
  .flexible-signposts-columns-4,
  .flexible-signposts-columns-5 {
    column-gap: 1.5rem; /* 24px */
    grid-column: 1 / 17;
  }

  .flexible-signposts-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .flexible-signposts-columns-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .flexible-signposts-columns-5 .flexible-signposts-column {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .flexible-signposts-columns-5 .flexible-signposts-cta {
    left: 1.5rem;
  }

  .flexible-signposts-columns-5 h3 {
    font-size: 1.375rem; /* 22px */
    min-height: 2.4em; /* two lines, so the descriptions line up */
  }
}

/* ------ KPIs: fixed blocks --------- */

.flexible-kpis-grid {
  padding: var(--gap_S) 0;
}

.flexible-kpis-grid ul {
  display: grid;
  gap: 2rem; /* 32px */
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.flexible-kpis-grid li {
  margin: 0;
}

.flexible-kpis-grid h4 {
  /* Close to the original 70px figures */
  font-size: clamp(2.5rem, 1.9rem + 2vw, 3.75rem); /* 40px to 60px */
  line-height: 1;
  margin: 0 0 1rem 0;
  white-space: nowrap;
}

.flexible-kpis-grid h5 {
  font-size: 1.375rem; /* 22px */
  line-height: 1.3;
  margin: 0;
}

.flexible-kpis-grid p {
  margin: 0.5em 0 0 0;
}

@media all and (min-width: 30rem) {
  .flexible-kpis-grid ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media all and (min-width: 60rem) {
  /* Indented like the original slider, so the figures clear the dotted pattern */
  .flexible-kpis-grid {
    padding: var(--gap_S) 0 var(--gap_M) var(--gap_M);
  }

  .flexible-kpis-grid ul {
    column-gap: 2rem; /* 32px */
  }

  .flexible-kpis-grid-3 ul {
    grid-template-columns: repeat(3, 1fr);
  }

  .flexible-kpis-grid-4 ul {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media all and (min-width: 100rem) {
  .flexible-kpis-grid h4 {
    font-size: 4.375rem; /* 70px, as the original */
  }
}

/* ------ Copy and image: button spacing --------- */

/* Same 32px gap between text and a button as the page headers use */
.flexible-copy-image-copy p:has(> a.button) {
  margin-top: 2rem;
}

/* ------ News: latest stories block --------- */

.flexible-news-block {
  position: relative;
}

.flexible-news-block .container {
  position: relative;
  z-index: 1;
}

@media all and (min-width: 48rem) {
  /* Wider heading column so the heading fits on one line */
  .flexible-news-block .flexible-news-info .flexible-columns-1-column {
    grid-column: 2 / 16;
  }
}

.flexible-news-block .flexible-news-intro {
  margin: 1rem auto 0 auto;
  max-width: 50rem; /* 800px */
}

.flexible-news-block .flexible-news-more {
  position: relative;
}

@media all and (min-width: 80rem) {
  .flexible-news-block-4 .flexible-news-column {
    width: calc(25% - 0.85rem);
  }
}

/* ------ Priority pages without a designed cut-out image --------- */
/* Header photo: a large panel that runs to the right edge of the screen, cut on
   the site's diagonal (as the homepage stats photo), with the brand's corner
   triangle and double-chevron arrow at full scale, as in the brand artwork. */

.brand-photo {
  position: relative;
}

.brand-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.brand-photo-triangle,
.brand-photo-chevron {
  position: absolute;
  z-index: 3; /* above the photo (the theme lifts header images to layer 2) */
}

/* Triangle: bottom-right corner, right angle in the corner */
.brand-photo-triangle {
  bottom: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  height: clamp(5rem, 11vw, 11rem);
  right: 0;
  width: clamp(5rem, 11vw, 11rem);
}

/* Double chevron: large, low on the left of the photo */
.brand-photo-chevron {
  bottom: clamp(1.25rem, 3vw, 2.5rem);
  height: clamp(2.75rem, 5vw, 4.5rem);
  left: clamp(1.25rem, 4vw, 3rem);
  width: clamp(2.75rem, 5vw, 4.5rem);
}

.brand-photo-chevron svg {
  display: block;
  height: 100%;
  width: 100%;
}

.brand-photo-triangle-orange .brand-photo-triangle { background-color: #f3a32f; }
.brand-photo-triangle-orange-dark .brand-photo-triangle { background-color: #ea5439; }
.brand-photo-triangle-yellow .brand-photo-triangle { background-color: #f6d82a; }
.brand-photo-triangle-teal .brand-photo-triangle { background-color: #0c84a0; }

.brand-photo-chevron-orange .brand-photo-chevron path { fill: #f3a32f; }
.brand-photo-chevron-orange-dark .brand-photo-chevron path { fill: #ea5439; }
.brand-photo-chevron-yellow .brand-photo-chevron path { fill: #f6d82a; }
.brand-photo-chevron-teal .brand-photo-chevron path { fill: #0c84a0; }
.brand-photo-chevron-teal-dark .brand-photo-chevron path { fill: #054b64; }

/* Phones and tablets: the photo runs edge to edge under the text,
   with a diagonal bottom edge */
@media all and (max-width: 59.9375rem) {
  .hero-priority-with-photo {
    padding-bottom: var(--gap_S); /* a gap before the next section's photo */
  }

  .hero-priority-with-photo .hero-priority-column-visual-photo {
    margin: var(--gap_S) calc(0px - ((100vw - var(--containerWidth)) / 2)) 0 calc(0px - ((100vw - var(--containerWidth)) / 2));
  }

  .hero-priority-with-photo .brand-photo {
    height: clamp(16rem, 62vw, 28rem);
  }

  .hero-priority-with-photo .brand-photo img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 82%);
  }
}

/* Desktop: the photo fills the right of the header, below the menu bar,
   from the top of the header to the bottom, and off the right edge */
@media all and (min-width: 60rem) {
  .hero-priority-with-photo {
    min-height: 42rem; /* 672px */
  }

  .hero-priority-with-photo .container {
    position: static;
  }

  .hero-priority-with-photo .hero-priority-column-info {
    grid-column: 1 / 9;
    position: relative;
    z-index: 4;
  }

  .hero-priority-with-photo .hero-priority-column-visual-photo {
    bottom: 0;
    position: absolute;
    right: 0;
    top: 8.5rem; /* clear of the menu bar */
    bottom: var(--gap_S) !important; /* a gap before the next section's photo */
    width: 48vw;
  }

  .hero-priority-with-photo .brand-photo {
    height: 100%;
  }

  .hero-priority-with-photo .brand-photo img {
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
  }

  /* Chevrons sit just inside the diagonal at the bottom */
  .hero-priority-with-photo .brand-photo-chevron {
    left: 6%;
  }
}

/* ------ Copy and image: small print (e.g. report dates) --------- */

.flexible-copy-image-copy .copy-meta {
  font-size: 0.875rem; /* 14px */
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* ------ Sections whose photos bleed off the right edge --------- */
/* The photos are meant to run to the edge of the screen; without this the page
   could be scrolled sideways (about 100px on the original homepage). */
.flexible-kpis,
.flexible-copy-image {
  overflow-x: clip;
}

/* =====================================================================
   Tidy-up: spacing, widths and sizes on the homepage, About Us and the
   priority pages (Green Industry, Employment and Skills, Social Economy,
   Supported Housing, Homelessness), at every screen size.
   ===================================================================== */

/* Desktop: one rhythm for section spacing (100px above and below) */
body.home .flexible-signposts,
body.page-template-page_who-we-are .flexible-signposts,
body.page-template-page_priority .flexible-signposts {
  padding-bottom: var(--gap_M);
}

/* Homepage hero: the same 32px gap above the button as everywhere else */
.hero-front-page-column-info p:has(+ .hero-front-page-cta) {
  margin-bottom: 0;
}

/* Tablet (768px to 959px): fluid width with 40px side margins
   (the theme's fixed 768px width left no margin at all on a 768px screen) */
@media only screen and (min-width: 768px) and (max-width: 959px) {
  body {
    --containerWidth: calc(100vw - 5rem);
    --gap_L: 6rem; /* 96px */
    --gap_M: 5rem; /* 80px */
  }

  body .container {
    width: calc(100vw - 5rem);
  }
}

/* Phones (up to 767px): fluid width with 20px to 32px side margins
   (the theme's fixed 300px / 420px widths wasted up to half the screen),
   and section spacing scaled down from the desktop 100px to 150px */
@media only screen and (max-width: 767px) {
  body {
    --containerWidth: calc(100vw - 2.5rem);
    --gap_XL: 8rem; /* 128px: keeps headers clear of the menu bar */
    --gap_L: 4.5rem; /* 72px */
    --gap_M: 4rem; /* 64px */
    --gap_S: 2.5rem; /* 40px */
    --gap_XS: 1.5rem; /* 24px */
  }

  body .container {
    width: calc(100vw - 2.5rem);
  }

  /* Homepage header: clear of the menu bar */
  body.home .hero-front-page {
    padding-top: 7rem; /* 112px */
  }

  /* Copy and image: shorter photo above the text (was a full-screen square) */
  body .flexible-copy-image-image img {
    height: 70vw;
  }

  /* Stats: figures sized for a phone screen */
  .flexible-kpis-slider h4,
  .flexible-kpis-grid h4 {
    font-size: 3.25rem; /* 52px */
  }

  /* Section headings: a step smaller so long ones don't run to four lines */
  body main h2.font-size-5 {
    font-size: 1.75rem; /* 28px */
  }
}

@media only screen and (min-width: 480px) and (max-width: 767px) {
  body {
    --containerWidth: calc(100vw - 4rem);
  }

  body .container {
    width: calc(100vw - 4rem);
  }
}

/* Three stats: one row from tablet width up (avoids two plus an orphan) */
@media only screen and (min-width: 768px) {
  .flexible-kpis-grid-3 ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* About Us: the map section uses the same spacing as the other sections */
body.page-template-page_who-we-are .lcrha-map {
  padding-top: var(--gap_M);
}

/* Headers: decorative shapes and photos stop at the screen edge on tablets */
.hero-front-page,
.hero-priority {
  overflow-x: clip;
}

/* Header text centred against the photo on desktop */
@media all and (min-width: 60rem) {
  .hero-priority-with-photo .hero-priority-columns {
    align-items: center;
    min-height: 24rem; /* the photo's height, less the header's top and bottom spacing */
  }
}

/* About Us header on phones: keep room under the intro for the two corner photos
   (the theme reserved it with a spacing value that is now smaller on phones) */
@media only screen and (max-width: 767px) {
  body.page-template-page_who-we-are .hero-generic-column-images {
    padding-bottom: calc(33.333vw + 1.5rem);
  }
}

/* Photo headers on tablets (768px to 959px): text full width, photo full width
   below it, as on phones (side by side squeezed long titles onto five lines) */
@media all and (min-width: 48rem) and (max-width: 59.9375rem) {
  .hero-priority-with-photo .hero-priority-columns {
    display: block;
  }
}

/* Stats section label used as an evidence link (e.g. Social Economy) */
.flexible-kpis-info h2 a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.flexible-kpis-info h2 a:hover,
.flexible-kpis-info h2 a:focus {
  color: #fff;
}

/* ------ News blocks: category and search (same look as the News page filters) --------- */

.news-filters {
  margin-bottom: var(--gap_S);
  padding: 0;
}

.news-filters select,
.news-filters input {
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid #054b64;
  border-radius: 2em;
  display: block;
  font-family: aw-conqueror-sans, sans-serif;
  font-size: 1rem;
  font-weight: normal;
  height: 3.375rem; /* 54px */
  margin: 0;
  padding: 0 1em;
  text-transform: uppercase;
  width: 100%;
}

.news-filters select {
  background: #054b64;
  color: #fff;
  cursor: pointer;
}

.news-filters input {
  background: #fff;
  color: #054b64;
}

.news-filters input::placeholder {
  color: #054b64;
  opacity: 1;
}

@media all and (min-width: 48rem) {
  .news-filters select,
  .news-filters input {
    width: 18.75rem; /* 300px, as on the News page */
  }
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
}

/* ------ Fonts and buttons: one font and one button style throughout --------- */

/* Form controls don't inherit the page font by default (they showed in Arial) */
button,
input,
select,
textarea {
  font-family: inherit;
}

.button,
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"] {
  font-family: aw-conqueror-sans, sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 700;
}

/* ------ Text-and-photo sections: dots only as wide as the photo --------- */
/* (They were 60% of the screen wide, so they ran under the text.) */
@media all and (min-width: 48rem) {
  .flexible-copy-image-pattern {
    width: calc(((100vw - var(--containerWidth)) / 2) + ((var(--containerWidth) / 16) * 5));
  }
}

/* ------ Header photo crop for individual pages --------- */
/* Employment and Skills: show more of the left of the photo, less of the right */
.hero-priority-employment-and-skills .brand-photo img {
  object-position: 15% center;
}

/* Social Economy: show the left of the photo so the man on the left isn't cut off */
.hero-priority-social-economy .brand-photo img {
  object-position: 0% center;
}

/* ------ Even spacing: 100px between sections (64px on phones, 80px on tablets) --------- */

/* About Us map: its inner columns added an extra 50px above the heading */
body.page-template-page_who-we-are .lcrha-map-columns {
  padding-top: 0;
}

/* Photo gallery: same gap below it as every other section, instead of
   sitting flush against the footer band */
.flexible-gallery {
  padding-bottom: var(--gap_M);
}

/* ------ Responsive fixes --------- */

/* Stats carousel (3 at a time): figures and labels scale with the screen so
   "213,000+" and long labels fit their slide on tablets and small laptops
   (they were a fixed 70px / 25px). Full size from about 1600px wide. */
.flexible-kpis-slider h4 {
  font-size: clamp(2.5rem, 4.4vw, 4.375rem); /* 40px to 70px */
}

.flexible-kpis-slider h5 {
  font-size: clamp(1rem, 1.6vw, 1.5625rem); /* 16px to 25px */
}

/* Small phones: page titles scale down so long words ("HOMELESSNESS",
   "ASSOCIATIONS") fit on screen */
@media all and (max-width: 29.9375rem) {
  .hero-priority h1,
  .hero-front-page h1 {
    font-size: 8.5vw;
  }
}

/* Tablets: five priority cards go two per row; centre the fifth on its own row */
@media all and (min-width: 48rem) and (max-width: 959.98px) {
  .flexible-signposts-columns-5 .flexible-signposts-column:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 1rem);
  }
}

/* ------ Header menu (longer labels from the audit: "News and Stories" etc.) --------- */

.menu-primary .menu > .menu-item > a {
  white-space: nowrap;
}

.header-navigation-logo {
  flex-shrink: 0;
}

/* 960px to 1299px: the labels no longer fit beside the logo and Contact
   button, so use the menu button (as on phones) */
@media all and (min-width: 60rem) and (max-width: 1299.98px) {
  .header-contact,
  .header-navigation-primary-container {
    display: none;
  }

  .header-navigation-mobile-toggle {
    display: block;
  }

  .header-navigation-mobile {
    display: none;
  }

  .header-navigation-mobile-active {
    display: block;
  }
}

/* 1300px to 1640px: slightly smaller labels and gaps so they sit on one line */
@media all and (min-width: 81.25rem) and (max-width: 102.5rem) {
  .menu-primary .menu > .menu-item > a {
    font-size: 1.0625rem; /* 17px */
  }

  .menu-primary .menu > .menu-item {
    margin-right: 1.5rem; /* 24px */
  }

  .menu-primary .menu > .menu-item-has-children {
    margin-right: 2.75rem; /* 44px, room for the + */
  }
}

/* News and Stories header: wider text column so the longer intro reads better
   (the theme's 8 of 16 columns made it a narrow centred block) */
@media all and (min-width: 48rem) {
  body.blog .hero-generic-column {
    grid-column: 3 / 15;
  }
}

/* ------ Body text: 18px everywhere (matches the homepage and priority pages) --------- */
/* Older pages (Our Research, Employment Opportunities, Cost of Living Support,
   Contact) used the theme's 20px and 25px text styles for body copy. Headings,
   stats and news cards keep their own sizes. */
.hero-generic-column p,
.hero-generic-column .font-size-3,
.hero-generic-column .font-size-4,
.flexible-columns .container.font-size-3,
.flexible-copy-image-copy,
main p.font-size-3:not(.flexible-kpis p),
main p.font-size-4,
.contact .gform_description,
.contact .gform_required_legend {
  font-size: 1.125rem; /* 18px */
  line-height: 1.55;
}

/* ------ Bold text in the site font ---------------------------------------------- */
/* The old theme set bold text to "FSAlbertWeb-Bold", which is never loaded, so it
   fell back to Arial. */
strong, b {
  font-family: inherit;
  font-weight: 700;
}

/* ------ Member logo sections: caption as body text ----------------------------- */
.flexible-logos-info p,
.flexible-logos-info {
  font-size: 1.125rem; /* 18px */
  line-height: 1.55;
}

/* ------ Research and Evidence header -------------------------------------------- */
.hero-generic-column p.hero-subheading {
  color: #054b64;
  /* same 18px size as all other intros; the teal colour marks it as the subheading */
}
@media (min-width: 48rem) {
  body.page-template-page_research .hero-generic-column {
    grid-column: 4 / 14; /* a little wider for the longer intro */
  }
}

/* ------ Section spacing: one gap between white sections, not two ----------------- */
/* Each white section has its own top and bottom padding, so two white sections in a
   row (or a header followed by a white section) left a double gap. Coloured sections
   (bg-* classes) keep their padding. */
.flexible-section:has(> :is(.pad-bottom-s, .pad-bottom-m, .pad-bottom-l, .pad-bottom-xl):not([class*="bg-"])) + .flexible-section > [class*="pad-top-"]:not([class*="bg-"]) {
  padding-top: 0;
}

/* Cards section: the standard gap below, and no space for a heading when there isn't one */
.flexible-signposts.pad-bottom-l {
  padding-bottom: var(--gap_M);
}
.flexible-signposts-info:not(:has(h2, p)) {
  display: none;
}

/* After a header, half the gap: the header photo already sits in the header's bottom padding */
.hero + #maincontent > .flexible > .flexible-section:first-child > [class*="pad-top-"]:not([class*="bg-"]) {
  padding-top: var(--gap_S);
}

/* ------ Header: menu lines up with the logo's words, not the whole logo --------- */
/* The logo's text sits lower than the house mark, so its middle is 9px below the
   logo's middle (the logo is always 200px wide when the full menu shows). */
@media all and (min-width: 1300px) {
  .header-navigation-primary-container,
  .header-contact {
    position: relative;
    top: 0.5625rem; /* 9px */
  }
}

/* ------ 404 page and search results ---------------------------------------------- */
.site-search-column {
  margin: 0 auto;
  max-width: 50rem; /* 800px */
}

.site-search {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: var(--gap_S);
}

.site-search input {
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border: 2px solid #054b64;
  border-radius: 2em;
  color: #054b64;
  flex: 1 1 16rem;
  font-family: aw-conqueror-sans, sans-serif;
  font-size: 1rem;
  height: 3.375rem; /* 54px, as the news filters */
  margin: 0;
  max-width: 30rem;
  padding: 0 1.25em;
}

.site-search input::placeholder {
  color: #054b64;
  opacity: 1;
  text-transform: uppercase;
}

.site-search .button {
  border: 0;
  cursor: pointer;
  margin: 0;
}

.site-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.site-shortcuts .button {
  margin: 0;
}

.site-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-search-result {
  border-top: 1px solid rgba(5, 75, 100, 0.2);
  padding: 2rem 0;
}

.site-search-result h2 {
  margin-bottom: 0.5rem;
}

.site-search-result .copy-meta {
  color: #054b64;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.site-search-result p:last-child {
  margin-bottom: 0;
}

.site-search-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  padding-top: var(--gap_S);
  text-transform: uppercase;
}

.site-search-pagination .current {
  color: #ea5439;
}

/* ------ Small laptops (960px to 1299px): 960px page with at least 40px each side --- */
@media only screen and (min-width: 960px) and (max-width: 1299px) {
  body {
    --containerWidth: min(960px, calc(100vw - 5rem));
  }

  body .container {
    width: min(960px, calc(100vw - 5rem));
  }

  /* Five priority cards: three on the first row, two centred below */
  .flexible-signposts-columns-5 {
    column-gap: 1.5rem;
    grid-column: 1 / 17;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 1.5rem;
  }

  .flexible-signposts-columns-5 .flexible-signposts-column {
    grid-column: span 2;
  }

  .flexible-signposts-columns-5 .flexible-signposts-column:nth-child(4) {
    grid-column: 2 / 4;
  }

  .flexible-signposts-columns-5 .flexible-signposts-column:nth-child(5) {
    grid-column: 4 / 6;
  }
}

/* ------ Mobile menu and sticky header (below 1300px, where the menu button shows) --- */
@media only screen and (max-width: 1299.98px) {
  /* Open menu: the first link starts well clear of the logo */
  .header-navigation-mobile-active {
    padding-top: 9.5rem; /* 152px */
  }

  body.admin-bar .header-navigation-mobile-active {
    padding-top: calc(9.5rem + 32px);
  }

  /* Scrolled: a slimmer bar with a smaller logo and menu button */
  .header-navigation-logo svg {
    transition: width 0.3s ease-in-out;
  }

  .header-navigation.sticky:not(.header-navigation-fixed) {
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
  }

  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-logo {
    width: 8.5rem; /* 136px, was 176px to 200px */
  }

  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle button,
  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle-line {
    width: 1.625rem; /* 26px, was 32px */
  }

  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle button {
    height: 1.625rem;
  }

  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle-line {
    height: 3px;
  }

  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle-line:nth-child(2),
  .header-navigation.sticky:not(.header-navigation-fixed) .header-navigation-mobile-toggle-line:nth-child(3) {
    top: calc(50% - 1.5px);
  }
}

@media only screen and (max-width: 782px) {
  body.admin-bar .header-navigation-mobile-active {
    padding-top: calc(9.5rem + 46px);
  }
}

/* Logged-in editors on phones: WordPress's admin bar scrolls away, so the scrolled
   header moves up to the very top instead of leaving a gap where the bar was */
@media only screen and (max-width: 600px) {
  body.admin-bar .header-navigation.sticky:not(.header-navigation-fixed) {
    top: 0;
  }
}

/* ------ "Get in touch" form: submit button centred on phones and tablets --------- */
@media only screen and (max-width: 959px) {
  .footer-contact_wrapper .gform_wrapper .gform_footer,
  .footer-contact_wrapper .gform_footer {
    justify-content: center;
  }
}

/* ------ Header with two corner photos (Contact): photos sit below the text on phones -- */
/* The photos are pinned to the bottom of the header; on a phone the text runs further down,
   so leave room for the tallest photo (about 40% of the page width) under it */
@media only screen and (max-width: 767px) {
  .hero-generic-column-images {
    padding-bottom: calc(var(--containerWidth) * 0.4 + 1.5rem);
  }
}
