/* ============================================
   AIワークラボ - メインスタイルシート
   ============================================ */

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

:root {
  --primary: #1e3a5f;
  --accent: #3b9ed8;
  --accent-light: #e8f4fc;
  --text: #2d2d2d;
  --text-muted: #6c757d;
  --bg: #ffffff;
  --bg-sub: #f8f9fa;
  --border: #e9ecef;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-width: 1100px;
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }
img { max-width: 100%; height: auto; display: block; }

/* --- レイアウト --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }

/* ============================================
   ヘッダー
   ============================================ */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

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

.site-logo a {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-badge {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: .05em;
}

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.site-nav a:hover { color: #fff; border-color: var(--accent); opacity: 1; }

/* ハンバーガー（SP用） */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* ============================================
   ヒーロー（トップページ）
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%);
  color: #fff;
  padding: 64px 20px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: .1em;
}

.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.hero p { font-size: 1rem; opacity: .85; max-width: 560px; margin: 0 auto 28px; }

.hero-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-tag {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.3);
}

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

/* --- セクションタイトル --- */
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  margin-bottom: 24px;
}

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

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.article-card:hover { box-shadow: var(--card-shadow); transform: translateY(-2px); }

.card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent-light), #dbe9f5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 2.5rem;
}

.card-body { padding: 18px 20px 20px; }

.card-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
  letter-spacing: .05em;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: .8rem;
  color: var(--text-muted);
}

.card-excerpt {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* もっと見るボタン */
.btn-more {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s;
}
.btn-more:hover { background: var(--accent); opacity: 1; }

/* ============================================
   サイドバー
   ============================================ */
.sidebar { display: flex; flex-direction: column; gap: 32px; }

.sidebar-widget {
  background: var(--bg-sub);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 16px;
}

/* プロフィール */
.profile-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.profile-name { text-align: center; font-weight: 700; margin-bottom: 4px; }
.profile-bio { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* カテゴリ */
.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;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: .9rem;
  color: var(--text);
}
.category-list a:hover { color: var(--accent); opacity: 1; }
.category-count {
  background: var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  padding: 1px 7px;
  border-radius: 10px;
}

/* AdSenseスロット */
.ad-slot {
  background: var(--border);
  border-radius: var(--radius);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .8rem;
}

/* ============================================
   記事ページ
   ============================================ */
.article-layout { padding: 48px 0; }

.article-header { margin-bottom: 32px; }

.article-category {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.article-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary);
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* 目次 */
.toc {
  background: var(--bg-sub);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px 0;
}

.toc-title { font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.toc ol { padding-left: 20px; }
.toc li { margin: 6px 0; font-size: .9rem; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--accent); }

/* 記事本文 */
.article-body { line-height: 1.9; }

.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin: 48px 0 16px;
  padding: 14px 20px;
  background: var(--accent-light);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 20px; }
.article-body li { margin: 8px 0; }

.article-body strong { color: var(--primary); }

.article-body .note {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-size: .9rem;
}

.article-body .point {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-size: .9rem;
}

/* CTAブロック（アフィリエイト） */
.cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 40px 0;
  text-align: center;
}

.cta-label { font-size: .8rem; opacity: .8; margin-bottom: 8px; letter-spacing: .1em; }
.cta-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.cta-desc { font-size: .9rem; opacity: .85; margin-bottom: 20px; }
.cta-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 4px;
  font-size: .95rem;
  transition: transform .2s;
}
.cta-btn:hover { transform: translateY(-1px); opacity: 1; }

/* 記事フッター */
.article-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.tag {
  background: var(--bg-sub);
  color: var(--text-muted);
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* 関連記事 */
.related-title { font-weight: 700; color: var(--primary); margin-bottom: 16px; font-size: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ============================================
   Aboutページ
   ============================================ */
.about-page { padding: 56px 0; max-width: 720px; margin: 0 auto; }
.about-profile { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 40px; }
.about-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.about-body h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.about-body p { font-size: .95rem; color: var(--text-muted); }

.about-section { margin-bottom: 40px; }
.about-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  margin-bottom: 16px;
}
.about-section p, .about-section li { font-size: .95rem; line-height: 1.9; }
.about-section ul { padding-left: 20px; }
.about-section li { margin: 6px 0; }

/* ============================================
   フッター
   ============================================ */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand .brand-name {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.footer-brand p { font-size: .85rem; line-height: 1.7; }

.footer-nav-title {
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin: 8px 0; }
.footer-nav a { font-size: .85rem; color: rgba(255,255,255,.7); }
.footer-nav a:hover { color: #fff; opacity: 1; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.6); }

/* ============================================
   パンくず
   ============================================ */
.breadcrumb {
  background: var(--bg-sub);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.breadcrumb ol { list-style: none; display: flex; gap: 0; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.breadcrumb li::after { content: '›'; margin: 0 8px; color: var(--text-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb li:last-child { color: var(--text-muted); }

/* ============================================
   プライバシーポリシー・お問い合わせ
   ============================================ */
.static-page { padding: 56px 0; max-width: 720px; margin: 0 auto; }
.static-page h1 { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-bottom: 32px; }
.static-page h2 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 32px 0 12px; }
.static-page p { margin-bottom: 16px; font-size: .95rem; line-height: 1.9; }
.static-page ul { padding-left: 20px; margin-bottom: 16px; }
.static-page li { margin: 6px 0; font-size: .95rem; }

/* お問い合わせフォーム */
.contact-form { margin-top: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font);
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { height: 160px; resize: vertical; }
.form-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 4px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.form-submit:hover { background: var(--accent); }

/* ============================================
   記事一覧ページ
   ============================================ */
.archive-page { padding: 48px 0; }
.archive-header { margin-bottom: 32px; }
.archive-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.archive-header p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { order: -1; }

  .site-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); padding: 16px 20px; gap: 16px; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }

  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .hero { padding: 40px 20px; }
  .about-profile { flex-direction: column; align-items: center; text-align: center; }
}
