.services {
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 40px);
  background-color: #f4f1ed;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 40px);
}

.services h2 {
  font-family: 'M PLUS 1p', sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  color: #343434;
  font-weight: 900;
  margin-bottom: clamp(60px, 10vw, 110px);
  position: relative;
  display: inline-block;
  letter-spacing: 0.05em;
}

.services h2::after {
  content: "";
  display: block;
  width: 106px;
  height: 8px;
  background-color: #0054a7;
  margin: 12px auto 0;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.services__wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
}

.service {
  width: clamp(220px, 28%, 360px);
  text-align: center;
  margin: 0 auto;
  transition: transform 0.3s;
}

.img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service:hover img {
  box-shadow: 14px 14px 12px rgba(0, 0, 0, 0.22);
}

.service h3 {
  font-family: 'M PLUS 1p', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 900;
  color: #343434;
  margin: clamp(24px, 5vw, 40px) 0 clamp(16px, 4vw, 25px);
}

.service a {
  font-family: 'M PLUS 1p', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: #84c0fb;
  font-weight: 900;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s;
}

.service:hover {
  transform: none;
}

.service:hover .img-wrapper img {
  transform: scale(1.05);
}

.service a:hover {
  color: #0054a7;
  text-decoration: underline;
}

.service-item:target {
  scroll-margin-top: 100px;
}

.img-link:active .img-wrapper img {
  transform: scale(0.97);
  box-shadow: 6px 6px 5px rgba(0, 0, 0, 0.15);
}

.service a:active {
  color: #003d7e;
  transform: scale(0.92);
  text-decoration: underline;
}

@media screen and (max-width: 910px) {
  .services__wrap {
    flex-direction: column;
    align-items: center;
  }

  .service {
    width: 100%;
    max-width: 360px;
  }

  .img-wrapper img {
    width: 110%;
    height: 110%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 10px 10px 7px rgba(0, 0, 0, 0.12);
  }
}

@media screen and (max-width: 768px) {
  .container {
    padding: 0 clamp(4px, 2vw, 40px);
  }

  .services__wrap {
    gap: 50px;
  }

  .services h2 {
    font-size: clamp(1.2rem, 2.5vw, 2.4rem);
  }

  .services h2::after {
    width: 75px;
  }

  .service h3 {
    font-size: 1.0rem;
    margin: 0 0 clamp(16px, 4vw, 25px);
  }

  .service a {
    font-size: 0.8rem;
  }

  .img-wrapper img {
    width: 90%;
    height: 90%;
    margin: 0 auto;
  }

}