/* AI navi - メインCSS */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --accent-dark: #ea6c0a;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #22c55e;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
}

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

/* ナビゲーション */
header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
nav { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.4rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.logo span { color: var(--accent); }
nav ul { list-style: none; display: flex; gap: 24px; }
nav ul a { text-decoration: none; color: var(--text-light); font-size: 0.9rem; font-weight: 500; transition: color .2s; }
nav ul a:hover { color: var(--primary); }

/* ヒーロー */
.hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #0ea5e9 100%); color: white; text-align: center; padding: 64px 20px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.4; margin-bottom: 16px; }
.hero p { font-size: 1.05rem; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }
.hero-badge { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.badge { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; padding: 6px 16px; font-size: 0.85rem; }

/* CTAボタン */
.btn { display: inline-block; padding: 14px 32px; border-radius: 8px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: all .2s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: white; position: relative; overflow: hidden; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249,115,22,0.5); }
.btn-primary::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(255,255,255,0.3); border-radius: 50%; transform: translate(-50%,-50%); transition: width .4s, height .4s; }
.btn-primary:active::after { width: 200px; height: 200px; }
.btn-outline { background: transparent; color: white; border: 2px solid white; }
.btn-outline:hover { background: white; color: var(--primary); }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
/* パルスアニメーション（目を引くCTA用） */
@keyframes pulse-btn { 0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.5); } 50% { box-shadow: 0 0 0 10px rgba(249,115,22,0); } }
.btn-pulse { animation: pulse-btn 2s infinite; }

/* セクション */
section { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }
.section-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--text-light); margin-bottom: 32px; }
.section-divider { border: none; border-top: 2px solid var(--border); margin: 48px 0; }

/* おすすめTop3 */
.top3 { background: linear-gradient(135deg, #fef9f0, #fff7ed); border-radius: var(--radius); padding: 32px 24px; margin-bottom: 48px; border: 2px solid #fed7aa; }
.top3-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 24px; color: var(--accent-dark); text-align: center; }
.top3-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.top3-card { background: white; border-radius: 10px; padding: 20px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 12px; }
.rank-badge { font-size: 1.1rem; font-weight: 800; }
.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #b45309; }
.tool-name { font-size: 1.15rem; font-weight: 700; }
.tool-desc { font-size: 0.9rem; color: var(--text-light); }
.tool-merit { font-size: 0.85rem; background: #f0fdf4; color: #15803d; padding: 8px 12px; border-radius: 6px; }

/* 比較表 */
.compare-table-wrap { overflow-x: auto; margin: 24px 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.compare-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: left; }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.compare-table tr:nth-child(even) td { background: #f8fafc; }
.compare-table tr:hover td { background: #eff6ff; }
.tag-free { background: #dcfce7; color: #15803d; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.tag-paid { background: #fef3c7; color: #92400e; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.tag-best { background: #dbeafe; color: #1d4ed8; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }

/* ツールカード */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 24px 0; }
.tool-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--card-shadow); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.tool-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tool-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.1rem; }
.tool-card h3 { font-size: 1.1rem; font-weight: 700; }
.tool-price { font-size: 0.85rem; color: var(--text-light); }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; font-size: 0.85rem; }
.pros li::before { content: "✓ "; color: var(--success); }
.cons li::before { content: "✗ "; color: #ef4444; }
.pros, .cons { list-style: none; }
.pros li, .cons li { margin-bottom: 4px; }

/* CTA ブロック */
.cta-block { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: white; border-radius: var(--radius); padding: 36px 28px; text-align: center; margin: 40px 0; border: 2px solid rgba(255,255,255,0.15); }
.cta-block h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.cta-block p { opacity: 0.9; margin-bottom: 22px; font-size: 0.98rem; }
.cta-note { font-size: 0.8rem; opacity: 0.7; margin-top: 10px; }
/* オレンジCTA（目立つ高CV色） */
.cta-block-orange { background: linear-gradient(135deg, #ea580c, #f97316); color: white; border-radius: var(--radius); padding: 36px 28px; text-align: center; margin: 40px 0; }
.cta-block-orange h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.cta-block-orange p { opacity: 0.9; margin-bottom: 22px; font-size: 0.98rem; }
/* おすすめラベル */
.recommend-badge { display: inline-block; background: #f97316; color: white; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 4px; margin-bottom: 8px; letter-spacing: 0.05em; }
/* 緊急性バナー */
.urgency-bar { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 6px; padding: 10px 16px; font-size: 0.88rem; color: #92400e; font-weight: 600; text-align: center; margin: 16px 0; }
/* スティッキーモバイルCTA */
.sticky-cta { display: none; }
@media (max-width: 768px) {
  .sticky-cta { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: var(--accent); color: white; text-align: center; padding: 14px 20px; font-weight: 700; font-size: 1rem; text-decoration: none; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 -2px 12px rgba(0,0,0,0.2); }
  .sticky-cta:hover { background: var(--accent-dark); }
  .article-wrap { padding-bottom: 80px; }
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: white; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
.faq-q { padding: 16px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.faq-q::after { content: "＋"; color: var(--primary); font-weight: 700; }
.faq-a { padding: 0 20px 16px; color: var(--text-light); font-size: 0.95rem; }

/* パンくず */
.breadcrumb { font-size: 0.85rem; color: var(--text-light); padding: 12px 20px; max-width: 1100px; margin: 0 auto; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* 記事ページ */
.article-wrap { max-width: 860px; margin: 0 auto; padding: 32px 20px; }
.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.5; margin-bottom: 12px; }
.article-meta { display: flex; gap: 16px; font-size: 0.85rem; color: var(--text-light); flex-wrap: wrap; }
.article-toc { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 20px 24px; margin: 24px 0; }
.article-toc h2 { font-size: 1rem; margin-bottom: 12px; }
.article-toc ol { padding-left: 20px; font-size: 0.9rem; line-height: 2; }
.article-toc a { color: var(--primary); text-decoration: none; }
.article-body h2 { font-size: 1.3rem; font-weight: 700; margin: 40px 0 16px; padding-left: 12px; border-left: 4px solid var(--primary); }
.article-body h3 { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; line-height: 2; }
.summary-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 20px 24px; margin: 20px 0; }
.summary-box h3 { color: var(--primary); margin-bottom: 8px; }
.price-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; }
.price-table th { background: #1e3a8a; color: white; padding: 10px 14px; }
.price-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.price-table tr:nth-child(even) td { background: #f8fafc; }

/* アフィリエイトバナー */
.affiliate-banner { text-align: center; margin: 32px 0; }

/* 著者ボックス */
.author-box { display: flex; align-items: center; gap: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; margin: 24px 0; }
.author-avatar { flex-shrink: 0; }
.author-name { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.author-bio { font-size: 0.84rem; color: var(--text-light); line-height: 1.65; }

/* フッター */
footer { background: #1e293b; color: #94a3b8; text-align: center; padding: 32px 20px; font-size: 0.85rem; }
footer a { color: #60a5fa; text-decoration: none; }
.footer-nav { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.affiliate-disc { background: #0f172a; padding: 12px 20px; border-radius: 6px; font-size: 0.8rem; margin-bottom: 16px; }

/* レスポンシブ */
@media (max-width: 768px) {
  nav ul { display: none; }
  .hero { padding: 40px 16px; }
  .top3-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .article-wrap { padding: 20px 16px; }
  .btn { width: 100%; display: block; text-align: center; padding: 16px 20px; font-size: 1.05rem; }
  .cta-block, .cta-block-orange { padding: 24px 16px; }
}
/* ハイライトアフィリリンク */
.affiliate-link-highlight { display: inline-flex; align-items: center; gap: 6px; background: #fff7ed; border: 1.5px solid #f97316; border-radius: 6px; padding: 2px 10px; color: #ea580c; font-weight: 600; text-decoration: none; font-size: 0.9rem; transition: all .2s; }
.affiliate-link-highlight:hover { background: #f97316; color: white; }
/* ハンバーガーメニュー */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: .3s; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  nav { position: relative; }
  nav ul.nav-open { display: flex !important; position: absolute; top: 60px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 16px 20px; gap: 16px; border-bottom: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 99; }
  .site-nav.nav-open, .header-nav.nav-open, .global-nav.nav-open { display: flex !important; position: absolute; top: 60px; left: 0; right: 0; background: var(--white, #fff); flex-direction: column; padding: 16px 20px; gap: 16px; border-bottom: 1px solid var(--border, #e5e7eb); box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 99; }
}

/* 著者ボックス */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin: 40px 0;
}
.author-box .author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
}
.author-box .author-info h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}
.author-box .author-info .author-title {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 8px;
}
.author-box .author-info p {
  font-size: 0.875rem;
  color: #495057;
  margin: 0;
  line-height: 1.6;
}
.author-box .author-info .author-links {
  margin-top: 8px;
  font-size: 0.8rem;
}
.author-box .author-info .author-links a {
  color: #667eea;
  text-decoration: none;
  margin-right: 12px;
}

.article-screenshot {
  margin: 24px 0;
  text-align: center;
}
.article-screenshot img {
  width: 100%;
  max-width: 800px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.article-screenshot figcaption {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 8px;
}

/* === CTR改善: CTAボタン強化 === */
.btn-primary {
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
  letter-spacing: 0.03em;
}

/* === CTR改善: 比較表おすすめ行ハイライト === */
.compare-table tr.recommended td {
  background: #eff6ff !important;
  border-left: 3px solid var(--primary);
  font-weight: 600;
}

/* === CTR改善: 関連記事hover効果 === */
.related-articles li {
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-articles li:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* === CTR改善: 比較表スクロールヒント（モバイル） === */
@media (max-width: 768px) {
  .compare-table-wrap::after {
    content: '← 横スクロールできます →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 6px 0;
    background: #f0f4ff;
    border-radius: 4px;
    margin-top: 4px;
  }
}

/* === 収益化改善: PC対応スティッキーCTAバー === */
@media (min-width: 769px) {
  .sticky-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
    transition: background 0.2s;
  }
  .sticky-cta:hover {
    background: linear-gradient(135deg, var(--accent-dark), #c2410c);
  }
  .article-wrap {
    padding-bottom: 70px;
  }
}

/* === 収益化改善: インラインCTAボタンボックス === */
.cta-inline-box {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 2px solid #fb923c;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
  text-align: center;
}
.cta-inline-box p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #9a3412;
}
.cta-inline-box .btn {
  display: inline-block;
}

/* === 収益化改善: 比較表おすすめバッジ === */
.badge-recommend {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* === 収益化改善: アフィリエイトリンクボタン化 === */
.af-link-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(249,115,22,0.3);
}
.af-link-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.4);
}

/* === 収益化改善: AdSense間隔調整 === */
.ad-unit {
  margin: 32px 0;
  text-align: center;
  min-height: 100px;
}

/* === (A) モバイル用スティッキーCTA === */
@media (max-width: 768px) {
  .sticky-cta-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(90deg, #f97316, #ea580c);
    color: white;
    text-align: center;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.25);
  }
  .sticky-cta-mobile:hover { background: linear-gradient(90deg, #ea580c, #c2410c); }
  /* 記事コンテンツの下部に余白（スティッキーCTAに隠れないように） */
  body { padding-bottom: 56px; }
}
@media (min-width: 769px) {
  .sticky-cta-mobile { display: none; }
}

/* === (B) 比較表ハイライト行 === */
.table-highlight-row {
  background: #fef3c7 !important;
  position: relative;
}
.table-highlight-row td:first-child::before {
  content: "\2605 \304A\3059\3059\3081";
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #d97706;
  margin-bottom: 2px;
}

/* === (C) 記事末尾フルワイドCTA === */
.cta-fullwidth {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  margin: 40px 0;
}
.cta-fullwidth h3 {
  color: white;
  font-size: 1.3rem;
  margin: 0 0 12px;
}
.cta-fullwidth p {
  color: rgba(255,255,255,0.9);
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.cta-fullwidth .cta-btn {
  display: inline-block;
  background: white;
  color: #4f46e5;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-fullwidth .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* === (D) サイドバー追従広告（PC用） === */
@media (min-width: 1100px) {
  .sidebar-sticky-ad {
    position: sticky;
    top: 80px;
    width: 300px;
    margin-left: auto;
    float: right;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
  }
  .sidebar-sticky-ad p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0 0 8px;
  }
}
@media (max-width: 1099px) {
  .sidebar-sticky-ad { display: none; }
}

/* === (E) 社会的証明ボックス === */
.social-proof-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.9rem;
}
.social-proof-box .proof-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.social-proof-box .proof-text {
  color: #166534;
  font-weight: 600;
}
.social-proof-box .proof-sub {
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 400;
}
