/* ===== BLOG LAYOUT STYLES ===== */
/* style.css と同じカラー変数を使用。色の上書きは不要。 */

/* ===== BLOG HEADER ===== */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 14px 0;
}

/* ===== BLOG INDEX HERO ===== */
.blog-index-hero {
  background: var(--bg-secondary);
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.blog-index-hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); color: var(--text-primary); margin-bottom: 12px; }
.blog-index-hero p  { color: var(--text-secondary); }

/* ===== CATEGORY FILTER ===== */
.blog-categories { padding: 28px 0; border-bottom: 1px solid var(--border); }
.category-list { display: flex; gap: 10px; flex-wrap: wrap; }
.category-btn {
  padding: 7px 20px;
  border-radius: 50px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: var(--font);
  transition: all 0.25s ease;
}
.category-btn:hover,
.category-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

/* ===== ARTICLE GRID ===== */
.blog-article-list { padding: 56px 0; }
.article-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
}
.article-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.article-card-image {
  height: 190px;
  background: linear-gradient(135deg, rgba(56,128,255,0.08), rgba(96,165,250,0.14));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.article-card-content { padding: 22px 24px; }

.article-tag {
  display: inline-block;
  background: rgba(56,128,255,0.08);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.article-card-content h2 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.5; }
.article-card-content h2 a { color: inherit; transition: color 0.3s ease; }
.article-card-content h2 a:hover { color: var(--accent); }
.article-card-content p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta { display: flex; align-items: center; justify-content: space-between; }
.article-meta span { font-size: 0.77rem; color: var(--text-muted); }
.article-meta .read-more { font-size: 0.77rem; font-weight: 700; color: var(--accent); }

/* ===== BLOG FOOTER ===== */
.blog-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* ===== ARTICLE PAGE ===== */
.article-page { max-width: 740px; margin: 0 auto; padding: 72px 24px 100px; }

.article-header { margin-bottom: 44px; }
.article-header .article-tag { margin-bottom: 18px; font-size: 0.78rem; }
.article-header h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--text-primary); line-height: 1.4; margin-bottom: 22px; }

.article-header-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.83rem;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.article-eyecatch {
  height: 340px;
  background: linear-gradient(135deg, rgba(56,128,255,0.08), rgba(96,165,250,0.15));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 44px;
  letter-spacing: 0.05em;
}

/* ===== ARTICLE BODY ===== */
.article-body { font-size: 1rem; line-height: 1.95; color: var(--text-primary); }
.article-body h2 {
  font-size: 1.45rem;
  margin: 52px 0 18px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--text-primary);
}
.article-body h3 { font-size: 1.15rem; margin: 36px 0 14px; color: var(--text-primary); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 7px; line-height: 1.8; }
.article-body strong { font-weight: 700; color: var(--accent); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { opacity: 0.8; }

.highlight-box {
  background: rgba(56,128,255,0.06);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 26px 0;
}
.highlight-box p { margin: 0; }

.article-toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 32px 0 40px;
}
.article-toc h4 { font-size: 0.88rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.article-toc ol { margin: 0 0 0 18px; }
.article-toc li { font-size: 0.88rem; margin-bottom: 6px; }
.article-toc a { color: var(--accent); text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 32px;
  transition: gap 0.3s ease;
}
.back-link:hover { gap: 10px; }

/* ===== SIDEBAR LAYOUT ===== */
.blog-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 48px;
  align-items: start;
  padding: 40px 0 64px;
}

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

/* Article page inside sidebar — override standalone styles */
.blog-with-sidebar .article-page {
  max-width: none;
  margin: 0;
  padding: 0 0 64px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 20px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); font-size: 0.85rem; }
.breadcrumb-current { color: var(--text-secondary); }

/* ===== SIDEBAR ===== */
.blog-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 20px;
}
.sidebar-widget:last-child { margin-bottom: 0; }

.sidebar-widget-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Ranked article list */
.sidebar-article-list { list-style: none; }
.sidebar-article-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-article-item:first-child { padding-top: 0; }
.sidebar-article-item:last-child { border-bottom: none; padding-bottom: 0; }

.sidebar-rank {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.sidebar-rank.dim {
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.sidebar-article-info { min-width: 0; }
.sidebar-article-info a {
  font-size: 0.80rem;
  color: var(--text-primary);
  line-height: 1.5;
  transition: color 0.2s;
  display: block;
}
.sidebar-article-info a:hover { color: var(--accent); }
.sidebar-article-info .sidebar-date {
  font-size: 0.70rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}
.sidebar-coming { font-size: 0.80rem; color: var(--text-muted); }

/* Category list */
.sidebar-category-list { list-style: none; }
.sidebar-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-category-item:first-child { padding-top: 0; }
.sidebar-category-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-category-item a {
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
}
.sidebar-category-item a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
  flex-shrink: 0;
}
.sidebar-category-item a:hover { color: var(--accent); }
.sidebar-category-count {
  font-size: 0.70rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 8px;
  border-radius: 50px;
}

/* ===== ARTICLE CATEGORY TAG AS LINK ===== */
a.article-tag { text-decoration: none; transition: background 0.2s; }
a.article-tag:hover { background: rgba(56,128,255,0.15); }

/* ===== SNS SHARE ===== */
.share-section {
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.share-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.80rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); color: #fff; }
.share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.share-btn-x    { background: #000; }
.share-btn-line { background: #06c755; }
.share-btn-fb   { background: #1877f2; }

/* 上部シェア — ヘッダーと目次の間に挟まるため余白を調整 */
.share-section--top {
  margin-top: 0;
  padding-top: 24px;
  border-top: none;
  padding-bottom: 0;
  margin-bottom: 36px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .blog-with-sidebar { grid-template-columns: 1fr; gap: 32px; }
  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .sidebar-widget { margin-bottom: 0; }
}
@media (max-width: 768px) {
  .article-grid { grid-template-columns: 1fr; }
  .blog-sidebar { grid-template-columns: 1fr; }
}
