.clients {
  display: grid;
  gap: 48px;
  grid-template-columns: repeat(1, 1fr);
  margin: 4rem auto;
  max-width: 100%;
  width: 100%;
}

.client {
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  justify-content: start;
  position: relative;
}

.client:last-child {
  border-bottom-color: transparent;
}

.client:hover {
  cursor: help;
}

.client figure {
  display: flex;
  margin: 0 auto;
  width: 100%;
}

.client figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  opacity: 1;
  transform: scale(.5);
}

.client .client-work {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: 1rem;
}

.client .client-work p {
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  display: flex;
  font-family: sans-serif;
  font-size: .75rem;
  justify-content: start;
  margin: 0;
  padding: .5rem 0;
  white-space: pre;
}

.client .client-work p:last-child {
  border-bottom: none;
}

.client .client-work p .icon {
  height: 1.5rem;
  display: flex;
  margin-right: .5rem;
  width: 1.5rem;
}

.client .client-work p .icon.icon-type1 {
  background-image: url('../images/icons/share.svg');
}

.client .client-work p .icon.icon-type2 {
  background-image: url('../images/icons/design.svg');
}

.client .client-work p .icon.icon-type3 {
  background-image: url('../images/icons/devices.svg');
}

.client .client-work p .icon.icon-type4 {
  background-image: url('../images/icons/dns.svg');
}

.client .client-work p .icon.icon-type5 {
  background-image: url('../images/icons/brush.svg');
}

.client .client-work p .icon.icon-type6 {
  background-image: url('../images/icons/videocam.svg');
}

.client .client-work p .icon.icon-type7 {
  background-image: url('../images/icons/computer.svg');
}

.client .client-work .btn {
  border: 2px solid transparent;
  border-radius: 3rem;
  background-color: #FFDA60;
  color: #AF1313;
  display: block;
  margin: 1rem auto 3rem;
  padding: .25rem 2rem;
  text-align: center;
  transition: all .25s ease;
}

.client .client-work .btn:hover {
  background-color: transparent;
  border-color: #AF1313;
  color: #AF1313;
}


/* ———————————————————————— media queries ———————————————————————— */
/* ———————————— small up to 576px ———————————— */
@media only screen and (min-width: 576px) {
  .clients {
    gap: 0px;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ———————————— medium up to 768px ———————————— */
@media only screen and (min-width: 768px) {
  .clients {
    gap: 48px;
    max-width: 576px;
  }
}

/* ———————————— large up to 992px ———————————— */
@media only screen and (min-width: 992px) {
  .clients {
    grid-template-columns: repeat(4, 1fr);
    max-width: 768px;
  }

  .client {
    border-bottom-color: transparent;
    justify-content: center;
  }

  .client figure {
    margin-bottom: 0;
  }

  .client figure img {
    filter: grayscale(100%);
    opacity: .5;
    transform: scale(.75);
    transform-origin: center;
    transition: all .25s ease;
  }
  
  .client:hover figure img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.25);
  }

  .client .client-work {
    background-color: #FFDA60;
    border-radius: 1rem;
    left: 50%;
    margin-top: -1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 100%;
    transform: translateX(-75%);
    transition: all .25s ease;
    visibility: hidden;
    z-index: 2;
  }
  
  .client:hover .client-work {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%);
    visibility: visible;
  }

  .client .client-work::before {
    border-radius: 1rem;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .25);
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    top: 0px;
    transition: all .35s ease;
    width: 100%;
    z-index: -1;
  }

  .client .client-work::after {
    background-color: transparent;
    border-bottom: 0 solid #FFDA60;
    border-left: .5rem solid transparent;
    border-right: .5rem solid transparent;
    border-top: .5rem solid transparent;
    bottom: 100%;
    content: '';
    height: 0;
    left: 50%;
    margin-left: -.5em;
    position: absolute;
    transition: all .25s ease;
    transition-delay: .1s;
    width: 0 ;
    z-index: 3;
  }

  .client:hover .client-work::after {
    border-bottom-width: .5rem;
  }

  .client .client-work .btn {
    margin-bottom: 0;
    white-space: pre;
  }

  .client .client-work .btn {
    background-color: #AF1313;
    color: #FFFFFF;
  }
  
  .client .client-work .btn:hover {
    background-color: transparent;
    border-color: #AF1313;
    color: #AF1313;
  }
}

/* ———————————— extra large up to 1200px ———————————— */
@media only screen and (min-width: 1200px) {
  .clients {
    grid-template-columns: repeat(5, 1fr);
    max-width: 992px;
  }
}

/* ———————————— extra large up to 1400px ———————————— */
@media only screen and (min-width: 1400px) {
  .clients {
    grid-template-columns: repeat(6, 1fr);
    max-width: 1200px;
  }
}
