.ehs-related {
  padding: 64px 0;
  background: #f5f9fc;
}

.ehs-related + .ehs-related {
  padding-top: 0;
}

.ehs-related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.ehs-related__title {
  margin: 0;
  color: #151d25;
  font-size: 30px;
  line-height: 1.2;
}

.ehs-related__all {
  flex: 0 0 auto;
  color: #159bd7;
  font-weight: 600;
  text-decoration: none;
}

.ehs-related__all:hover,
.ehs-related__all:focus {
  text-decoration: underline;
}

.ehs-related__grid {
  display: grid;
  gap: 24px;
}

.ehs-related__grid--projects {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ehs-related__grid--services {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ehs-related-card,
.ehs-related-service {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(32, 61, 77, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 61, 77, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ehs-related-card:hover,
.ehs-related-card:focus-within,
.ehs-related-service:hover,
.ehs-related-service:focus {
  transform: translateY(-3px);
  border-color: rgba(21, 155, 215, 0.35);
  box-shadow: 0 16px 36px rgba(32, 61, 77, 0.13);
}

.ehs-related-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.ehs-related-card__image-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 540 / 290;
  background: #eaf1f5;
}

.ehs-related-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ehs-related-card:hover .ehs-related-card__image,
.ehs-related-card:focus-within .ehs-related-card__image {
  transform: scale(1.035);
}

.ehs-related-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px 22px 24px;
}

.ehs-related-card__title {
  color: #151d25;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.ehs-related-card__text {
  margin-top: 12px;
  color: #63727c;
  font-size: 14px;
  line-height: 1.55;
}

.ehs-related-card__more {
  margin-top: auto;
  padding-top: 18px;
  color: #159bd7;
  font-size: 14px;
  font-weight: 600;
}

.ehs-related-service {
  position: relative;
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: center;
  padding: 25px 58px 25px 25px;
  color: inherit;
  text-decoration: none;
}

.ehs-related-service__type {
  margin-bottom: 10px;
  color: #7a8a94;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ehs-related-service__title {
  color: #151d25;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.ehs-related-service__arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  color: #159bd7;
  font-size: 25px;
  transform: translateY(-50%);
}

@media (max-width: 991px) {
  .ehs-related__grid--projects,
  .ehs-related__grid--services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .ehs-related {
    padding: 48px 0;
  }

  .ehs-related__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .ehs-related__title {
    font-size: 24px;
  }

  .ehs-related__grid--projects,
  .ehs-related__grid--services {
    grid-template-columns: 1fr;
  }
}
