/* Portfolio pages, built by tools/build_work.py.
   Theme layouts used: work-2.html (index grid, same cards as the homepage) and work-details.html (project pages).
   Only sizing fixes live here; every component is the theme's own. */

/* Index: the old featured images come in mixed sizes (590x244 up to 2073x1200).
   Every card gets the same 3:2 box so rows line up. Most images are 3:2 already and fill it. */
.hm-work-index .work-box .thumb .image img {
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
/* Logos and wide device line-ups are shown whole inside the box; a crop would cut into them. */
.hm-work-index .work-box .thumb .image img.hm-fit {
  object-fit: contain;
}
/* The featured card spans both columns (the theme's "span-2", as on the homepage) and keeps its own
   wide 1620x870 shape. */
.hm-work-index .work-box.span-2 .thumb .image img {
  aspect-ratio: auto;
}
/* Index: the label row above each group sits close to its own grid. */
.hm-work-index .work-header-meta {
  margin-bottom: 30px;
}
.hm-work-index .work-header-meta h2 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Project pages: titles are long ("United Broadcast & Media Solutions - Magento CE"),
   so the theme's 140px page title steps down to stay on two or three lines. */
.hm-work-detail .page-title-wrapper .page-title {
  font-size: clamp(30px, 4.6vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
/* Project image: centred in the container, never wider than the file itself (some logos are under 1000px).
   Corners match the theme's gallery images. */
.hm-work-image {
  text-align: center;
}
.hm-work-image img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
}
@media (max-width: 767px) {
  .hm-work-image img {
    border-radius: 5px;
  }
}
/* Project pages: links inside the fact list, the text blocks and the feature list look like links
   (the theme gives every link the colour of its text and no underline). */
.work-details-area .meta-item .text a,
.work-details-area .section-info .text a,
.work-details-area .feature-list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Case studies (Symmetric Strength, FitnessVolt): the theme's text block can hold two paragraphs. */
.hm-work-case .section-info .text + .text {
  margin-top: 20px;
}
/* Case study: closing line under the last image, with two of the theme's underlined links side by side. */
.hm-work-case .hm-work-close {
  padding-top: 68px;
}
.hm-work-case .hm-work-close a + a {
  margin-left: 30px;
}
