/* =============================================
   blog.css - Notion Design System
   工場・倉庫の床研磨・コーティング業界 ブログページ
   =============================================
   
   デザインシステム:
   - フォント：Inter + Noto Sans JP（Google Fonts）
   - 色：Warm White (#f6f5f4), Near-Black (rgba(0,0,0,0.95)), Notion Blue (#0075de)
   - ボーダー：1px solid rgba(0,0,0,0.1)（whisper border）
   - シャドウ：4-5 層の低不透明度スタック
   - 余白：8px ベース、64-120px の generous vertical rhythm
   ============================================= */

/* =============================================
   リセットとベース
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Notion カラーパレット */
  --notion-bg: #f6f5f4;
  --notion-white: #ffffff;
  --notion-blue: #0075de;
  --notion-blue-hover: #0061b8;
  --near-black: rgba(0, 0, 0, 0.95);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-tertiary: rgba(0, 0, 0, 0.45);
  
  /* Whisper Border */
  --whisper-border: 1px solid rgba(0, 0, 0, 0.1);
  
  /* Multi-layer Shadow (4-5 layers, low opacity) */
  --notion-shadow: 
    rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,
    rgba(15, 15, 15, 0.1) 0px 3px 6px,
    rgba(15, 15, 15, 0.2) 0px 9px 24px;
  
  --notion-shadow-hover:
    rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,
    rgba(15, 15, 15, 0.1) 0px 6px 12px,
    rgba(15, 15, 15, 0.2) 0px 18px 48px;
  
  /* Spacing (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 80px;
  --space-8: 120px;
  
  /* Typography */
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-noto: 'Noto Sans JP', sans-serif;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-noto);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--near-black);
  background-color: var(--notion-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   スキップリンク
   ============================================= */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--notion-blue);
  color: white;
  padding: var(--space-1) var(--space-2);
  z-index: 1001;
  font-weight: 600;
  font-family: var(--font-inter);
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* =============================================
   ヘッダー（本体 index.html と同一構造）
   ============================================= */
header {
  background: var(--notion-white);
  border-bottom: var(--whisper-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--notion-bg);
  border-bottom: var(--whisper-border);
  padding: var(--space-1) 0;
  font-size: 0.8125rem;
}

.header-top .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.site-info {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.header-main {
  padding: var(--space-2) 0;
}

.header-main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  font-size: 2rem;
}

.logo-text h1 {
  font-family: var(--font-inter);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--near-black);
  line-height: 1.2;
  margin: 0;
}

.logo-text p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: var(--space-1);
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--near-black);
  transition: all 0.3s ease;
}

nav {
  border-top: var(--whisper-border);
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-1);
  overflow-x: auto;
}

.nav-item a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-inter);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: var(--radius-md);
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--notion-blue);
  background: rgba(0, 117, 222, 0.08);
}

/* =============================================
   メインレイアウト（2 カラム）
   ============================================= */
.blog-main {
  padding: var(--space-6) 0 var(--space-8);
  min-height: calc(100vh - 200px);
}

.blog-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-5);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* =============================================
   ブログ一覧ページ - ヒーロー
   ============================================= */
.blog-header {
  text-align: center;
  padding: var(--space-7) var(--space-2);
  margin-bottom: var(--space-5);
}

.blog-header h1 {
  font-family: var(--font-inter);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--near-black);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  line-height: 1.1;
}

.blog-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =============================================
   ブログカードグリッド（一覧ページ）
   ============================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
}

.blog-card {
  background: var(--notion-white);
  border: var(--whisper-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--notion-shadow);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--notion-shadow-hover);
  border-color: rgba(0, 117, 222, 0.3);
}

.blog-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-thumbnail {
  transform: scale(1.03);
}

.blog-content {
  padding: var(--space-3);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-content h2 {
  font-family: var(--font-inter);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--near-black);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-content time {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-family: var(--font-inter);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.article-summary {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-inter);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--notion-blue);
  text-decoration: none;
  transition: color 0.2s ease;
  align-self: flex-start;
}

.read-more:hover {
  color: var(--notion-blue-hover);
}

.read-more::after {
  content: '→';
  transition: transform 0.2s ease;
}

.read-more:hover::after {
  transform: translateX(4px);
}

/* =============================================
   記事詳細ページ
   ============================================= */
.article-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: var(--whisper-border);
}

.article-title {
  font-family: var(--font-inter);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--near-black);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  font-family: var(--font-inter);
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.featured-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  border: var(--whisper-border);
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
}

/* 記事本文 */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgba(0, 0, 0, 0.85);
}

.article-body h2 {
  font-family: var(--font-inter);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--near-black);
  margin: var(--space-6) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--notion-blue);
  letter-spacing: -0.015em;
}

.article-body h3 {
  font-family: var(--font-inter);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--near-black);
  margin: var(--space-5) 0 var(--space-2);
  letter-spacing: -0.01em;
}

.article-body h4 {
  font-family: var(--font-inter);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--near-black);
  margin: var(--space-4) 0 var(--space-2);
}

.article-body p {
  margin-bottom: var(--space-3);
  color: rgba(0, 0, 0, 0.85);
}

.article-body a {
  color: var(--notion-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.article-body a:hover {
  color: var(--notion-blue-hover);
}

.article-body ul,
.article-body ol {
  margin: var(--space-3) 0 var(--space-3) var(--space-5);
  padding: 0;
}

.article-body li {
  margin-bottom: var(--space-2);
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.75;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  border: var(--whisper-border);
}

.article-body blockquote {
  border-left: 3px solid var(--notion-blue);
  margin: var(--space-4) 0;
  padding: var(--space-3) 0 var(--space-3) var(--space-3);
  color: var(--text-secondary);
  font-style: italic;
  background: var(--notion-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body strong {
  color: var(--near-black);
  font-weight: 600;
}

/* ハイライトボックス */
.highlight-box,
.data-reference {
  background: var(--notion-white);
  border: var(--whisper-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  box-shadow: var(--notion-shadow);
}

.highlight-box h3,
.data-reference h3 {
  margin-top: 0;
  font-family: var(--font-inter);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--near-black);
}

/* 目次 (TOC) */
.toc {
  background: var(--notion-white);
  border: var(--whisper-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--notion-shadow);
}

.toc h3 {
  font-family: var(--font-inter);
  font-size: 1rem;
  font-weight: 700;
  color: var(--near-black);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--whisper-border);
  letter-spacing: -0.01em;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: var(--space-2);
}

.toc a {
  display: block;
  padding: var(--space-1) var(--space-2);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  line-height: 1.5;
}

.toc a:hover {
  background: rgba(0, 117, 222, 0.08);
  color: var(--notion-blue);
}

.toc .toc-sub {
  margin-left: var(--space-3);
  font-size: 0.875rem;
}

/* =============================================
   サイドバー
   ============================================= */
.sidebar {
  position: sticky;
  top: calc(var(--space-6) + 20px);
  align-self: start;
}

.sidebar-widget,
.sidebar-section {
  background: var(--notion-white);
  border: var(--whisper-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  box-shadow: var(--notion-shadow);
}

.sidebar-widget .widget-title,
.sidebar-section h3 {
  font-family: var(--font-inter);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--near-black);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--whisper-border);
  letter-spacing: -0.01em;
}

.widget-list,
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list li,
.sidebar-nav li {
  margin-bottom: var(--space-2);
}

.widget-list a,
.sidebar-nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: var(--space-1) 0;
  line-height: 1.5;
}

.widget-list a:hover,
.sidebar-nav a:hover {
  color: var(--notion-blue);
}

/* 広告バナー */
.amazon-banner {
  background: var(--notion-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  text-align: center;
}

.amazon-banner a {
  display: block;
  text-decoration: none;
}

.amazon-banner div {
  font-family: var(--font-inter);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* 関連記事 */
.related-articles {
  background: var(--notion-white);
  border: var(--whisper-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  box-shadow: var(--notion-shadow);
}

.related-articles h3 {
  font-family: var(--font-inter);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--near-black);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: var(--whisper-border);
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles li {
  margin-bottom: var(--space-2);
}

.related-articles a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.related-articles a:hover {
  color: var(--notion-blue);
}

/* =============================================
   シェアボタン
   ============================================= */
.share-links {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--whisper-border);
}

.share-links-title {
  font-family: var(--font-inter);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: var(--space-3);
}

.share-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  border: var(--whisper-border);
  border-radius: var(--radius-md);
  color: var(--near-black);
  font-family: var(--font-inter);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--notion-white);
  transition: all 0.2s ease;
}

.share-buttons a:hover {
  border-color: var(--notion-blue);
  color: var(--notion-blue);
  background: rgba(0, 117, 222, 0.08);
}

/* =============================================
   フッター（本体 index.html と同一構造）
   ============================================= */
footer {
  background: var(--notion-white);
  border-top: var(--whisper-border);
  padding: var(--space-6) 0 var(--space-4);
  margin-top: var(--space-8);
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.footer-section h3 {
  font-family: var(--font-inter);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--near-black);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--space-2);
}

.footer-section a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.5;
}

.footer-section a:hover {
  color: var(--notion-blue);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: var(--whisper-border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--notion-blue);
}

.copyright {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-family: var(--font-inter);
}

/* =============================================
   ピルバッジ
   ============================================= */
.pill-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: rgba(0, 117, 222, 0.1);
  color: var(--notion-blue);
  border-radius: var(--radius-pill);
  font-family: var(--font-inter);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* =============================================
   スクロールトップ
   ============================================= */
.scroll-to-top {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--notion-blue);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 100;
  display: none;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: var(--notion-shadow);
}

.scroll-to-top:hover {
  transform: translateY(-2px);
  background: var(--notion-blue-hover);
  box-shadow: var(--notion-shadow-hover);
}

.scroll-to-top.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   レスポンシブデザイン
   ============================================= */
@media (max-width: 1080px) {
  .blog-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-3);
  }
}

@media (max-width: 768px) {
  :root {
    --space-6: 48px;
    --space-7: 64px;
    --space-8: 80px;
  }

  .blog-main {
    padding: var(--space-4) 0 var(--space-6);
  }

  .blog-container {
    gap: var(--space-4);
    padding: 0 var(--space-2);
  }

  .header-top {
    display: none;
  }

  .logo-text h1 {
    font-size: 1rem;
  }

  .logo-text p {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
    padding: var(--space-2) 0;
  }

  .blog-header {
    padding: var(--space-5) var(--space-2);
  }

  .blog-header h1 {
    font-size: 1.75rem;
  }

  .blog-header p {
    font-size: 1rem;
  }

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

  .article-title {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .featured-image {
    max-height: 280px;
  }

  .article-body {
    font-size: 1rem;
  }

  .article-body h2 {
    font-size: 1.375rem;
  }

  .article-body h3 {
    font-size: 1.125rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-2);
  }

  .scroll-to-top {
    bottom: var(--space-3);
    right: var(--space-3);
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .blog-container {
    padding: 0 var(--space-2);
  }

  .blog-content {
    padding: var(--space-2);
  }

  .blog-content h2 {
    font-size: 1rem;
  }

  .blog-thumbnail {
    height: 160px;
  }

  .article-header {
    margin-bottom: var(--space-4);
  }

  .article-title {
    font-size: 1.375rem;
  }

  .sidebar-widget,
  .sidebar-section {
    padding: var(--space-2);
  }
}
