/* =============================================
   AIツール活用ナビ - style.css
   情報サイト王道デザイン
   ============================================= */

/* ---------- CSS変数（カラーパレット） ---------- */
:root {
  --primary:      #1a56db;   /* メインブルー */
  --primary-dark: #1340a8;
  --primary-light:#e8f0fe;
  --accent:       #f97316;   /* オレンジアクセント */
  --accent-light: #fff7ed;
  --success:      #16a34a;
  --text-main:    #1a1a2e;
  --text-sub:     #555770;
  --text-muted:   #5a6272;
  --border:       #e2e6f0;
  --bg:           #f5f7fb;
  --bg-white:     #ffffff;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.13);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    18px;
  --font:         'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'MS PGothic', sans-serif;
}

/* ---------- リセット & ベース ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---------- レイアウト ---------- */
.inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--bg-white);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.header-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.header-nav {
  display: flex;
  gap: 4px;
}
.header-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: background 0.2s, color 0.2s;
}
.header-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* =============================================
   HERO（トップページ）
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0e3fa3 60%, #1a56db 100%);
  color: #fff;
  padding: 48px 0 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 4px 18px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 24px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.hero-badges span {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.85rem;
}

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

/* カテゴリタブ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.tab-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--bg-white);
  color: var(--text-sub);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.tab-btn:hover,
.tab-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* セクション見出し */
.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  color: var(--text-main);
}

.article-section { margin-bottom: 48px; }

/* カードグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--primary);
  text-decoration: none;
}
.card-cat {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}
.card-desc {
  font-size: 1.2rem;
  color: var(--text-sub);
  line-height: 1.6;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.card-target {
  font-size: 0.88rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.card-arrow {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
}

/* =============================================
   BREADCRUMB（パンくず）
   ============================================= */
.breadcrumb {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 1.2rem;
  color: var(--text-muted);
}
.breadcrumb .inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb span:last-child { color: var(--text-sub); }

/* =============================================
   ARTICLE LAYOUT（記事ページ）
   ============================================= */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 60px;
  align-items: start;
}

/* 記事ヘッダー */
.article-header {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 30px 32px;
  margin-bottom: 24px;
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.article-meta-top {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.badge-cat, .badge-target {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 700;
}
.badge-cat {
  background: var(--primary);
  color: #fff;
}
.badge-target {
  background: var(--accent-light);
  color: #b45309;
  border: 1px solid #fed7aa;
}
.article-h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--text-main);
}
.article-lead {
  font-size: 1.2rem;
  color: var(--text-sub);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* 目次 */
.toc {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 28px;
}
.toc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.toc-list {
  list-style: decimal;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-list li a {
  font-size: 1rem;
  color: var(--primary);
}
.toc-list li a:hover { text-decoration: underline; }

/* 記事本文 */
.article-body {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 36px 0 16px;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px dashed var(--border);
}
.article-body p {
  margin-bottom: 16px;
  font-size: 1.2rem;
  line-height: 1.9;
}
.article-body ul, .article-body ol {
  margin: 0 0 18px 0;
  padding-left: 0;
}
.article-body ul li, .article-body ol li {
  font-size: 1.2rem;
  line-height: 1.8;
  padding: 6px 0 6px 22px;
  position: relative;
  border-bottom: 1px solid var(--bg);
}
.article-body ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.article-body ol { list-style: decimal; padding-left: 20px; }
.article-body ol li::before { content: none; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 20px 0;
}
.article-body th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body tr:nth-child(even) td { background: var(--bg); }

/* プレースホルダーテキスト */
.placeholder-text {
  background: #fffbeb;
  border: 1px dashed #fbbf24;
  border-radius: var(--radius-sm);
  padding: 16px;
  color: #92400e;
  font-size: 1rem;
}

/* CTAボックス */
.cta-box {
  background: linear-gradient(135deg, #1340a8 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 36px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-label {
  font-size: 1.2rem;
  opacity: 0.85;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.cta-point {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.6;
}
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 12px 32px;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(249,115,22,0.4);
}
.cta-btn:hover {
  background: #ea6c0e;
  transform: scale(1.03);
  text-decoration: none;
}

/* 関連記事 */
.related-articles { margin-bottom: 20px; }
.related-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.related-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.related-cat {
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 600;
}
.related-h1 {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.5;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { position: sticky; top: 80px; }
.sidebar-widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.widget-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text-main);
}
.widget-list li {
  border-bottom: 1px solid var(--bg);
}
.widget-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 1rem;
  color: var(--text-sub);
  transition: color 0.2s;
}
.widget-list li a:hover { color: var(--primary); text-decoration: none; }
.widget-list .count { color: var(--text-muted); font-size: 1.2rem; }

.sidebar-cta { background: var(--primary-light); border-color: var(--primary); }
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-tools li a {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  transition: background 0.2s;
}
.sidebar-tools li a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-color: var(--primary);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px;
  margin-top: 60px;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.footer-about p:not(.footer-logo) { line-height: 1.8; }
.footer-links h4 {
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-links ul li {
  margin-bottom: 8px;
}
.footer-links ul li a {
  color: #94a3b8;
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-links ul li a:hover { color: #fff; text-decoration: none; }
.footer-copy {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1.8;
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 12px 16px; }
  .nav-toggle { display: block; }

  .hero { padding: 40px 0 36px; }

  .card-grid { grid-template-columns: 1fr; }

  .article-header { padding: 20px; }
  .article-body { padding: 20px; }
  .cta-box { padding: 22px 20px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* =============================================
   PR・広告表示バー
   ============================================= */
.pr-bar {
  background: #fff5f5;
  border-top: 1px solid #fecaca;
  padding: 6px 20px;
  font-size: 0.72rem;
  color: #555770;
  text-align: center;
}
.pr-label {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  letter-spacing: 0.05em;
}

/* =============================================
   静的ページ（about / privacy / disclaimer / contact）
   ============================================= */
.static-layout {
  max-width: 800px;
  padding-top: 32px;
  padding-bottom: 60px;
}
.static-main .article-body h2 {
  margin-top: 32px;
}
.static-page p {
  margin-bottom: 18px;
  line-height: 1.9;
}
.contact-form-wrap {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 20px 0;
}
.contact-placeholder {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: #92400e;
  font-size: 0.875rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

/* お問い合わせボタン */
.contact-btn-wrap {
  text-align: center;
  margin: 32px 0;
}
.contact-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 18px 48px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(26,86,219,0.3);
  transition: background 0.2s, transform 0.2s;
}
.contact-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

/* =============================================
   目次クリック時のスクロールオフセット修正
   （スティッキーヘッダー＋PRバーの高さ分）
   ============================================= */
h2, h3, h4,
.article-body h2,
.article-body h3,
[id] {
  scroll-margin-top: 140px;
}


/* ===== XServerアフィリエイトCTA追加スタイル ===== */
.cta-box a:not(.cta-btn) {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}
.cta-box a:not(.cta-btn):hover {
  color: #fff;
}
/* サーバー比較ページ用テーブル強調 */
.article-body table td strong {
  color: var(--primary);
}
