/* Each complete feature card fits below the site header at normal zoom.
   Every feature illustration is displayed completely, without cropping. */
body[data-sb-page="features"] .sb-feature-card {
  --feature-card-height: min(72rem, calc(100svh - 130px));
  min-width: 0;
  min-height: 0 !important;
  height: var(--feature-card-height);
  padding: 1.6rem !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 29rem;
  gap: 1.4rem;
  scroll-margin-top: 110px;
  background: linear-gradient(150deg, #4a238e 0%, #351968 48%, #241143 100%) !important;
  border-color: rgba(201, 171, 255, .28) !important;
}
/* All illustrations share one canvas, so the image itself fills its frame.
   Full controls are composed into the asset; the browser never crops it. */
body[data-sb-page="features"] .sb-feature-capture {
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  container-type: size;
}
body[data-sb-page="features"] .sb-feature-capture .sb-feature-media {
  display: block;
  width: min(100cqw, calc(100cqh * 1.25));
  max-width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: contain;
  border-radius: 1.4rem;
  margin: 0;
}
body[data-sb-page="features"] .sb-feature-capture:focus-visible {
  outline: 3px solid #ffda62;
  outline-offset: 4px;
}
body[data-sb-page="features"] .sb-feature-copy > .sb-feature-capture-note {
  margin: 0 0 1rem !important;
  font-size: 1.1rem;
  line-height: 1.3;
}
body[data-sb-page="features"] .sb-feature-card h3 {
  margin: 0 0 1rem !important;
  font-size: clamp(2rem, 1.8vw, 2.7rem);
  line-height: 1.15;
}
body[data-sb-page="features"] .sb-feature-card p {
  margin: 0 0 1.4rem !important;
  font-size: 1.6rem;
  line-height: 1.45;
}
body[data-sb-page="features"] .sb-feature-card .sb-feature-meta {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.4;
}
@media (max-width: 767px) {
  body[data-sb-page="features"] .sb-feature-card {
    --feature-card-height: min(72rem, calc(100svh - 110px));
    padding: 1.4rem !important;
    grid-template-rows: minmax(0, 1fr) 32rem;
  }
  body[data-sb-page="features"] .sb-feature-card p { font-size: 1.5rem; line-height: 1.4; }
  body[data-sb-page="features"] .sb-feature-card h3 { font-size: 2.1rem; }
}
/* A wide single column keeps the full copy readable on short landscape screens. */
@media (max-height: 480px) {
  body[data-sb-page="features"] .sb-feature-grid { grid-template-columns: minmax(0, 1fr) !important; }
  body[data-sb-page="features"] .sb-feature-card { --feature-card-height: calc(100svh - 110px); grid-column: auto; padding: 1rem !important; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 1.2rem; }
  body[data-sb-page="features"] .sb-feature-card h3 { font-size: 1.8rem; margin-bottom: .5rem !important; }
  body[data-sb-page="features"] .sb-feature-card p { font-size: 1.4rem; line-height: 1.3; margin-bottom: .6rem !important; }
  body[data-sb-page="features"] .sb-feature-copy > .sb-feature-capture-note { margin-bottom: .5rem !important; }
  body[data-sb-page="features"] .sb-feature-capture { margin: 0; padding: 0; }
}

/* Give each label the same bottom anchor, independent of description length. */
body[data-sb-page="features"] .sb-feature-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
body[data-sb-page="features"] .sb-feature-card .sb-feature-meta {
  margin-top: auto;
}
body[data-sb-page="features"] .sb-feature-copy > .sb-feature-capture-note { display: block; }

/* Center a single remaining card in the desktop three-card layout. */
@media (min-width: 1101px) and (min-height: 481px) {
  body[data-sb-page="features"] .sb-feature-card:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
  }
}

/* In a single column, let the copy set its height instead of pushing the
   yellow label to the bottom of a fixed-height desktop text area. */
@media (max-width: 767px) {
 body[data-sb-page="features"] .sb-feature-card .sb-feature-meta { margin-top: 0; }
 body[data-sb-page="features"] .sb-feature-card p { margin-bottom: 12px !important; }
}
@media (max-width: 767px) and (min-height: 481px) {
 body[data-sb-page="features"] .sb-feature-card { height: auto; grid-template-rows: auto auto; gap: 16px; }
 body[data-sb-page="features"] .sb-feature-capture { height: auto; aspect-ratio: 5 / 4; }
 body[data-sb-page="features"] .sb-feature-capture .sb-feature-media { width: 100%; }
}
