/* ==========================================================================
   LINK (リンク集) 専用スタイルシート (link.css)
   ========================================================================== */

#link-section {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto 80px auto;
}

#link-section h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: none;
}

#link-section h2::before {
  content: "Links";
  display: block;
  font-size: 14px;
  color: var(--fedl-blue); /* FEDL Blue */
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

/* カテゴリごとのブロック */
.link-category-block {
  margin-bottom: 50px;
}

.link-category-block:last-child {
  margin-bottom: 0;
}

.link-category-title {
  font-size: 18px;
  color: #2d3748;
  margin: 0 0 20px 0;
  font-weight: 700;
  border-left: 4px solid var(--fedl-blue);
  padding-left: 12px;
  line-height: 1.4;
}

/* 3カラムのグリッド配置（画面幅に合わせて自動調整） */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* リンクカード */
.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card:hover {
  border-color: var(--fedl-blue);
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(14, 66, 109, 0.08);
}

.link-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.link-name {
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.4;
  word-break: break-all;
  transition: color 0.2s ease;
}

.link-card:hover .link-name {
  color: var(--fedl-blue);
}

.link-url {
  font-size: 12px;
  color: #718096;
  font-family: monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 外部リンクアイコン */
.link-external-icon {
  font-size: 13px;
  color: #a0aec0;
  margin-left: 15px;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.link-card:hover .link-external-icon {
  color: var(--fedl-blue);
  transform: scale(1.1);
}

.loading-text {
  font-size: 14px;
  color: #a0aec0;
}

/* レスポンシブ調整 */

@media (max-width: 600px) {
  #link-section {
    width: 92%;
    margin: 20px auto 40px auto;
  }
  .link-grid {
    grid-template-columns: 1fr; /* スマホでは縦1列 */
    gap: 12px;
  }
  .link-card {
    padding: 14px 16px;
  }
}
