/* ============================================================
   PlantMapper — Garden Types visual image system
   Additive, shared component sheet. The "gt-" prefix keeps
   these styles isolated from the frozen shared CSS.
   Used by all Garden Type hub pages for a consistent,
   responsive, optimised photo layout:
     .gt-gallery   — 4-image inspiration gallery
     .gt-feature   — single in-body feature image
     .gt-finished  — large "finished garden" closing image
   ============================================================ */

/* --- Inspiration gallery: 4-up grid -------------------------- */
.gt-gallery{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-top:6px;
}
.gt-gallery figure{
  margin:0;
  border-radius:var(--radius-lg,18px);
  overflow:hidden;
  box-shadow:var(--shadow-2);
  background:linear-gradient(160deg,var(--green-soft),var(--rose-soft));
}
.gt-gallery img{
  display:block;
  width:100%;
  aspect-ratio:4/3;          /* identical sizing across every tile */
  object-fit:cover;
  transition:transform .55s ease;
}
.gt-gallery figure:hover img{ transform:scale(1.05); }

/* --- Feature image: single, in-body -------------------------- */
.gt-feature{
  margin:36px 0;
  position:relative;
  border-radius:var(--radius-lg,18px);
  overflow:hidden;
  box-shadow:var(--shadow-2);
  background:linear-gradient(160deg,var(--green-soft),var(--rose-soft));
}
.gt-feature img{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  max-height:440px;
  object-fit:cover;
  object-position:center;
}

/* --- Finished garden: large closing banner ------------------- */
.gt-finished{
  margin:8px 0 4px;
  position:relative;
  border-radius:var(--radius-lg,18px);
  overflow:hidden;
  box-shadow:var(--shadow-2);
  background:linear-gradient(160deg,var(--green-soft),var(--rose-soft));
}
.gt-finished img{
  display:block;
  width:100%;
  aspect-ratio:16/9;
  min-height:300px;
  max-height:520px;
  object-fit:cover;
  object-position:center;
}

/* --- Shared caption treatment (feature + finished) ----------- */
.gt-feature figcaption,
.gt-finished figcaption{
  position:absolute;
  left:0; right:0; bottom:0;
  font-size:.74rem;
  letter-spacing:.02em;
  color:#fff;
  background:linear-gradient(to top,rgba(31,42,35,.68),rgba(31,42,35,0));
  padding:30px 16px 10px;
  text-align:right;
}

/* --- Responsive ---------------------------------------------- */
@media (max-width:860px){
  .gt-gallery{ grid-template-columns:repeat(2,1fr); gap:12px; }
  .gt-feature img{ aspect-ratio:3/2; max-height:none; }
  .gt-finished img{ aspect-ratio:4/3; min-height:220px; }
}
@media (max-width:430px){
  .gt-gallery{ gap:9px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce){
  .gt-gallery img{ transition:none; }
  .gt-gallery figure:hover img{ transform:none; }
}
