/* 全体レイアウト */
body {
  font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: linear-gradient(180deg, #e3f2fd, #fff);
  color: #333;
  margin: 0;
  padding: 2rem;
  text-align: center;
  min-height: 100vh; /* 画面いっぱいに背景を伸ばす */
}

/* タイトル */
h1 {
  font-size: 1.8rem;
  color: #1565c0;
  margin-bottom: 2rem; /* 少し間隔を広げました */
}

/* ★新しく追加：カード全体を包むエリアの設定★ */
.card-container {
  display: flex;
  flex-wrap: wrap;          /* 折り返しあり */
  justify-content: center;  /* 中央寄せ */
  gap: 30px;                /* カード間の隙間 */
  max-width: 1400px;
  margin: 0 auto;
}

/* ★修正：個別のカード設定★ */
section {
  background: #ffffffcc;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 2rem 1rem;
  
  /* レイアウト調整 */
  width: 380px;             /* 基準幅 */
  flex: 1 1 380px;          /* 伸縮設定 */
  max-width: 450px;         /* 最大幅 */
  margin: 0;                /* マージンは親のgapに任せる */
  
  /* カードの中身 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.3s;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* リンクボタン */
p a {
  display: inline-block;
  background: #42a5f5;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;        /* 文字サイズアップ */
  padding: 1.0rem 2.5rem;
  border-radius: 50px;
  margin-top: auto; /* 上に少し余白 */
  margin-bottom: 0;
  transition: background 0.3s, transform 0.2s;
}

p a:hover {
  background: #1e88e5;
}

/* カード内のタイトル */
section h1 {
  font-size: 1.6rem;
  color: #1565c0;
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* レスポンシブ調整 */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }
  .card-container {
    gap: 15px;
  }
}