.projects {
  margin-block-start: 62px;
  scroll-margin-block-start: 90px;
}

.projects .section-head {
  margin-block-end: 24px;
}

.project-card {
  position: relative;
  display: block;
  height: 100%;
  min-height: 246px;
  padding: 20px 17px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(145deg, #f6f7f9 0%, #e7e9ed 60%, #dadde3 100%);
}

.project-card__label {
  padding-inline-end: 36px;
}

.project-card__name {
  padding-inline-end: 40px;
  margin-block-start: 11px;
}

.project-card__name-accent {
  font-style: normal;
  color: var(--color-gold);
}

.project-card__text {
  position: relative;
  z-index: 1;
  max-width: 157px;
  margin-block-start: 25px;
}

.project-card__arrow {
  position: absolute;
  top: 16px;
  right: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  z-index: 2;
  border-radius: 50%;
  background-color: var(--color-white);
  font-family: "Inter", var(--font-text);
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: var(--text-arrow);
}

.project-card__image {
  position: absolute;
  height: auto;
  transition: scale 0.3s ease;
}

.project-card__image--ceramic {
  right: 13px;
  bottom: 4px;
  width: min(44%, 150px);
}

.project-card__image--car {
  right: 21px;
  bottom: 16px;
  width: min(50%, 173px);
}

.projects__footer {
  margin-block-start: 25px;
}

.project-card__image--object {
  right: -8px;
  bottom: -8px;
  width: 52%;
}

@media (768px <= width) {
  .projects {
    margin-block-start: 142px;
  }

  .projects .section-head {
    margin-block-end: 41px;
  }

  .project-card {
    --card-height: clamp(300px, 20.3vw, 390px);
    min-height: var(--card-height);
    padding: 28px clamp(24px, 1.8vw, 35px);
    border-radius: 28px;
  }

  .project-card__name {
    margin-block-start: 13px;
  }

  .project-card__text {
    max-width: 221px;
    margin-block-start: 14px;
  }

  .project-card__arrow {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
  }

  .project-card__image--ceramic {
    right: -1.3%;
    bottom: calc(var(--card-height) * -0.22);
    width: auto;
    height: calc(var(--card-height) * 0.846);
  }

  .project-card__image--car {
    right: -8.3%;
    bottom: calc(var(--card-height) * -0.095);
    width: auto;
    height: calc(var(--card-height) * 0.648);
  }

  .projects__footer {
    margin-block-start: 37px;
    text-align: center;
  }

  .project-card__image--object {
    right: -3%;
    bottom: -3%;
    width: 57%;
  }
}

@media (hover: hover) {
  .project-card:hover .project-card__image {
    scale: 1.03;
  }

  .project-card:hover .project-card__arrow {
    background-color: var(--color-ink);
    color: var(--color-white);
  }
}

.project-card:focus-visible .project-card__arrow {
  background-color: var(--color-ink);
  color: var(--color-white);
}
