/* ========== リセット & ベース ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #1a73e8;
  --color-primary-dark: #1557b0;
  --color-accent: #e84c1a;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #202124;
  --color-text-light: #5f6368;
  --color-border: #dadce0;
  --font-base: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  --font-size-base: 18px;
  --line-height: 1.9;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

html { font-size: var(--font-size-base); }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height);
}

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

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== ヘッダー ========== */
.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
  padding: 16px 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.site-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.main-nav {
  margin-top: 12px;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--color-border);
  overflow-x: auto;
}

.main-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  text-decoration: none;
}

/* ========== メインコンテンツ ========== */
.main-content { padding: 32px 0 60px; }

/* ========== ヒーロー ========== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  margin-bottom: 32px;
  text-align: center;
}

.hero h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.hero p { font-size: 1rem; opacity: 0.95; }
.hero strong { color: #ffd54f; }

/* ========== セクションタイトル ========== */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  border-left: 5px solid var(--color-primary);
  padding-left: 12px;
  margin-bottom: 20px;
}

/* ========== 記事カード（グリッド） ========== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.post-card a { color: inherit; text-decoration: none; display: block; }

.post-thumb { width: 100%; height: 160px; object-fit: cover; }

.post-card-body { padding: 16px; }

.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-date { font-size: 0.78rem; color: var(--color-text-light); }
.post-cat {
  font-size: 0.72rem;
  background: #e8f0fe;
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.post-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.post-summary { font-size: 0.85rem; color: var(--color-text-light); }

.view-all { text-align: center; margin-top: 12px; }

.btn-more {
  display: inline-block;
  padding: 12px 32px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn-more:hover { background: var(--color-primary-dark); text-decoration: none; }

/* ========== カテゴリグリッド ========== */
.recent-posts, .category-links { margin-bottom: 40px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.cat-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--color-text);
  text-decoration: none;
}
.cat-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow); text-decoration: none; }
.cat-icon { font-size: 2rem; }
.cat-name { font-size: 0.95rem; font-weight: 700; }

/* ========== 記事一覧ページ ========== */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; border-left: 5px solid var(--color-primary); padding-left: 12px; }

.post-list { display: flex; flex-direction: column; gap: 20px; }

.post-list-item {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.post-list-item a {
  display: flex;
  gap: 0;
  color: inherit;
  text-decoration: none;
}
.post-list-item a:hover .list-title { color: var(--color-primary); }

.list-thumb { width: 180px; min-width: 180px; height: 130px; object-fit: cover; }

.list-body { padding: 16px 20px; flex: 1; }
.list-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.list-summary { font-size: 0.85rem; color: var(--color-text-light); }

/* ========== 記事詳細ページ ========== */
.single-post { background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }

.post-header { margin-bottom: 24px; }
.post-heading { font-size: 1.6rem; font-weight: 700; line-height: 1.4; margin: 12px 0; }
.post-lead { font-size: 1rem; color: var(--color-text-light); border-left: 4px solid var(--color-border); padding-left: 12px; }

.post-featured-img { border-radius: var(--radius); margin-bottom: 28px; width: 100%; }

.post-body { font-size: 1rem; }
.post-body h2 { font-size: 1.3rem; font-weight: 700; margin: 36px 0 12px; padding: 10px 16px; background: #e8f0fe; border-left: 5px solid var(--color-primary); border-radius: 0 var(--radius) var(--radius) 0; }
.post-body h3 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; border-bottom: 2px solid var(--color-border); padding-bottom: 6px; }
.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { margin: 0 0 16px 1.5em; }
.post-body li { margin-bottom: 6px; }
.post-body table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.95rem; }
.post-body th { background: var(--color-primary); color: #fff; padding: 10px 14px; text-align: left; }
.post-body td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); }
.post-body tr:nth-child(even) td { background: #f8f9fa; }
.post-body blockquote { background: #f8f9fa; border-left: 5px solid var(--color-border); padding: 16px 20px; margin: 16px 0; font-size: 0.95rem; color: var(--color-text-light); }

.post-footer-banner { margin: 40px 0 24px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #f1f3f4; color: var(--color-text-light); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.tag:hover { background: #e8f0fe; color: var(--color-primary); text-decoration: none; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; }
.post-nav a { background: var(--color-surface); border-radius: var(--radius); padding: 12px 20px; box-shadow: var(--shadow); font-size: 0.9rem; font-weight: 600; max-width: 48%; }

/* ========== アフィリエイトバナー ========== */
.affiliate-banner {
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.affiliate-pickup {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
  border: 2px solid #ffb300;
}

.affiliate-article {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border: 2px solid #43a047;
}

.affiliate-inline {
  background: #f8f9fa;
  border: 2px solid var(--color-border);
}

.banner-label {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.affiliate-banner h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.affiliate-banner p { font-size: 0.9rem; margin-bottom: 16px; }

.btn-affiliate {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  transition: opacity 0.2s;
  text-decoration: none;
}
.btn-affiliate:hover { opacity: 0.85; text-decoration: none; }

.banner-note { font-size: 0.72rem; color: var(--color-text-light); margin-top: 10px !important; margin-bottom: 0 !important; }

/* ========== ページネーション ========== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.pagination .active span { background: var(--color-primary); color: #fff; }

/* ========== 固定ページ（プライバシー・免責・お問い合わせ） ========== */
.page-body {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.page-body h2 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; border-bottom: 2px solid var(--color-border); padding-bottom: 6px; }
.page-body p { margin-bottom: 14px; }

.contact-form { max-width: 560px; margin-top: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.95rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-base);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--color-primary); }
.btn-submit {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 14px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--color-primary-dark); }

/* ========== フッター ========== */
.site-footer {
  background: #2c2c2c;
  color: #ccc;
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
}
.footer-note { color: #aaa; margin-bottom: 10px; }
.footer-links { margin-bottom: 10px; }
.footer-links a { color: #aaa; margin: 0 6px; }
.footer-links a:hover { color: #fff; }
.copyright { color: #888; }

/* ========== ポイントボックス（ショートコード） ========== */
.point-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}
.point-good { background: #e8f5e9; border-left: 5px solid #43a047; }
.point-bad  { background: #fce4ec; border-left: 5px solid #e53935; }
.point-info { background: #e3f2fd; border-left: 5px solid #1e88e5; }
.point-label { font-size: 0.75rem; font-weight: 700; margin-bottom: 6px; color: var(--color-text-light); }
.point-body p { margin: 0; }

/* ========== レスポンシブ ========== */
@media (max-width: 640px) {
  :root { --font-size-base: 17px; }
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 1.3rem; }
  .single-post { padding: 20px; }
  .post-heading { font-size: 1.3rem; }
  .post-list-item a { flex-direction: column; }
  .list-thumb { width: 100%; min-width: unset; height: 200px; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
}
