/* ========== 友情链接（首页区块）· 独立样式 ========== */

/* 容器与标题 */
.link-bar{margin:20px 0 4px;padding:0;background:none;border-radius:0}
.link-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.link-bar h3{font-size:16px;font-weight:700;letter-spacing:.5px;line-height:1.3;color:#25292f;margin:0}
.link-apply{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  height:28px;padding:0 12px;border-radius:999px;border:1px solid #22c55e;
  color:#16a34a;font-size:12px;line-height:1;background:#fff;text-decoration:none;white-space:nowrap;
  transition:background .2s,color .2s}
.link-apply:hover{background:#22c55e;color:#fff}

/* 列表与卡片 */
.link-list{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 2px}
.link-item{display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;
  height:44px;padding:0 16px;border-radius:10px;background:#fff;
  border:1px solid #eceef1;color:#4b5563;font-size:13px;text-decoration:none;
  flex:0 0 auto;transition:border-color .2s,box-shadow .2s,color .2s}
.link-item:hover{border-color:#cfe8d8;box-shadow:0 4px 14px rgba(17,24,39,.06);color:#111827}
.link-item img{width:22px;height:22px;border-radius:6px;object-fit:cover;display:block;flex:0 0 auto;
  transform-origin:50% 100%}
.link-item span{flex:0 0 auto;white-space:nowrap;overflow:visible;text-overflow:clip;max-width:none}
.link-item.noimg{padding:0 14px}
.link-item .lf{flex:0 0 auto;width:22px;height:22px;border-radius:6px;background:#eef0f3;
  color:#7b8390;font-size:12px;font-weight:600;line-height:22px;text-align:center;
  transform-origin:50% 100%}
.link-none{font-size:13px;color:#9aa0a8;padding:2px 0 4px}
.link-none a{color:#16a34a;text-decoration:none}

/* 净版入场：逐张淡入上浮 */
.link-item{opacity:0;transform:translateY(10px);
  transition:opacity .32s ease,transform .32s ease,border-color .2s,box-shadow .2s,color .2s}
.link-item.in{opacity:1;transform:none}

/* 图标 hover 跳动 */
@keyframes kyjJump{
  0%{transform:translate(0)}
  10%{transform:translateY(8px) scaleX(1.2) scaleY(.8)}
  30%{transform:translateY(-5px) scaleX(1) scaleY(1) rotate(5deg)}
  50%{transform:translateY(3px) scale(1) rotate(0)}
  55%{transform:translateY(0) scaleX(1.1) scaleY(.9) rotate(0)}
  70%{transform:translateY(-5px) scaleX(1) scaleY(1) rotate(-2deg)}
  80%{transform:translateY(0) scaleX(1) scaleY(1) rotate(0)}
  85%{transform:translateY(0) scaleX(1.05) scaleY(.95) rotate(0)}
  to{transform:translateY(0) scaleX(1) scaleY(1)}
}
.link-item:hover img,
.link-item:hover .lf{animation:kyjJump 1.2s ease 1}

/* 桌面：5 列网格，图标文字居中 */
@media (min-width:768px){
  .link-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0 2px}
  .link-item{width:100%;height:44px;margin:0;padding:0 8px;
    justify-content:center;text-align:center;gap:5px}
  .link-item img,.link-item .lf{width:19px;height:19px;line-height:19px;font-size:11px}
  .link-item span{font-size:12.5px;letter-spacing:0}
}

/* 手机：3 列网格 */
@media (max-width:767px){
  .link-bar h3{font-size:15px}
  .link-apply{height:26px;padding:0 10px;font-size:12px}
  .link-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 2px}
  .link-item{width:100%;min-width:0;height:42px;margin:0;padding:0 6px;
    justify-content:center;gap:4px;font-size:12px}
  .link-item img,.link-item .lf{width:17px;height:17px;line-height:17px;font-size:9px}
  .link-item span{min-width:0;overflow:visible;text-overflow:clip;white-space:nowrap;
    font-size:12px;letter-spacing:0;text-align:center}
}
