.categories {
  position: relative;
  padding: 20px 0;
  overflow: hidden;
}

.categories__items {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  margin: 0 -2px;
}

.categories__items .item {
  width: 25%;
  aspect-ratio: 1;
}

.categories__items .item--2x {
  width: 50%;
  aspect-ratio: 1/0.5;
}

.categories__items .item--3x {
  width: 75%;
  aspect-ratio: 1/0.3333333333;
}

.categories__items .item--4x {
  width: 100%;
  aspect-ratio: 1/0.25;
}

.categories__items .item--2x .item__title,
.categories__items .item--3x .item__title,
.categories__items .item--4x .item__title {
  max-width: 50%;
}

.categories__items .item--transparent .item__body {
  color: var(--secondary-1);
}

.categories__items .item--transparent .item__arrow {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M25.2471 9.91648L21.3189 12.0717L4.8805 21.5624L3.26185 18.7588L19.7003 9.26807L6.73636 5.7944L7.57422 2.66748L25.8755 7.57129L25.2471 9.91648ZM20.974 25.8746L17.9244 25.0575L20.5749 15.1658L24.4074 13.0636L20.974 25.8746Z' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
}

.categories__items .item--grey:hover .item__title {
  color: var(--primary-2);
}

.categories__items .item--grey .item__body {
  background: var(--neutral-1);
}

.categories__items .item--grey .item__arrow {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M25.2471 9.91648L21.3189 12.0717L4.8805 21.5624L3.26185 18.7588L19.7003 9.26807L6.73636 5.7944L7.57422 2.66748L25.8755 7.57129L25.2471 9.91648ZM20.974 25.8746L17.9244 25.0575L20.5749 15.1658L24.4074 13.0636L20.974 25.8746Z' fill='%23303335'/%3E%3C/svg%3E") center/contain no-repeat;
}

.categories__items .item--disabled {
  pointer-events: none;
}

.categories__items .item._active .item__image {
  opacity: 1;
  z-index: 2;
}

.categories__items .item._active .item__arrow {
  transform: rotate(-45deg);
}

.categories__items .item:first-child .item__image {
  opacity: 1;
}

.categories__items .item__image,
.categories__items .item__image::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.categories__items .item__image::before {
  content: "";
  background: rgba(13, 37, 83, 0.6);
  opacity: 1;
}

.categories__items .item__image img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center;
  object-position: center;
}

.categories__items .item__body {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 32px;
  cursor: pointer;
  border: 2px solid var(--secondary-1);
}

.categories__items .item__number {
  font-size: 18px;
}

.categories__items .item__title {
  margin-top: 8px;
  font-size: 24px;
  transition: var(--transition);
}

.categories__items .item__link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.categories__items .item__arrow {
  display: block;
  width: 30px;
  aspect-ratio: 1;
  margin-top: auto;
  margin-left: auto;
  transition: var(--transition);
}

.categories__items .item__angle span {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M0 30H2V22C2 10.9543 10.9543 2 22 2H30V0H0V30Z' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
  display: block;
  position: absolute;
  z-index: 5;
  width: 30px;
  aspect-ratio: 1;
}

.categories__items .item__angle span:nth-child(1) {
  top: -2px;
  left: -2px;
}

.categories__items .item__angle span:nth-child(2) {
  top: -2px;
  right: -2px;
  transform: rotate(90deg);
}

.categories__items .item__angle span:nth-child(3) {
  right: -2px;
  bottom: -2px;
  transform: rotate(180deg);
}

.categories__items .item__angle span:nth-child(4) {
  bottom: -2px;
  left: -2px;
  transform: rotate(270deg);
}

.categories .circles {
  margin: 0;
}

.categories .circles span {
  border-color: var(--neutral-4);
}

@media (max-width: 1260px) {
  .categories__items {
    gap: 16px;
    margin: 0;
  }

  .categories__items .item {
    position: relative;
    width: calc(50% - 8px);
    aspect-ratio: 343/243;
    border-radius: var(--border-radius);
    overflow: hidden;
  }

  .categories__items .item--2x,
  .categories__items .item--3x,
  .categories__items .item--4x {
    width: 100%;
    aspect-ratio: 686/243;
  }

  .categories__items .item--grey .item__body {
    background: linear-gradient(0deg, rgba(13, 37, 83, 0.5) 0%, rgba(13, 37, 83, 0.5) 100%);
    color: var(--secondary-1);
  }

  .categories__items .item__image,
  .categories__items .item__image::before {
    opacity: 1;
  }

  .categories__items .item__image::before {
    display: none;
  }

  .categories__items .item__body {
    padding: 16px;
    border: none;
    background: linear-gradient(0deg, rgba(13, 37, 83, 0.5) 0%, rgba(13, 37, 83, 0.5) 100%);
  }

  .categories__items .item__title {
    font-size: 18px;
  }

  .categories__items .item__arrow {
    display: none;
  }

  .categories__items .item__angle {
    display: none;
  }
}

@media (max-width: 760px) {
  .categories__items .item {
    width: 100%;
  }

  .categories__items .item--2x,
  .categories__items .item--3x,
  .categories__items .item--4x {
    aspect-ratio: 343/243;
  }
}