/* =========================
   候補者カード一覧
   ========================= */

.candidates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); /* PCで2列 */
  gap: 20px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto 40px;
}

.candidate {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  border: 1px solid #002f6c;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.candidate:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.candidate img {
  flex: 0 0 auto;
  width: 80px;
  height: 100px;
  object-fit: contain;
  background: #ffcc00;
  padding: 4px;
  border-radius: 4px;
  margin-right: 12px;
}

.candidate-content { flex: 1; min-width: 0; }

.date {
  display: inline-block;
  background: #ffcc00;
  color: #002f6c;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 6px;
}

.area-election {
  font-size: 14px;
  font-weight: bold;
  color: #002f6c;
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.fullname {
  font-size: 16px;
  font-weight: bold;
  color: #002f6c;
  margin: 6px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

.kana {
  font-size: 13px;
  color: #555;
}

/* =========================
   スマホ対応（1列化）
   ========================= */
@media (max-width: 768px) {
  .candidates {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .candidate {
    flex-direction: row;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
  }

  .candidate img {
    width: 70px;
    height: 90px;
    margin-right: 10px;
  }

  .fullname { font-size: 14px; }
  .area-election { font-size: 13px; }
  .date { font-size: 12px; }
}