/* ============================================================
ファイル名 : index.css
作成者：香田 大輝Ⓨ
制作開始日：2026/09/25
最終更新日：2026/10/06
機能 : ブログ一覧画面専用スタイル
 
概要 :
・ページヘッダー（メインタイトル、サブタイトル、装飾ライン）のスタイリング
・サイドバー内に配置される年別絞り込みメニューおよびフィルターボタンのデザイン
・ブログ記事カードをきれいに並べるレスポンシブなグリッドレイアウト（3カラム～1カラム）
・個別ブログカードの表示・非表示アニメーション、ホバーエフェクト、NEWバッジの装飾
・ブログカード内のサムネイル画像、投稿日、タイトルテキストのスタイル
・一覧画面全体およびカード要素のダークモード時におけるカラー反転・調整
・タブレット・スマートフォン向けのレスポンシブ対応（画面幅1100pxおよび768px以下）
============================================================ */

/* ページ全体の初期設定（余白の消除、基本フォント、背景色と文字色の設定、テーマ切替時の滑らかなトランジション） */
body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #333333;
  font-family: sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- スクロールしても追従する半透明の固定ヘッダー --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

/* ヘッダー内部のレイアウト（左右の要素をスペースを空けて配置） */
.header-inner {
  width: 100%;
  max-width: 100%;
  padding: 18px 40px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between; /* 左右にロゴと戻るボタンを配置 */
  align-items: center;
}

/* 左上ロゴを包むエリアのスタイル */
.top-logo-area {
  margin: 0;
}

/* ロゴ画像のスタイル（背景画像として読み込み、ホバー時に透明度を変更） */
.top-logo-img {
  display: block;
  width: 160px;
  height: 40px; /* 背景画像として表示させるための高さを指定 */
  background-image: url('../pict/logo.svg'); /* 階層や構成に合わせて 'pict/logo.svg' に調整してください */
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  transition: opacity 0.3s ease;
}

.top-logo-img:hover {
  opacity: 0.8;
}

/* ヘッダー右側の操作エリア */
.header-right {
  display: flex;
  align-items: center;
}

/* ホームページに戻るボタンのスタイルとホバー時のエフェクト */
.header-back-btn {
  text-decoration: none;
  color: #1c53a7;
  font-size: 14px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.header-back-btn:hover {
  opacity: 0.7;
}

/* ページ全体のレイアウト構造を中央に配置するラッパー */
.layout-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

/* メインコンテンツエリアのサイズと内側余白の設定 */
.main-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 120px 60px 60px 60px;
  box-sizing: border-box;
}

/* --- ページヘッダーセクション --- */
.page-header {
  margin-bottom: 30px;
}

/* ページタイトルのフォント設定とレイアウト */
.page-title {
  font-size: 36px;
  font-weight: 300;
  color: #555555;
  margin: 0 0 10px 0;
  display: flex;
  align-items: baseline;
  line-height: 1;
  transition: color 0.3s ease;
}

/* タイトル内の特定文字（アクセントカラーの適用） */
.text-blue {
  color: #1c53a7;
  font-size: 1.1em;
}

/* サブタイトルのスタイル */
.page-title-sub {
  font-size: 14px;
  color: #999999;
  font-weight: normal;
  margin-left: 10px;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

/* タイトル下部のグラデーション・装飾ライン */
.page-header-line {
  height: 1px;
  background-color: #1c53a7;
  width: 100%;
  opacity: 0.6;
}

/* --- 年別フィルターメニュー（上部中央ピル型ボタン） --- */
.filter-menu {
  display: flex;
  justify-content: center;
  margin: 35px 0 45px 0;
}

/* フィルターボタンを並べるリストのスタイル */
.filter-menu .filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* 個別フィルターボタンのデザインとインタラクション設定 */
.filter-btn {
  background: transparent;
  border: 1px solid #1c53a7;
  color: #1c53a7;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 24px;
  border-radius: 30px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background-color: rgba(28, 83, 167, 0.1);
}

/* アクティブ状態のフィルターボタン（選択中） */
.filter-btn.active {
  background-color: #1c53a7;
  color: #ffffff;
}

/* --- ブログカード・グリッドレイアウト（デフォルト：3カラム） --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

/* 個別ブログカードの基本構造とアニメーション初期状態 */
.blog-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #eeeeee;
  text-decoration: none;
  color: #333333;
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.6s ease, opacity 0.6s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* フィルタリング時の非表示状態 */
.blog-card.is-hidden {
  display: none;
}

/* フェードイン表示された状態 */
.blog-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* カードホバー時の浮き上がり・影の強調エフェクト */
.blog-card.is-visible:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* サムネイル画像エリア（アスペクト比16:9を維持） */
.blog-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 新着記事を示す「NEWバッジ」の装飾と配置 */
.blog-new-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #00bfff, #0099cc);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 191, 255, 0.4);
  letter-spacing: 1px;
  z-index: 2;
}

/* 記事情報（日付・タイトル）を格納するエリア */
.blog-title-area {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* 投稿日のスタイル */
.blog-date {
  font-size: 12px;
  color: #888888;
  margin-bottom: 6px;
}

/* 記事タイトルのフォント設定 */
.blog-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.5;
  margin: 0;
  color: #333333;
  transition: color 0.3s ease;
}


/* --- ダークモード対応スタイル --- */
body.dark-theme {
  background-color: #0f172a;
  color: #f8fafc;
}

/* ダークモード時の固定ヘッダー背景色調整 */
body.dark-theme .site-header {
  background-color: rgba(15, 23, 42, 0.75);
}

body.dark-theme .header-back-btn {
  color: #60a5fa;
}

body.dark-theme .page-title {
  color: #f8fafc;
}

body.dark-theme .page-title-sub {
  color: #94a3b8;
}

body.dark-theme .blog-card {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

body.dark-theme .blog-title {
  color: #f8fafc;
}

body.dark-theme .blog-image {
  background-color: #0f172a;
}


/* ==========================================
   レスポンシブ対応（メディアクエリ）
   ========================================== */

/* 画面幅1024px以下のタブレット向けレイアウト調整 */
@media (max-width: 1024px) {
  .header-inner {
    padding: 16px 30px;
  }
  .main-content {
    padding: 110px 30px 40px 30px;
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2カラム表示に変更 */
    gap: 24px;
  }
}

/* 画面幅768px以下のスマートフォン向けレイアウト調整 */
@media (max-width: 768px) {
  .header-inner {
    padding: 14px 20px;
  }
  .top-logo-img {
    width: 130px;
  }
  .main-content {
    padding: 95px 16px 30px 16px;
  }
  .page-title {
    font-size: 28px;
  }
  .page-title-sub {
    font-size: 12px;
  }
  .header-back-btn {
    font-size: 13px;
  }
  .filter-menu {
    margin: 25px 0 30px 0;
  }
  .filter-btn {
    padding: 6px 18px;
    font-size: 13px;
  }
  .blog-grid {
    grid-template-columns: 1fr; /* 1カラム表示に変更 */
    gap: 20px;
  }
}