/* Cards grid and the four looks of the single card (front end and editor) */
.sg-cards {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 32px;

  &.has-cols-2 { --cols: 2; }
  &.has-cols-3 { --cols: 3; }
  &.has-cols-4 { --cols: 4; gap: 24px; }
  &.has-cols-5 { --cols: 5; gap: 24px; }
}

@media (max-width: 1100px) {
  .sg-cards.has-cols-5 { --cols: 3; }
}
@media (max-width: 1023px) {
  .sg-cards.has-cols-4 { --cols: 2; }
}
@media (max-width: 860px) {
  .sg-cards:is(.has-cols-3, .has-cols-5) { --cols: 2; }
}
@media (max-width: 560px) {
  .sg-cards { --cols: 1 !important; }
}

/* ---------- the card ---------- */
.sg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--wp--custom--body);
  transition: transform 220ms var(--wp--custom--ease-out), box-shadow 220ms ease;
}

/* image: shown whole (product images, cut-outs), no background; white image backgrounds blend into grey cards.
   The look "image" crops a photo instead (see below). */
.sg-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;

  & img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
    transition: transform 600ms var(--wp--custom--ease-out);
  }

  & .sg-media-empty { position: absolute; inset: 0; min-height: 0; }
}

.is-variant-frame .sg-card__media,
.is-variant-tint .sg-card__media { margin: 16px 16px 0; }

/* option "Images" of the block: whole or filling, for every card of the block */
.sg-cards.is-fit-contain .sg-card__media img { object-fit: contain; }
.sg-cards.is-fit-cover .sg-card__media img { object-fit: cover; mix-blend-mode: normal; }

.sg-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;

  & > * { margin: 0; }
  & h3 { font-size: 17px; line-height: 1.35; transition: color 200ms ease; }
  & p { font-size: 14px; }
}

/* editor: the inner blocks sit in one more wrapper */
.sg-card__body-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;

  & > * { margin: 0 !important; }
}

.sg-card__kicker {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--wp--preset--color--teal);
  font-variant-numeric: tabular-nums;
}

.sg-card__link {
  margin-top: auto;
  padding-top: 6px;
  color: var(--wp--preset--color--teal);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;

  /* the whole card is clickable; links inside the text stay clickable above it */
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
  }

  & .arr {
    display: inline-block;
    transition: transform 220ms var(--wp--custom--ease-out);
  }
}

.sg-card__link.is-editor::after { content: none; }

.sg-card__body a:not(.sg-card__link) {
  position: relative;
  z-index: 2;
}

.sg-card__link:focus-visible {
  outline: none;

  &::after { outline: 2px solid var(--wp--preset--color--teal); outline-offset: 3px; }
}

@media (hover: hover) and (pointer: fine) {
  .sg-card.has-link:hover {
    & h3 { color: var(--wp--preset--color--teal); }
    & .sg-card__link .arr { transform: translateX(4px); }
    & .sg-card__media img { transform: scale(1.03); }
  }

  /* On dark ground (looks "image" and "numbered", cards without their own background in a dark section) a teal
     title would be unreadable: it stays white and is underlined instead. Cards with a light tile keep teal. */
  :is(.is-variant-image, .is-variant-numbered) .sg-card.has-link:hover h3,
  .sg-section.is-dark .sg-cards:not(.is-variant-frame, .is-variant-tint, .is-variant-logo, .is-variant-panels) .sg-card.has-link:hover h3 {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
  }
}

/* look "frame" */
.is-variant-frame .sg-card {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--custom--line);

  & .sg-card__body { padding: 24px 24px 28px; }
}

@media (hover: hover) and (pointer: fine) {
  .is-variant-frame .sg-card.has-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px -20px rgba(14, 110, 100, .6);
  }
}

/* look "tint" */
.is-variant-tint .sg-card {
  background: var(--wp--preset--color--grey);

  & .sg-card__body { padding: 24px 24px 28px; }
}

.sg-section.has-bg-grey .is-variant-tint .sg-card { background: var(--wp--preset--color--white); }

/* look "line": separators between the cards, key figure on top (Business Lines of the home page) */
.sg-cards.is-variant-line {
  gap: 0;
  border-top: 1px solid var(--wp--custom--line);
}

.is-variant-line .sg-card {
  padding: 28px 24px 28px 0;
  margin-right: 24px;
  border-right: 1px solid var(--wp--custom--line);

  &:last-child { border-right: 0; margin-right: 0; }
  & .sg-card__media { margin-bottom: 16px; }
}

/* look "logo": brand logo fitted into a white tile, caption below (Our brands) */
.sg-cards.is-variant-logo { gap: 22px; }

.is-variant-logo .sg-card {
  text-align: center;

  & .sg-card__media {
    aspect-ratio: auto;
    height: 110px;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--custom--line);

    & img {
      inset: 0;
      margin: auto;
      width: auto;
      height: auto;
      max-width: 68%;
      max-height: 42px;
      object-fit: contain;
    }
  }

  & .sg-card__body {
    padding-top: 10px;
    align-items: center;
  }

  & p { font-size: 12.5px; }
}

@media (hover: hover) and (pointer: fine) {
  .is-variant-logo .sg-card.has-link:hover .sg-card__media {
    border-color: var(--wp--preset--color--teal);

    & img { transform: none; }
  }
}

/* look "icon": small image / icon on top, everything centred (support center: advice, quality, spare parts …) */
.is-variant-icon .sg-card {
  text-align: center;
  align-items: center;

  & .sg-card__media {
    width: 56px;
    height: 56px;
    aspect-ratio: auto;
    margin-bottom: 14px;
  }

  & :is(.sg-card__body, .sg-card__body-inner) { align-items: center; } /* -inner: editor wrapper (margins forced to 0 there) */
  & h3 { font-size: 17px; font-weight: 400; }
  & p { font-size: 12.5px; color: var(--wp--custom--muted); }
}

/* Icon block inside a card (blocks/icon): space below, centred in the look "icon" */
.sg-card .sg-icon { margin-bottom: 14px; }
.is-variant-icon .sg-card .sg-icon { margin-inline: auto; }

/* look "numbered": teal tiles with 01, 02 … (the numbers count across the grid) */
.sg-cards.is-variant-numbered { counter-reset: sg-tile; }

.is-variant-numbered .sg-card {
  counter-increment: sg-tile;
  background: var(--wp--preset--color--teal);
  color: rgba(255, 255, 255, .85); /* 4.5:1 on teal */
  padding: 22px 24px 28px;
  min-height: 170px;

  &::before {
    content: counter(sg-tile, decimal-leading-zero);
    font-size: 14px;
    line-height: 1;
    color: #c4e6d6; /* lighter than the accent: 4.55:1 on teal */
    margin-bottom: 8px;
  }

  & h3 { color: #fff; font-size: 18px; font-weight: 400; }
  & p { font-size: 13px; }
  & .sg-card__media { display: none; }
  & .sg-card__link { color: #fff; }
}

@media (hover: hover) and (pointer: fine) {
  .is-variant-numbered .sg-card.has-link:hover { background: var(--wp--preset--color--teal-dark); }
}

/* look "panels": coloured halves across the full page width (Investors / Careers) */
.is-layout-constrained > .sg-cards.is-variant-panels,
.is-layout-flow > .sg-cards.is-variant-panels {
  margin-block: 0;
}

.sg-cards.is-variant-panels { gap: 0; }

.is-variant-panels .sg-card {
  padding: clamp(48px, 6vw, 64px) clamp(24px, 5vw, 72px);
  background: var(--wp--preset--color--mint);
  transition: background-color 240ms ease;

  &:nth-child(2n) { background: var(--wp--preset--color--cream); }

  & .sg-card__body { gap: 14px; }
  & :is(h2, h3) { max-width: 18ch; }
  & p { max-width: 48ch; font-size: inherit; }
}

@media (hover: hover) and (pointer: fine) {
  .is-variant-panels .sg-card.has-link:hover { background: #e3f1ec; }
  .is-variant-panels .sg-card.has-link:nth-child(2n):hover { background: #f9eade; }
}

/* look "image": photo on top, below it a teal text panel, shifted in from the left and pulled up so it overlaps the
   bottom of the photo slightly – white text and links stay readable (no text on the photo itself) */
.is-variant-image .sg-card {
  & .sg-card__media {
    margin: 0;
    aspect-ratio: 4 / 3;

    & img { object-fit: cover; mix-blend-mode: normal; }
  }

  & .sg-card__body {
    position: relative;
    margin: -12% 0 0 24px; /* overlap ~10 % of the photo, offset to the right */
    padding: 24px 26px 26px;
    background: var(--wp--preset--color--teal);
    color: #fff;
    hyphens: manual; /* links and names wrap at spaces */

    & :is(h3, h4, p, strong, .sg-card__link, .sg-card__kicker) { color: #fff; }
    & p { color: rgba(255, 255, 255, .9); }
    & a:not(.wp-element-button, .sg-card__link) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  }
}

/* =====================================================================
   Looks of the group pages (values from the group template). Content of a card: inner blocks; a paragraph in front
   of the heading is a small teal label; the key figure (card setting) is the large number.
   ===================================================================== */

/* look "photo": photo 190 px high on top, small uppercase teal title (What we do) */
.sg-cards.is-variant-photo { gap: 24px; }
.is-variant-photo .sg-card__body { gap: 10px; }
.is-variant-photo .sg-card__media {
  aspect-ratio: auto;
  min-height: 190px;
  margin-bottom: 10px;
  background: var(--wp--preset--color--mint);

  & img { object-fit: cover; mix-blend-mode: normal; }
}
.is-variant-photo .sg-card h3 { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--teal); }

/* look "feature": icon in a teal circle left of title and text */
.sg-cards.is-variant-feature { gap: 44px 48px; }
.sg-cards.is-variant-feature.has-cols-2 { gap: 48px 64px; }
.is-variant-feature .sg-card__body {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 6px 20px;
  align-items: start;

  & > * { grid-column: 2; }
  & > .sg-icon { grid-column: 1; grid-row: 1 / 4; margin: 0; }
  & h3 { font-size: 15px; color: var(--wp--preset--color--teal); }
}
.is-variant-feature .sg-icon,
.is-variant-pillars .sg-icon { transition: transform 260ms var(--wp--custom--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .is-variant-feature .sg-card:hover .sg-icon { transform: scale(1.06); }
}

/* look "pillars": icon above, centred, two per row */
.sg-cards.is-variant-pillars:not(.has-cols-3) { --cols: 2 !important; }
.sg-cards.is-variant-pillars { gap: 36px 40px; }
.is-variant-pillars .sg-card__body {
  align-items: center;
  text-align: center;
  gap: 8px;

  & > .sg-icon { margin: 0; }
  & h3 { font-size: 13px; letter-spacing: .07em; color: var(--wp--preset--color--ink); }
  & p { font-size: 13px; max-width: 30ch; }
}

/* looks "kit" and "cover": white link tiles (downloads, profiles) */
.sg-cards:is(.is-variant-kit, .is-variant-cover) { gap: 20px; }
:is(.is-variant-kit, .is-variant-cover) .sg-card {
  background: var(--wp--preset--color--white);
  padding: 24px;

  & .sg-card__body { gap: 6px; }
  & h3 { font-size: 15px; color: var(--wp--preset--color--ink); }
  & p { font-size: 13px; }
  & .sg-card__link { font-size: 11px; letter-spacing: .06em; margin-top: 6px; padding-top: 0; }
}
.is-variant-cover .sg-card__media {
  width: 96px;
  aspect-ratio: 707 / 1000;
  margin-bottom: 14px;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .45);
  transition: transform 220ms var(--wp--custom--ease-out);

  & img { object-fit: cover; mix-blend-mode: normal; }
}
.sg-section.has-bg-white .is-variant-kit .sg-card { background: var(--wp--preset--color--grey); }
/* covers on white: no box, the cover itself carries the card (reports and financing) */
.sg-section.has-bg-white .is-variant-cover .sg-card { padding: 0; background: none; }
@media (hover: hover) and (pointer: fine) {
  :is(.is-variant-kit, .is-variant-cover, .is-variant-contact) .sg-card.has-link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(14, 110, 100, .5); }
  .is-variant-cover .sg-card.has-link:hover .sg-card__media { transform: translateY(-3px) rotate(-1deg); }
  .is-variant-cover .sg-card.has-link:hover .sg-card__media img { transform: none; }
}

/* small teal label: a paragraph in front of the heading (info, ibox, rows, kit) */
.sg-cards:is(.is-variant-info, .is-variant-ibox, .is-variant-rows, .is-variant-kit, .is-variant-certs, .is-variant-badges) .sg-card__body > p:has(+ :is(h2, h3, h4)) {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--wp--preset--color--teal);
}

/* look "badges": mint boxes, optional badge image (96 px) on top, small label, title, short text (ratings) */
.sg-cards.is-variant-badges { gap: 20px; }
.is-variant-badges .sg-card {
  background: var(--wp--preset--color--mint);
  padding: 26px 22px;

  & .sg-card__media {
    width: 96px;
    height: 96px;
    aspect-ratio: auto;
    margin-bottom: 6px;

    & img { object-fit: contain; mix-blend-mode: normal; }
  }
  & .sg-card__body { gap: 6px; }
  & .sg-card__body > p:has(+ :is(h2, h3, h4)) { font-size: 11px; }
  & h3 { font-size: 15px; color: var(--wp--preset--color--ink); }
  & p { font-size: 13px; }
}

/* look "info": mint boxes, label, large title, text */
.sg-cards.is-variant-info { gap: 24px; }
.sg-cards.is-variant-info.has-cols-2 { gap: 20px; }
.is-variant-info .sg-card {
  background: var(--wp--preset--color--mint);
  padding: 28px 28px 32px;

  & .sg-card__body { gap: 8px; }
  & h3 { font-size: 22px; line-height: 1.2; color: var(--wp--preset--color--ink); }
  & p:last-child { font-size: 15px; line-height: 1.55; color: var(--wp--preset--color--ink); }
}

/* look "lcols": columns with dividing lines, small uppercase teal title */
.sg-cards.is-variant-lcols { gap: 24px 0; }
.is-variant-lcols .sg-card {
  padding: 2px 20px;
  border-left: 1px solid var(--wp--custom--line);

  &:first-child { border-left: 0; padding-left: 0; }
  & .sg-card__body { gap: 6px; }
  & h3 { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--teal); }
  & p { font-size: 14px; }
}
/* on a dark band (industrial excellence): white title, pale text, pale lines */
.sg-section.is-dark .is-variant-lcols .sg-card {
  border-left-color: rgba(255, 255, 255, .25);
  color: #dcefea;

  & h3 { color: #fff; }
}

/* look "certs": framed boxes, large teal value (key figure), label, text */
.sg-cards.is-variant-certs { gap: 20px; }
.is-variant-certs .sg-card {
  padding: 24px 22px;
  border: 1px solid var(--wp--custom--line);
  border-radius: 8px;
  background: var(--wp--preset--color--white);

  & .sg-card__body { gap: 6px; }
  & .sg-card__kicker { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1; }
  & h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--teal); }
  & p { font-size: 13.5px; }
}

/* look "contact": white boxes, 2 per row, an odd last one across the full width */
.sg-cards.is-variant-contact { --cols: 2 !important; gap: 20px; }
.is-variant-contact .sg-card {
  background: var(--wp--preset--color--white);
  padding: 30px;

  &:last-child:nth-child(odd) { grid-column: 1 / -1; }
  & .sg-card__body { gap: 8px; }
  & h3 { font-size: 17px; color: var(--wp--preset--color--ink); }
}
.sg-section.has-bg-white .is-variant-contact .sg-card { background: var(--wp--preset--color--grey); }

/* look "ibox": white boxes with pale number, label, title, text and a footer line */
.sg-cards.is-variant-ibox { gap: 24px; }
.is-variant-ibox .sg-card {
  background: var(--wp--preset--color--white);
  padding: 30px;

  & .sg-card__kicker { font-size: 30px; color: var(--wp--preset--color--teal-pale, #a8d2c9); }
  & p.is-style-small:last-child,
  & .sg-card__link {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--wp--custom--line);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--wp--preset--color--teal);
  }
}

/* looks "steps" and "chevron": large pale numbers 01, 02 … */
.sg-cards:is(.is-variant-steps, .is-variant-chevron) { gap: 28px; counter-reset: sg-step; }
:is(.is-variant-steps, .is-variant-chevron) .sg-card {
  counter-increment: sg-step;

  &::before {
    content: counter(sg-step, decimal-leading-zero);
    font-size: 76px;
    font-weight: 700;
    line-height: .9;
    letter-spacing: -.03em;
    color: var(--wp--custom--teal-wash);
    margin-bottom: 6px;
  }

  & .sg-card__body { gap: 6px; }
  & h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--teal); }
  & p { font-size: 14px; }
  & strong { color: var(--wp--preset--color--ink); font-size: 13px; }
}
.is-variant-chevron .sg-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 30px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--wp--preset--color--teal);
  border-top: 2px solid var(--wp--preset--color--teal);
  transform: rotate(45deg);
}

/* look "rows": one row per card, large pale number (key figure or counted) on the left, lines between */
.sg-cards.is-variant-rows { --cols: 1 !important; gap: 0; counter-reset: sg-row; }
.is-variant-rows .sg-card {
  counter-increment: sg-row;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: start;
  padding-block: 30px;
  border-top: 1px solid var(--wp--custom--line);

  &:last-child { border-bottom: 1px solid var(--wp--custom--line); }
  &:not(:has(.sg-card__kicker))::before {
    content: counter(sg-row, decimal-leading-zero);
    font-size: 56px;
    font-weight: 700;
    line-height: .9;
    letter-spacing: -.02em;
    color: var(--wp--preset--color--teal-pale, #a8d2c9);
  }
  & .sg-card__media { grid-column: 1; grid-row: 1; aspect-ratio: 4 / 3; }
  & .sg-card__media img { object-fit: cover; mix-blend-mode: normal; }
  & .sg-card__body { grid-column: 2; }
  & .sg-card__kicker { position: absolute; left: 0; top: 30px; width: 150px; font-size: 56px; line-height: .9; color: var(--wp--preset--color--teal-pale, #a8d2c9); }
}

/* look "years": one row per card, year (key figure) teal italic 30 px in a 100 px column (history "the roots") */
.sg-cards.is-variant-years { --cols: 1 !important; gap: 0; }
.is-variant-years .sg-card {
  padding: 30px 0 30px 128px;
  border-top: 1px solid var(--wp--custom--line);

  &:last-child { border-bottom: 1px solid var(--wp--custom--line); }
  & .sg-card__body { gap: 4px; }
  & .sg-card__kicker { position: absolute; left: 0; top: 30px; width: 100px; font-size: 30px; font-style: italic; font-weight: 700; line-height: 1.1; color: var(--wp--preset--color--teal); }
}

/* look "stats": figures one below the other, large value, small teal caps title, text (quality management) */
.sg-cards.is-variant-stats { --cols: 1 !important; gap: 0; }
.is-variant-stats .sg-card {
  padding-block: 18px;
  border-bottom: 1px solid var(--wp--custom--line);

  &:first-child { padding-top: 0; }
  & .sg-card__body { gap: 4px; }
  & .sg-card__kicker { font-size: clamp(34px, 4vw, 48px); font-weight: 700; line-height: 1; color: var(--wp--preset--color--teal); }
  & h3 { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--wp--preset--color--teal); }
  & p { font-size: 13.5px; }
}

/* a single box or cover next to a text (innovation "Materials", public CSR report): full width of its column */
.sg-cards:is(.is-variant-ibox, .is-variant-cover):has(> .sg-card:only-child) { --cols: 1 !important; }
/* key figure line of an ibox: "<strong>Up to 100%</strong> text" large teal value */
.is-variant-ibox .sg-card p.is-style-small:last-child:has(strong) {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--wp--custom--body);

  & strong { font-size: 32px; line-height: 1.1; color: var(--wp--preset--color--teal); white-space: nowrap; }
}
/* pillars with three columns (Business Units) stay three, also on phones */
.sg-cards.is-variant-pillars.has-cols-3 { --cols: 3 !important; gap: 24px; }

/* columns of the group looks (the general rules above use 1023/860/560 for the product cards) */
@media (max-width: 900px) {
  .sg-cards:is(.is-variant-photo, .is-variant-kit, .is-variant-cover, .is-variant-steps, .is-variant-chevron, .is-variant-certs, .is-variant-info) { --cols: 2 !important; }
  .sg-cards:is(.is-variant-feature, .is-variant-lcols, .is-variant-ibox) { --cols: 1 !important; gap: 32px; }
  .is-variant-lcols .sg-card { border-left: 0; padding-left: 0; }
  .sg-cards.is-variant-kit.has-cols-3 { --cols: 1 !important; }
  .is-variant-chevron .sg-card::after { display: none; }
  .is-variant-rows .sg-card { grid-template-columns: 1fr; gap: 8px; }
  .is-variant-rows .sg-card .sg-card__body { grid-column: 1; }
  .is-variant-rows .sg-card .sg-card__kicker { position: static; width: auto; }
  .sg-cards.is-variant-contact { --cols: 1 !important; }
}

@media (max-width: 560px) {
  .sg-cards.is-variant-info { --cols: 1 !important; }
}

@media (max-width: 480px) {
  .sg-cards:is(.is-variant-photo, .is-variant-kit, .is-variant-cover, .is-variant-steps, .is-variant-chevron, .is-variant-certs) { --cols: 1 !important; }
  .sg-cards.is-variant-pillars:not(.has-cols-3) { --cols: 1 !important; } /* three pillars stay in one row */
}

/* "line" (Product Line rows) and "panels" (two halves): breakpoints of the group pages */
.is-variant-line .sg-card h3 { font-size: 15.5px; }
.is-variant-line .sg-card p { font-size: 13.5px; }
@media (max-width: 1023px) {
  .sg-cards.is-variant-line { --cols: 2 !important; }
  .is-variant-line .sg-card { border-right: 0; margin-right: 0; padding-right: 16px; border-bottom: 1px solid var(--wp--custom--line); }
  .sg-cards.is-variant-panels { --cols: 1 !important; }
}
@media (max-width: 640px) {
  .sg-cards.is-variant-line { --cols: 1 !important; }
}

/* look "caprow": one row per card, photo tile with colour shading and the key figure as text on it (industrial
   capabilities: Bins, Stationary Containers, Compacting), text right */
.sg-cards.is-variant-caprow { --cols: 1 !important; gap: 0; }
.is-variant-caprow .sg-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  padding-block: 26px;
  border-top: 1px solid var(--wp--custom--line);

  & .sg-card__media {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: auto;
    height: 150px;
    margin: 0;
    background: linear-gradient(140deg, #7fa79d, #4f7d72);

    & img { object-fit: cover; mix-blend-mode: normal; transition: transform 900ms var(--wp--custom--ease-out); }
    &::after { content: ""; position: absolute; inset: 0; background: linear-gradient(140deg, rgba(127, 167, 157, .84), rgba(79, 125, 114, .9)); transition: opacity 500ms ease; }
  }

  &:nth-child(3n + 2) .sg-card__media::after { background: linear-gradient(140deg, rgba(156, 192, 107, .72), rgba(111, 154, 64, .84)); }
  &:nth-child(3n) .sg-card__media::after { background: linear-gradient(140deg, rgba(93, 138, 160, .82), rgba(54, 95, 115, .88)); }

  & .sg-card__kicker {
    position: absolute;
    z-index: 2;
    left: 0;
    top: 26px;
    width: 240px;
    height: 150px;
    display: grid;
    place-items: center;
    padding: 12px;
    text-align: center;
    font-size: 22px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .22);
    pointer-events: none;
    transition: letter-spacing 500ms var(--wp--custom--ease-out);
  }

  & .sg-card__body { grid-column: 2; gap: 8px; }
  & h3 { font-size: 19px; font-weight: 600; color: var(--wp--preset--color--teal); }
  & p.is-style-small:last-child { font-size: 12.5px; font-weight: 700; color: var(--wp--preset--color--teal); margin-top: 6px; }
}

@media (hover: hover) and (pointer: fine) {
  .is-variant-caprow .sg-card:hover {
    & .sg-card__media img { transform: scale(1.08); }
    & .sg-card__media::after { opacity: .55; }
    & .sg-card__kicker { letter-spacing: .1em; }
  }
}

@media (max-width: 900px) {
  .is-variant-caprow .sg-card { grid-template-columns: 1fr; gap: 16px; }
  .is-variant-caprow .sg-card .sg-card__body { grid-column: 1; }
  .is-variant-caprow .sg-card .sg-card__kicker { width: 100%; }
}
