/* Queen Anne’s Gate: an alternating second row and an optional photo gallery. */
.queen-annes-repair {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-top: clamp(3rem, 6vw, 6rem);
}
.project-page .queen-annes-repair .repair-story-copy,
.queen-annes-repair .project-detail { margin: 0; }
.queen-annes-repair .project-detail img { max-height: none; }
.project-page .queen-annes-closing { margin-left: 0; }
.project-gallery { margin-top: clamp(2.5rem, 5vw, 5rem); }
.project-gallery > summary {
  display: flex; align-items: center; gap: 1rem; min-height: 64px;
  padding: .8rem 0; border-top: 1px solid #ad5c1e55; border-bottom: 1px solid #ad5c1e55;
  cursor: pointer; list-style: none; color: #ad5c1e;
  font-family: var(--body); font-size: 20px; font-weight: 400;
}
.project-gallery > summary::-webkit-details-marker { display: none; }
.gallery-total { margin-left: auto; font-size: .85rem; color: #645a4b; }
.gallery-toggle { font-size: 1.8rem; line-height: 1; }
.project-gallery[open] .gallery-toggle { transform: rotate(45deg); }
.project-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding-top: 1.5rem; }
.gallery-thumbnail { padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gallery-thumbnail img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; }
.gallery-thumbnail:focus-visible, .project-gallery summary:focus-visible,
.project-lightbox button:focus-visible { outline: 2px solid #ad5c1e; outline-offset: 5px; }
.project-lightbox {
  width: min(70rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem);
  margin: auto; padding: clamp(.8rem, 2vw, 1.5rem); border: 0;
  background: #f4eee2; color: #362a24; font-family: var(--body);
}
.project-lightbox::backdrop { background: rgb(30 22 17 / .82); }
.lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: .5rem; }
.project-lightbox button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.lightbox-close { display: flex; align-items: center; gap: .6rem; }
.lightbox-close span { font-size: 1.8rem; }
.lightbox-photo { display: block; width: 100%; height: min(68dvh, 52rem); object-fit: contain; }
.lightbox-controls { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.lightbox-controls button { font-size: 1.6rem; }
.lightbox-counter { font-size: .9rem; }
body.gallery-is-open { overflow: hidden; }
@media (max-width: 900px) {
  .queen-annes-repair { grid-template-columns: minmax(0, 1fr); }
  .project-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .gallery-total { font-size: .72rem; }
  .project-gallery > summary { gap: .5rem; font-size: 18px; }
  .project-lightbox { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
}

/* Guidance above the expanded project gallery thumbnails. */
.gallery-hint { margin:1.1rem 0 0; font:400 15px/1.5 var(--body); color:#645a4b; }
.gallery-hint + .project-gallery-grid { padding-top:.85rem; }
