/* ============================================
   IT-kks オリジナルデザイン
   ============================================ */

:root {
  --blue:       #1d4ed8;
  --blue-mid:   #3b82f6;
  --blue-light: #eff6ff;
  --orange:     #f97316;
  --text:       #1e293b;
  --text-sub:   #64748b;
  --bg:         #f1f5f9;
  --white:      #ffffff;
  --border:     #e2e8f0;
  --radius:     10px;
  --shadow:     0 1px 6px rgba(0,0,0,.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
               'ヒラギノ角ゴ ProN W3', Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Header ---- */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-logo-img {
  height: 42px;
  width: auto;
  border-radius: 6px;
}
.site-title-wrap { display: flex; flex-direction: column; }
.site-title { color: var(--blue); font-size: 1.05rem; font-weight: bold; }
.site-tagline { color: var(--text-sub); font-size: 0.73rem; }

/* ---- Nav ---- */
.site-nav { background: var(--blue); border-bottom: none; }
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
}
.nav-item {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,.9);
  font-size: 0.88rem;
  font-weight: bold;
  transition: background .15s;
}
.nav-item:hover {
  background: rgba(255,255,255,.15);
  color: white;
  text-decoration: none;
}
.nav-item.active { background: rgba(255,255,255,.2); color: white; }

/* ---- Layout ---- */
.content-wrap {
  max-width: 1140px;
  margin: 28px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 800px) {
  .content-wrap { grid-template-columns: 1fr; gap: 20px; }
  .sidebar { order: 2; }
}

/* ---- Article card (top page) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.13);
  text-decoration: none;
}
.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.card-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.card-date { font-size: 0.75rem; color: var(--text-sub); margin-bottom: 6px; }
.card-title {
  font-size: 0.95rem;
  font-weight: bold;
  line-height: 1.5;
  color: var(--text);
  flex: 1;
}
.card-badge {
  display: inline-block;
  background: var(--orange);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* ---- Page heading ---- */
.page-heading {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text);
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  margin-bottom: 18px;
}

/* ---- Article page ---- */
.article-card-header {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.article-eyecatch img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}
.article-meta { padding: 20px 24px 12px; }
.article-category {
  display: inline-block;
  background: var(--orange);
  color: white;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.article-title {
  font-size: 1.65rem;
  line-height: 1.4;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 10px;
}
.article-date { font-size: 0.8rem; color: var(--text-sub); }
.pr-notice {
  font-size: 0.75rem;
  color: var(--text-sub);
  background: #f8fafc;
  border-top: 1px solid var(--border);
  padding: 8px 24px;
}

/* ---- Article body ---- */
.article-body {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.article-body p { margin-bottom: 1.2em; }
.article-body h2 {
  font-size: 1.3rem;
  color: var(--white);
  background: var(--blue);
  padding: 10px 16px;
  border-radius: 6px;
  margin: 2em 0 0.9em;
  line-height: 1.4;
}
.article-body h3 {
  font-size: 1.1rem;
  color: var(--blue);
  border-left: 4px solid var(--blue);
  background: var(--blue-light);
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  margin: 1.8em 0 0.8em;
  line-height: 1.4;
}
.article-body h4 {
  font-size: 1rem;
  font-weight: bold;
  margin: 1.5em 0 0.6em;
  padding-bottom: 4px;
  border-bottom: 2px dashed var(--border);
}
.article-body ul, .article-body ol { padding-left: 1.6em; margin-bottom: 1.2em; }
.article-body li { margin-bottom: .4em; }
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body img {
  border-radius: 8px;
  margin: 1em auto;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.article-body a {
  color: var(--blue);
  border-bottom: 1px solid rgba(29,78,216,.35);
  transition: background .15s;
}
.article-body a:hover { background: var(--blue-light); text-decoration: none; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2em;
  font-size: 0.93rem;
}
.article-body th {
  background: var(--blue);
  color: white;
  padding: 10px 14px;
  text-align: left;
}
.article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: #f8fafc; }
.article-body blockquote {
  border-left: 4px solid var(--blue-mid);
  background: var(--blue-light);
  padding: 12px 18px;
  margin: 1.2em 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}
.article-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.88em;
}
.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.2em;
}
.article-body pre code { background: none; padding: 0; color: inherit; }

/* ---- Cocoon互換：TOC（目次） ---- */
.toc {
  background: var(--blue-light);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.5em 0;
  font-size: 0.9rem;
}
.toc-checkbox { display: none; }
.toc-title {
  font-weight: bold;
  cursor: pointer;
  display: block;
  color: var(--blue);
}
.toc-title::after { content: ' [開く]'; font-size: 0.8em; font-weight: normal; }
.toc-checkbox:checked ~ .toc-title::after { content: ' [閉じる]'; }
.toc-content { display: none; padding-top: 10px; }
.toc-checkbox:checked ~ .toc-content { display: block; }
.toc-list { padding-left: 1.4em; }
.toc-list li { margin-bottom: .3em; }
.toc-list a { color: var(--blue); border-bottom: none; }

/* ---- Cocoon互換：吹き出し/強調ボックス ---- */
.information-box, .memo-box, .common-icon-box[class*="information"] {
  background: #eff6ff; border-left: 4px solid #3b82f6;
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 1.2em 0; font-size: 0.95rem;
}
.question-box {
  background: #fefce8; border-left: 4px solid #ca8a04;
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 1.2em 0; font-size: 0.95rem;
}
.alert-box, .common-icon-box[class*="alert"] {
  background: #fef2f2; border-left: 4px solid #ef4444;
  padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 1.2em 0; font-size: 0.95rem;
}
.wp-block-list { padding-left: 1.6em; margin-bottom: 1.2em; list-style-type: disc; }
.cat-label {
  display: inline-block;
  background: var(--orange);
  color: white;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 20px;
  background: var(--white);
  border-radius: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-sub); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { margin: 0 8px; }

/* ---- Sidebar ---- */
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.widget-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.profile-img {
  width: 76px; height: 76px;
  border-radius: 50%; object-fit: cover; margin: 0 auto 10px;
}
.profile-name { text-align: center; font-weight: bold; font-size: 0.95rem; margin-bottom: 8px; }
.profile-desc { font-size: 0.83rem; color: var(--text-sub); line-height: 1.7; }
.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; padding: 9px 4px;
  color: var(--text); font-size: 0.88rem; transition: color .15s;
}
.category-list a::before { content: '›'; margin-right: 8px; color: var(--blue); font-weight: bold; }
.category-list a:hover { color: var(--blue); text-decoration: none; }
.recent-list { list-style: none; }
.recent-item {
  display: flex; gap: 10px; border-bottom: 1px solid var(--border);
  padding: 10px 0; align-items: flex-start;
}
.recent-item:last-child { border-bottom: none; }
.recent-thumb {
  width: 64px; height: 48px; object-fit: cover; border-radius: 5px; flex-shrink: 0;
}
.recent-title-link { color: var(--text); font-size: 0.82rem; line-height: 1.5; }
.recent-title-link:hover { color: var(--blue); text-decoration: none; }
.recent-date { font-size: 0.72rem; color: var(--text-sub); margin-top: 3px; }

/* ---- Author box (記事下) ---- */
.author-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-box img {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.author-box-name { font-weight: bold; margin-bottom: 6px; }
.author-box-desc { font-size: 0.88rem; color: var(--text-sub); line-height: 1.7; }
@media (max-width: 480px) { .author-box { flex-direction: column; align-items: center; text-align: center; } }

/* ---- Footer ---- */
.site-footer {
  background: #1e293b;
  color: rgba(255,255,255,.75);
  margin-top: 48px;
  padding: 32px 0 20px;
  font-size: 0.85rem;
}
.footer-inner { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.footer-logo-img { height: 36px; border-radius: 4px; margin-bottom: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 20px; }
.footer-nav a { color: rgba(255,255,255,.65); }
.footer-nav a:hover { color: white; text-decoration: none; }
.copyright {
  font-size: 0.78rem; color: rgba(255,255,255,.35);
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px;
}

/* ---- Top page hero ---- */
.site-hero {
  background: #7096c8;
  border-bottom: none;
  padding: 20px;
  text-align: center;
}
.hero-title { font-size: 1.15rem; font-weight: bold; color: #ffffff; margin-bottom: 4px; }
.hero-sub { font-size: 0.85rem; color: rgba(255,255,255,0.88); line-height: 1.6; }

/* ---- Mobile (〜800px) ---- */
@media (max-width: 800px) {
  body { font-size: 16px; }

  /* ヘッダー */
  .site-logo-img { height: 34px; }
  .site-title { font-size: 0.9rem; }
  .site-tagline { display: none; }

  /* ナビ */
  .nav-item { padding: 9px 12px; font-size: 0.82rem; }

  /* レイアウト */
  .content-wrap { margin: 16px auto; }

  /* 記事ページ */
  .article-title { font-size: 1.25rem; }
  .article-body { padding: 16px; }
  .article-body h2 { font-size: 1.1rem; padding: 8px 12px; }
  .article-body h3 { font-size: 1rem; }
  .article-meta { padding: 14px 16px 10px; }
  .pr-notice { margin: 0 16px 10px; }

  /* カード */
  .card-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 10px 12px 14px; }
  .card-title { font-size: 0.88rem; }
}

/* ---- スマホ縦（〜480px） ---- */
@media (max-width: 480px) {
  .content-wrap { padding: 0 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .site-title { font-size: 0.85rem; }
  .article-body { padding: 14px; }
  .article-body h2 { font-size: 1rem; }
  .breadcrumb { padding: 8px 12px; font-size: 0.75rem; }
}

/* ---- モバイルで著者ボックスを非表示（サイドバーに同じ内容あり） ---- */
@media (max-width: 800px) {
  .author-box { display: none; }
}
