/* Case study "Challenge / Insight / Approach / Outcome" cards: equal height + Read more.
   Long descriptions are clipped to a few lines (see assets/js/case-study-cards.js). */

/* all cards share the height of the tallest (clipped) card — set by the script as --cs-card-h.
   Opening one card only grows that card (and its neighbour in the same row). */
.cs-page .work-info-card {
  min-height: var(--cs-card-h, 0);
}
.cs-page .work-info-card > div:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cs-page .work-info-card .cs-desc.is-clamped {
  position: relative;
  overflow: hidden;
  transition: max-height .35s ease;
}
/* soft fade over the last clipped line */
.cs-page .work-info-card .cs-desc.is-clamped:not(.is-open)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.2em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
}
.cs-page .work-info-card .cs-desc.is-open {
  max-height: none !important;
}

.cs-page .work-info-card .cs-readmore {
  align-self: flex-start;
  margin-top: auto;
  padding: 14px 0 0;
  border: 0;
  background: none;
  color: #1a3349;
  font: 600 13px/1.2 "Bahnschrift", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.cs-page .work-info-card .cs-readmore::after {
  content: " ↓";
}
.cs-page .work-info-card .cs-desc.is-open + .cs-readmore::after {
  content: " ↑";
}
.cs-page .work-info-card .cs-readmore:hover {
  text-decoration: underline;
}
.cs-page .work-info-card .cs-readmore:focus-visible {
  outline: 2px solid #1a3349;
  outline-offset: 3px;
}
