/* --- 共通スタイル --- */
/* サイト全体に適用される基本的なフォント、背景色、文字色などを定義します */
body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #0f2e3e;
  color: #1a1a1a;
  line-height: 1.75;
  margin: 0;
}

/* --- ヘッダー背景 --- */
/* ヘッダー部分に波模様の背景画像を設定します */
.bg-wave {
  background-image: url('/static/images/nami_bg.png');
  background-size: cover;
  background-repeat: repeat;
}

/* --- メインコンテンツ背景 --- */
/* 本文エリア全体に和紙のようなテクスチャの背景色を設定します */
.washi-box {
  background-color: #f5f3ea;
}

/* --- ナビゲーションボタン --- */
/* ヘッダー内のナビゲーションリンクの基本デザインです */
nav a {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
  backdrop-filter: blur(8px);
}

/* ナビゲーションボタンのホバー効果: マウスが乗った時の見た目の変化です */
nav a:hover {
  background-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: underline;
}

/* --- アイキャッチ画像 --- */
/* 記事やページのトップに表示される画像のスタイルを調整します */
.illustration {
  background-color: #f5f3ea;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  display: block;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  height: auto;
}

/* --- フッター --- */
/* ページ最下部のフッターのスタイルを調整します */
footer {
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 1rem;
  color: #eee;
  background-color: #0f2e3e;
}

/* --- 見出し --- */
/* h1, h2, h3 タグの基本的なスタイルを定義します */
h1, h2, h3 {
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
h1 {
  font-size: 1.8rem;
  color: #0f2e3e;
}
h2 {
  font-size: 1.5rem;
  color: #264653;
}
h3 {
  font-size: 1.3rem;
  color: #3e5b64;
}

/* --- 汎用リンク --- */
/* 本文中の一般的なリンクのスタイルです */
a {
  color: #264653;
  text-decoration: underline;
}
/* リンクのホバー効果: マウスが乗った時の色の変化です */
a:hover {
  color: #2a9d8f;
}

/* --- カード風コンポーネント --- */
/* 本文内で情報をまとめるための、影付きのカード型コンポーネントのスタイルです */
.card {
  background-color: white;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- レスポンシブ対応 --- */
/* 画面幅が640px以下のデバイスで適用されるスタイルです */
@media screen and (max-width: 640px) {
  body {
    font-size: 15px; /* モバイルでは少しフォントサイズを小さくします */
  }

  nav a {
    font-size: 0.85rem; /* ナビゲーションボタンの文字と余白を調整します */
    padding: 0.4rem 0.8rem;
  }

  .illustration {
    width: 100%; /* アイキャッチ画像は画面幅いっぱいに広げます */
    max-width: 100%;
  }

  footer {
    padding-bottom: 2rem; /* フッターの下部の余白を確保します */
  }
}

/* Markdownのコードブロック部分の見た目を調整します。 */
/* 背景色、枠線、角丸、余白を設定し、横スクロール可能にすることで可読性を向上させます。 */
pre {
  background-color: #f3f4f6; /* 背景を薄い灰色に */
  border: 1px solid #e5e7eb; /* 薄い灰色の枠線を追加 */
  border-radius: 0.5rem;     /* 角を少し丸くする */
  padding: 1rem;             /* 内側の余白を確保 */
  overflow-x: auto;          /* 横に長いコードはスクロールできるようにする */
}

/* コード用フォントの指定 */
/* コードブロック内やインラインコードで使われるフォントを、等幅フォントに指定します。 */
code {
  font-family: Consolas, 'Courier New', Courier, monospace; /* プログラミング向けのフォントを指定 */
}
