.project-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  padding:24px 0 38px;
}
.project-actions > :is(a,button) {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:8px 16px;
  border:1px solid #a81524;
  border-radius:6px;
  color:#a81524;
  background:#fff;
  font:inherit;
  cursor:pointer;
  transition:background-color .18s,color .18s;
}
.project-actions > [hidden] { display:none; }
.project-actions [data-project-consult] { background:#a81524; color:#fff; }
.project-actions > :is(a,button):hover { background:#891021; color:#fff; }
.project-media [role="button"] { cursor:zoom-in; }
.project-media [role="button"]:focus-visible,
.project-actions :focus-visible, .project-gallery button:focus-visible {
  outline:2px solid #d03949;
  outline-offset:3px;
}
.project-gallery {
  box-sizing:border-box;
  width:min(960px,calc(100% - 24px));
  max-height:calc(100% - 24px);
  margin:auto;
  padding:54px 14px 12px;
  border:1px solid #464042;
  border-radius:8px;
  background:#191617;
  color:#fff;
  overscroll-behavior:contain;
}
.project-gallery::backdrop { background:rgba(15,12,13,.88); }
.project-gallery figure { margin:0; }
.gallery-image { display:block; width:100%; height:clamp(130px,58dvh,640px); object-fit:contain; touch-action:pan-y; }
.project-gallery figcaption { min-height:24px; padding:8px 0; text-align:center; overflow-wrap:anywhere; }
.gallery-controls { display:flex; justify-content:center; gap:10px; }
.gallery-controls[hidden] { display:none; }
.project-gallery button {
  width:44px;
  height:44px;
  border:1px solid #6f6668;
  border-radius:6px;
  background:#332c2e;
  color:#fff;
  font:26px/1 sans-serif;
  cursor:pointer;
}
.project-gallery button:hover { background:#a81524; }
.project-gallery .gallery-close { position:absolute; top:6px; right:10px; }
html:has(.project-gallery[open]) { overflow:hidden; }
#footer-xm { scroll-margin-top:110px; }
@media (prefers-reduced-motion:reduce) { .project-actions > :is(a,button) { transition:none; } }
