/*
 * Allgood Construction: the theme's own styles, on top of the compiled app.css
 * (which is final and cannot be rebuilt). One file since 19 Nov 2026; it was
 * five (transitions, header-reveal, site, post-content, sections), kept here in
 * the order they loaded. Also loaded in the editor (inc/setup.php).
 */

/* ==========================================================================
   transitions
   ========================================================================== */

/*
 * Page transitions (cross-document view transitions), part of the theme since
 * 19 Nov 2026 (replaces the View Transitions plugin). Browsers that support
 * them (Chrome, Edge, Safari 18+) animate between the site's own pages; others
 * change page as normal.
 *
 * - The header keeps still; the page underneath fades out and the new one
 *   fades in with a small upward drift (300ms).
 * - On /news and news posts, assets/js/transitions.js also glides a card's
 *   photo and title into place on the post (agc-photo / agc-title).
 * - No animation for visitors who ask for reduced motion.
 */
@view-transition { navigation: auto; }

header.banner { view-transition-name: agc-header; }

/* Header: no cross-fade, the new one simply replaces the old. */
::view-transition-group(agc-header) { animation: none; z-index: 10; }
::view-transition-old(agc-header) { display: none; }
::view-transition-new(agc-header) { animation: none; }

/* The rest of the page. */
::view-transition-old(root) { animation: agc-vt-out 200ms ease both; }
::view-transition-new(root) { animation: agc-vt-in 300ms ease both; }

/* News card <-> post: photo and title move and resize. */
::view-transition-group(agc-photo),
::view-transition-group(agc-title) { animation-duration: 400ms; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(agc-photo),
::view-transition-new(agc-photo) { height: 100%; object-fit: cover; overflow: clip; }

@keyframes agc-vt-out { to { opacity: 0; } }
@keyframes agc-vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ==========================================================================
   header-reveal
   ========================================================================== */

/*
 * Header scroll reveal (see assets/js/header-reveal.js).
 * Hidden = slid up by its own height. No transform at rest, on purpose: a
 * transform would make the header the containing block for the fixed mobile-menu
 * backdrop inside it.
 * The rule on .is-hidden times the slide UP; the base rule times the slide back.
 * Selector is header#header.banner so it outranks the theme's own #header
 * transition rule.
 */
header#header.banner {
	transition-property: transform, color, background-color, border-color;
	transition-duration: 0.45s, 0.15s, 0.15s, 0.15s;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1), cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1);
}

header#header.banner.is-hidden {
	transform: translateY(-100%);
	transition-duration: 0.3s, 0.15s, 0.15s, 0.15s;
	transition-timing-function: cubic-bezier(0.4, 0, 1, 1), cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
	header#header.banner,
	header#header.banner.is-hidden {
		transition-duration: 0s;
	}
}

/* ==========================================================================
   site
   ========================================================================== */

/*
 * Small site-wide additions, outside the frozen compiled CSS.
 */

/* Bamboo Schema cookie banner: the theme's paragraph and link colours override
   the banner's own text colour (grey on dark failed contrast). */
#bamboo-consent p,
#bamboo-consent a,
#bamboo-consent label,
#bamboo-consent label span {
  color: var(--bc-fg, #fff);
}
#bamboo-consent a {
  text-decoration: underline;
}

/* Contact Form 7 honeypot (app/contact-form.php): off-screen, not display:none,
   so simple bots still see and fill it. */
.agc-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* "Cookie settings" link beside the footer copyright */
.bamboo-cookie-settings {
  color: inherit;
  text-decoration: underline;
}
.bamboo-cookie-settings:hover,
.bamboo-cookie-settings:focus-visible {
  color: #86cb72;
}

/* ------------------------------------------------------------------
 * Our Projects page (page 2726, Blocks page template, Query Loop).
 * Matches the old projects archive, measured 19 November 2026.
 * ------------------------------------------------------------------ */
.agc-projects-index {
  padding-top: 48px;
  padding-bottom: 96px;
}
@media (min-width: 1024px) {
  .agc-projects-index {
    padding-top: 80px;
  }
}
.agc-projects-index .agc-projects-index__title {
  font-size: 36px;
  line-height: 40px;
  font-weight: 400;
  color: #000;
  text-transform: capitalize;
  margin: 0 0 64px;
}
@media (min-width: 1024px) {
  .agc-projects-index .agc-projects-index__title {
    font-size: 50px;
  }
}

/* Cards: one column, three from 1024px, 32px gaps */
.agc-project-cards .wp-block-post-template {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}
@media (min-width: 1024px) {
  .agc-project-cards .wp-block-post-template {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.agc-project-cards .wp-block-post {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.agc-project-cards .wp-block-post-featured-image {
  margin: 0;
  height: 351px;
  overflow: hidden;
}
.agc-project-cards .wp-block-post-featured-image a,
.agc-project-cards .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agc-project-cards .agc-project-card__panel {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #2c2f31;
  padding: 24px;
  margin: 0;
}
.agc-project-cards .wp-block-post-date {
  font-size: 14px;
  line-height: 20px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 16px;
}
.agc-project-cards .wp-block-post-title {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 400;
  color: #fff;
  margin: 0 0 16px;
}
.agc-project-cards .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}
.agc-project-cards .wp-block-post-title a:hover,
.agc-project-cards .wp-block-post-title a:focus-visible {
  color: #c1ffaf;
}

/* Pagination: bordered numbers, current page in green, arrows only */
.agc-project-cards .wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.agc-project-cards .wp-block-query-pagination-numbers {
  display: flex;
}
.agc-project-cards .wp-block-query-pagination .page-numbers {
  display: block;
  margin: 0 4px;
  padding: 4px 12px;
  border: 1px solid #d1d5db;
  color: #374151;
  font-size: 16px;
  font-weight: 300;
  text-decoration: none;
}
.agc-project-cards .wp-block-query-pagination .page-numbers.current {
  background: #c1ffaf;
  border-color: #c1ffaf;
  color: #000;
}
.agc-project-cards .wp-block-query-pagination-previous,
.agc-project-cards .wp-block-query-pagination-next {
  margin: 0 4px;
  padding: 4px 12px;
  font-size: 0; /* hides "Previous Page" / "Next Page"; the arrow stays */
  color: #374151;
  text-decoration: none;
}
.agc-project-cards .wp-block-query-pagination-previous-arrow,
.agc-project-cards .wp-block-query-pagination-next-arrow {
  font-size: 20px;
  margin: 0;
}

/* ==========================================================================
   post-content
   ========================================================================== */

/*
 * Block content in news posts (.agc-post-content in partials/content-single).
 * The theme dequeues WordPress's block CSS, so the blocks used by converted
 * posts are styled here. Plain file outside the frozen build.
 * The block editor loads it too (add_editor_style), where the content sits in
 * .is-root-container, so the editor shows galleries and tables as on the site.
 */

/* Images */
:is(.agc-post-content, .is-root-container) .wp-block-image {
  margin: 1rem 0;
}
:is(.agc-post-content, .is-root-container) .wp-block-image img {
  max-width: 100%;
  height: auto;
}

/* Gallery: matches the old ACF gallery (2 columns, 3 from 1024px, square crops) */
:is(.agc-post-content, .is-root-container) .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 1024px) {
  :is(.agc-post-content, .is-root-container) .wp-block-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* WordPress inlines the core gallery CSS when the block renders. Its figure
   rules use :not(#individual-image), so these need the same to win. */
:is(.agc-post-content, .is-root-container) .wp-block-gallery .wp-block-image,
:is(.agc-post-content, .is-root-container) .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  /* !important: core also sizes galleries of 1 to 3 images with
     :first-child:nth-last-child() rules that outrank this one */
  width: auto !important;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
:is(.agc-post-content, .is-root-container) .wp-block-gallery .wp-block-image a {
  display: block;
  width: 100%;
  height: 100%;
}
:is(.agc-post-content, .is-root-container) .wp-block-gallery .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important;
}

/* Tables: the design most of the posts' hand-styled tables used */
:is(.agc-post-content, .is-root-container) .wp-block-table {
  margin: 1.5rem 0;
  overflow-x: auto;
}
:is(.agc-post-content, .is-root-container) .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  color: #2b2b2b;
}
:is(.agc-post-content, .is-root-container) .wp-block-table th,
:is(.agc-post-content, .is-root-container) .wp-block-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
  border: 0; /* core's inlined table CSS borders every cell; the design has row lines only */
}
:is(.agc-post-content, .is-root-container) .wp-block-table thead th {
  background: #2b2b2b;
  color: #fff;
}
:is(.agc-post-content, .is-root-container) .wp-block-table tbody tr {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
:is(.agc-post-content, .is-root-container) .wp-block-table tbody tr:nth-child(even) {
  background: #f7f7f7;
}
:is(.agc-post-content, .is-root-container) .wp-block-table tbody td:first-child {
  font-weight: 600;
}

/* ------------------------------------------------------------------
 * Projects (.agc-project-content in partials/content-single-case-study).
 * Matches the old ACF project template, measured 19 November 2026.
 * ------------------------------------------------------------------ */

/* Introduction (was the centred content field in the header) */
.agc-project-content .agc-project-intro {
  text-align: center;
  display: flow-root; /* keeps its last paragraph's margin, as the old header did */
}
.agc-project-content .agc-project-intro p {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #2c2f31;
  max-width: 636px;
  margin: 0 auto 16px;
}

/* Gallery: 2 columns, 3 from 768px, 4 from 1024px, 5 from 1280px; 4:3 tiles */
.agc-project-content .wp-block-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .agc-project-content .wp-block-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .agc-project-content .wp-block-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .agc-project-content .wp-block-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.agc-project-content.agc-post-content .wp-block-gallery .wp-block-image,
.agc-project-content.agc-post-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
  aspect-ratio: 4 / 3;
}

/* Video: square, rounded, shadowed, centred, half width from 1024px */
.agc-project-content .wp-block-video {
  width: 100%;
  margin: 3rem auto 1rem;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
@media (min-width: 1024px) {
  .agc-project-content .wp-block-video {
    width: 50%;
  }
}
.agc-project-content .wp-block-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pasted HTML (the Google review on 3219, a Custom HTML block): keep it to the
   theme's 65ch text width, as the old template's text column did */
.agc-project-content > div:not([class]) {
  max-width: 65ch;
}

/* Centred heading (was extral_title, an h4 in the old template) */
.agc-project-content h2.has-text-align-center {
  font-size: 1.5rem;
  margin: 1rem 0;
  text-align: center;
}

/* ==========================================================================
   sections
   ========================================================================== */

/*
 * Native page sections (tools/native-sections.php). The sections carry the old
 * layouts' Tailwind classes; this file covers what core blocks mark up
 * differently. Loaded on the site and in the editor.
 */

/* Images that fill their box (the old absolute / object-cover images) */
.agc-fill {
  margin: 0;
}
.agc-fill img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agc-fill-abs img {
  position: absolute;
  inset: 0;
}

/* Dark overlays over a section's background photo */
[class*="agc-dim-"] {
  pointer-events: none;
}
[class*="agc-dim-"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.agc-dim-50::after { background: rgb(0 0 0 / 0.5); }
.agc-dim-60::after { background: rgb(0 0 0 / 0.6); }
.agc-dim-70::after { background: rgb(0 0 0 / 0.7); }

/* Buttons: the Button block's wrapper carries the theme's .btn classes, so its
   link takes the wrapper's colours and spacing instead of WordPress's own. */
.wp-block-button.btn {
  display: inline-block;
  position: relative;
}
/* The whole button is tappable, not only its text (mobile review, 22 November
   2026). The wrapper carries the padding, so without this the link was only as
   big as its words: 116x16px inside a 172x56px button. */
.wp-block-button.btn > .wp-block-button__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.wp-block-button.btn > .wp-block-button__link {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  text-decoration: none;
  box-shadow: none;
}
.wp-block-buttons {
  margin: 0;
}

/* Page link cards: gradient over the photo, the whole card is the link */
.agc-card {
  overflow: hidden;
}
.agc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.761), rgba(0, 0, 0, 0.17) 47%, transparent);
}
.agc-card :is(h3, h4) a {
  color: inherit;
  text-decoration: none;
}
.agc-card :is(h3, h4) a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
}

/* Custom CTA card headings: link with an arrow, as before */
.agc-arrow-link a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.agc-arrow-link a::after {
  content: "\2192";
  margin-left: 2rem;
  font-size: 1.25rem;
}
.agc-arrow-link a:hover {
  color: var(--agc-secondary, #6c757d);
}

/* Latest news: link line and cards (Query Loop) */
.agc-news-link a {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.agc-news-cards .wp-block-post-template {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 -1rem 1rem;
  padding: 0;
}
.agc-news-cards .wp-block-post {
  width: 100%;
  padding: 0 1rem;
  margin: 0 0 1rem;
}
@media (min-width: 1024px) {
  .agc-news-cards .wp-block-post {
    width: 33.333%;
    margin-bottom: 0;
  }
}
.agc-news-cards .wp-block-post-featured-image {
  margin: 0;
  min-height: 351px;
  position: relative;
  overflow: hidden;
}
.agc-news-cards .wp-block-post-featured-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agc-news-card__panel {
  padding: 1.5rem;
}
.agc-news-cards .wp-block-post-date {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.agc-news-cards .wp-block-post-title {
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  margin: 0 0 1rem;
}
.agc-news-cards .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

/* FAQ block inside a page section (was the page Accordion layout): the section
   sets the spacing, as the old accordion did, so the block adds none, and its
   heading sits flush like the old one. */
#accordion > .agc-faq {
  margin-top: 0;
  margin-bottom: 0;
}
#accordion > .agc-faq .agc-faq__title {
  margin-top: 0;
}

/* Latest projects cards (Query Loop on the About page), drawn like the
   Related Products cards: square photo, the product-gradient, white 24px title
   at the bottom; slid by the same slick-related-products settings (19 Nov 2026). */
/* Core caps the post template at max-width: 100%, which undoes -mx-4. */
.agc-product-cards .wp-block-post-template {
  max-width: none;
}
.agc-product-cards .wp-block-post {
  position: relative;
  padding: 0 1rem;
  margin: 0 0 2rem;
}
.agc-product-cards .wp-block-post-featured-image {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
/* In normal flow, not absolute: inside the slider's moving track the browser
   never lazy-loads an absolutely positioned photo. */
.agc-product-cards .wp-block-post-featured-image a {
  display: block;
  height: 100%;
}
.agc-product-cards .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}
.agc-product-cards .wp-block-post-featured-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.761), rgba(0, 0, 0, 0.17) 47%, transparent);
}
.agc-product-card__text {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  padding: 1.5rem;
  z-index: 2;
  pointer-events: none;
}
.agc-product-cards .wp-block-post-title {
  font-size: 24px;
  font-weight: 400;
  line-height: inherit;
  text-transform: capitalize;
  color: #fff;
  margin: 0;
}
.agc-product-cards .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
@media (max-width: 767px) {
  .agc-product-cards .wp-block-post { padding: 0 0.5rem; }
  .agc-product-card__text { left: 0.5rem; right: 0.5rem; }
}

/* Footer template part (parts/footer.html): the logo is a core Image block and
   the call to action a core Button, sized and spaced as the old footer's
   hard-coded logo link and button (19 Nov 2026). */
footer .agc-footer-logo {
  margin: 0;
  line-height: 0; /* no text line under the logo: 128px tall, as before */
}
footer .agc-footer-logo a {
  border: 0; /* the theme underlines links with a border; the old logo link was border-0 */
}
footer .agc-footer-logo img {
  display: inline-block;
  width: auto;
  height: 6rem;
}
@media (min-width: 1280px) {
  footer .agc-footer-logo img { height: 8rem; }
}
footer .agc-footer-cta {
  display: block;
  padding-top: 1.5rem; /* the old button's mt-6 (core zeroes margins on .wp-block-button);
                         padding, so it does not merge with the heading's margin */
}

/* Header template part (parts/header.html): the two logos are core Image
   blocks, sized as the old header's logo links (19 Nov 2026). */
#header .agc-header-logo,
#header .agc-header-icon {
  margin: 0;
  line-height: 0;
}
#header .agc-header-logo a,
#header .agc-header-icon a {
  border: 0;
}
#header .agc-header-logo img {
  display: inline-block;
  width: auto;
  height: 6rem;
}
@media (min-width: 1280px) {
  #header .agc-header-logo img { height: 8rem; }
}
/* Desktop header logo: a small lift and scale on hover or keyboard focus
   (Simon, 22 Nov 2026). Header only; the mobile icon and footer logo stay
   still. Scales from the left edge so the logo keeps its alignment. */
#header .agc-header-logo img {
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#header .agc-header-logo a:hover img,
#header .agc-header-logo a:focus-visible img {
  transform: translateY(-2px) scale(1.04);
}
@media (prefers-reduced-motion: reduce) {
  #header .agc-header-logo img { transition: none; }
  #header .agc-header-logo a:hover img,
  #header .agc-header-logo a:focus-visible img { transform: none; }
}
#header .agc-header-icon {
  height: auto; /* the theme holds .brand to 2rem on phones */
}
#header .agc-header-icon img {
  width: auto;
  height: 2.5rem; /* 40px: Simon, 19 Nov 2026 (was 2rem); fits the 56px bar */
}

/* Mobile menu button: menu bars when closed, a close cross while the menu is
   open (.is-open, set by header-reveal.js). Both icons keep the bars' width
   so the button does not move. */
#nav-primary-toggle .agc-toggle-close { display: none !important; }
#nav-primary-toggle.is-open .agc-toggle-open { display: none !important; }
#nav-primary-toggle.is-open .agc-toggle-close { display: inline-block !important; width: 0.875em; }

/* Contact page details: the email address (18px, wide letter spacing) did not
   wrap, so /contact-us was 413px wide on a 375px phone and scrolled sideways,
   pushing the menu button off screen. Let it break onto a second line when it
   does not fit (Simon, 19 Nov 2026). Wide screens are unchanged. */
#contact-form a[href^="mailto:"] {
  min-width: 0;
}
#contact-form a[href^="mailto:"] span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Block templates (block-theme branch, 19 Nov 2026): core blocks standing in
   for the old Blade markup, styled as the elements they replace. */
.agc-post-photo { margin: 0; }
.agc-post-photo img { width: 100%; height: auto; margin-block: 1rem; }
.agc-related .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.agc-related .wp-block-post { width: 100%; }
@media (min-width: 1024px) {
  .agc-related .wp-block-post { padding-left: 2.5rem; }
}
.agc-related .agc-first-only { margin: 0; }
.agc-related .agc-first-only a { display: block; height: 100%; border: 0; }
.agc-related .agc-first-only img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
.agc-related .wp-block-post-title a { color: inherit; border: 0; }
.agc-related .wp-block-post-date { display: block; }
/* News grid (/news): cards as the old ones, the photo filling its 351px box. */
.agc-news-grid .wp-block-post-template { list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; max-width: none; }
.agc-news-grid .wp-block-post-featured-image { margin: 0; }
.agc-news-grid .wp-block-post-featured-image a { display: block; height: 100%; border: 0; }
.agc-news-grid .wp-block-post-featured-image img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; }
.agc-news-grid .wp-block-post-title a { color: inherit; border: 0; }
/* Archives and search: Sage's plain list, no bullets. */
.agc-post-list__items { list-style: none; margin: 0; padding: 0; }
/* Archive and search list: the byline reads "By <author>" on one line as the
   old <p class="byline"> did; titles' links inline (core makes them inline-block). */
.agc-post-list .byline > p,
.agc-post-list .byline > .wp-block-post-author-name { display: inline; }
.agc-post-list .byline > p::after { content: " "; }
.agc-post-list .wp-block-post-title a { display: inline; }
.agc-post-list .byline { margin: 0 0 1rem; line-height: 24px; }
/* Project header date: sized as the old <h6> it replaces. */
.agc-h6-date { line-height: 20px; }
.agc-post-list .wp-block-post-excerpt__excerpt { margin-bottom: 1rem; }

/* News tag filter (/news): chips in the site's button style. Idle: dark
   outline; hover: solid dark; active: the site green. Each shows its post
   count (news-filter.js). Cards fade when the filter changes. 19 Nov 2026. */
.agc-tag-filter { gap: .5rem; margin-bottom: 2rem; scroll-behavior: smooth; }
.agc-tag-filter button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .875rem;
  border: 1px solid #2c2f31;
  border-radius: 2px;
  background: transparent;
  color: #2c2f31;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.agc-tag-filter button:hover { background: #2c2f31; color: #fff; }
.agc-tag-filter button:active { transform: scale(.97); }
.agc-tag-filter button:focus-visible { outline: 2px solid #2c2f31; outline-offset: 2px; }
.agc-tag-filter button.is-active,
.agc-tag-filter button.is-active:hover {
  background: #c1ffaf;
  border-color: #c1ffaf;
  color: #2c2f31;
  font-weight: 500;
}
.agc-tag-filter .agc-tag-count {
  min-width: 1.5em;
  padding: .125rem .375rem;
  border-radius: 999px;
  background: rgba(44, 47, 49, .08);
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
  transition: background-color .2s ease;
}
.agc-tag-filter button:hover .agc-tag-count { background: rgba(255, 255, 255, .18); }
.agc-tag-filter button.is-active .agc-tag-count { background: rgba(44, 47, 49, .12); }
#agc-news-grid-list .mix { transition: opacity .2s ease, transform .2s ease; }
#agc-news-grid-list .mix.is-leaving,
#agc-news-grid-list .mix.is-entering { opacity: 0; transform: translateY(8px); }
@media (max-width: 767px) {
  /* Phones: one row that scrolls sideways, instead of four rows of chips. */
  .agc-tag-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin-right: -1rem;
    padding: 2px 1rem 6px 2px;
    scrollbar-width: none;
  }
  .agc-tag-filter::-webkit-scrollbar { display: none; }
  .agc-tag-filter button { flex: 0 0 auto; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .agc-tag-filter { scroll-behavior: auto; }
  .agc-tag-filter button,
  #agc-news-grid-list .mix { transition: none; }
}

/* Footer contact details as native blocks (no ACF, 19 Nov 2026): typed into
   the Footer part in the site editor. Laid out as the old ACF contact list:
   icon, then the text; 16px between lines; the address block with the
   company name first; round social icons below. */
footer .agc-contact p {
  margin: 0 0 1rem;
  font-size: 16px;
  font-weight: 300;
  line-height: 27px;
}
footer .agc-contact p a {
  position: relative;
  display: inline-block;
  padding-left: 30px;
  color: #fff;
  font-size: 16px;
  line-height: 21px;
  vertical-align: top;
  border: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
footer .agc-contact p a:hover { color: #c1ffaf; }
footer .agc-contact p a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--agc-icon) center / contain no-repeat;
          mask: var(--agc-icon) center / contain no-repeat;
}
footer .agc-contact__phone,
footer .agc-contact__email { padding-top: 3px; height: 24px; box-sizing: content-box; margin-bottom: 1rem; }
footer .agc-contact__phone a { --agc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z'/%3E%3C/svg%3E"); }
footer .agc-contact__email a { --agc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/%3E%3C/svg%3E"); }
footer .agc-contact p.agc-contact__address { margin: 0; }
footer .agc-contact__address a {
  padding-left: 26px;
  line-height: 27px;
  --agc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z'/%3E%3C/svg%3E");
}
footer .agc-contact__address a::before { top: 4px; width: 14px; }
footer .agc-contact__address strong {
  display: block;
  margin-bottom: 1rem;
  font-weight: 400;
  line-height: 23px;
}
/* Social links: the core Social Icons block as round grey buttons. */
footer .agc-social.wp-block-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 2rem 0;
  list-style: none;
}
footer .agc-social .wp-social-link {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  background-color: #7a8b93 !important;
  color: #fff !important;
  transition: background-color .2s ease, color .2s ease;
}
footer .agc-social .wp-social-link:hover { background-color: #c1ffaf !important; color: #2c2f31 !important; transform: none; }
footer .agc-social .wp-social-link a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  color: inherit;
  border: 0;
}
footer .agc-social .wp-social-link svg { width: 18px; height: 18px; fill: currentColor; }

/* ==========================================================================
   Restored content styling
   The old ACF text fields carried their own styling (style="" attributes, and a
   <style> block on /extensions). The block conversion dropped it; these classes
   put it back. tools/restore-inline-styles.php adds the classes to the blocks.
   A section with one of these classes styles whatever is typed inside it.
   ========================================================================== */

/* /extensions: the service areas, four columns of towns.
   The old <style> block also set list spacing and a dark green link colour, but
   WordPress had broken those rules (paragraph tags inside the <style>), so they
   never applied on the live site and are left out here. The two narrow-screen
   rules were broken the same way: live shows four squeezed columns on a phone.
   They are kept here as written, so phones get one column and tablets two. */
.allgood-areas .allgood-areas__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 1.75rem clamp(1rem, 3vw, 2.5rem);
}
.allgood-areas .allgood-areas__list > li { overflow-wrap: anywhere; }
@media (max-width: 56rem) {
  .allgood-areas .allgood-areas__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 32rem) {
  .allgood-areas .allgood-areas__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Text sections on the location pages: 16px text, numbered or bulleted lists,
   dark green underlined links. */
.agc-prose p { margin: 0 0 16px; color: #222; font-size: 16px; line-height: 1.7; }
.agc-prose a { color: #285e36 !important; text-decoration: underline; } /* was #2f6b3d, 3.97 to 1 on the grey panel; this is 4.77 (22 Nov 2026) */
.agc-prose ol,
.agc-prose ul { display: block !important; margin: 0 0 18px !important; padding: 0 0 0 28px !important; }
.agc-prose ol,
.agc-prose ol > li { list-style: decimal outside !important; }
.agc-prose ul,
.agc-prose ul > li { list-style: disc outside !important; }
.agc-prose li { display: list-item !important; margin: 0 0 10px !important; padding: 0 0 0 4px !important; color: #222; font-size: 16px; line-height: 1.7; }

/* The long "local area guide" on five location pages. */
.agc-guide-spaced { padding-top: clamp(48px, 6vw, 96px); overflow-wrap: break-word; }
.agc-guide h2 { margin: 0 0 24px; font-size: clamp(28px, 3vw, 36px); line-height: 1.25; font-weight: 400; color: #111; }
.agc-guide h3 { margin: 32px 0 12px; font-size: clamp(20px, 2vw, 22px); line-height: 1.35; font-weight: 500; color: #111; }
.agc-guide p,
.agc-guide ul { width: 100%; max-width: 80ch; box-sizing: border-box; margin: 0 0 1.2em; font-size: 17px; line-height: 1.7; font-weight: 400; color: #333; }
.agc-guide ul { list-style: disc outside; padding-left: 24px; }
.agc-guide li { margin: 0 0 8px; }
.agc-guide a { color: #2a7e54; } /* was #339966, 3.57 to 1 on white; this is 4.99 (22 Nov 2026) */

/* A plain bulleted or numbered list. */
.agc-list { padding-left: 24px; margin-bottom: 16px; line-height: 1.7; }
ul.agc-list { list-style-type: disc; }
ol.agc-list { list-style-type: decimal; }

/* A list item that only holds another list shows no marker of its own. */
li.agc-no-marker { list-style-type: none; }

/* Heading order (SEO, 19 November 2026): five page titles were plain <h2> text
   and are now the page's <h1>. This keeps them the size they were. Remove the
   class from a title in the editor to give it the normal <h1> size. */
h1.agc-h1-plain { font-size: inherit; line-height: 1.25; }

/* Mobile review, 22 November 2026. Checked at 375px on all 157 addresses. */

/* News posts: the article column is a flex item, and a table inside it stopped
   it shrinking, so four posts ran off the right edge of a phone with no way to
   scroll. The column now fits the screen and the table scrolls in its own box. */
.article-main-content { min-width: 0; max-width: 100%; }

/* Text links on the light grey panels were the site's pale green (#c1ffaf on
   #ccc, contrast 1.39 to 1). Dark and underlined instead: 8.39 to 1. */
.bg-secondary-light p a,
.bg-secondary-light li a { color: #2c2f31; text-decoration: underline; text-underline-offset: 2px; }

/* Text links on white. The site's link colour is the pale green, made for the
   dark sections: on white it is 1.15 to 1, and the news articles' lighter green
   (#86cb72, from app.css) is 1.94 to 1. These are the places that put text
   links on white (found by checking every address): news articles, projects,
   the picture-and-text sections, the areas list, the "more news" line and the
   two policy pages. #2a7e54 is 4.99 to 1. Links on dark sections and over
   photos keep the pale green. */
.article-main-content a:not(.wp-block-button__link),
.agc-post-content a:not(.wp-block-button__link),
.agc-alt-text p a,
.agc-alt-text li a,
.allgood-areas__list a,
p.agc-news-link a,
body.privacy-policy main p a,
body.privacy-policy main li a,
body.cookie-policy main p a,
body.cookie-policy main li a { color: #2a7e54; }

/* "Reasons to choose us" icon grid: two columns on a phone, and a long word in
   a 24px heading poked out of its column and made the page scroll sideways. */
@media (max-width: 480px) {
  #icon-key h3.wp-block-heading { font-size: 17px; line-height: 1.3; overflow-wrap: break-word; }
}

/* Phone menu (below 1024px): hovering or tapping an item turned its text the
   pale green, which cannot be read on the menu's white. The row turns green
   instead and the text stays dark (Simon, 22 November 2026). Get a quote keeps
   its own button hover. The desktop menu is not changed. */
@media (max-width: 1023px) {
  .nav-primary ul li:not(.btn-quote) > a:hover,
  .nav-primary ul li:not(.btn-quote) > a:focus-visible {
    background-color: #c1ffaf;
    color: #2c2f31;
  }
}
