/* Project photography: a full-width closing image, with copy above it. */
.project-work .project-work-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.project-work-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.project-work-heading h2 { max-width: 19ch; }
.project-work-heading p { margin-top: 0; }
.project-work .project-image-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 50% 55%;
}
@media (max-width: 760px) {
  .project-work .project-work-layout { gap: 24px; }
  .project-work-heading { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project-work-heading h2 { max-width: none; }
  .project-work .project-image-link img {
    aspect-ratio: auto;
    object-fit: contain;
  }
}

/* Instagram photo: keep the house, pool and lawn visible across crops. */
.project-hero .editorial-hero-image { object-position: 50% 30%; }
@media (max-width: 760px) {
  .project-hero .editorial-hero-image { object-position: 72% 35%; }
}

/* Portfolio: paired photographs, without visible titles or descriptions. */
.project-collection .project-grid {
  gap: 24px;
}
.project-collection .project-grid figure {
  margin: 0;
}
.project-collection .project-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}
.project-collection .project-photo-square img {
  aspect-ratio: 1 / 1;
}
@media (max-width: 760px) {
  .project-collection .project-grid { gap: 24px; }
  .project-collection #proyecto-lomas img { aspect-ratio: auto; }
}

/* Larger portrait photographs with balanced side margins. */
.project-collection .section-heading { max-width: none; }
.project-gallery-heading { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.project-collection .section-heading h2 { max-width: 12em; }
.project-slideshow-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.has-slideshow .project-slideshow-shell { width: min(1240px, calc(100% - 48px)); }
.has-slideshow .project-grid {
  position: relative;
  display: flex;
  overflow-x: auto;
  gap: 20px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.has-slideshow .project-grid::-webkit-scrollbar { display: none; }
.has-slideshow .project-grid figure {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}
.has-slideshow .project-grid .project-image-link { overflow: hidden; border-radius: 4px; }
.has-slideshow .project-grid .project-image-link img {
  aspect-ratio: 4 / 5;
  object-position: center;
}
.has-slideshow #proyecto-lomas img { object-position: 50% 56%; }
.has-slideshow #proyecto-casa-galeria img { object-position: 50% 64%; }
.has-slideshow #proyecto-jardin-terron img { object-position: 50% 60%; }
.has-slideshow #proyecto-deck img { object-position: 50% 62%; }
.has-slideshow #proyecto-quincho img { object-position: 50% 62%; }
.has-slideshow #proyecto-cantero-piedras img { object-position: 50% 62%; }
.has-slideshow #proyecto-cantero-ventanal img { object-position: 50% 60%; }
.has-slideshow .project-image-link:hover { outline-offset: -2px; }
.has-slideshow .project-image-link:focus-visible {
  z-index: 1;
  outline: 3px solid var(--cream, #f6f6e9);
  outline-offset: -6px;
  box-shadow: inset 0 0 0 3px var(--forest, #2e5b47);
}
@media (min-width: 761px) and (max-width: 1000px) {
  .has-slideshow .project-grid figure { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 760px) {
  .project-gallery-heading { width: min(480px, calc(100% - 48px)); }
  .has-slideshow .project-slideshow-shell { width: min(480px, calc(100% - 48px)); }
  .has-slideshow .project-grid { gap: 12px; }
  .has-slideshow .project-grid figure { flex-basis: 100%; }
  .has-slideshow .project-grid .project-image-link img { aspect-ratio: 4 / 5; object-position: center; }
}

/* Keep mouse drags on the carousel instead of dragging the image itself. */
@media (hover: hover) and (pointer: fine) {
  .has-slideshow .project-grid,
  .has-slideshow .project-grid .project-image-link { cursor: grab; }
  .has-slideshow .project-grid img { user-select: none; -webkit-user-drag: none; }
}
.has-slideshow .project-grid.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}
.has-slideshow .project-grid.is-dragging,
.has-slideshow .project-grid.is-dragging .project-image-link { cursor: grabbing; }
