/* Restore the earlier gallery proportions: paired 32px column insets and 2rem rows. */
.cch-legacy-gallery {
  --cch-column-gap:64px;
  --cch-row-gap:2rem;
  width:calc(100% - var(--cch-gallery-inset,calc(.75rem + 32px)) * 2);
  max-width:calc(1920px - var(--cch-gallery-inset,calc(.75rem + 32px)) * 2 + 3rem);
  margin:0 auto; padding:0; box-sizing:border-box;
}
.cch-legacy-gallery *, .cch-legacy-gallery *::before, .cch-legacy-gallery *::after { box-sizing:border-box; }
.cch-gallery-grid,.cch-legacy-gallery .gallery { display:flex; flex-direction:column; gap:var(--cch-row-gap); }
.cch-legacy-gallery .gallery { min-width:0; padding:0; }
/* Keep enlarged artwork above its neighbours until the return motion finishes. */
.cch-work { position:relative; z-index:0; min-width:0; margin:0; padding:0; break-inside:avoid; transition:z-index 0s linear .35s; }
.cch-work:is(:hover,:focus-within) { z-index:2; transition-delay:0s; }
.cch-work-link {
  --cch-work-frame:.75rem; --cch-work-zoom:1.15;
  display:block; position:relative; isolation:isolate; border-radius:.375rem;
  transform-origin:center bottom; transition:transform .2s ease-out .15s;
}
/* Start enlargement immediately, then reveal the frame.
   Grow the frame independently without changing the artwork or caption layout. */
.cch-work-link::before {
  content:""; position:absolute; inset:0; z-index:-1;
  border:var(--cch-work-frame) solid #fff; border-radius:.625rem; background:#fff; opacity:0; pointer-events:none;
  box-shadow:0 1.25rem 1.25rem -.3rem rgba(14,42,36,0);
  transition:inset .2s ease-out,box-shadow .1s ease-in,opacity 0s linear .2s;
}
.cch-legacy-gallery .gallery-item {
  display:block; width:100%; max-width:100%; height:auto; margin:0; border:0; border-radius:.375rem;
  background:transparent;
}
.cch-work-link:focus-visible { outline:3px solid #244b28; outline-offset:.35rem; }
.cch-work-link:where(:focus-visible) { transition:transform .2s ease-out; }
.cch-work-link:where(:focus-visible)::before {
  inset:calc(-1 * var(--cch-work-frame)); opacity:1;
  box-shadow:0 1.25rem 1.25rem -.3rem rgba(14,42,36,.28);
  transition:inset .2s ease-out .2s,box-shadow .2s ease-out,opacity 0s;
}
@media(min-width:992px) and (hover:hover) and (pointer:fine) {
  .cch-work-link:where(:hover) { transition:transform .2s ease-out; }
  .cch-work-link:where(:hover)::before {
    inset:calc(-1 * var(--cch-work-frame)); opacity:1; pointer-events:auto;
    box-shadow:0 1.25rem 1.25rem -.3rem rgba(14,42,36,.28);
    transition:inset .2s ease-out .2s,box-shadow .2s ease-out,opacity 0s;
  }
}
@media(min-width:992px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  /* Grow upward and lift the frame clear of the badge row. */
  .cch-work-link:is(:hover,:focus-visible) { transform:translateY(calc(-.5 * var(--cch-work-frame))) scale(var(--cch-work-zoom,1)); }
}
@media(prefers-reduced-motion:reduce) {
  .cch-work,.cch-work-link,.cch-work-link::before { transition:none; }
}
.cch-work figcaption { --cch-info-target:2.75rem; position:relative; min-height:var(--cch-info-target); margin:.75rem 0 0; }
/* Reserve the right-hand info target while allowing the service labels to wrap. */
.cch-work figcaption > .cch-service-badges {
  min-height:var(--cch-info-target); padding:.5rem calc(var(--cch-info-target) + .375rem) .5rem 0;
  align-content:flex-start; align-items:flex-start;
}
.cch-service-badges { display:flex; flex-wrap:wrap; gap:.375rem; list-style:none; margin:0; padding:0; }
.cch-service-badges li {
  display:block; width:fit-content; margin:0; padding:.28rem .65rem; border:1px solid rgb(0 0 0 / 7%); border-radius:10rem;
  background:rgb(87 117 63 / 5%); color:#40523d; font-family:var(--wp--preset--font-family--body);
  font-size:.75rem; font-weight:400; line-height:1.4; letter-spacing:.015em;
}
/* Native details keep every title/description in the initial HTML, with or without JS. */
.cch-work-details {
  margin:0; color:#40523d; font-family:var(--wp--preset--font-family--body);
  font-size:.85rem; line-height:1.6;
}
.cch-work-details summary {
  position:absolute; inset-block-start:0; inset-inline-end:0;
  display:grid; place-items:center; width:var(--cch-info-target); height:var(--cch-info-target);
  padding:0; border:0; border-radius:50%; background:transparent; color:inherit;
  cursor:pointer; list-style:none; text-decoration:none;
}
.cch-work-details summary::-webkit-details-marker { display:none; }
.cch-work-details-icon {
  display:grid; place-items:center; width:1.5rem; height:1.5rem; border:1px solid currentColor; border-radius:50%;
  font-size:.75rem; line-height:1; text-decoration:none;
  transition:background-color .2s,color .2s,border-color .2s;
}
.cch-work-details summary:hover .cch-work-details-icon { background:rgb(87 117 63 / 12%); color:#244b28; }
.cch-work-details[open] .cch-work-details-icon { background:#244b28; border-color:#244b28; color:#fff; }
.cch-work-details[open] summary:hover .cch-work-details-icon { background:#315e35; color:#fff; }
.cch-work-details summary:focus-visible { outline:3px solid #244b28; outline-offset:.125rem; }
@media(prefers-reduced-motion:reduce) { .cch-work-details-icon { transition:none; } }
.cch-work-details h3 {
  margin:.3rem 0 .4rem; color:#244b28; font-family:inherit; font-size:.95rem; font-weight:500; line-height:1.45;
}
.cch-work-details p { margin:0 0 .35rem; }
/* Existing artwork treatments are retained independently of gallery gutters. */
.cch-legacy-gallery .bgwhite { background:#fff; }
.cch-legacy-gallery .js-bg { background:#1a1a1a; padding:1rem; }
.cch-legacy-gallery .p-05-bg-white { padding:.5rem; background:#fff; }
.cch-legacy-gallery .p-2-bg-white { padding:2rem; background:#fff; }
.cch-legacy-gallery .padding { padding:2rem; }
.cch-legacy-gallery .emw { background:#fff; padding:1rem; }
/* Preserve the three curated desktop columns, then flow continuously on tablets. */
@media(min-width:576px) and (max-width:991.98px) {
  .cch-gallery-grid { display:block; columns:2; column-gap:var(--cch-column-gap); }
  .cch-legacy-gallery .gallery { display:contents; }
  .cch-work { display:inline-block; width:100%; margin-bottom:var(--cch-row-gap); vertical-align:top; }
}
@media(min-width:992px) {
  .cch-gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--cch-column-gap); align-items:start; }
}

/* Captions sit below the artwork in the viewer, including on small screens. */
.glightbox-container.glightbox-clean .goverlay { background:rgba(5,19,22,.96); }
.glightbox-container.glightbox-clean .gslide-inner-content { width:100%; height:100dvh; padding:3.75rem 3.5rem 1.5rem; }
.glightbox-container.glightbox-clean .ginner-container { display:grid; grid-template-rows:minmax(0,1fr) auto; width:min(64rem,100%); max-width:100%; height:100%; }
/* The media slot reserves room for captions; its empty area must not cast a frame. */
.glightbox-container.glightbox-clean .gslide-media { width:100%; height:100%; min-height:0; box-shadow:none; }
@media(min-width:769px) {
  .glightbox-container.glightbox-clean .gslide-image img { box-shadow:1px 2px 9px 0 rgba(0,0,0,.65); }
}
.glightbox-container.glightbox-clean .gslide-image img { object-fit:contain; min-width:0; max-width:100%; max-height:100%!important; }
.glightbox-container.glightbox-clean .gslide-description,
.glightbox-mobile .glightbox-container.glightbox-clean .gslide-description {
  position:relative; inset:auto; flex:0 0 auto; width:100%; max-width:100%!important;
  max-height:none; margin:0; padding:0; overflow:visible!important; background:transparent;
}
.glightbox-container.glightbox-clean .gdesc-inner { max-width:44rem; margin:0 auto; padding:1.25rem 0 0; }
.glightbox-container.glightbox-clean .gslide-title,.glightbox-mobile .glightbox-container.glightbox-clean .gslide-title {
  margin:0 0 .55rem; color:#fff; font-family:var(--wp--preset--font-family--display);
  font-size:clamp(1.3rem,2.5vw,1.75rem); font-weight:400; line-height:1.25;
}
.glightbox-container.glightbox-clean .gslide-desc,.glightbox-mobile .glightbox-container.glightbox-clean .gslide-desc {
  color:#dbe6df; font-family:var(--wp--preset--font-family--body); font-size:.9rem; line-height:1.6;
}
.glightbox-container.glightbox-clean .gslide-desc p { margin:0 0 .85rem; }
.glightbox-container.glightbox-clean .gslide-desc .cch-service-badges li { color:#c9dbb6; }
.glightbox-container.glightbox-clean .gclose,.glightbox-container.glightbox-clean .gprev,.glightbox-container.glightbox-clean .gnext { width:2.75rem; height:2.75rem; border:1px solid rgba(219,230,223,.4); border-radius:50%; background:rgba(12,33,32,.9); }
.glightbox-container.glightbox-clean .gclose:focus-visible,.glightbox-container.glightbox-clean .gprev:focus-visible,.glightbox-container.glightbox-clean .gnext:focus-visible { outline:3px solid #a3e635; outline-offset:.25rem; }
@media(max-width:767.98px) {
  .glightbox-container.glightbox-clean .gslide-inner-content { padding:3.75rem 1.5rem 1.5rem; }
  .glightbox-container.glightbox-clean .gdesc-inner { padding-top:1rem; }
  .glightbox-container.glightbox-clean .gslide-desc { font-size:.85rem; }
}
@media(max-height:600px) {
  .glightbox-container.glightbox-clean .gslide-inner-content { display:block; overflow-y:auto; max-height:100dvh; }
  .glightbox-container.glightbox-clean .ginner-container { display:block; height:auto; }
  .glightbox-container.glightbox-clean .gslide-media { height:auto; }
  .glightbox-container.glightbox-clean .gslide-image img { max-height:55dvh!important; }
}

/* Let the viewer restore its native full-resolution desktop zoom. */
.glightbox-container.glightbox-clean .zoomed .gslide-image img { max-height:none!important; box-shadow:none; }
