/* ========================================
   旅とみぃ - 共通スタイル
   ======================================== */

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

:root {
  --primary: #3a7bd5;
  --primary-dark: #2563b0;
  --accent: #e07b54;
  --accent-light: #fef3ed;
  --bg: #f5f7fa;
  --bg-hero: #e8f1fb;
  --white: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --border: #e2e8f0;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 6px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 6px;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 2.0;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   ヘッダー
   ======================================== */
.site-header {
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo .logo-icon { font-size: 24px; }
.site-logo .logo-text { font-size: 15px; font-weight: 700; color: var(--primary); line-height: 1.3; }
.site-logo .logo-sub { font-size: 11px; color: var(--text-light); font-weight: 400; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--bg); color: var(--primary); }
.site-nav a.active { color: var(--primary); background: #eef4fd; }

.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; }

/* ========================================
   ヒーロー
   ======================================== */
.hero {
  background: var(--bg-hero);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 18px,
    rgba(58,123,213,0.04) 18px,
    rgba(58,123,213,0.04) 19px
  );
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: rgba(58,123,213,0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 14px;
}
.hero-title .highlight { color: var(--primary); }

.hero-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
  max-width: 480px;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-weight: 500;
}

.hero-illust { font-size: 80px; line-height: 1; opacity: 0.85; }

/* ========================================
   メインレイアウト
   ======================================== */
.main-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* ========================================
   セクション
   ======================================== */
.section { margin-bottom: 40px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.section-link {
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}
.section-link:hover { text-decoration: underline; }

/* ========================================
   記事カード
   ======================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }

.card-thumbnail {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.tag-credit { background: #fef3c7; color: #92400e; }
.tag-travel { background: #d1fae5; color: #065f46; }
.tag-tips   { background: #ede9fe; color: #4c1d95; }
.tag-goods  { background: #fce7f3; color: #831843; }
.tag-points { background: #dbeafe; color: #1e40af; }
.tag-trend  { background: #ffe4e6; color: #9f1239; }

.card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ========================================
   サイドバー
   ======================================== */
.sidebar { position: sticky; top: 80px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* プロフィールウィジェット */
.profile-widget { text-align: center; }
.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
}
.profile-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.profile-bio { font-size: 12px; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.profile-link {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 20px;
  transition: background 0.15s;
}
.profile-link:hover { background: var(--primary-dark); }

/* カテゴリーウィジェット */
.category-list { list-style: none; }
.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px;
  font-size: 13px;
  transition: color 0.15s;
}
.category-list a:hover { color: var(--primary); }
.category-count {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

/* 人気記事リスト */
.popular-list { list-style: none; }
.popular-list li { padding: 9px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; }
.popular-list li:last-child { border-bottom: none; }
.popular-num { font-size: 16px; font-weight: 800; color: var(--primary); opacity: 0.4; min-width: 20px; }
.popular-title { font-size: 12px; line-height: 1.5; color: var(--text); }
.popular-title:hover { color: var(--primary); }

/* ========================================
   フッター
   ======================================== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.8);
  padding: 40px 20px;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-title { font-size: 15px; font-weight: 700; color: white; }
.footer-desc { font-size: 12px; line-height: 1.7; max-width: 500px; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { font-size: 12px; color: rgba(255,255,255,0.6); }
.footer-nav a:hover { color: white; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ========================================
   記事ページ
   ======================================== */
.article-header {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 20px 0;
}
.article-header .tag { margin-bottom: 12px; }
.article-h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 16px;
}
.article-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }

.article-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}
.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 14px;
  padding: 12px 16px;
  background: var(--bg-hero);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
}
.article-body p { margin-bottom: 22px; line-height: 2.0; font-size: 16px; }
.article-body ul, .article-body ol { margin: 14px 0 24px 24px; }
.article-body li { margin-bottom: 10px; line-height: 2.0; font-size: 16px; }
.article-body strong { font-weight: 700; }

/* 目次 (TOC) */
.toc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.toc-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-light); }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 7px; font-size: 14px; }
.toc a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.toc a:hover { color: var(--primary-dark); }

/* 著者ボックス */
.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 40px 0 0;
}
.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.author-bio { font-size: 13px; color: var(--text-light); line-height: 1.7; }

.info-box {
  background: var(--bg-hero);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13px;
}
.info-box .box-title { font-weight: 700; color: var(--primary); margin-bottom: 8px; }

.comparison-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13px; }
.comparison-table th { background: var(--primary); color: white; padding: 10px 12px; text-align: left; }
.comparison-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.comparison-table tr:nth-child(even) td { background: var(--bg); }
.comparison-table .highlight-row td { background: #fef9c3; font-weight: 600; }

.affiliate-cta {
  background: linear-gradient(135deg, var(--accent-light), #fff);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin: 28px 0;
  text-align: center;
}
.affiliate-cta .cta-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.affiliate-cta .cta-desc { font-size: 13px; color: var(--text-light); margin-bottom: 14px; }
.affiliate-cta .cta-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 30px;
  transition: background 0.15s, transform 0.1s;
}
.affiliate-cta .cta-btn:hover { background: #c96840; transform: translateY(-1px); }

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-illust { display: none; }
  .main-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .articles-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  /* スマホ: 記事本文の読みやすさ */
  .article-body p,
  .article-body li {
    font-size: 16px;
    line-height: 2.0;
  }
  .article-body h2 {
    font-size: 18px;
  }
  .article-body h3 {
    font-size: 16px;
  }
  .article-h1 {
    font-size: 20px !important;
  }
  .info-box,
  .affiliate-cta {
    padding: 14px;
  }
  .comparison-table {
    font-size: 12px;
  }
  .comparison-table th,
  .comparison-table td {
    padding: 7px 8px;
  }
}


/* 関連記事セクション */
.related-articles { max-width: 800px; margin: 48px auto 0; padding: 0 20px; }
.related-heading { font-size: 20px; font-weight: 800; margin-bottom: 20px; padding-left: 12px; border-left: 5px solid var(--primary); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.related-item { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--text); display: block; transition: all 0.2s; }
.related-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.related-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary); background: var(--bg-hero); padding: 3px 10px; border-radius: 10px; margin-bottom: 8px; }
.related-title { font-size: 14px; font-weight: 600; line-height: 1.5; margin: 0; color: var(--text); }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }


/* 記事ヒーロー画像 */
.article-hero { max-width: 900px; margin: 0 auto 0; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 1; }
.article-hero svg { width: 100%; height: 100%; display: block; }
@media (max-width: 768px) { .article-hero { border-radius: 0; } }


/* パンくずリスト */
.breadcrumb { max-width: 900px; margin: 16px auto 0; padding: 0 20px; font-size: 12px; color: var(--text-light); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 600; }


/* SNSシェアボタン */
.share-block { max-width: 800px; margin: 32px auto 0; padding: 20px; text-align: center; border-top: 1px solid var(--border); }
.share-label { font-size: 13px; font-weight: 700; color: var(--text-light); margin-bottom: 12px; letter-spacing: 0.05em; }
.share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 24px; font-size: 13px; font-weight: 700; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; cursor: pointer; border: none; }
.share-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
.share-btn svg { flex-shrink: 0; }
.share-x { background: #000; color: #fff; }
.share-threads { background: #000; color: #fff; }
.share-hatena { background: #00a4de; color: #fff; }
.share-copy { background: var(--bg); color: var(--text); border: 1px solid var(--border); font-family: inherit; }
.share-copy:hover { background: var(--bg-hero); }
@media (max-width: 480px) { .share-btn span { display: none; } }

/* ===== Xフォローボタン ===== */
.x-follow-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff !important;
  padding: 11px 18px;
  border-radius: 24px;
  font-size: 0.88em;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s;
  justify-content: center;
  margin-top: 4px;
}
.x-follow-btn:hover { background: #222; }
.x-cta-box {
  background: linear-gradient(135deg,#f0f7ff,#e8f0fe);
  border: 1.5px solid #c5d8f8;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 32px 0;
  text-align: center;
}
.x-cta-box p { font-size: 0.9em; color: #444; margin-bottom: 12px; line-height: 1.7; }
