/* =========================
   リセット
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", sans-serif;
  background: #ffffff;
  color: #333;
  line-height: 1.6;
}

/* =========================
   ヘッダー（ロゴ）
========================= */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 1px 0;
  text-align: center;
}

.logo img {
  height: 100px;
  width: auto;
}

.global-nav {
  background: #2e2e2e;
  border-bottom: 1px solid #e0e0e0;
}

.global-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
}

.global-nav a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #ffffff;
  font-size: 14px;
}

.global-nav a:hover {
  background: #606060;
}

.hero {
  display: flex;
  justify-content: center;
}

/* ナビ下画像 */
.hero img {
  width: 40%;
  height: 250px;
  object-fit: cover;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.category-filter button {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px; /* カプセル型 */
  border: 1px solid #ccc;
  background-color: #fff;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ホバー時 */
.category-filter button:hover {
  background-color: #f0f0f0;
  border-color: #999;
}

/* 選択中 */
.category-filter button.active {
  background-color: #333;
  color: #fff;
  border-color: #333;
}
/* =========================
   全体レイアウト
========================= */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
}

/* =========================
   記事検索
========================= */
.search-box {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

/* =========================
   記事カード（画像＋タイトル）
========================= */
.post-card {
  margin-bottom: 16px;
}

.post-card a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* 記事カード中身 */
.post-info {
  display: flex;
  flex-direction: column;
}

.meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 6px;
}

.meta .category {
  margin-left: 8px;
  padding: 2px 8px;
  background: #eee;
  border-radius: 999px;
}

@media (hover: hover) {
  .post-card a:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  }
}

/* サムネイル */
.post-card img {
  width: 180px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

/* タイトル */
.post-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

/* =========================
   サイドバー（プロフィール）
========================= */
.sidebar {
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  height: fit-content;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.sidebar h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.sidebar p {
  font-size: 14px;
  color: #555;
}

/* YouTube ボタン */
.youtube-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  background: #00aaff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.youtube-btn:hover {
  opacity: 0.85;
}

/* =========================
   レスポンシブ対応
========================= */

/* タブレット以下 */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* スマホ */
@media (max-width: 600px) {
  .logo img {
    height: 60px;
  }

  .hero img {
    width: 100%;
    height: auto;
  }

  .post-card a {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-card img {
    width: 100%;
    height: 200px;
  }

  .post-title {
    font-size: 17px;
  }

  .global-nav ul {
    flex-wrap: wrap;
  }
}
/* =========================
   記事本文レイアウト
========================= */
.article-content {
  max-width: 820px;
  margin: 40px auto;
  padding: 32px 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* =========================
   見出し
========================= */
.article-content h1 {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eee;
}

.article-content h2 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid #c25b2a;
}

.article-content h3 {
  font-size: 18px;
  margin-top: 32px;
  margin-bottom: 12px;
}

/* =========================
   本文・テキスト
========================= */
.article-content p {
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}

/* 強調 */
.article-content strong {
  background: linear-gradient(transparent 60%, #ffe4c4 60%);
  font-weight: 600;
}

/* =========================
   リンク
========================= */
.article-content a {
  color: #c25b2a;
  text-decoration: underline;
}

.article-content a:hover {
  text-decoration: none;
}

/* =========================
   画像
========================= */
.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 32px auto;
  border-radius: 12px;
}

/* キャプション */
.article-content figure {
  margin: 32px 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-top: 8px;
}

/* =========================
   リスト
========================= */
.article-content ul,
.article-content ol {
  margin: 20px 0 20px 24px;
}

.article-content li {
  margin: 10px 0;
  line-height: 1.8;
}

/* =========================
   引用
========================= */
.article-content blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  background: #f9f6f2;
  border-left: 4px solid #c25b2a;
  color: #555;
}

/* =========================
   コード（簡易）
========================= */
.article-content pre {
  background: #2b2b2b;
  color: #f8f8f2;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
}

.article-content code {
  font-family: Consolas, Monaco, monospace;
}

/* インラインコード */
.article-content p code {
  background: #f1f1f1;
  color: #c25b2a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 90%;
}

/* =========================
   スマホ対応
========================= */
@media (max-width: 600px) {
  .article-content {
    margin: 16px;
    padding: 24px 16px;
  }

  .article-content h1 {
    font-size: 24px;
  }

  .article-content h2 {
    font-size: 20px;
  }

  .article-content p {
    font-size: 15px;
  }
}
.youtube {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  height: 0;
}

.youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
/* 画像＋説明文 */
.article-figure {
  margin: 40px 0;
  text-align: center;
}

.article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: #777;
  line-height: 1.6;
}
.post-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
  display: block;
}