.contact-card-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 0;
}

@media screen and (max-width: 850px) {
  .contact-card-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .contact-card-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 450px) {
  .contact-card-list {
    grid-template-columns: repeat(1, 1fr);
  }
}

.contact-card {
  list-style: none;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.25);
}

@media screen and (max-width: 350px) {
  .contact-card {
    width: 100%;
  }
}

.contact-card :is(a, a:visited) {
  text-decoration: none;
}

.contact-card__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  aspect-ratio: 3 / 6;
}

.contact-card__photo,
.contact-card__photo-default {
  grid-area: photo;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
}

.contact-card__photo-default {
  flex: 1 1 auto;
  object-fit: contain;
  width: 50%;
}

.contact-card__info-container {
  grid-area: name;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 0 0 auto;
  min-height: 150px;
}

.contact-card__name {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 40%;
  padding-left: 10px;
  padding-right: 10px;
  background: linear-gradient(
    to right,
    rgba(0, 82, 136, 1) 0%,
    rgba(20, 177, 231, 1) 100%
  );
}

.contact-card__name-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  font-weight: bold;
  font-size: 17px;
  line-height: 1.2em;
  text-align: center;
  max-height: calc(1.2em * 2);
}

.contact-card__name::before,
.contact-card__name::after {
  content: "\20";
  display: block;
  position: absolute;
  left: 0px;
  width: 100%;
  background: linear-gradient(90deg, #14729c 0%, #28ccff 100%);
}

.contact-card__name::before {
  top: 0px;
  height: 2px;
}

.contact-card__name::after {
  bottom: 0px;
  height: 4px;
}

.contact-card__title {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 60%;
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.05);
}

.contact-card__title-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  text-shadow: 0 0 black;
  font-size: 14px;
  line-height: 1.4em;
  max-height: calc(1.4em * 2);
}

.contact-subcontent {
    margin-top: 16px;
}

/* Contact Page */
.contact_image {
  width: 30%;
  max-width: 480px;
  border-radius: 10px;
}

@media screen and (max-width: 780px) {
  .contact_image {
    width: 50%;
    max-width: 320px;
  }
}
