/* GLOBAL VARIABLES */

:root {
  /* Left/right padding — all sections/containers */
  --fluid-side-padding-min: 1.25rem; /* 20px */
  --fluid-side-padding-max: 5rem;    /* 80px */

  /* Top/bottom padding — fluid section size variants */
  --section-xxl-padding-min: 9.375rem; /* 150px */
  --section-xxl-padding-max: 10rem;    /* 160px */

  --section-xl-padding-min: 6.875rem; /* 110px */
  --section-xl-padding-max: 7.5rem;   /* 120px */

  --section-l-padding-min: 5.625rem; /* 90px */
  --section-l-padding-max: 6.25rem;  /* 100px */

  --section-m-padding-min: 5rem; /* 80px */
  --section-m-padding-max: 5rem; /* 80px */

  --section-s-padding-min: 3.75rem; /* 60px */
  --section-s-padding-max: 3.75rem; /* 60px */

  --section-xs-padding-min: 2.5rem; /* 40px */
  --section-xs-padding-max: 2.5rem; /* 40px */

  --section-xxs-padding-min: 1.5rem; /* 24px */
  --section-xxs-padding-max: 1.5rem; /* 24px */

  --section-header-padding-min: 1.25rem; /* 20px */
  --section-header-padding-max: 1.25rem; /* 20px */

  /* Hero sections */
  --section-hero-height: 100vh; /* full screen height */

  /* Offset for overlay headers */
  --section-offset-header: 80px; /* match the overlay header's negative margin */

  /* Narrow section widths */
  --section-narrow: 62.5rem;    /* 1000px */
  --section-narrow-xs: 45rem;   /* 720px */
}


/* SECTION / CONTAINER PADDING — FLUID VARIANTS */

.section-xxl {
  padding-top: clamp(var(--section-xxl-padding-min), 1.087vw + 9.13rem, var(--section-xxl-padding-max));
  padding-bottom: clamp(var(--section-xxl-padding-min), 1.087vw + 9.13rem, var(--section-xxl-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-xl {
  padding-top: clamp(var(--section-xl-padding-min), 1.087vw + 6.63rem, var(--section-xl-padding-max));
  padding-bottom: clamp(var(--section-xl-padding-min), 1.087vw + 6.63rem, var(--section-xl-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-l {
  padding-top: clamp(var(--section-l-padding-min), 1.087vw + 5.38rem, var(--section-l-padding-max));
  padding-bottom: clamp(var(--section-l-padding-min), 1.087vw + 5.38rem, var(--section-l-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-m {
  padding-top: clamp(var(--section-m-padding-min), 0vw + 5rem, var(--section-m-padding-max));
  padding-bottom: clamp(var(--section-m-padding-min), 0vw + 5rem, var(--section-m-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-s {
  padding-top: clamp(var(--section-s-padding-min), 0vw + 3.75rem, var(--section-s-padding-max));
  padding-bottom: clamp(var(--section-s-padding-min), 0vw + 3.75rem, var(--section-s-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-xs {
  padding-top: clamp(var(--section-xs-padding-min), 0vw + 2.5rem, var(--section-xs-padding-max));
  padding-bottom: clamp(var(--section-xs-padding-min), 0vw + 2.5rem, var(--section-xs-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-xxs {
  padding-top: clamp(var(--section-xxs-padding-min), 0vw + 1.5rem, var(--section-xxs-padding-max));
  padding-bottom: clamp(var(--section-xxs-padding-min), 0vw + 1.5rem, var(--section-xxs-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}

.section-header {
  padding-top: clamp(var(--section-header-padding-min), 0vw + 1.25rem, var(--section-header-padding-max));
  padding-bottom: clamp(var(--section-header-padding-min), 0vw + 1.25rem, var(--section-header-padding-max));
  padding-left: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
  padding-right: clamp(var(--fluid-side-padding-min), 6.522vw + -0.217rem, var(--fluid-side-padding-max)) !important;
}


/* LAYOUT UTILITIES */

.section-hero .e-con-inner {
  justify-content: center !important;
}

.pt-0 {
  padding-top: 0 !important;
}

/* Full width sections — no side padding */
.section-full div {
  max-width: 100% !important;
}

/* Narrow sections */
.section-narrow .e-con-inner {
  max-width: var(--section-narrow) !important;
}

.section-narrow-xs .e-con-inner {
  max-width: var(--section-narrow-xs) !important;
}

/* BANNER OVERLAY */

.banner-overlay {
  position: relative;
}

.banner-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(25, 23, 21, 0) 0%,
    rgba(25, 23, 21, 0) 65%,
    rgba(25, 23, 21, 1) 90%,
    rgba(25, 23, 21, 1) 100%
  );
  pointer-events: none;
  z-index: 1;
}


/* TYPOGRAPHY & MISC UTILITIES */

.italic {
  font-style: italic;
  margin-right: 0.2rem;
}

ul.wp-block-list {
  line-height: 2.2;
}

.elementor-icon-box-icon {
  padding: 1rem;
  border: 1px solid #972721;
  border-radius: 50px;
}

.elementor-1952 .elementor-element.elementor-element-249066e5:not(.elementor-motion-effects-element-type-background), .elementor-1952 .elementor-element.elementor-element-249066e5 > .elementor-motion-effects-container > .elementor-motion-effects-layer, .wpforms-container input[type=date], .wpforms-container input[type=datetime], .wpforms-container input[type=datetime-local], .wpforms-container input[type=email], .wpforms-container input[type=month], .wpforms-container input[type=number], .wpforms-container input[type=password], .wpforms-container input[type=range], .wpforms-container input[type=search], .wpforms-container input[type=tel], .wpforms-container input[type=text], .wpforms-container input[type=time], .wpforms-container input[type=url], .wpforms-container input[type=week], .wpforms-container select, .wpforms-container textarea, .wp-core-ui div.wpforms-container input[type=date], .wp-core-ui div.wpforms-container input[type=datetime], .wp-core-ui div.wpforms-container input[type=datetime-local], .wp-core-ui div.wpforms-container input[type=email], .wp-core-ui div.wpforms-container input[type=month], .wp-core-ui div.wpforms-container input[type=number], .wp-core-ui div.wpforms-container input[type=password], .wp-core-ui div.wpforms-container input[type=range], .wp-core-ui div.wpforms-container input[type=search], .wp-core-ui div.wpforms-container input[type=tel], .wp-core-ui div.wpforms-container input[type=text], .wp-core-ui div.wpforms-container input[type=time], .wp-core-ui div.wpforms-container input[type=url], .wp-core-ui div.wpforms-container input[type=week], .wp-core-ui div.wpforms-container select, .wp-core-ui div.wpforms-container textarea {
    border-radius: 0!important;
}


.ct-footer h2 {
    font-size: 1.375rem;
}

[data-footer*="type-1"] .ct-footer [data-column="widget-area-1"] figure.wp-block-image.size-full {
    width: 200px;
    height: 200px;
}

.elementor-widget-icon-box .elementor-icon-box-icon {
    flex-grow: 0;
    flex-shrink: 0;
    width: fit-content;
    align-self: center;
}

.gold-sheen {
  background:linear-gradient(100deg, #b8964f 0%, #d4bd94 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
}

@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  .gold-sheen{
    color:#d4bd94;
    -webkit-text-fill-color:#d4bd94;
    background:none;
  }
}

[data-footer*="type-1"] .ct-footer [data-row*="middle"] {
  border-top:2px solid transparent;
  border-image:linear-gradient(100deg, #b8964f 0%, #d4bd94 100%);
  border-image-slice:1;
}
/* ACCESSIBILITY — REDUCED MOTION (GLOBAL) */

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

.has-bg-video { 
    position: relative;
    z-index: 999;
}

/* Archive items — filterable grid + modal */

.ai-wrap {
  width: 100%;
}

.ai-empty {
  color: #5F5E5A;
  padding: 1.25rem 0;
}

/* Sidebar + grid layout, forced with !important over Elementor/theme defaults */
.ai-layout {
  display: flex !important;
  gap: 2.5rem;
  align-items: flex-start;
  width: 100%;
}

/* Filter sidebar — every option always visible, no scrolling or swipe gesture required */
.ai-sidebar-col {
  display: flex !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  width: 20.5rem !important;
  max-width: 20.5rem !important;
}

.ai-filter-sidebar {
  border: 0.0625rem solid #DDD5C7 !important;
}

/* Mobile toggle — hidden entirely on desktop, only shown via the media query below */
.ai-filter-toggle {
  display: none;
}

.ai-filter-label {
  display: block;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: normal;
  text-transform: none;
  background-color: #141C2E;
  padding: 0.75rem 1rem;
  margin: 0;
}

.ai-filters {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 1rem 1.1rem;
}

.ai-filters li {
  margin: 0;
}

/* Filter buttons — outlined when inactive, solid fill when active */
.ai-filters button.ai-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0.65rem 0.9rem !important;
  min-height: 2.75rem !important;
  border-radius: 0 !important;
  border: none !important;
  border-left: 0.125rem solid #DDD5C7 !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #1C2B3A !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  text-align: left;
  box-shadow: none !important;
}

.ai-filters button.ai-btn:hover {
  border-left-color: #C8A34E !important;
  background-color: #F4F1EA !important;
}

.ai-filters button.ai-btn:focus-visible {
  outline: 0.1875rem solid #8B2020 !important;
  outline-offset: 0.125rem;
}

/* Active button — left accent bar in red, light paper fill, bold navy text.
   Quieter than a solid fill, closer to a museum wayfinding marker. */
.ai-filters button.ai-btn.ai-active {
  background-color: #F4F1EA !important;
  border-left-color: #8B2020 !important;
  color: #141C2E !important;
  font-weight: 600 !important;
}

.ai-btn-label {
  flex: 1;
}

/* Inactive button count — meets 4.5:1 contrast against the transparent/white background */
.ai-btn-count {
  display: none !important;
}

/* Active button count — solid white for contrast on the red fill */
/* Active button count — dark red on the pale paper fill, keeps it legible and on-brand */
.ai-filters button.ai-btn.ai-active .ai-btn-count {
  color: #8B2020 !important;
}

/* Cards — masonry layout balanced by JS, not CSS columns */
/* Grid stays hidden until JS finishes its first layout pass */
.ai-grid {
  width: 100% !important;
  opacity: 0;
}

.ai-grid.ai-js-ready {
  opacity: 1;
  transition: opacity 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .ai-grid.ai-js-ready {
    transition: none;
  }
}

/* Once JS has built the real .ai-grid-col structure, it adds this class
   and takes over with proper shortest-column masonry balancing. */
.ai-grid.ai-js-ready {
  columns: unset;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  align-items: flex-start;
  flex: 1;
}

.ai-grid-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

/* Card — whole card is clickable; opacity fade handles filter transitions */
.ai-card {
  background: #ffffff !important;
  overflow: hidden;
  border: 0.0625rem solid #E0DDD8;
  cursor: pointer;
  transition: box-shadow 0.2s ease, opacity 0.4s ease;
  width: 100%;
  opacity: 1;
  break-inside: avoid;
}

/* Fallback margin, removed once JS switches to flex (which uses gap instead) */
.ai-grid:not(.ai-js-ready) .ai-card {
  margin-bottom: 1.5rem;
}

.ai-card.ai-fade-out {
  opacity: 0;
}

.ai-card:hover {
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.08);
}

.ai-card:focus-visible {
  outline: 0.1875rem solid #8B2020;
  outline-offset: -0.1875rem;
}

.ai-card.ai-hidden {
  display: none !important;
}

/* Image fills the full width of the card and shows at its natural height — no cropping */
/* Letterboxed stage — image floats inside at true proportions, never cropped */
.ai-stage {
  width: 100%;
  aspect-ratio: auto; /* Natural — the default */
  background: #F4F1EA;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: aspect-ratio 0.25s ease;
  border-radius: 0 !important;
}

.ai-img {
  border-radius: 0 !important;
}

/* View toggle just swaps the stage's aspect ratio via CSS — no re-layout,
   so switching between views is instant regardless of item count. */
/* Natural view — no forced ratio, image at true size */
.ai-grid.ai-size-natural .ai-stage {
  aspect-ratio: auto;
  background: transparent;
}

/* Definite width needed here to prevent layout shift while images load */
.ai-grid.ai-size-natural .ai-img {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
}

.ai-grid.ai-size-natural .ai-stage {
  display: block;
}

.ai-grid.ai-size-landscape .ai-stage {
  aspect-ratio: 4 / 3;
  min-height: 280px;
  max-height: 280px;
}

.ai-grid.ai-size-portrait .ai-stage {
  aspect-ratio: 3 / 4;
}

@media (prefers-reduced-motion: reduce) {
  .ai-stage {
    transition: none;
  }
}

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

.ai-img-ph {
  width: 100%;
  height: 100%;
  background: #D5CFC8;
  display: block;
}

/* Size toggle — Small / Medium / Large */
.ai-view-label {
  font-size: 0.8rem;
  color: #5F5E5A;
  margin-right: 0.6rem;
  font-weight: 500;
}

.ai-size-toggle {
  display: inline-flex;
  border: 0.0625rem solid #DDD5C7;
  border-radius: 0;
  overflow: hidden;
}

.ai-size-toggle button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem;
  font-family: "Inter", sans-serif !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem !important;
  border: none !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #5F5E5A !important;
  cursor: pointer;
  box-shadow: none !important;
  min-height: 0 !important;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.ai-size-icon {
  flex-shrink: 0;
  color: currentColor;
}

.ai-size-toggle button.ai-size-active {
  background: #141C2E !important;
  color: #ffffff !important;
}

.ai-size-toggle button:focus-visible {
  outline: 0.1875rem solid #8B2020 !important;
  outline-offset: 0.125rem;
}

.ai-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

/* Card body */
.ai-body {
  padding: 1rem 1.25rem 1.25rem;
}

/* Meta text — #6B6B67 on white gives a 4.6:1 contrast ratio, meeting WCAG AA */
.ai-meta {
  font-size: 0.8125rem;
  color: #2B2B28;
  margin: 0 0 0.25rem;
}

/* Heading — EB Garamond, inherits the theme's text colour rather than setting one */
.ai-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.25rem;
  color: inherit;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

/* Body copy inherits the site's default font (Inter) */
.ai-desc {
  font-size: 0.875rem;
  color: #3D3D3A;
  line-height: 1.6;
  margin: 0;
}

/* --- Modal --- */

.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.ai-modal[hidden] {
  display: none;
}

.ai-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 43, 58, 0.75);
  cursor: pointer;
}

/* No rounded corners on the popout, matching the cards */
.ai-modal-box {
  position: relative;
  background: #ffffff;
  width: min(60rem, 88vw);
  max-width: 88vw;
  z-index: 1;
  overflow: visible;
}

/* Close button — 2.5rem (40px) circle keeps it within reach of the 44px target guideline */
.ai-modal-close {
  position: absolute;
  top: 0.875rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  color: #1C2B3A;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.ai-modal-close:focus-visible {
  outline: 0.1875rem solid #8B2020;
  outline-offset: 0.125rem;
}

/* Image sits full width at the top of the popout, at its natural height within the container */
.ai-modal-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(32rem, 55vh);
  background: #F4F1EA;
  overflow: hidden;
}

.ai-modal-main-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ai-modal-content {
  display: block;
  box-sizing: border-box;
  background: #ffffff;
  width: 0;
  min-width: 100%;
  padding: 1.5rem 1.75rem 1.75rem;
}

/* Category pill — shown above the title so the theme is clear even when browsing "All" */
.ai-modal-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8B2020;
  background: #F7E9E9;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.625rem;
}

.ai-modal-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.625rem;
  color: inherit;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.3;
  text-wrap: balance;
}

.ai-modal-extended {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 0.0625rem solid #E0DDD8;
}

.ai-modal-extended p {
  font-size: 0.9375rem;
  color: #2C2C2C;
  line-height: 1.8;
  margin: 0;
}

/* --- Results column: header above the grid --- */

.ai-results {
  flex: 1;
  min-width: 0;
}

.ai-res-head {
  background-color: #F2F0ED;
  border-left: 0.25rem solid #8B2020;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.ai-res-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.ai-res-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: #1C2B3A;
  line-height: 1.15;
  margin: 0;
}

.ai-res-count {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5F5E5A;
  flex-shrink: 0;
}

.ai-res-intro {
  font-size: 0.9375rem;
  color: #3D3D3A;
  line-height: 1.65;
  max-width: 52rem;
  margin: 0;
}

/* "View details" affordance on each card */
.ai-more {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8B2020;
  margin-top: 0.35rem;
}

/* Smaller header on mobile — add inside your existing @media (max-width: 48em) block */
@media (max-width: 48em) {
  .ai-res-title {
    font-size: 1.4rem;
  }
}

/* Respect reduced motion preference — WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  .ai-card,
  .ai-btn {
    transition: none !important;
  }
}

/* --- Responsive --- */
@media (max-width: 48em) {
  /* Sidebar stacks above the grid rather than sitting beside it */
  .ai-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .ai-sidebar-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ai-filter-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ai-grid {
    gap: 1.5rem !important;
  }

  /* The static "Browse by theme" label is replaced by the toggle button on mobile */
  .ai-filter-label {
    display: none;
  }

  /* Sticky mobile toggle, forced with !important over Elementor/theme defaults */
  .ai-filter-sidebar button.ai-filter-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 0.125rem solid #8B2020 !important;
    border-radius: 0 !important;
    padding: 0.875rem 0.25rem !important;
    cursor: pointer;
    min-height: 3rem;
    text-align: left;
  }

  .ai-filter-sidebar button.ai-filter-toggle:focus-visible {
    outline: 0.1875rem solid #8B2020 !important;
    outline-offset: 0.125rem;
  }

  /* Single line — "Theme:" in a muted weight, the current selection in full strength */
  .ai-filter-toggle-text {
    font-size: 1rem;
    color: #1C2B3A !important;
    font-weight: 500;
  }

  .ai-filter-toggle-prefix {
    color: #6B6B67 !important;
    font-weight: 400;
  }

  .ai-filter-current {
    color: #1C2B3A !important;
    font-weight: 500;
  }

  /* Arrow icon — SVG stroke colour set explicitly so it's never invisible against the white bar */
  .ai-filter-toggle-icon {
    color: #6B6B67 !important;
    flex-shrink: 0;
    margin-left: 0.75rem;
    transition: transform 0.2s ease;
  }

  .ai-filter-sidebar button.ai-filter-toggle[aria-expanded="true"] .ai-filter-toggle-icon {
    transform: rotate(180deg);
  }

  /* List is collapsed by default on mobile — hidden, not just scrolled past,
     so it never contributes to page length until the person asks for it */
  .ai-filters {
    display: none;
    margin-top: 0.5rem;
  }

  .ai-filters.ai-filters-open {
    display: flex;
  }
}


/* --- Prev/next navigation inside the popout --- */

.ai-modal-nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #1C2B3A;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.ai-modal-prev { left: 0.75rem; }
.ai-modal-next { right: 0.75rem; }

.ai-modal-nav:hover { background: #ffffff; }

.ai-modal-nav:focus-visible {
  outline: 0.1875rem solid #8B2020;
  outline-offset: 0.125rem;
}

/* On small screens, tuck the arrows to the bottom so they don't cover the image */
@media (max-width: 48em) {
  .ai-modal-nav {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }
}

/* --- Prev/next navigation (modern chevrons) --- */

.ai-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #000000;
  cursor: pointer;
  z-index: 3;
  padding: 0 !important;
  box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ai-modal-prev { left: -4rem; }
.ai-modal-next { right: -4rem; }

.ai-modal-nav:hover {
  background: #ffffff;
}

.ai-modal-prev:hover { transform: translateY(-50%) translateX(-2px); }
.ai-modal-next:hover { transform: translateY(-50%) translateX(2px); }

.ai-modal-nav svg {
  display: block;
}

.ai-modal-nav:focus-visible {
  outline: 0.1875rem solid #8B2020;
  outline-offset: 0.125rem;
}

/* Small screens: tuck to the bottom so they don't cover the image */
@media (max-width: 48em) {
  .ai-modal-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .ai-modal-prev:hover,
  .ai-modal-next:hover { transform: none; }

  /* Modal scrolls internally on mobile; close button pinned to viewport */
  .ai-modal-box {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ai-modal-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 4;
  }
}

/* Archive preview strip — marquee */

.ap-wrap {
  background: #191715;
  padding: 3.5rem 0;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.ap-inner {
  max-width: 35rem !important;
  width: 100% !important;
  margin: 0 auto 2.5rem !important;
  padding: 0 2rem !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.ap-eyebrow {
  display: block !important;
  width: 100%;
  text-align: center !important;
  font-size: 0.8125rem;
  color: #C8A882 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ap-heading {
  font-family: "EB Garamond", Georgia, serif !important;
  font-size: 2.25rem;
  font-weight: 500 !important;
  color: #ffffff !important;
  margin: 0 0 0.75rem !important;
  text-align: center !important;
  width: 100%;
}

.ap-copy {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65) !important;
  line-height: 1.6;
  margin: 0 auto 1.5rem !important;
  max-width: 28.75rem;
  text-align: center !important;
  width: 100%;
}

.ap-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #191715 !important;
  background-color: #C8A882 !important;
  background-image: none !important;
  padding: 0.6875rem 1.375rem !important;
  border-radius: 0.125rem !important;
  border: none !important;
  text-decoration: none !important;
  min-height: 2.75rem;
}

.ap-cta:focus-visible {
  outline: 0.1875rem solid #ffffff !important;
  outline-offset: 0.1875rem;
}

.ap-marquee {
  position: relative;
  width: 100% !important;
  margin-left: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 16rem;
  padding: 1rem 0;
  overflow: hidden !important;
}

.ap-track {
  display: flex !important;
  gap: 1.375rem !important;
  width: max-content !important;
  align-items: flex-end !important;
  height: 100% !important;
  min-height: 100% !important;
  padding-left: 0 !important;
  padding-top: 0 !important;
  margin: 0 !important;
  transform: translateX(0);
  animation: ap-scroll 55s linear infinite;
  animation-play-state: paused;
}

.ap-marquee.ap-marquee-visible .ap-track {
  animation-play-state: running;
}

.ap-marquee.ap-marquee-visible:hover .ap-track,
.ap-marquee.ap-marquee-visible:focus-within .ap-track {
  animation-play-state: paused;
}

@keyframes ap-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.3333%); }
}

.ap-item {
  flex-shrink: 0 !important;
  position: relative;
  overflow: hidden;
}

.ap-item-w1 {
  width: 9.375rem !important;
  height: 6.875rem !important;
}

.ap-item-w2 {
  width: 13.125rem !important;
  height: 8.75rem !important;
}

.ap-item-w3 {
  width: 17.5rem !important;
  height: 11.25rem !important;
}

.ap-item-w4 {
  width: 12.5rem !important;
  height: 14.375rem !important;
}

.ap-item-up {
  transform: translateY(-0.625rem);
}

.ap-item-down {
  transform: translateY(0.625rem);
}

.ap-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: grayscale(100%) contrast(1.05) brightness(0.95);
  opacity: 0.9;
  display: block;
  transition: opacity 0.25s ease;
}

.ap-item:hover img,
.ap-item:focus-within img,
.ap-item a:focus-visible img {
  opacity: 1;
}

.ap-bottom-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6rem;
  background: linear-gradient(to top, #191715 30%, transparent);
  z-index: 3;
  pointer-events: none;
}

.ap-fade-left,
.ap-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9rem;
  z-index: 4;
  pointer-events: none;
}

.ap-fade-left {
  left: 0;
  background: linear-gradient(to right, #191715 70%, transparent);
}

.ap-fade-right {
  right: 0;
  background: linear-gradient(to left, #191715 70%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .ap-track {
    animation: none !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 48em) {
  .ap-heading {
    font-size: 1.75rem;
  }

  .ap-marquee {
    height: 11rem;
  }

  .ap-item-w1 {
    width: 6.5rem !important;
    height: 4.75rem !important;
  }

  .ap-item-w2 {
    width: 9rem !important;
    height: 6rem !important;
  }

  .ap-item-w3 {
    width: 12rem !important;
    height: 7.75rem !important;
  }

  .ap-item-w4 {
    width: 8.5rem !important;
    height: 10rem !important;
  }

  .ap-bottom-overlay {
    height: 5rem !important;
    min-height: 5rem !important;
  }
}


/* ARCHIVE STRIP — EQUAL-HEIGHT VERSION */

.archive-strip {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  padding: 60px 0;
  display: flex;
  justify-content: center;
}

.archive-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: max-content;
  animation: archiveScroll 130s linear infinite;
}

.archive-strip:hover .archive-track,
.archive-strip:focus-within .archive-track {
  animation-play-state: paused;
}

/* Fixed height = every item the same height, regardless of size class */
.archive-item {
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  height: 320px;
}

.archive-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: sepia(10%) brightness(0.95) contrast(1.05);
  transition: all 0.4s ease;
}

.archive-item:hover img {
  opacity: 0.8;
  transform: scale(1.02);
}

/* Size classes control WIDTH only — heights stay uniform */
.small { width: 300px; }
.medium { width: 350px; }
.large { width: 400px; }

/* Vertical offsets kept available but optional with equal heights */
.up { transform: translateY(-30px); }
.down { transform: translateY(30px); }

.archive-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 220px;
  height: 100%;
  z-index: 10;
  pointer-events: none;
background: linear-gradient(to right, #141B2B 0%, rgba(20, 27, 43, .95) 35%, transparent 100%);
}

.archive-strip::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 220px;
  height: 100%;
  z-index: 10;
  pointer-events: none;
background: linear-gradient(to left, #141B2B 0%, rgba(20, 27, 43, .95) 35%, transparent 100%);
}

.archive-bottom-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  z-index: 11;
  pointer-events: none;
background: linear-gradient(to top, #141B2B 0%, rgba(20, 27, 43, .95) 35%, transparent 100%);
}

@keyframes archiveScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .archive-track {
    animation: none;
  }
}

@media (max-width: 768px) {
  .archive-strip {
    padding: 30px 0;
  }

  /* Uniform height on mobile too */
  .archive-item {
    height: 200px;
  }

  .small { width: 160px; }
  .medium { width: 200px; }
  .large { width: 240px; }

  .up { transform: translateY(-16px); }
  .down { transform: translateY(16px); }

  .archive-strip::before,
  .archive-strip::after {
    width: 50px;
  }
}

@media (max-width: 480px) {
  .archive-strip::before,
  .archive-strip::after {
    width: 32px;
  }
}


/* LIGHTBOX — VOLUNTEER PAGE */

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 85%;
  max-height: 300px;
  border-radius: 4px;
}

#lightboxOverlay button {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-block !important;
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: #fff !important;
  cursor: pointer !important;
  padding: 10px 16px !important;
  margin: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: normal !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  transition: opacity 0.2s ease !important;
}

#lightboxOverlay button:focus {
  outline: 2px solid #fff !important;
  outline-offset: 2px !important;
}

#lightboxOverlay button:hover {
  opacity: 0.7 !important;
}

#lightboxClose {
  position: fixed !important;
  top: 16px !important;
  right: 16px !important;
  left: auto !important;
  font-size: 32px !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
  border-radius: 50% !important;
  z-index: 10000 !important;
}

#lightboxClose:hover {
  background-color: rgba(0, 0, 0, 0.6) !important;
}

.lightbox-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  border: none !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #000000 !important;
  font-size: initial !important;
  padding: 0 !important;
  box-shadow: 0 0.125rem 0.75rem rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
  user-select: none !important;
}

.lightbox-arrow:hover {
  background: #ffffff !important;
}

.lightbox-prev {
  left: 1rem !important;
}

.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-2px) !important;
}

.lightbox-next {
  right: 1rem !important;
}

.lightbox-next:hover {
  transform: translateY(-50%) translateX(2px) !important;
}

.lightbox-status {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 14px;
  margin: 0;
}

@media (max-width: 600px) {
  .lightbox-arrow {
    font-size: 26px !important;
    padding: 6px 10px !important;
  }
}

/* MODAL IMAGE ZOOM — hover magnifier */

.ai-modal-img-wrap {
  position: relative;
  cursor: zoom-in;
}

.ai-zoom-lens {
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  border: 0.1875rem solid #ffffff;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.35), inset 0 0 0 0.0625rem rgba(0, 0, 0, 0.1);
  pointer-events: none;
  background-repeat: no-repeat;
  display: none;
  z-index: 5;
}

.ai-zoom-lens.ai-zoom-active {
  display: block;
}

/* Hide the zoom entirely on touch devices, where there's no real hover
   and pinch-zoom already does this job natively */
@media (hover: none), (pointer: coarse) {
  .ai-modal-img-wrap {
    cursor: default;
  }
  .ai-zoom-lens {
    display: none !important;
  }
}

/* MODAL LAYOUT BY ORIENTATION */

.ai-modal-box.ai-modal-portrait {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  width: min(70rem, 92vw);
  max-width: 92vw;
  max-height: 92vh;
}

.ai-modal-box.ai-modal-portrait .ai-modal-img-wrap {
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-height: 0;
}

.ai-modal-box.ai-modal-portrait .ai-modal-content {
  flex: 0 0 24rem;
  width: 24rem;
  min-width: 24rem;
  max-width: 24rem;
  overflow-y: auto;
}

@media (max-width: 48em) {
  /* Side-by-side doesn't work on narrow screens — fall back to the normal
     stacked layout regardless of orientation */
  .ai-modal-box.ai-modal-portrait {
    flex-direction: column;
    width: min(60rem, 88vw);
    max-height: 90vh;
  }
  .ai-modal-box.ai-modal-portrait .ai-modal-img-wrap {
    height: min(32rem, 55vh);
  }
  .ai-modal-box.ai-modal-portrait .ai-modal-content {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
}

/* VOLUNTEER VOICES — gallery thumbnail max height */

.volunteer-grid-section img {
  width: 100%;
  height: 21.875rem; /* ~350px */
  object-fit: cover;
  display: block;
}

/* PAGE BANNER KICKER */

.sos-kicker .elementor-heading-title {
  display: inline-flex !important;
  align-items: center;
  gap: 0.7rem;
}

.sos-kicker .elementor-heading-title::before {
  content: "";
  width: 0.9rem;
  height: 1px;
  background: #D9BE86;
  flex-shrink: 0;
}

/* ARCHIVE: ITEM OF THE DAY — a small card under the theme filter list */

.ai-item-of-day {
  margin-top: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 2.5rem;
  border-top: 1px solid #E5DFD3;
  cursor: pointer;
  max-width: 26rem;
}

.ai-item-of-day-eyebrow {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #141C2E;
  margin-bottom: 0.75rem;
}

.ai-item-of-day-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 0.75rem;
}

.ai-item-of-day-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-item-of-day-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #141C2E;
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

.ai-item-of-day-desc {
  font-size: 0.85rem;
  color: #5F5E5A;
  line-height: 1.55;
  margin: 0 0 0.6rem;
}

.ai-item-of-day-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b2020;
  text-decoration: none;
}

.ai-item-of-day-link svg {
  flex-shrink: 0;
  position: relative;
  top: 0.02rem;
}

.ai-item-of-day-link:hover {
  text-decoration: underline;
}

/* ARCHIVE STRIP — EXHIBITION PAGE OVERRIDE ONLY */

body.page-id-2602 .archive-strip::before {
  background: linear-gradient(to right, #F2F0ED 0%, rgba(242, 240, 237, .95) 35%, transparent 100%);
}

body.page-id-2602 .archive-strip::after {
  background: linear-gradient(to left, #F2F0ED 0%, rgba(242, 240, 237, .95) 35%, transparent 100%);
}

body.page-id-2602 .archive-bottom-fade {
  background: linear-gradient(to top, #F2F0ED 0%, rgba(242, 240, 237, .95) 35%, transparent 100%);
}

/* Hides prev/next nav when opened from Item of the Day (not part of the grid) */
.ai-modal-no-nav .ai-modal-nav {
  display: none !important;
}

/* Match the copyright text color to the Privacy Policy link beside it */
.ct-copyright p {
  color: #972721;
}

/* PROJECT NEWS TIMELINE */

@media (max-width: 767px) {
  .elementor-element-5fe71c06 .elementor-widget-image {
    order: -1;
  }
}

  .elementor-heading-title {
    line-height: 1.1!important;
  }

/* View toggle — tighter sizing on mobile to prevent overflow */

@media (max-width: 480px) {
  /* Icons only on mobile; text visually hidden but kept for screen readers */
  .ai-size-toggle button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ai-size-toggle button {
    padding: 0.65rem 0.9rem !important;
  }
}

@media (max-width: 767px) {
  .ai-wrap {
    overflow-x: hidden;
    max-width: 100%;
  }
}

/* Privacy Policy footer link — gold on hover, matching the other footer links */
.ct-footer .stk-block-text__text a:hover {
  color: #D9BE86 !important;
}

/* Bigger popout on desktop — especially the landscape image area, which
   was capped at 32rem/55vh regardless of how much screen space was available */
@media (min-width: 769px) {
  .ai-modal-box {
    width: min(75rem, 92vw);
    max-width: 92vw;
  }

  .ai-modal-img-wrap {
    height: min(42rem, 75vh);
  }
}

/* Footer top row (ICKSP crest + socials) — background image with the
   existing red gradient layered on top as a semi-transparent tint */
[data-footer*="type-1"] .ct-footer [data-row="top"] {
  background-image: url('https://stwalburgestories.org.uk/wp-content/uploads/2026/09/footer-bg.webp'), linear-gradient(135deg, rgba(139, 32, 32, 0.85) 0%, rgba(96, 35, 35, 0.85) 100%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* Footer bottom row columns are flex-column with
   justify-content:flex-start by default (top-aligned), which is why the
   copyright text and Privacy Policy link didn't line up vertically */
[data-footer*="type-1"] .ct-footer [data-row="bottom"] [data-column] {
  justify-content: center !important;
}

.portrait-video .elementor-wrapper,
.portrait-video .elementor-video {
  aspect-ratio: 9 / 13!important;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.portrait-video video,
.portrait-video iframe {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Section utility classes — reduced top/bottom padding on mobile.
   These normally floor out at their desktop minimum on narrow screens
   (e.g. .section-l never goes below 90px even on a phone), which eats
   up too much vertical space. This overrides that floor specifically
   for mobile, keeping the same relative size hierarchy between classes. */
@media (max-width: 767px) {
  .section-xxl {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }
  .section-xl {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
  .section-l {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  .section-m {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  .section-s {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .section-xs {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .section-xxs {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }
}