/* index.css（改良版）
   元の index.css の構造・クラスを土台に、見た目だけを整えた版です。
   機能やリンク先は元のまま変えていません。
   カテゴリごとのアクセント色は、各カードのクラス（card-image / card-video / card-audio）で
   CSS変数 --accent（通常）/ --accent-strong（ホバー時）/ --accent-bg（アイコン背景）として定義しています。 */

.home-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
  flex: 1; /* フッターを画面下部に固定するための追加 */
}

/* ---------- ヒーロー（グラデーションのパネル化） ---------- */
.hero-section {
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #2b2b2b 0%, #1e1e1e 55%, #251315 100%);
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 44px 24px;
}

.hero-section h1 {
  font-size: 2.4rem;
  margin-bottom: 14px;
  color: #fff;
}

.hero-section p {
  color: #bbb;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ---------- カテゴリカード ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* カテゴリごとのアクセント色 */
.card-image {
  --accent: #5ea3ff;
  --accent-strong: #2f7df6;
  --accent-bg: rgba(47, 125, 246, 0.16);
}

.card-video {
  --accent: #ff5a4e;
  --accent-strong: #d00000;
  --accent-bg: rgba(208, 0, 0, 0.16);
}

.card-audio {
  --accent: #2dd4bf;
  --accent-strong: #0d9488;
  --accent-bg: rgba(13, 148, 136, 0.18);
}

.category-card {
  position: relative;
  overflow: hidden;
  background-color: #222;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 34px 20px 42px; /* 下部は「開く →」の表示スペース */
  text-decoration: none;
  color: #fff;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

/* カード上部の細い帯（アクセント色） */
.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--accent);
  transition: background-color 0.2s, height 0.2s;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  background-color: #2a2a2a;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.category-card:hover::before {
  background-color: var(--accent-strong);
  height: 6px;
}

/* キーボード操作時に見えるフォーカス枠 */
.category-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* アイコン（丸バッジ背景つき） */
.card-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  background-color: var(--accent-bg);
  border-radius: 50%;
}

.category-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
}

.category-card p {
  font-size: 0.85rem;
  color: #bbb;
  line-height: 1.6;
}

/* カード右下の「開く →」誘導表示 */
.card-open {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--accent);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.category-card:hover .card-open {
  opacity: 1;
}

/* ---------- フッター（新設） ---------- */
.site-footer {
  background-color: #111;
  border-top: 1px solid #333;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-logo {
  font-weight: bold;
  color: #fff;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  gap: 16px;
}

.footer-nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- スマホ幅の余白調整 ---------- */
@media (max-width: 600px) {
  .home-container {
    padding: 24px 14px;
  }

  .hero-section {
    padding: 30px 16px;
    margin-bottom: 28px;
  }

  .hero-section h1 {
    font-size: 1.7rem;
  }

  .category-card {
    padding: 28px 16px 40px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- 動きを減らす設定への配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-card::before,
  .card-open,
  .footer-nav a {
    transition: none;
  }

  .category-card:hover {
    transform: none;
  }
}
