/* Notion Design System - Warm Minimalism */

/* ========================================
   Notion Design System - Warm Minimalism
   - セリフ見出し、ソフトなサーフェス
   - ウィスパーボーダー：1px solid rgba(0,0,0,0.08)
   - マルチレイヤーシャドウ
   - 8px ベース間隔システム
   - ピルバッジ (9999px radius)
   ======================================== */

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2563eb;
  color: #ffffff;
  padding: 8px 16px;
  z-index: 1001;
  font-weight: 600;
  transition: top 0.2s;
}

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

/* ========================================
   メインレイアウト
   ======================================== */
.blog-main {
  padding: 4rem 0 6rem;
  margin-top: var(--header-height, 80px);
  min-height: calc(100vh - var(--header-height, 80px));
  background: #fafafa;
}

.blog-container,
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 5%;
}

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

/* ========================================
   ブログ一覧ページ
   ======================================== */
.blog-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 5%;
  background: #fafafa;
}

.blog-list-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-list-header h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.blog-list-header p {
  font-size: 1.1rem;
  color: #6b7280;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

/* ブログカードグリッド */
.blog-cards {
  display: grid;
  gap: 2rem;
}

/* ブログカード - Notion スタイル */
.blog-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(37, 99, 235, 0.3);
}

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

/* カードサムネイル（アイキャッチ画像） */
.blog-card-image,
.blog-thumbnail {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* カードボディ */
.blog-content {
  padding: 1.5rem;
}

.blog-content time {
  display: block;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.blog-card-title,
.blog-content h2 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
}

.blog-card:hover .blog-card-title,
.blog-card:hover .blog-content h2 {
  color: #2563eb;
}

.blog-card-excerpt,
.article-summary {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 続きを読むリンク */
.read-more,
.blog-card-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: all 0.2s ease;
  gap: 0.375rem;
}

.read-more:hover,
.blog-card-link:hover {
  color: #1d4ed8;
  gap: 0.5rem;
}

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

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

/* ========================================
   記事詳細ページ
   ======================================== */
.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 5%;
  background: #fafafa;
}

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.article-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.article-meta time {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ヒーロー画像 (記事詳細ページ) */
.blog-hero-image {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* 記事本文 */
.article-content {
  color: #374151;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.article-content h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2.5rem 0 1.25rem;
  letter-spacing: -0.015em;
}

.article-content h2 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid #2563eb;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2rem 0 0.875rem;
  letter-spacing: -0.01em;
}

.article-content h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 1.5rem 0 0.625rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: #374151;
}

.article-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.article-content a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

.article-content ul,
.article-content ol {
  margin: 1.25rem 0 1.25rem 1.5rem;
  padding: 0;
}

.article-content li {
  color: #374151;
  margin-bottom: 0.625rem;
  line-height: 1.7;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.article-content blockquote {
  border-left: 3px solid #2563eb;
  margin: 1.5rem 0;
  padding: 0.75rem 0 0.75rem 1.25rem;
  color: #4b5563;
  font-style: italic;
  background: #f9fafb;
  border-radius: 0 8px 8px 0;
}

.article-content strong {
  color: #1a1a1a;
  font-weight: 600;
}

/* ハイライトボックス */
.highlight-box,
.data-reference {
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.highlight-box h3,
.data-reference h3 {
  margin-top: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* 目次 (TOC) */
.toc-container {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.toc-container summary {
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  list-style: none;
}

.toc-container summary::-webkit-details-marker {
  display: none;
}

.toc-list {
  margin: 0;
  padding-left: 1.2rem;
}

.toc-list li {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: #4b5563;
}

.toc-list .toc-sub {
  margin-left: 1.2rem;
  font-size: 0.875rem;
  list-style-type: disc;
}

.toc-list a {
  text-decoration: none;
  color: #2563eb;
}

.toc-list a:hover {
  text-decoration: underline;
}

/* 共有リンク */
.share-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.share-links-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-buttons a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #ffffff;
}

.share-buttons a:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

/* ========================================
   サイドバー (2 カラムレイアウト用)
   ======================================== */
.blog-sidebar,
.sidebar {
  position: sticky;
  top: calc(var(--header-height, 80px) + 1.5rem);
  align-self: start;
}

.sidebar-widget,
.sidebar-section {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sidebar-widget .widget-title,
.sidebar-section h3 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #1a1a1a;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  letter-spacing: -0.01em;
}

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

.widget-list li,
.sidebar-nav li {
  margin-bottom: 0.625rem;
}

.widget-list a,
.sidebar-nav a {
  color: #4b5563;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.25rem 0;
}

.widget-list a:hover,
.sidebar-nav a:hover {
  color: #2563eb;
}

.widget-content {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.6;
}

.widget-content p {
  margin: 0;
}

/* 広告ウィジェット */
.ad-widget,
.sidebar-ad {
  padding: 0.75rem;
  text-align: center;
  background: #f9fafb;
  border-radius: 6px;
}

.ad-widget .amazon-banner,
.ad-widget img,
.sidebar-ad img {
  max-width: 100%;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.ad-widget img:hover,
.sidebar-ad img:hover {
  opacity: 0.9;
}

.ad-widget a,
.sidebar-ad a {
  display: inline-block;
}

/* ピルバッジ */
.pill-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* ========================================
   フッター
   ======================================== */
.main-footer {
  background: #1a1a1a;
  color: #f9fafb;
  padding: 3rem 5% 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-section {
  min-width: 0;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 900px) {
  .blog-container,
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-list,
  .article-page {
    padding: 2rem 4%;
  }

  .blog-cards {
    gap: 1.5rem;
  }

  .blog-card-image,
  .blog-thumbnail {
    height: 180px;
  }

  .blog-content {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .blog-list-header h1 {
    font-size: 1.75rem;
  }

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

  .blog-hero-image {
    max-height: 280px;
  }
}
