/* ======================================================================
   Capabilities V2
   Figma: V1 / T2 Solutions / "Pharma Solutions Capabilities"
   ====================================================================== */

.capabilities-v2 {
  --capv2-bg: #04061a;
  --capv2-card-bg: #12162c;
  --capv2-border: #313444;
  --capv2-accent: #ffdc04;
  --capv2-bullet: #FFDC04;
  --capv2-head: #ffffff;
  --capv2-body: #b4b4bf;
  --capv2-max: 1360px; /* content width — container adds the gutters, like header-v2 */
  --capv2-gutter: var(--v2-gutter, 40px);
  --capv2-font: "Figtree", sans-serif;
  position: relative;
  overflow: hidden;
  background-color: var(--capv2-bg);
  font-family: var(--capv2-font);
}

/* Blue glow under the cards — exported from Figma (blob 1968:12920), clipped
   to the section exactly like the design; its edges are the page color. */
.capabilities-v2__glow {
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: calc(50% - 620px);
  display: block;
  width: 1340px;
  max-width: none;
  height: auto;
  pointer-events: none;
}

.capabilities-v2__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  max-width: calc(var(--capv2-max) + 2 * var(--capv2-gutter));
  margin: 0 auto;
  padding: var(--capv2-pad-top, 0) var(--capv2-gutter) var(--capv2-pad-bottom, 120px);
}

/* head/xl — strong = yellow highlight */
.capabilities-v2__heading {
  max-width: 1013px;
  font-family: var(--capv2-font);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.4px;
  text-align: center;
  color: var(--capv2-head);
}

.capabilities-v2__heading p {
  margin: 0;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit;
}

.capabilities-v2__heading strong {
  font-weight: inherit;
  color: var(--capv2-accent);
}

.capabilities-v2__grid {
  display: grid;
  grid-template-columns: repeat(var(--capv2-cols, 3), minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

/* Card: 1px yellow line on top, bordered surface below */
.capabilities-v2__card {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--capv2-accent);
}

/* Optional header row (T3 Product): 36px icon + head/sm title, 88px tall.
   Shares the list's border box; the list's top border is the divider below it. */
.capabilities-v2__card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--capv2-border);
  border-bottom: 0;
  background-color: var(--capv2-card-bg);
}

.capabilities-v2__icon {
  flex: none;
  display: block;
  width: 36px;
  height: 36px;
}

/* head/sm */
.capabilities-v2__card-title {
  margin: 0;
  font-family: var(--capv2-font);
  font-size: 24px !important;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.96px;
  text-transform: none;
  color: var(--capv2-head);
}

/* The list draws the card's bottom edge; its last item has no line of its own
   (below) */
.capabilities-v2__list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--capv2-border);
  background-color: var(--capv2-card-bg);
}

/* body/normal + 6px square bullet */
.capabilities-v2__item {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 24px;
  border-bottom: 1px solid var(--capv2-border);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.16px;
  color: var(--capv2-body);
}

/* In a shorter column the last item takes the leftover height, so it reads
   as one taller cell instead of an empty row */
.capabilities-v2__item:last-child {
  flex: 1 1 auto;
  border-bottom: 0;
}

.capabilities-v2__item::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  background-color: var(--capv2-bullet);
}

/* Side-by-side cards share their rows (subgrid): the grid has one row per item
   position (+ the header row, see module.html), so when an item wraps, that
   row grows in every column and the dividers line up across the cards. A
   shorter column's last item spans its leftover rows (--capv2-fill).
   Phones stack the cards, and browsers without subgrid keep the flex layout. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 769px) {
    .capabilities-v2__grid {
      grid-template-rows: repeat(var(--capv2-rows, 1), auto);
      row-gap: 0;
    }

    .capabilities-v2__card {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: span var(--capv2-rows, 1);
    }

    .capabilities-v2__list {
      display: grid;
      grid-template-rows: subgrid;
      grid-row: 1 / -1;
    }

    .capabilities-v2__grid--heads .capabilities-v2__list {
      grid-row: 2 / -1;
    }

    .capabilities-v2__item:last-child {
      grid-row-end: span var(--capv2-fill, 1);
    }
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 992px) {

  .capabilities-v2__container {
    gap: 32px;
    padding-bottom: min(var(--capv2-pad-bottom, 120px), 80px);
  }

  .capabilities-v2__heading {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .capabilities-v2__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .capabilities-v2__list {
    min-height: 0;
  }

  .capabilities-v2__card-head {
    padding: 20px 24px;
  }
}
