.popular-projects {
  width: 100%;
  height: 997px;
  padding: 34px 20px 0;
  color: var(--color-light);
  background: var(--color-dark);
  border: 1px solid rgba(244, 246, 244, 0.1);
}

.popular-projects__heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: calc(100% + 2px);
  height: 94px;
  margin-left: -1px;
}

.popular-projects__title {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--color-light);
  font-size: 44px;
  font-weight: 600;
  line-height: 46.64px;
  letter-spacing: -0.66px;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-projects__title span:last-child {
  color: rgba(244, 246, 245, 0.6);
  font-weight: 400;
}

.popular-projects__all {
  padding-bottom: 5px;
  color: var(--color-light);
  border-bottom: 2px solid var(--color-yellow);
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
}

.popular-projects__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, 410.5px);
  gap: 16px;
  width: calc(100% + 2px);
  margin-top: 32px;
  margin-left: -1px;
}

.popular-projects__card {
  display: flex;
  min-width: 0;
  height: 410.5px;
  overflow: hidden;
  background: #151917;
  border: 1px solid rgba(244, 246, 245, 0.12);
  border-radius: 16px;
  flex-direction: column;
}

.popular-projects__media {
  position: relative;
  display: block;
  width: 100%;
  height: 216px;
  overflow: hidden;
  background: #1b211e;
  flex: 0 0 216px;
}

.popular-projects__image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.popular-projects__village,
.popular-projects__hit {
  position: absolute;
  top: 12px;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: normal;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-projects__village {
  left: 12px;
  color: var(--color-light);
  background: rgba(20, 26, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  letter-spacing: 1.1px;
}

.popular-projects__hit {
  right: 12px;
  color: var(--color-dark);
  background: var(--color-yellow);
  font-weight: 700;
  letter-spacing: 0.88px;
}

.popular-projects__content {
  display: flex;
  width: 100%;
  min-height: 0;
  padding: 22px;
  flex: 1 1 auto;
  flex-direction: column;
}

.popular-projects__name {
  color: var(--color-light);
  font-size: 21px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.21px;
  white-space: nowrap;
}

.popular-projects__specs {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 26px;
  padding-top: 10px;
  color: rgba(244, 246, 245, 0.55);
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.popular-projects__divider {
  width: 100%;
  height: 37px;
  border-top: 1px solid rgba(244, 246, 245, 0.12);
  border-bottom: 18px solid transparent;
  margin-top: 18px;
  flex: 0 0 19px;
}

.popular-projects__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
}

.popular-projects__price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.popular-projects__price-label {
  color: rgba(244, 246, 245, 0.45);
  font-size: 11px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 1.54px;
  text-transform: uppercase;
  white-space: nowrap;
}

.popular-projects__price {
  margin-top: 5px;
  color: var(--color-light);
  font-size: 20px;
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
}

.popular-projects__mortgage {
  margin-top: 4px;
  color: rgba(244, 246, 245, 0.5);
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.popular-projects__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--color-light);
  background: rgba(244, 246, 245, 0.1);
  border: 1px solid rgba(244, 246, 245, 0.18);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  flex: 0 0 42px;
}

@media (max-width: 1040px) {
  .popular-projects {
    height: auto;
    padding: 34px 20px 20px;
  }

  .popular-projects__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .popular-projects__heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    height: auto;
  }

  .popular-projects__title {
    font-size: 36px;
    line-height: 38px;
  }

  .popular-projects__grid {
    grid-template-columns: 1fr;
  }
}
