/*
 * サイト全ページ共通スタイル。
 * デザイントークン、リセット、ヘッダー、パンくずをここに集約する。
 * ヘッダーやトークンを変更するときは、このファイルだけを直せば全ページに反映される。
 *
 * ページ側の上書き:
 * - index.html (home.css): ヘッダーを position: fixed にする、footer はトップ専用の構造
 * - topic.css: .container を 800px にする（ヘッダーとフッターは 1200px のまま）、body の行間 1.9
 */

:root {
  --primary: #1e88e5;
  --primary-dark: #1565c0;
  --primary-light: #42a5f5;
  --accent: #ff9800;
  --accent-secondary: #4caf50;
  --success: #10b981;
  --background: #f8f9fa;
  --surface: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #cbd5e1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Hiragino Sans",
    sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  /* 日本語を文節で折り返す。未対応ブラウザは従来どおりの折り返しになる */
  word-break: auto-phrase;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: var(--surface);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.header-link:hover {
  color: var(--primary);
}

.header-cta {
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition:
    background 0.2s,
    transform 0.2s;
}

.header-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 640px) {
  /* ロゴとリンクとボタンを並べると 375px 幅に収まらないため、
     左右の余白と文字を詰めたうえで各要素の折り返しを止める */
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 1.05rem;
    gap: 6px;
  }

  .logo-icon {
    width: 30px;
    height: 30px;
    padding: 5px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-link {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .header-cta {
    padding: 8px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}
