/* エッジコンピューティングハブ ブログ専用スタイルシート */

/* CSS変数（edge-computingサイトのカラースキーム） */
:root {
  --primary-blue: #3b82f6;
  --secondary-cyan: #06b6d4;
  --dark-bg: #0f172a;
  --mid-bg: #1e293b;
  --light-bg: #334155;
  --text-light: #cbd5e1;
  --text-white: #fff;
  --text-dark: #333;
  --card-bg: #fff;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* ブログ一覧ページ */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-blue);
}

.blog-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-content h2 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.blog-card-content h2 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-content h2 a:hover {
  color: var(--primary-blue);
}

.article-date {
  color: var(--secondary-cyan);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.article-summary {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.read-more:hover {
  color: var(--secondary-cyan);
  border-bottom-color: var(--secondary-cyan);
  transform: translateX(5px);
}

/* ブログ記事ページ - 2カラムレイアウト */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.main-content {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-light);
}

.article-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-content section {
  margin-bottom: 2.5rem;
}

.article-content h2 {
  font-size: 1.9rem;
  color: var(--text-dark);
  margin: 2.5rem 0 1.2rem 0;
  font-weight: 600;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--primary-blue);
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin: 2rem 0 1rem 0;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1.3rem;
  line-height: 1.9;
  color: var(--text-dark);
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  line-height: 1.8;
}

.article-content li {
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

.article-content strong {
  color: var(--primary-blue);
  font-weight: 600;
}

.article-content pre {
  background: #1e293b;
  color: #cbd5e1;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 4px solid var(--primary-blue);
}

.article-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-meta {
  color: var(--secondary-cyan);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* サイドバー */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.toc,
.ad-space,
.related-articles {
  background: var(--card-bg);
  padding: 1.8rem;
  border-radius: 15px;
  box-shadow: var(--shadow-light);
  margin-bottom: 2rem;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.toc h3,
.ad-space h3,
.related-articles h3 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 1.2rem;
  font-weight: 600;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--primary-blue);
}

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

.toc li {
  margin-bottom: 0.7rem;
}

.toc a {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: block;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
}

.toc a:hover {
  background: #f1f5f9;
  color: var(--secondary-cyan);
  padding-left: 1.2rem;
}

.ad-space {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(59, 130, 246, 0.2);
}

.ad-space p {
  color: #64748b;
  font-size: 1rem;
  font-weight: 500;
}

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

.related-articles li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.related-articles li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.related-articles a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  display: block;
  line-height: 1.5;
}

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

/* ヒーローセクション（記事ページ） */
.blog-article .hero {
  position: relative;
  margin: 0 0 2rem 0;
  border-radius: 15px;
  overflow: hidden;
  height: 400px;
}

.hero-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.hero-content {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
  padding: 2.5rem;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  color: white;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.hero-content .article-meta {
  color: var(--secondary-cyan);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-list {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1.5rem;
  }

  .article-content h2 {
    font-size: 1.6rem;
  }

  .article-content h3 {
    font-size: 1.3rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .blog-card-content {
    padding: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .toc,
  .ad-space,
  .related-articles {
    padding: 1.2rem;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

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