/*
 Theme Name:   Rothera Bray
 Theme URI:    https://www.pippley.co.uk
 Author:       Studio Seventeen Ltd.
 Author URI:   https://studioseventeen.co.uk
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* =====================================================
   CONTENTS
   =====================================================
   01. Theme palettes
   02. Mesh gradients
   03. Header
   04. Navigation
   05. Typography
   06. Call to action
   07. Buttons
   08. Accordions
   09. WP Forms
   10. Cards
   11. Services
   12. In-page anchor menu
   13. Tabs
   14. Galleries
   15. Single team member lists
   16. Sub-services
   17. Search
   18. Footer accreditations
   19. Offcanvas mobile menu
   20. Drilldown menus
   21. Litespeed
   21. Reviews Solicitor
   ===================================================== */

/* =====================================================
   01. THEME PALETTES
   ===================================================== */

/* ---------- Manual theme variables ---------- */
.theme-purple {
  --service-accent: var(--s17purple);
  --service-accent-dark: var(--s17purple-d-1);
  --service-accent-xdark: var(--s17purple-d-2);
  --service-accent-light: var(--s17purple-l-1);
  --service-accent-x-light: var(--s17purple-l-2);
  --service-accent-xx-light: var(--s17purple-l-3);
  --mesh-bg-base: var(--service-accent-xdark);
}

.theme-red {
  --service-accent: var(--s17red);
  --service-accent-dark: var(--s17red-d-1);
  --service-accent-xdark: var(--s17red-d-2, var(--s17dark));
  --service-accent-light: var(--s17red-l-1);
  --service-accent-x-light: var(--s17red-l-2);
  --service-accent-xx-light: var(--s17red-l-3);
  --mesh-bg-base: var(--service-accent-xdark);
}

.theme-teal {
  --service-accent: var(--s17teal);
  --service-accent-dark: var(--s17teal-d-1);
  --service-accent-xdark: var(--s17teal-d-2, var(--s17dark));
  --service-accent-light: var(--s17teal-l-1);
  --service-accent-x-light: var(--s17teal-l-2);
  --service-accent-xx-light: var(--s17teal-l-3);
  --mesh-bg-base: var(--service-accent-xdark);
}

.theme-green {
  --service-accent: var(--s17green);
  --service-accent-dark: var(--s17green-d-1);
  --service-accent-xdark: var(--s17green-d-2, var(--s17dark));
  --service-accent-light: var(--s17green-l-1);
  --service-accent-x-light: var(--s17green-l-2);
  --service-accent-xx-light: var(--s17green-l-3);
  --mesh-bg-base: var(--service-accent-xdark);
}

.theme-lime {
  --service-accent: var(--s17lime-d-1);
  --service-accent-dark: var(--s17teal-d-1);
  --service-accent-xdark: var(--s17teal-d-2);
  --service-accent-light: var(--s17lime);
  --service-accent-x-light: var(--s17lime-1);
  --service-accent-xx-light: var(--s17lime-l-2);
  --mesh-bg-base: var(--service-accent-xdark);
}

.theme-grey {
  --service-accent: var(--s17grey);
  --service-accent-dark: var(--s17grey);
  --service-accent-xdark: var(--s17grey-d-2, var(--s17dark));
  --service-accent-light: var(--s17grey-l-1);
  --service-accent-x-light: var(--s17grey-l-2);
  --service-accent-xx-light: var(--s17grey-l-3);
  --mesh-bg-base: var(--service-accent-xdark);
}

/* =====================================================
   02. MESH GRADIENTS
   ===================================================== */

/* ---------- Shared mesh gradient ---------- */
/* Dark RB base + grey + black + themed accent */
.mesh-gradient {
  --mesh-bg: var(--mesh-bg-base, var(--service-accent-xdark, var(--s17red-d-1)));
  --mesh-dark: var(--service-accent-xdark, var(--s17grey-d-2));
  --mesh-accent-1: var(--service-accent, var(--s17red));
  --mesh-accent-2: var(--service-accent-dark, var(--s17red-d-1));
  --mesh-accent-3: var(--service-accent-xdark, var(--s17red-d-2));

  background-color: var(--mesh-bg);
  background-image:
    radial-gradient(at 0% 85%, var(--mesh-dark) 0px, transparent 65%),
    radial-gradient(at 60% 20%, var(--mesh-accent-1) 0px, transparent 50%),
    radial-gradient(at 0% 10%, var(--mesh-accent-2) 0px, transparent 60%),
    radial-gradient(at 35% 65%, var(--mesh-accent-3) 0px, transparent 50%);
}

/* ---------- Mixed mesh themes ---------- */
.theme-purple-teal {
  --mesh-bg-base: var(--s17purple-d-1);
  --mesh-accent-1: var(--s17teal);
  --mesh-accent-2: var(--s17purple);
  --mesh-accent-3: var(--s17purple);
}

.theme-red-purple {
  --mesh-bg-base: var(--s17red-d-1, var(--s17dark));
  --mesh-accent-1: var(--s17red);
  --mesh-accent-2: var(--s17purple);
  --mesh-accent-3: var(--s17red);
}

.theme-purple-red {
  --mesh-bg-base: var(--s17purple-d-2);
  --mesh-accent-1: var(--s17purple);
  --mesh-accent-2: var(--s17red);
  --mesh-accent-3: var(--s17purple);
}

.theme-red-teal {
  --mesh-bg-base: var(--s17red-d-2, var(--s17dark));
  --mesh-accent-1: var(--s17red);
  --mesh-accent-2: var(--s17teal-d-1);
  --mesh-accent-3: var(--s17red-d-1);
}

.theme-red-teal-purple {
  --mesh-bg-base: var(--s17purple-d-1, var(--s17dark));
  --mesh-accent-1: var(--s17red);
  --mesh-accent-2: var(--s17teal);
  --mesh-accent-3: var(--s17purple-d-1);
}

/* ---------- Mesh behaviour ---------- */
.mesh-static {
  background-size: cover;
}

/* ---------- Animated gradient backgrounds ---------- */
.mesh-animated {
  background-size: 160% 160%;
  animation: animatedgradient 10s ease-in-out infinite;
}

@keyframes animatedgradient {
  0% {
    background-position: 0% 30%;
    background-size: 150% 150%;
  }

  25% {
    background-position: 50% 50%;
    background-size: 170% 160%;
  }

  50% {
    background-position: 100% 100%;
    background-size: 155% 175%;
  }

  75% {
    background-position: 50% 50%;
    background-size: 170% 160%;
  }

  100% {
    background-position: 0% 30%;
    background-size: 150% 150%;
  }
}

/* Review Solicitors positioning */
html body .rssw__widget {
  bottom: 20px !important;
  transform: none !important;
}

/* =====================================================
   03. HEADER
   ===================================================== */

:root {
  --header-height: 142px;
  --header-overlap: 20px;
}

@media screen and (max-width: 768px) {
  :root {
    --header-height: 170px;
  }
}

/* ---------- Hero overlap ---------- */
/* Only move the hero, not the header */
#brx-content> :first-child {
  margin-top: calc(var(--header-overlap) * -1);
  padding-top: var(--header-overlap);
}

.home-hero {
  height: calc(100vh - var(--header-height));
}

/* ---------- Header globals ---------- */
header .header__container,
.footer__container.copyright__container {
  padding: var(--s17space-xs);
}

.scrolling .header__main-nav {
  position: relative;
  background: transparent;
}

.scrolling .header__main-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 0 0 var(--s17radius-s) var(--s17radius-s);
  pointer-events: none;
  z-index: 0;
  clip-path: inset(0);
}

header.scrolling .header__main-nav>* {
  position: relative;
  z-index: 1;
}

/* =====================================================
   04. NAVIGATION
   ===================================================== */

/* ---------- Mega menu ---------- */

/* Mega menu: left column triggers */
.mega-services__trigger {
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    color 0.25s ease;
}

.mega-services__trigger:hover,
.mega-services__trigger.is-active {
  transform: var(--s17translate-x-global);
}

/* Mega menu: right panel wrapper */
.mega-services__panels {
  position: relative;
  min-height: 100%;
}

/* Mega menu: hidden panel state */
.mega-services__panel {
  position: absolute;
  inset: 0;
  padding: 2rem 2.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(14px);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(.2, .7, .2, 1),
    filter 0.28s ease,
    visibility 0s linear 0.32s;
}

/* Mega menu: active panel */
.mega-services__panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(.2, .7, .2, 1),
    filter 0.28s ease,
    visibility 0s;
}

/* =====================================================
   05. TYPOGRAPHY
   ===================================================== */

/* ---------- Base typography ---------- */
strong {
  font-weight: 500;
}

figcaption {
  color: var(--s17-dark);
}

.news-post h2 {
  font-family: "Source Serif 4", serif;
  font-size: var(--s17text-2xl);
  margin-bottom: var(--s17space-s);
}

.news-post h3 {
  font-size: var(--s17text-xl);
  margin-bottom: var(--s17space-s);
}

.news-post h4 {
  font-size: var(--s17text-l);
  margin-bottom: var(--s17space-s);
}

/* ---------- Headings ---------- */

:root {
  --s17-heading-space-before: var(--s17space-l);
  --s17-heading-space-after: var(--s17space-m);
}

/* Headings inside WYSIWYG and Post Content elements */
:is(.brxe-text, .brxe-rich-text, .brxe-post-content):is(h1, h2, h3, h4, h5, h6) {
  margin-block-start: var(--s17-heading-space-before);
  margin-block-end: var(--s17-heading-space-after);
}

/* No top margin when the heading is the first direct element */
:is(.brxe-text, .brxe-rich-text, .brxe-post-content)> :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-block-start: 0;
}

/* Remove the paragraph's top margin immediately after a heading */
:is(.brxe-text, .brxe-rich-text, .brxe-post-content)> :is(h1, h2, h3, h4, h5, h6)+p {
  margin-block-start: 0;
}

/* Remove empty paragraphs added by the editor */
:is(.brxe-text, .brxe-rich-text, .brxe-post-content) p:empty {
  display: none;
}

/* Spacing between flexible content blocks */
.content-section__blocks-flexible-layouts {
  row-gap: var(--s17space-m);
}

/* ---------- Search result highlights ---------- */
.search-results mark,
.search-results .relevanssi-query-term,
.search-results strong {
  background: var(--s17red-l-2);
  color: inherit;
  font-weight: inherit;
  border-radius: 0.15em;
  padding-inline: 0.1em;
}

/* ---------- Tables ---------- */
.brxe-post-content table,
.brxe-text table,
.brxe-rich-text table {
  width: 100%;
  margin-block: var(--s17space-m);
  border-collapse: collapse;
  border: 1px solid var(--s17grey-l-1);
  overflow: hidden;
}

.brxe-post-content th,
.brxe-post-content td,
.brxe-text th,
.brxe-text td,
.brxe-rich-text th,
.brxe-rich-text td {
  padding: var(--s17space-xs);
  border: 1px solid var(--s17grey-l-1);
  text-align: left;
}

.brxe-post-content th,
.brxe-text th,
.brxe-rich-text th {
  font-weight: 500;
  background: var(--s17grey-l-1);
}

.brxe-post-content tr:nth-child(even),
.brxe-text tr:nth-child(even),
.brxe-rich-text tr:nth-child(even) {
  background: rgb(0 0 0 / 0.025);
}

/* ---------- Blockquotes ---------- */
blockquote,
.blockquote {
  position: relative;
  overflow: hidden;
  color: var(--s17light);
  border: none;
  margin: 0;
  padding: var(--s17space-l) var(--s17space-l) var(--s17space-l) var(--s17space-3xl);
  font-size: var(--s17text-m);
  font-family: "Raleway", sans-serif;
  font-weight: 400;
}

.service-Personal blockquote,
.service-Business blockquote {
  color: var(--s17dark);
}

.service-Personal blockquote::before,
.service-Business blockquote::before {
  color: color-mix(in srgb, var(--service-accent) 45%, transparent);
}

/* ---------- Blockquote background options ---------- */
blockquote.blockquote--purple {
  background: var(--s17purple);
}

blockquote.blockquote--red {
  background: var(--s17red);
}

blockquote.blockquote--teal {
  background: var(--s17teal);
}

/* Quote mark */
blockquote::before,
.blockquote::before {
  content: "\201C";
  position: absolute;
  top: var(--s17space-m);
  left: var(--s17space-m);
  font-size: 10rem;
  line-height: 0.75;
  color: color-mix(in srgb, var(--s17light) 45%, transparent);
  font-family: "Raleway", sans-serif;
  font-weight: 500;
  pointer-events: none;
}

/* Keep content above the decorative quote */
blockquote>*,
.blockquote>* {
  position: relative;
  z-index: 1;
}

cite,
.cite {
  font-style: normal;
  font-family: "Raleway", sans-serif;
  font-size: var(--s17text-m);
  opacity: 1;
  text-transform: none;
  font-weight: 500;
}

blockquote cite::before,
.blockquote cite::before {
  content: "\2013 ";
  font-style: normal;
}

@media screen and (max-width: 768px) {

  blockquote,
  .blockquote {
    padding: var(--s17space-l) var(--s17space-l) var(--s17space-l) var(--s17space-4xl);
  }

  blockquote::before,
  .blockquote::before {
    font-size: 6rem;
  }
}

/* ---------- Content icon lists ---------- */
.brxe-text ul,
.brxe-rich-text ul,
.brxe-post-content ul,
.accordion .tab-content ul,
.accordion-content-wrapper ul {
  --list-icon-size: 1.5em;
  --list-icon-gap: 1.4em;
  --list-icon-color: var(--s17red);
  list-style: none;
  padding: var(--s17space-s);
  margin: 0;
}

.list-dark ul {
  --list-icon-color: var(--s17red-l-1);
}

.brxe-text li,
.brxe-rich-text li,
.brxe-post-content li,
.accordion .tab-content li,
.accordion-content-wrapper li {
  position: relative;
  padding-left: calc(var(--list-icon-size) + var(--list-icon-gap));
  margin-bottom: 0.9em;
}

.brxe-text li::before,
.brxe-rich-text li::before,
.brxe-post-content li::before,
.accordion .tab-content li::before,
.accordion-content-wrapper li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: var(--list-icon-size);
  height: var(--list-icon-size);
  background-color: var(--list-icon-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* White list icons inside service accordions only */
:is(.service-Personal, .service-Business) .accordion-content-wrapper ul {
  --list-icon-color: var(--s17light);
}

/* Nested lists: use standard bullets instead of arrows */

:is(.brxe-text, .brxe-rich-text, .brxe-post-content) ul ul {
  list-style: disc;
  padding-left: 1.5em;
}

:is(.brxe-text, .brxe-rich-text, .brxe-post-content) ul ul>li {
  padding-left: 0;
}

:is(.brxe-text, .brxe-rich-text, .brxe-post-content) ul ul>li::before {
  display: none;
}

/* Match nested bullet colour to list icon colour */
:is(.brxe-text, .brxe-rich-text, .brxe-post-content) ul ul>li::marker {
  color: var(--list-icon-color);
}

/* ---------- Rotating text ---------- */
.rotating-word {
  color: var(--s17light);
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.rotating-word.is-changing {
  opacity: 0;
  transform: translateY(0.15em);
}

/* ---------- 2 column menu ---------- */
.menu-columns-2 ul.bricks-nav-menu {
  column-count: 2;
  column-gap: var(--s17space-l);
  display: block;
}

.menu-columns-2 ul.bricks-nav-menu>li {
  display: block;
  margin: 0 0 var(--s17space-3xs) 0;
  break-inside: avoid;
}

.menu-columns-2 ul.bricks-nav-menu>li>a {
  display: inline;
}

@media (max-width: 767px) {
  .menu-columns-2 ul.bricks-nav-menu {
    column-count: 1;
  }
}

/* ---------- Link underline ---------- */
:is(.brxe-text a,
  .brxe-rich-text a,
  .brxe-post-content a,
  .brxe-accordion a,
  .brxe-tabs a,
  .bricks-nav-menu a,
  .brxe-social-icons a span,
  .link-underline,
  .brxe-breadcrumbs a) {
  display: inline;
  width: auto;
  text-decoration: none;

  --underline-height: 1px;
  --underline-duration: .35s;
  --underline-ease: cubic-bezier(0.16, 1, 0.3, 1);

  background-image: linear-gradient(currentColor, currentColor);
  background-position: 100% 100%;
  background-repeat: no-repeat;
  background-size: 100% var(--underline-height);

  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;

  transition: background-size var(--underline-duration) var(--underline-ease);
}

:is(.brxe-text a,
  .brxe-rich-text a,
  .brxe-post-content a,
  .brxe-accordion a,
  .brxe-tabs a,
  .bricks-nav-menu a,
  .brxe-social-icons a span,
  .link-underline,
  .brxe-breadcrumbs a):hover,
:is(.brxe-text a,
  .brxe-rich-text a,
  .brxe-post-content a,
  .brxe-accordion a,
  .brxe-tabs a,
  .bricks-nav-menu a,
  .brxe-social-icons a span,
  .link-underline,
  .brxe-breadcrumbs a):focus-visible {
  background-size: 0% var(--underline-height);
}

/* ---------- Mega panel links ---------- */
/* Force include these explicitly */
.mega-services__panels__text-link,
.mega-services__panels__heading {
  position: relative;
  text-decoration: none;
  margin-bottom: var(--s17space-4xs);
  --underline-height: 1px;
  --underline-offset: -0.02em;
  --underline-duration: .7s;
  --underline-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --underline-color: currentColor;
}

.mega-services__panels__text-link::before,
.mega-services__panels__text-link::after,
.mega-services__panels__heading::before,
.mega-services__panels__heading::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--underline-offset);
  height: var(--underline-height);
  background: var(--underline-color);
  transition: transform var(--underline-duration) var(--underline-ease);
}

.mega-services__panels__text-link::before,
.mega-services__panels__heading::before {
  transform-origin: left;
  transform: scaleX(0);
}

.mega-services__panels__text-link::after,
.mega-services__panels__heading::after {
  transform-origin: right;
  transform: scaleX(1);
}

.mega-services__panels__text-link:hover::before,
.mega-services__panels__text-link:focus-visible::before,
.mega-services__panels__heading:hover::before,
.mega-services__panels__heading:focus-visible::before {
  transform: scaleX(1);
  transition-delay: .25s;
}

.mega-services__panels__text-link:hover::after,
.mega-services__panels__text-link:focus-visible::after,
.mega-services__panels__heading:hover::after,
.mega-services__panels__heading:focus-visible::after {
  transform: scaleX(0);
}

/* =====================================================
   06. CALL TO ACTION
   ===================================================== */

.s17-cta {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-default.webp");
}

/* ---------- Manual CTA themes ---------- */
.s17-cta .theme-red {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-red.webp");
}

.s17-cta .theme-purple {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-purple-teal.webp");
}

.s17-cta .theme-teal {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-teal-purple.webp");
}

.s17-cta .theme-lime {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-lime-teal.webp");
}

/* ---------- Service theme fallback ---------- */
.service-Personal .s17-cta {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-purple-teal.webp");
}

.service-Business .s17-cta {
  --cta-image: url("/wp-content/themes/rothera-bray/assets/images/CTA-teal-purple.webp");
}

/* ---------- CTA image panel ---------- */
.cta__image {
  position: relative;
  overflow: hidden;

  background-image: var(--cta-image) !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Fade image into background */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 70%);
  mask-image: linear-gradient(to right, transparent 0%, black 70%);
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .cta__image {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 50%);
  }
}

/* =====================================================
   07. BUTTONS
   ===================================================== */

.s17btn {
  position: relative;
  justify-content: flex-start;
  text-decoration: none;

  line-height: 1.2;
  text-align: left;

  overflow-wrap: break-word;

  outline: 0;
  cursor: pointer;
  transition: all 0.25s ease-in-out;

  --s17btn-height: 2.5rem;
  --s17btn-pad-left: 1rem;
  --s17btn-pad-y: .45rem;
  --s17btn-gap-right: 0.75rem;

  --s17btn-arrow-bg: var(--s17red-l-1);
  --s17btn-arrow-bg-hover: var(--s17red);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17light);

  min-height: var(--s17btn-height);
  padding: var(--s17btn-pad-y) calc(1em + 2.5rem) var(--s17btn-pad-y) var(--s17btn-pad-left);

  width: fit-content;
  max-width: 100%;

  white-space: normal;
}

/* ---------- Button arrow ---------- */
.s17btn:not(.s17btn--pill)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: var(--s17btn-arrow-bg);
  transition:
    transform .35s cubic-bezier(.4, 0, .2, 1),
    background-color .3s ease;
}

.s17btn:not(.s17btn--pill)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(var(--s17btn-height) / 2);
  width: 1.35rem;
  height: 1.35rem;
  z-index: 1;
  pointer-events: none;
  background-color: var(--s17btn-arrow-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translate(50%, -50%);
  transition:
    transform .35s cubic-bezier(.4, 0, .2, 1),
    background-color .3s ease;
}

.s17btn:not(.s17btn--pill):hover::after {
  background-color: var(--s17btn-arrow-bg-hover);
  transform: var(--s17translate-x-global);
}

.s17btn:not(.s17btn--pill):hover::before {
  background-color: var(--s17btn-arrow-color-hover);
  transform: translate(50%, -50%) var(--s17translate-x-global);
}

/* ---------- Light red button ---------- */
.s17btn.light {
  --s17btn-arrow-bg: var(--s17red-l-2);
  --s17btn-arrow-bg-hover: var(--s17red-l-3);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17dark);
}

/* ---------- Purple button ---------- */
.s17btn.purple,
.theme-purple .s17btn,
.service-Personal .s17-cta .s17btn {
  background: var(--s17purple);
  color: var(--s17light);

  --s17btn-arrow-bg: var(--s17purple-l-1);
  --s17btn-arrow-bg-hover: var(--s17purple);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17light);
}

.s17btn.purple:hover,
.theme-purple .s17btn:hover,
.service-Personal .s17-cta .s17btn:hover {
  background: var(--s17purple-d-1);
  color: var(--s17light);
}

/* ---------- Light purple button ---------- */
.s17btn.purple-light {
  --s17btn-arrow-bg: var(--s17purple-l-2);
  --s17btn-arrow-bg-hover: var(--s17purple-l-3);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17dark);
}

/* ---------- Teal button ---------- */
.s17btn.teal,
.theme-teal .s17btn,
.service-Business .s17-cta .s17btn {
  background: var(--s17teal);
  color: var(--s17light);

  --s17btn-arrow-bg: var(--s17teal-l-1);
  --s17btn-arrow-bg-hover: var(--s17teal);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17light);
}

.s17btn.teal:hover,
.theme-teal .s17btn:hover,
.service-Business .s17-cta .s17btn:hover {
  background: var(--s17teal-d-1);
  color: var(--s17light);
}

/* ---------- Light teal button ---------- */
.s17btn.teal-light {
  --s17btn-arrow-bg: var(--s17teal-l-2);
  --s17btn-arrow-bg-hover: var(--s17teal-l-3);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17dark);
}

/* ---------- Lime button ---------- */
.s17btn.lime,
.theme-lime .s17btn {
  background: var(--s17lime);
  color: var(--s17dark);

  --s17btn-arrow-bg: var(--s17lime-l-1);
  --s17btn-arrow-bg-hover: var(--s17lime);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17dark);
}

.s17btn.lime:hover,
.theme-lime .s17btn:hover {
  background: var(--s17lime-d-2);
  color: var(--s17light);
}

/* ---------- Grey button ---------- */
.s17btn.grey {
  background: var(--s17grey);
  color: var(--s17light);

  --s17btn-arrow-bg: var(--s17grey-l-1);
  --s17btn-arrow-bg-hover: var(--s17grey);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17light);
}

.s17btn.grey:hover {
  background: var(--s17grey-l-1);
  color: var(--s17light);
}

/* ---------- Pill button ---------- */
.s17btn.s17btn--pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--s17btn-height);
  padding: 0 var(--s17btn-pad-left);
  border-radius: var(--s17radius-full);
  width: fit-content;
}

/* =====================================================
   08. ACCORDIONS
   ===================================================== */

/* ---------- Vertical accordion ---------- */
.accordion.accordion-vertical .tab-menu {
  display: flex;
  flex-direction: column;
  row-gap: var(--s17space-3xs);
}

/* ---------- Information cards ---------- */
.information-card {
  --card-bg: var(--s17light);
  --card-accent: var(--s17red);
  background: var(--card-bg);
  border-left: 6px solid var(--card-accent);
}

/* Variants */
.information-card.theme-red {
  --card-bg: var(--s17red-l-3);
  --card-accent: var(--s17red);
}

.information-card.theme-purple {
  --card-bg: var(--s17purple-l-2);
  --card-accent: var(--s17purple);
}

.information-card.theme-teal {
  --card-bg: var(--s17teal-l-2);
  --card-accent: var(--s17teal);
}

.information-card.theme-lime {
  --card-bg: var(--s17lime-l-2);
  --card-accent: var(--s17lime);
}

/* ---------- Award cards ---------- */
.award-card {
  --award-text-collapsed-height: 6rem;
  --award-card-bg: var(--s17light);
  scroll-margin-top: 8rem;
}

.award-card__text {
  position: relative;
  overflow: hidden;
  max-height: var(--award-text-collapsed-height);
  transition: max-height .45s cubic-bezier(.4, 0, .2, 1);
}

.award-card__text::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3rem;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--award-card-bg));
  opacity: 0;
  transition: opacity .25s ease;
}

.award-card.is-open .award-card__text::after {
  opacity: 0;
}

.award-card.has-overflow:not(.is-open) .award-card__text::after {
  opacity: 1;
}

/* NOTE: --award-text-height is referenced here but not defined anywhere
   in this file (kept as-is — same behaviour as the original) */
.award-card.is-open .award-card__text {
  max-height: var(--award-text-height);
}

.award-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

/* Hide button if content fits */
.award-card:not(.has-overflow) .award-card__toggle {
  display: none;
}

/* Only show fade when text actually overflows */
.award-card:not(.has-overflow) .award-card__text::after {
  display: none;
}

/* Award card pill chevron */
.award-card .s17btn--pill::after {
  content: "";
  display: block;
  width: 1.2em;
  height: 1.2em;
  margin-left: .5rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s ease;
}

.award-card.is-open .s17btn--pill::after {
  transform: rotate(180deg);
}


/* =====================================================
   09. WP FORMS
   ===================================================== */

/* ---------- Form reset ---------- */
.wpforms-container,
.wpforms-container-full {
  margin: 0 !important;
}

.wpforms-form :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  font: inherit;
  border-radius: var(--s17radius-s, .4rem);
}

.wpforms-form textarea {
  min-height: 10rem;
  resize: vertical;
}

.wpforms-form :is(input, textarea, select):focus {
  outline: none;
}

/* ---------- Form themes ---------- */
.form-theme-light,
.form-theme-dark {
  --form-field-bg: var(--s17light);
  --form-field-border: var(--s17grey-l-2);
  --form-field-focus: var(--service-accent, var(--s17red));

  --form-button-bg: var(--s17red);
  --form-button-hover: var(--s17red-d-1);
  --form-button-text: var(--s17light);

  --wpforms-label-error-color: var(--s17light);
}

.form-theme-light {
  --form-label-colour: white;
  --form-text-colour: var(--s17dark);
  --form-placeholder-colour: var(--s17grey);

  --form-button-bg: var(--s17red-l-2);
  --form-button-hover: var(--s17red-l-3);
  --form-button-text: var(--s17dark);
}

.form-theme-dark {
  --form-label-colour: var(--s17dark);
  --form-text-colour: var(--s17dark);
  --form-placeholder-colour: var(--s17grey);
}

/* ---------- Service page form overrides ---------- */
.service-Personal .form-theme-light,
.service-Business .form-theme-light {
  --form-button-bg: var(--service-accent-light);
  --form-button-hover: var(--service-accent-x-light);
  --form-button-text: var(--s17dark);
}

.service-Personal .form-theme-dark,
.service-Business .form-theme-dark {
  --form-button-bg: var(--service-accent);
  --form-button-hover: var(--service-accent-dark);
  --form-button-text: var(--s17light);
}

/* ---------- Form text ---------- */
:is(.form-theme-light, .form-theme-dark) .wpforms-form {
  color: var(--form-label-colour);
}

/* Catch almost all WPForms-generated content */
:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(label,
  legend,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  span,
  small,
  em,
  strong,
  a,
  ul,
  ol,
  li,
  table,
  thead,
  tbody,
  tfoot,
  tr,
  th,
  td,
  .wpforms-field > *,
  .wpforms-field-label,
  .wpforms-field-sublabel,
  .wpforms-field-description,
  .wpforms-field-divider,
  .wpforms-field-divider h1,
  .wpforms-field-divider h2,
  .wpforms-field-divider h3,
  .wpforms-field-divider h4,
  .wpforms-field-divider h5,
  .wpforms-field-divider h6,
  .wpforms-field-html,
  .wpforms-required-label,
  .wpforms-field-limit-text,
  .wpforms-page-indicator,
  .wpforms-page-indicator-page,
  .wpforms-page-indicator-page-title,
  .wpforms-page-indicator-page-number,
  .wpforms-page-indicator-page-triangle,
  .wpforms-error,
  .wpforms-confirmation-container,
  .wpforms-confirmation-container-full) {
  color: inherit;
}

/* Emphasised text */
:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .wpforms-field-label,
  .wpforms-field-sublabel,
  .wpforms-field-description) {
  font-weight: 500;
}

/* Force all WPForms headings to inherit the form theme */
:is(.form-theme-light, .form-theme-dark) .wpforms-container-full .wpforms-form :is(h1, h2, h3, h4, h5, h6),
:is(.form-theme-light, .form-theme-dark) .wpforms-container-full .wpforms-form .wpforms-field-divider :is(h1, h2, h3, h4, h5, h6) {
  color: var(--form-label-colour);
  font-weight: 500;
  background: transparent;
}

/* Radio / checkbox labels */
:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(input[type="radio"], input[type="checkbox"])+label {
  color: inherit;
}

/* ---------- Fields ---------- */
:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border: 1px solid var(--form-field-border);
  color: var(--form-text-colour);
}

:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(input, textarea)::placeholder {
  color: var(--form-placeholder-colour);
}

:is(.form-theme-light, .form-theme-dark) .wpforms-form :is(input, textarea, select):focus {
  border-color: var(--form-field-focus);
}

/* ---------- Form buttons ---------- */
:is(.form-theme-light, .form-theme-dark) .wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit {
  display: inline-flex;
  align-items: center;

  font-size: var(--s17text-s);
  font-weight: 500;

  background: var(--form-button-bg);
  border: 1px solid var(--form-button-bg);
  color: var(--form-button-text);

  border-radius: var(--s17radius-full);
  box-shadow: var(--s17shadow-m);

  transition: all 0.25s ease-in-out;

  outline: 0;
  cursor: pointer;
  position: relative;
}

:is(.form-theme-light, .form-theme-dark) .wpforms-container-full .wpforms-form button[type="submit"].wpforms-submit:hover {
  background: var(--form-button-hover);
  border-color: var(--form-button-hover);
  color: var(--form-button-text);
}

/* =====================================================
   10. CARDS
   ===================================================== */

/* ---------- Arrow card ---------- */
.arrow-card:hover {
  transform: var(--s17translate-y-global);
}

.arrow-card__icon {
  transition: var(--s17transition-global);
}

.arrow-card:hover .arrow-card__icon,
.service-sub-menu__text-link:hover {
  transform: var(--s17translate-x-global);
}

/* =====================================================
   11. SERVICES
   ===================================================== */

/* ---------- Single service ---------- */

/* ---------- Service colour variables ---------- */
.service-Personal {
  --service-accent: var(--s17purple);
  --service-accent-dark: var(--s17purple-d-1);
  --service-accent-xdark: var(--s17purple-d-2);
  --service-accent-light: var(--s17purple-l-1);
  --service-accent-x-light: var(--s17purple-l-2);
  --service-accent-xx-light: var(--s17purple-l-3);
}

.service-Business {
  --service-accent: var(--s17teal);
  --service-accent-dark: var(--s17teal-d-1);
  --service-accent-xdark: var(--s17teal-d-2);
  --service-accent-light: var(--s17teal-l-1);
  --service-accent-x-light: var(--s17teal-l-2);
  --service-accent-xx-light: var(--s17teal-l-3);
}

/* ---------- Default service button ---------- */
.service-Personal :is(.s17btn, .wpforms-submit):not(.light):not(.purple):not(.purple-light):not(.teal):not(.teal-light),
.service-Business :is(.s17btn, .wpforms-submit):not(.light):not(.purple):not(.purple-light):not(.teal):not(.teal-light) {
  background: var(--service-accent);
  border-color: var(--service-accent);
  color: var(--s17light);
  --s17btn-arrow-bg: var(--service-accent-light);
  --s17btn-arrow-bg-hover: var(--service-accent);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17light);
}

/* Service button hover state */
.service-Personal :is(.s17btn, .wpforms-submit):not(.light):not(.purple):not(.purple-light):not(.teal):not(.teal-light):hover,
.service-Business :is(.s17btn, .wpforms-submit):not(.light):not(.purple):not(.purple-light):not(.teal):not(.teal-light):hover {
  background: var(--service-accent-dark);
  border-color: var(--service-accent-light);
}

/* ---------- Light service button ---------- */
.service-Personal :is(.s17btn.light, .form-theme-light .wpforms-submit):not(.purple):not(.purple-light):not(.teal):not(.teal-light),
.service-Business :is(.s17btn.light, .form-theme-light .wpforms-submit):not(.purple):not(.purple-light):not(.teal):not(.teal-light) {
  background: var(--service-accent-light);
  border-color: var(--service-accent-x-light);
  color: var(--s17dark);
  --s17btn-arrow-bg: var(--service-accent-x-light);
  --s17btn-arrow-bg-hover: var(--service-accent-xx-light);
  --s17btn-arrow-color: var(--s17dark);
  --s17btn-arrow-color-hover: var(--s17dark);
}

.service-Personal :is(.s17btn.light, .form-theme-light .wpforms-submit):not(.purple):not(.purple-light):not(.teal):not(.teal-light):hover,
.service-Business :is(.s17btn.light, .form-theme-light .wpforms-submit):not(.purple):not(.purple-light):not(.teal):not(.teal-light):hover {
  background: var(--service-accent-x-light);
  border-color: var(--service-accent-x-light);
}

/* =====================================================
   12. IN-PAGE ANCHOR MENU
   ===================================================== */

/* ---------- Anchor scroll offset ---------- */
:root {
  --anchor-scroll-offset: 10px;
}

html {
  scroll-behavior: smooth;
}

[data-anchor-source][id] {
  scroll-margin-top: var(--anchor-scroll-offset);
}

/* ---------- Current simplified version ---------- */
.content-section__anchor-nav {
  width: fit-content;
}

/* ---------- Nav wrapper ---------- */
.s17-anchor-nav {
  display: block;
  width: 100%;
}

/* ---------- Title ---------- */
.s17-anchor-nav__title {
  margin: 0 0 var(--s17space-xs);
  font-weight: 500;
  font-size: var(--s17text-m);
}

/* ---------- Hide desktop toggle icon ---------- */
.s17-anchor-nav::after {
  display: none;
}

/* ---------- List ---------- */
.s17-anchor-nav__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s17space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Links ---------- */
.s17-anchor-nav__link {
  display: flex;
  align-items: center;
  border-radius: var(--s17radius-full);
  padding: var(--s17space-3xs) var(--s17space-2xs);
  font-size: var(--s17text-xs);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.s17-anchor-nav__link.is-active,
.s17-anchor-nav__link:hover {
  background: var(--s17grey-l-2);
}

/* ---------- Mobile accordion ---------- */
@media (max-width: 768px) {
  .content-section__anchor-nav {
    width: 100%;
  }

  .s17-anchor-nav {
    width: 100%;
    cursor: pointer;
  }

  .s17-anchor-nav__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0;
  }

  .s17-anchor-nav__title::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8em;
    line-height: 1;
    transition: transform 0.25s ease;
  }

  .s17-anchor-nav:not(.is-collapsed) .s17-anchor-nav__title::after {
    transform: rotate(180deg);
  }

  .s17-anchor-nav__list {
    max-height: 500px;
    margin-top: var(--s17space-xs);
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition:
      max-height 0.35s ease,
      margin-top 0.25s ease,
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  .s17-anchor-nav.is-collapsed .s17-anchor-nav__list {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    transform: translateY(-0.35rem);
    pointer-events: none;
  }
}

/* ---------- Main service in-page sub-menu ---------- */
.service-menu__text-link {
  justify-content: space-between;
}

/* =====================================================
   13. TABS
   ===================================================== */

/* ---------- Nestable tabs ---------- */
.nestable-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.nestable-tabs .tab-menu {
  gap: var(--s17space-3xs);
}

.nestable-tabs .tab-menu .tab-title {
  transition: var(--s17transition-global);
}

.nestable-tabs.nestable-tabs-vertical .tab-menu {
  flex: 0 0 28%;
  min-width: 16rem;
  max-width: 28%;
}

.nestable-tabs.nestable-tabs-vertical .tab-title {
  width: 100%;
}

@media (min-width: 768px) {
  .nestable-tabs .tab-pane.brx-open .nestable-tabs__pane-content {
    animation: nestableTabsContentIn 0.28s ease both;
  }

  @keyframes nestableTabsContentIn {
    from {
      opacity: 0;
      transform: var(--s17translate-x-global);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

/* ---------- Mobile accordion layout ---------- */
@media (max-width: 767px) {

  .nestable-tabs.brxe-tabs-nested,
  .nestable-tabs.brxe-tabs {
    flex-direction: column;
  }

  .nestable-tabs.nestable-tabs-vertical .tab-menu {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    gap: 0;
  }

  .nestable-tabs .tab-menu {
    gap: 0;
  }

  .nestable-tabs .tab-menu .tab-title {
    position: relative;
    width: 100%;
    margin-bottom: var(--s17space-3xs);
    padding-right: calc(var(--s17space-l) * 2);
  }

  .nestable-tabs .tab-content {
    display: contents;
    padding: 0;
    background: transparent;
  }

  .nestable-tabs .tab-pane {
    display: block;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nestable-tabs .tab-pane .nestable-tabs__pane-content {
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .nestable-tabs .tab-pane.is-mobile-open .nestable-tabs__pane-content {
    opacity: 1;
  }

  .nestable-tabs .tab-title::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: var(--s17space-m);
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.25s ease;
  }

  .nestable-tabs .tab-title.is-mobile-open::after {
    transform: translateY(-50%) rotate(180deg);
  }
}

/* ---------- Filters: hide empty groups ---------- */
/* Hide Department / Location filter groups when
   Bricks has no checkbox options to display */
.filter-accordion__group:has(.team__filter---department-checkbox:empty),
.filter-accordion__group:has(.team__filter---location-checkbox:empty) {
  display: none;
}

/* ---------- Filters mobile accordion ---------- */
@media (max-width: 767px) {
  .filter-accordion {
    width: 100%;
  }

  .filter-accordion__group {
    margin-bottom: var(--s17space-3xs);
  }

  .filter-accordion__title {
    position: relative;
    width: 100%;
    cursor: pointer;
    padding-right: calc(var(--s17space-l) * 2);
  }

  .filter-accordion__body {
    display: block;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .filter-accordion__title::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: var(--s17space-m);
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.25s ease;
  }

  .filter-accordion__group.is-open .filter-accordion__title::after {
    transform: translateY(-50%) rotate(180deg);
  }
}

@media (min-width: 768px) {
  .filter-accordion__title::after {
    display: none;
  }
}

/* =====================================================
   14. GALLERIES
   ===================================================== */

/* ---------- Vertical / horizontal scrolling galleries ---------- */
.vertical-scroll-gallery {
  --gallery-speed: 30s;
  --gallery-gap: var(--s17space-s);
  will-change: transform;
}

.vertical-scroll-gallery.scroll-up {
  animation: scrollInfinite-y-up var(--gallery-speed) linear infinite;
}

.vertical-scroll-gallery.scroll-down {
  animation: scrollInfinite-y-down var(--gallery-speed) linear infinite;
}

/* ---------- Seam gap between original and duplicated gallery ---------- */
.vertical-scroll-gallery>.brxe-image-gallery>.bricks-layout-item:last-child {
  margin-bottom: var(--gallery-gap);
}

@keyframes scrollInfinite-y-up {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

@keyframes scrollInfinite-y-down {
  from {
    transform: translateY(-50%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes scrollInfinite-x-up {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes scrollInfinite-x-down {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

@media (max-width: 767px) {
  .gallery-columns {
    grid-template-columns: 1fr;
  }

  .vertical-scroll-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: max-content;
    max-width: none;
    max-height: none;
  }

  .vertical-scroll-gallery>.brxe-image-gallery {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    width: max-content;
    max-width: none;
  }

  .vertical-scroll-gallery>.brxe-image-gallery.bricks-layout-wrapper[data-layout="grid"] {
    grid-template-columns: none;
  }

  .vertical-scroll-gallery>.brxe-image-gallery>.bricks-layout-item {
    flex: 0 0 clamp(110px, 30vw, 160px);
    width: clamp(110px, 30vw, 160px);
    max-width: none;
  }

  .vertical-scroll-gallery>.brxe-image-gallery>.bricks-layout-item:last-child {
    margin-bottom: 0;
    margin-right: var(--gallery-gap);
  }

  .vertical-scroll-gallery img {
    display: block;
    width: 100%;
    height: auto;
  }

  .vertical-scroll-gallery.scroll-up {
    animation-name: scrollInfinite-x-up;
  }

  .vertical-scroll-gallery.scroll-down {
    animation-name: scrollInfinite-x-down;
  }
}

/* =====================================================
   15. SINGLE TEAM MEMBER LISTS
   ===================================================== */

/* ---------- Shared spacing variables ---------- */
.profile-qualifications__timeline,
.team-experience__awards,
.memberships {
  --timeline-size: 1.5rem;
  --timeline-gap: 1.2rem;
}

/* ---------- Shared list reset ---------- */
.profile-qualifications__timeline ul,
.team-experience__awards ul,
.memberships ul {
  list-style: none;
  margin: 0;
}

/* ---------- Shared list item spacing ---------- */
.profile-qualifications__timeline li,
.team-experience__awards li,
.memberships li {
  position: relative;
  padding-left: calc(var(--timeline-size) + var(--timeline-gap));
  margin-bottom: 0.9em;
}

/* ---------- Shared icon styles ---------- */
.profile-qualifications__timeline li::before,
.team-experience__awards li::before,
.memberships li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: var(--timeline-size);
  height: var(--timeline-size);
  background-color: var(--s17red);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}


/* ---------- Qualifications icon: solid circle-dot ---------- */
.profile-qualifications__timeline li::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 6.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 6.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 1.1rem;
  mask-size: 1.1rem;
}


/* ---------- Awards icon: solid trophy ---------- */
.team-experience__awards li::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v2h3a1 1 0 0 1 1 1v2c0 3.1-2.2 5.7-5.2 6.3A6 6 0 0 1 13 16.9V19h3a1 1 0 0 1 1 1v1H7v-1a1 1 0 0 1 1-1h3v-2.1a6 6 0 0 1-2.8-2.6A6.4 6.4 0 0 1 3 8V6a1 1 0 0 1 1-1h3V3Zm0 4H5v1a4.4 4.4 0 0 0 2.4 3.9A9.4 9.4 0 0 1 7 9V7Zm10 0v2c0 1-.1 2-.4 2.9A4.4 4.4 0 0 0 19 8V7h-2Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v2h3a1 1 0 0 1 1 1v2c0 3.1-2.2 5.7-5.2 6.3A6 6 0 0 1 13 16.9V19h3a1 1 0 0 1 1 1v1H7v-1a1 1 0 0 1 1-1h3v-2.1a6 6 0 0 1-2.8-2.6A6.4 6.4 0 0 1 3 8V6a1 1 0 0 1 1-1h3V3Zm0 4H5v1a4.4 4.4 0 0 0 2.4 3.9A9.4 9.4 0 0 1 7 9V7Zm10 0v2c0 1-.1 2-.4 2.9A4.4 4.4 0 0 0 19 8V7h-2Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 1.5rem;
  mask-size: 1.5rem;
}


/* ---------- Memberships icon: solid star ---------- */
.memberships li::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 14.9 8.4l6.5.9-4.7 4.6 1.1 6.5-5.8-3.1-5.8 3.1 1.1-6.5-4.7-4.6 6.5-.9L12 2.5Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 14.9 8.4l6.5.9-4.7 4.6 1.1 6.5-5.8-3.1-5.8 3.1 1.1-6.5-4.7-4.6 6.5-.9L12 2.5Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 1.4rem;
  mask-size: 1.4rem;
}


/* ---------- Timeline vertical line ---------- */
.profile-qualifications__timeline li::after {
  content: "";
  position: absolute;
  left: calc(var(--timeline-size) / 2);
  top: calc(var(--timeline-size) + 0.2rem);
  bottom: -0.9em;
  width: 0.12em;
  background: var(--s17red);
  transform: translateX(-50%);
}

.profile-qualifications__timeline li:last-child::after {
  display: none;
}

/* =====================================================
   16. SUB-SERVICES
   ===================================================== */

/* ---------- Centred column ---------- */
.s17columns-centred>.content-section__blocks-flexible-layouts {
  grid-column: 2 / span 2;
}

@media (max-width: 767px) {
  .s17columns-centred>.content-section__blocks-flexible-layouts {
    grid-column: 1;
  }
}

/* ---------- Sub-service image menu ---------- */

/* ---------- Right columns: image panels ---------- */
.services-preview__images {
  display: grid;
}

/* Each image panel sits in the same grid cell,
   allowing them to overlap each other */
.services-preview__image {
  grid-area: 1 / 1;
  min-width: 0;

  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* Slight offset so the panel slides in */
  transform: translateX(14px);

  /* Match mega menu transition timing */
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(.2, .7, .2, 1),
    visibility 0s linear 0.32s;
  z-index: 0;
}

/* ---------- Active image panel ---------- */
/* When the corresponding service is active,
   reveal the image panel */
.services-preview__image.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  /* Slide into place */
  transform: translateX(0);

  /* Remove visibility delay so it appears instantly */
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(.2, .7, .2, 1),
    visibility 0s;

  /* Ensure active panel sits above others */
  z-index: 1;
}

/* ---------- Mobile: disable image preview interaction ---------- */
@media (max-width: 767px) {

  /* Hide the image preview column */
  .services-preview__images {
    display: none;
  }

  /* Remove hover/active movement on the list items */
  .services-preview__item:hover,
  .services-preview__item.is-active {
    transform: none;
  }
}

/* ---------- Service image reveal menu: view all accordion ---------- */
/* Hidden by default on desktop */
.services-preview__accordion {
  display: none;
}

/* MOBILE: view all accordion */
@media (max-width: 767px) {
  .services-preview__accordion {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    overflow: hidden;
    transition:
      grid-template-rows .35s ease,
      opacity .25s ease;
  }

  .services-preview__accordion-inner {
    min-height: 0;
    overflow: hidden;
  }

  .services-preview__accordion.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  /* Mobile accordion arrow */
  .services-preview__item--all.s17btn::after {
    transform: rotate(90deg);
    transition: transform .25s ease;
  }

  .services-preview__item--all.is-active.s17btn::after {
    transform: rotate(-90deg);
  }
}

/* =====================================================
   17. SEARCH
   ===================================================== */

/* ---------- Search form wrapper ---------- */
.bricks-search-form {
  display: flex;
  align-items: stretch;
  max-width: 34rem;
  border-radius: var(--s17radius-full);
  overflow: hidden;
  box-shadow: var(--s17shadow-m);
}

.bricks-search-form input {
  flex: 1;
}

/* ---------- Search input ---------- */
.bricks-search-form input[type="search"] {
  min-height: 3.75rem;
  flex: 1;
  border: 0;
  padding: 0 var(--s17space-m);
  font-size: var(--s17text-m);
  background: var(--s17light);
  color: var(--s17dark);
  border-radius: var(--s17radius-full) 0 0 var(--s17radius-full);
}

.bricks-search-form input[type="search"]:focus {
  outline: none;
  border-radius: var(--s17radius-full) 0 0 var(--s17radius-full);
}

/* ---------- Search button ---------- */
.bricks-search-form button {
  min-height: 3.75rem;
  min-width: 6rem;
  padding-inline: clamp(1.5rem, 3vw, 2.5rem);
  border: 0;
  font-weight: 500;
  background: var(--s17secondary-l-2);
  color: var(--s17dark);
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease;
  border-radius: 0 var(--s17radius-full) var(--s17radius-full) 0;
}

/* ---------- Search focus ---------- */
.bricks-search-form:focus-within {
  outline: 2px solid var(--s17secondary-l-2);
  outline-offset: 4px;
}

/* ---------- Overlay search ---------- */
#brxe-dzpbxm .bricks-search-overlay .close {
  font-size: var(--s17text-4xl);
  color: var(--s17light);
}

/* =====================================================
   18. FOOTER ACCREDITATIONS
   ===================================================== */

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Gallery logo items + SRA wrapper */
.footer-logos>* {
  flex: 0 1 8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* SRA wrapper */
.footer-logos .sra-badge>div {
  width: 100%;
  max-width: 8rem;
  margin-inline: auto;
}

/* =====================================================
   19. OFFCANVAS MOBILE MENU
   ===================================================== */

@media (max-width: 991px) {

  .brxe-offcanvas :is(.brxe-dropdown,
    .brx-has-multilevel,
    .brx-dropdown-content,
    .brx-submenu-positioned) {
    position: relative;
    display: block;
  }

  .nav-nested__content .brx-multilevel-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: var(--s17space-4xs) var(--s17space-2xs);
    border-radius: var(--s17radius-full);
  }

  .nav-nested__content .brx-multilevel-back::before {
    content: "\f053";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: .875em;
    line-height: 1;
  }
}

/* =====================================================
   20. DRILLDOWN MENUS
   ===================================================== */

.menu-drilldown {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* ---------- Panels ---------- */
.menu-drilldown .menu-drilldown__panel,
.menu-drilldown .menu-drilldown__panel .menu-item {
  display: none;
  width: 100%;
  max-width: 100%;
}

.menu-drilldown .menu-drilldown__panel.is-active,
.menu-drilldown .menu-drilldown__panel.is-active .menu-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s17space-xs);
  overflow: visible;
  animation: menuDrilldownIn 0.32s cubic-bezier(.2, .7, .2, 1) both;
}

.menu-drilldown>.menu-item {
  display: none;
}

.menu-drilldown>.menu-item:has(> .menu-drilldown__panel.is-active) {
  display: block;
}

@keyframes menuDrilldownIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Reveal Bricks lazy-loaded loop content */
.menu-drilldown .menu-drilldown__panel.is-active .bricks-lazy-hidden {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------- Links / buttons ---------- */
.menu-drilldown :is(.menu-drilldown__trigger,
  .menu-drilldown__link,
  .menu-drilldown__heading) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  text-decoration: none;
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    color .25s ease,
    transform .25s ease;
}

.menu-drilldown button {
  appearance: none;
}

/* ---------- Third level ---------- */
.menu-drilldown__panel.is-child-open>.menu-drilldown__back,
.menu-drilldown__panel.is-child-open>.menu-drilldown__parent {
  display: none;
}

.menu-drilldown__panel.is-child-open>.menu-drilldown__parent.is-current-branch {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.menu-drilldown__parent.is-current-branch>.menu-drilldown__trigger {
  display: none;
}

.menu-drilldown__parent.is-current-branch>.menu-drilldown__panel.is-active {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (max-width: 991px) {

  .brxe-offcanvas .brx-offcanvas-inner,
  .brxe-offcanvas [class*="offcanvas-inner"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
  }

  .brxe-offcanvas .menu-drilldown,
  .brxe-offcanvas .menu-drilldown__panel,
  .brxe-offcanvas .menu-drilldown__parent {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.menu-drilldown__parent.is-current-branch {
  margin: 0;
  padding: 0;
}

.menu-drilldown__parent.is-current-branch>.menu-drilldown__panel.is-active {
  width: 100%;
  max-width: 100%;
  margin: 0;
  transform-origin: left center;
}

@media (max-width: 767px) {

  .brxe-offcanvas.brx-open,
  .brxe-offcanvas.brx-open .brx-offcanvas-inner,
  .brxe-offcanvas.brx-open .menu-drilldown,
  .brxe-offcanvas.brx-open .menu-drilldown__panel,
  .brxe-offcanvas.brx-open .menu-drilldown__parent {
    flex-wrap: nowrap;
    overflow: visible;
  }

  .brxe-offcanvas.brx-open .brx-offcanvas-inner {
    overflow-x: hidden;
  }

  .brxe-offcanvas.brx-open .menu-drilldown :is(.menu-drilldown__trigger,
    .menu-drilldown__link,
    .menu-drilldown__heading) {
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    justify-content: space-between;
  }
}

/* =====================================================
   21. LITESPEED
   ===================================================== */

img[data-lazyloaded] {
  opacity: 0;
}

img.litespeed-loaded {
  -webkit-transition: opacity .5s linear 0.2s;
  -moz-transition: opacity .5s linear 0.2s;
  transition: opacity .5s linear 0.2s;
  opacity: 1;
}

/* =====================================================
   22. REVIEWS SOLICITOR
   ===================================================== */
/* Review Solicitors positioning */
html body .rssw__widget {
  bottom: 20px !important;
  transform: none !important;
}

html body .rssw .rssw--widget-4 {
  max-width: fit-content !important;
}