/* =========================================================
   友链卡片墙
   模板：layouts/shortcodes/friends.html
   数据：data/friends.yml
   ========================================================= */

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 1.8em 0;
}

.friend-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
  text-decoration: none !important;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
  transition: transform .4s cubic-bezier(.19, 1, .22, 1), box-shadow .3s ease;
}

.friend-card:hover,
.friend-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 5px 8px 0 rgba(0, 0, 0, .14), 0 1px 14px 0 rgba(0, 0, 0, .12);
  text-decoration: none !important;
}

/* 主题的 .markdown img 自带外边距、圆角和阴影，这里全部压掉 */
.friend-card .friend-avatar {
  display: block;
  width: 100%;
  height: 180px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: cover;
}

.friend-body {
  flex: 1;
  padding: 18px 16px 20px;
}

.friend-name {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.5;
  color: #3c4350;
  word-break: break-word;
}

.friend-desc {
  margin-top: 6px;
  font-size: 1.4rem;
  line-height: 1.6;
  color: #7f8794;
  word-break: break-word;
}

/* 友链页放宽内容区：默认 750px 下三列太挤 */
.page-friends .post-content .main-content-wrap {
  max-width: 1080px;
}
