#member-list {
  padding: 50px 0 80px;
}

.member-list__section {
  margin-bottom: 70px;
  scroll-margin-top: 90px;
}

.member-list__section:last-child {
  margin-bottom: 0;
}

.member-list__section .hd_title {
  margin-bottom: 30px;
}

.member-list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 4%;
}

.member-list__item {
  min-width: 0;
}

.member-list__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  height: 100%;
  padding: 22px 18px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #323232;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

a.member-list__card:hover,
a.member-list__card:focus {
  border-color: #41648a;
  box-shadow: 0 4px 16px rgba(65, 100, 138, 0.18);
  color: #41648a;
  opacity: 1;
}

.member-list__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  margin-bottom: 16px;
}

.member-list__logo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.member-list__name {
  font-size: 17px;
  font-weight: bold;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.member-list__section:not(.member-list__section--featured) .member-list__grid {
  gap: 30px 4%;
}

.member-list__section:not(.member-list__section--featured) .member-list__card {
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  transition: none;
}

.member-list__section:not(.member-list__section--featured) a.member-list__card::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 5px 7px 0 0;
  background-color: #f05b66;
  -webkit-mask: url("member-link-icon.svg") center / contain no-repeat;
  mask: url("member-link-icon.svg") center / contain no-repeat;
}

.member-list__section:not(.member-list__section--featured) a.member-list__card:hover,
.member-list__section:not(.member-list__section--featured) a.member-list__card:focus {
  border-color: transparent;
  box-shadow: none;
  opacity: 0.7;
}

.member-list__section:not(.member-list__section--featured) .member-list__logo {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  margin: 0 10px 0 0;
}

.member-list__section:not(.member-list__section--featured) .member-list__logo img {
  max-width: 64px;
  max-height: 32px;
}

.member-list__section:not(.member-list__section--featured) .member-list__name {
  color: #323232;
  font-size: 16px;
  line-height: 1.55;
}

.member-list__section:not(.member-list__section--featured) a.member-list__card .member-list__name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.member-list__empty {
  padding: 35px 20px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  color: #666;
  text-align: center;
}

@media screen and (min-width: 768px) {
  body.post-type-archive-member #content.main_lower #main {
    width: 100%;
    float: none;
  }
}

@media screen and (max-width: 767px) {
  #member-list {
    padding: 35px 0 55px;
  }

  .member-list__section {
    margin-bottom: 50px;
    scroll-margin-top: 60px;
  }

  .member-list__grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .member-list__card {
    min-height: 88px;
    padding: 18px 14px;
  }

  .member-list__logo {
    min-height: 90px;
  }

  .member-list__logo img {
    max-height: 90px;
  }

  .member-list__name {
    font-size: 15px;
  }

  .member-list__section:not(.member-list__section--featured) .member-list__grid {
    gap: 18px;
  }

  .member-list__section:not(.member-list__section--featured) .member-list__name {
    font-size: 15px;
  }
}
