.category-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;

}
.box-category-block {
  margin: auto;
  width: 95%;
  padding-left: 1%;
  padding-right: 1%;
}

.category-block__card {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 2.03 / 1;
  overflow: hidden;
  border-radius: 22px;
  color: #111;
  text-decoration: none;
  isolation: isolate;
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-block__card:hover,
.category-block__card:focus-visible {
  color: #111;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(24, 38, 50, .08);
}

.category-block__card--all {
  background: #eaf3ff;
}

.category-block__card--category:nth-of-type(3n + 2) {
  background: #ffeadc;
}

.category-block__card--category:nth-of-type(3n + 3) {
  background: #f3f8fc;
}

.category-block__card--category:nth-of-type(3n + 4) {
  background: #dff7f8;
}

.category-block__name {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 20px;
  max-width: calc(100% - 40px);
  color: #111;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.category-block__image {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  width: 58%;
  height: 76%;
  object-fit: contain;
  object-position: right bottom;
}

.category-block__arrow {
  position: absolute;
  right: 18px;
  bottom: 22px;
  width: 74px;
  height: 58px;
  background: #ff8b2e;
  clip-path: polygon(0 27%, 57% 27%, 57% 0, 100% 50%, 57% 100%, 57% 73%, 0 73%);
  transition: transform .2s ease;
}

.category-block__card--all:hover .category-block__arrow {
  transform: translateX(5px);
}

@media (max-width: 767px) {
  .category-block {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
  }

  .category-block__card {
    min-height: 125px;
    border-radius: 17px;
  }

  .category-block__name {
    top: 15px;
    left: 15px;
    max-width: calc(100% - 30px);
    font-size: 16px;
  }

  .category-block__arrow {
    right: 13px;
    bottom: 15px;
    width: 58px;
    height: 46px;
  }

  .category-block__image {
    width: 63%;
    height: 72%;
  }
}

@media (max-width: 420px) {
  .category-block {
    gap: 10px;
  }

  .category-block__card {
    min-height: 110px;
    border-radius: 14px;
  }

  .category-block__name {
    top: 12px;
    left: 12px;
    font-size: 14px;
  }
}
