.projects-block {
  padding: 0px 0 52px;
  background: #f6f6f6;
}

.projects-block__container {
  width: 1176px;
  max-width: calc(100% - 40px);
  margin: 0 auto;
}

.projects-block__title {
  margin: 0 0 52px;
  font-family: Inter, Arial, sans-serif;
  font-size: 47.5px;
  line-height: 0.98;
  font-weight: 400;
  color: #1a1a1a;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 376px);
  gap: 24px;
  justify-content: space-between;
}

.projects-grid__card {
  position: relative;
  display: block;
  width: 376px;
  height: 226px;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  background: #ffffff;
}

.projects-grid__image-wrap,
.projects-grid__image {
  width: 100%;
  height: 100%;
  display: block;
}

.projects-grid__image {
  object-fit: cover;
}

.projects-grid__hover {
  position: absolute;
  inset: 0;
  padding: 19px 27px 31px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  opacity: 0;
  transition: opacity .3s ease;
  box-sizing: border-box;
}

.projects-grid__hover-title {
  font-family: Inter, Arial, sans-serif;
  font-size: 32px;
  line-height: 1;
  font-weight: 400;
  margin-bottom: 18px;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.projects-grid__hover-text {
  font-family: Inter, Arial, sans-serif;
  font-size: 22.3px;
  line-height: 1.35;
  font-weight: 300;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.projects-grid__card:hover .projects-grid__hover {
  opacity: 1;
}

.projects-block__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 68px;
  margin-top: 45px;
  border-radius: 10px;
  background: #008de9;
  color: #ffffff;
  text-decoration: none;
  font-family: Inter, Arial, sans-serif;
  font-size: 28.5px;
  line-height: 1;
  font-weight: 600;
  transition: background .25s ease, color .25s ease;
}

.projects-block__button:hover {
  background: #ffffff;
  color: #008de9;
}

@media (max-width: 1270px) {
  .projects-block__container {
    max-width: calc(100% - 40px);
  }

  .projects-block__title {
    font-size: 38px;
    margin-bottom: 34px;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .projects-grid__card {
    width: 100%;
    height: auto;
    aspect-ratio: 376 / 226;
  }

  .projects-grid__hover {
    display: none;
  }

  .projects-block__button {
    min-height: 62px;
    font-size: 24px;
    margin-top: 32px;
  }
}

@media (max-width: 767px) {
  .projects-block {
    padding: 0px 0 52px;
  }

  .projects-block__container {
    max-width: calc(100% - 24px);
  }

  .projects-block__title {
    font-size: 28px;
    line-height: 1.02;
    margin-bottom: 28px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .projects-grid__card {
    width: 100%;
    height: auto;
    aspect-ratio: 376 / 226;
    border-radius: 18px;
  }

  .projects-grid__hover {
    display: none;
  }

  .projects-block__button {
    min-height: 52px;
    margin-top: 24px;
    font-size: 20px;
    border-radius: 10px;
  }
}