section h3 {
  margin-bottom: 16px;
}

.differentials {
  hgroup {
    margin-bottom: 28px;
  }
}

:is(.equipment, .materials) ul {
  padding-left: 26px;
}

:is(.equipment, .materials) li:not(:last-child) {
  margin-bottom: 10px;
}

.equipment {
  background-color: #fff;

  h4 {
    width: 100%;
    border-bottom: 4px solid var(--light-green);

    color: var(--blue);
    font-size: 24px;
    letter-spacing: 0.5%;
    line-height: 1.3;
  }

  h5 {
    margin-bottom: 16px;

    color: var(--dark-green);
    font-size: 20px;
    letter-spacing: 0.5%;
    line-height: 1.3;
  }
}

.materials {
  background-color: var(--silver);

  img {
    margin-bottom: 20px;
  }
  .material-wrapper {
    letter-spacing: 0.5%;
    line-height: 1.5;
  }
  h4 {
    margin-bottom: 12px;

    color: var(--blue);
    font-size: 24px;
  }
  li {
    font-size: 18px;
  }
}

.call-to-action:last-of-type {
  background-color: #fff;

  b {
    color: #000;
  }
}

.carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  max-block-size: 260px;

  inline-size: var(--carousel-width);
  margin-inline: calc(50% - (var(--carousel-width) / 2));
  margin-block: 3.75rem;

  align-items: center;
  justify-content: safe center;

  scrollbar-color: #9eb5cb var(--light-silver);

  &::-webkit-scrollbar {
    height: 0.75rem;
  }
  &::-webkit-scrollbar-track {
    padding-inline: 0.75rem;
    background: var(--light-silver);
  }
  &::-webkit-scrollbar-thumb {
    background: #9eb5cb;
    border-radius: 100%;
  }

  figcaption {
    margin-block-start: 0.75rem;
    text-align: center;
    color: var(--dark-gray);
  }

  .slide {
    flex-shrink: 0;
    padding: 2rem;

    img {
      block-size: 200px;
      inline-size: auto;
      margin: 0 auto;
    }
  }
}

/* desktop only */

@media screen and (min-width: 900px) {
  .hero {
    background-image: url(/img/capabilities-hero-desk.avif);
  }

  .differentials .card-wrapper {
    display: grid;
    grid-template-rows: repeat(2, max-content);
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .equipment hgroup {
    margin-bottom: 60px;
  }
  .equipment .list-grid-wrapper {
    display: grid;
  }
  .equipment .list-wrapper {
    height: max-content;
  }
  .equipment .cnc-machines {
    grid-template-rows: repeat(3, max-content);
    grid-template-columns: repeat(3, 1fr);
    align-content: space-between;
    grid-auto-flow: column;

    margin-bottom: 64px;
  }
  .equipment .cnc-machines .three-axis {
    grid-row: 2 / -1;
  }
  .equipment .cnc-machines :is(.five-axis, .special-processes) {
    align-self: end;
  }
  .equipment .quality-control {
    grid-template-columns: repeat(2, max-content) 1fr;
    column-gap: 94px;
  }
  .equipment h4 {
    grid-column: 1 / -1;

    padding-bottom: 8px;
    margin-bottom: 32px;
  }
  .equipment ul li {
    font-size: 18px;
  }

  .materials .wrapper {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }
  .materials .wrapper > :not(.material-wrapper) {
    grid-column: 1 / -1;
  }
  .materials hgroup {
    margin-bottom: 48px;
  }
  .materials img {
    height: 124px;
    width: 338px;
  }
}

/* mobile only */

@media screen and (max-width: 899px) {
  .hero {
    background-image: url(/img/capabilities-hero-mob.avif);
  }

  .differentials .card-wrapper {
    display: contents;
  }
  .differentials .card:not(:last-of-type) {
    margin-bottom: 28px;
  }

  .equipment hgroup {
    margin-bottom: 48px;
  }
  .equipment .list-grid-wrapper:not(:last-child) {
    margin-bottom: 56px;
  }
  .equipment h4 {
    padding-bottom: 4px;
    margin-bottom: 24px;
  }
  .equipment .list-wrapper:not(:last-child) {
    margin-bottom: 32px;
  }
  .equipment ul li {
    font-size: 20px;
  }

  .materials hgroup {
    margin-bottom: 40px;
  }
  .materials .material-wrapper:not(:last-of-type) {
    margin-bottom: 56px;
  }
  .materials img {
    height: 100px;
    width: 100%;
  }
}
